{"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 — it already serves the /v2 endpoints as its tools. 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":{"McpToolJsonSchemaInput":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/McpToolJsonSchemaInput"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/McpToolJsonSchemaInput"}}]},"AutomationConfigJsonValueInput":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/AutomationConfigJsonValueInput"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationConfigJsonValueInput"}}]},"ProcessFlowJsonValueInput":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/ProcessFlowJsonValueInput"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ProcessFlowJsonValueInput"}}]},"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"}}]},"TriggerItemJsonValueInput":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/TriggerItemJsonValueInput"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TriggerItemJsonValueInput"}}]},"AdminDreamInputValueInput":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/AdminDreamInputValueInput"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdminDreamInputValueInput"}}]},"CodeStepInputJsonValueInput":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/CodeStepInputJsonValueInput"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CodeStepInputJsonValueInput"}}]},"CodeStepJsonValueInput":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/CodeStepJsonValueInput"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CodeStepJsonValueInput"}}]},"AutomationPolicyJsonValueInput":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/AutomationPolicyJsonValueInput"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationPolicyJsonValueInput"}}]},"ResolvedPolicyValueJsonInput":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/ResolvedPolicyValueJsonInput"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ResolvedPolicyValueJsonInput"}}]},"CaseJsonDataValueInput":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/CaseJsonDataValueInput"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CaseJsonDataValueInput"}}]},"McpToolJsonSchema":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/McpToolJsonSchema"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/McpToolJsonSchema"}}]},"AutomationConfigJsonValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/AutomationConfigJsonValue"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationConfigJsonValue"}}]},"ProcessFlowJsonValue":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/ProcessFlowJsonValue"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ProcessFlowJsonValue"}}]},"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"}}]},"TriggerItemJsonValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/TriggerItemJsonValue"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TriggerItemJsonValue"}}]},"AdminDreamInputValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/AdminDreamInputValue"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdminDreamInputValue"}}]},"CodeStepInputJsonValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/CodeStepInputJsonValue"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CodeStepInputJsonValue"}}]},"CodeStepJsonValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/CodeStepJsonValue"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CodeStepJsonValue"}}]},"AutomationPolicyJsonValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/AutomationPolicyJsonValue"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationPolicyJsonValue"}}]},"ResolvedPolicyValueJson":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/ResolvedPolicyValueJson"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ResolvedPolicyValueJson"}}]},"CaseJsonDataValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/CaseJsonDataValue"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CaseJsonDataValue"}}]}}},"paths":{"/v1/mcp":{"post":{"tags":["MCP"],"description":"MCP JSON-RPC endpoint (Streamable HTTP transport). Exposes every public API route as an LLM-callable tool. The handshake (initialize, ping, tools/list) is open; tool calls require Bearer auth.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response"}}},"get":{"tags":["MCP"],"description":"MCP Streamable HTTP: GET (server-initiated streaming) is not supported. Use POST. Without credentials it returns the RFC 9728 challenge so clients and scanners can discover the OAuth metadata.","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.","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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.","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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. The schedule fires against the agent's live build. The authenticated user owns the schedule. On a team with revisions, a repeating schedule for an Agent in an automation joins that automation's revisions: one matching a schedule the automation already runs fires at once, and a new one is saved to the automation's draft and fires once the draft is made active (see `pending_change`).","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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"},"pending_change":{"nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string"},"enabled":{"nullable":true,"type":"boolean"},"cron":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"task":{"nullable":true,"type":"string"}},"required":["automation_revision_id","enabled","cron","frequency","time","timezone","day","day_of_month","task"],"additionalProperties":false}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"`automation_runs_as_team`: the agent's automation runs as its team, which takes no personal schedules.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false,"description":"`automation_runs_as_team`: the agent's automation runs as its team, which takes no personal schedules."}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Schedule","deprecated":true},"get":{"operationId":"listAgentSchedules","tags":["Schedules"],"description":"List the schedules you own on an agent. Returns only your own schedules, whoever you are. Callers with an elevated team role can read every member's schedules on the agent, including who created each one, via `GET /agents/{agent_id}/schedules/all`.","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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"},"pending_change":{"nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string"},"enabled":{"nullable":true,"type":"boolean"},"cron":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"task":{"nullable":true,"type":"string"}},"required":["automation_revision_id","enabled","cron","frequency","time","timezone","day","day_of_month","task"],"additionalProperties":false}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at"],"additionalProperties":false},"description":"Schedules the authenticated user owns on this agent. Never another member's, regardless of the caller's role — see `GET /agents/{agent_id}/schedules/all` for the elevated all-users read."}},"required":["schedules"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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. A schedule that belongs to an automation with revisions keeps firing as its automation's active revision says: a change to its timing is saved to the automation's draft and takes effect when the draft is made active (see `pending_change`), while `enabled` applies at once.","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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"},"pending_change":{"nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string"},"enabled":{"nullable":true,"type":"boolean"},"cron":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"task":{"nullable":true,"type":"string"}},"required":["automation_revision_id","enabled","cron","frequency","time","timezone","day","day_of_month","task"],"additionalProperties":false}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"`automation_runs_as_team`: the agent's automation runs as its team, which takes no personal schedules; an update may only switch one off (`enabled: false`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false,"description":"`automation_runs_as_team`: the agent's automation runs as its team, which takes no personal schedules; an update may only switch one off (`enabled: false`)."}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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. Deleting a schedule that belongs to an automation with revisions stops it for its owner at once; the automation's revisions keep the schedule for anyone else subscribed to 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":"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"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","x-extensible-enum":["request","auto"]},"automations_migrated_at":{"nullable":true,"description":"ISO 8601 timestamp of the team's move to the Automations workspace, or null if it has not moved","type":"string"},"automation_revisions_migrated_at":{"nullable":true,"description":"ISO 8601 timestamp of the team's move to automation revisions, or null. Narrower than automations_migrated_at: a team can be on the workspace without revisions","type":"string"}},"required":["id","name","created_at","organization_id","slack_team_id","discovery_mode","automations_migrated_at","automation_revisions_migrated_at"],"additionalProperties":false}},"required":["team"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Team","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Check MCP OAuth","deprecated":true}},"/v1/artifacts":{"get":{"operationId":"listPulseDashboards","tags":["Duvo Pulse"],"description":"List your Duvo Pulse dashboards (live, agent-generated visualizations of your Duvo data). Ordered most recently updated first, except scope=automation, which is ordered by creation time (then id) so the whole scope can be read with the after_id cursor without a concurrent change shifting a page boundary.","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":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of results to skip"},{"schema":{"default":"created","type":"string","enum":["created","shared","team","automation"]},"in":"query","name":"scope","required":false,"description":"Which dashboards to return: 'created' (yours, the default), 'team' (published to your whole team by a teammate), 'shared' (shared with you individually by a teammate), or 'automation' (owned by one of your team's automations, each carrying its automation's name)."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"after_id","required":false,"description":"Keyset cursor for reading the whole 'automation' scope: the id of the last dashboard you received; returns the page after it in (created_at, id) order. Use this instead of 'offset' when reading every page, so a dashboard created, updated or deleted between requests cannot shift a page boundary you have already passed. 400 when the id no longer names a dashboard (restart from the first page). Only valid with scope=automation."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"artifacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string","format":"uuid"},"organization_id":{"nullable":true,"type":"string","format":"uuid"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"automation_name":{"description":"Name of the owning automation, resolved only on the `automation` list scope — the one surface that renders the composite `<Automation> / <Title>` label. Absent elsewhere; a client reads absence and null the same way.","nullable":true,"type":"string"},"created_by_user_id":{"type":"string","format":"uuid"},"title":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"html_code_present":{"type":"boolean"},"content_format":{"type":"string","description":"The substrate the dashboard is written in. New substrates are added over time.","x-extensible-enum":["html","openui","react"]},"status":{"type":"string","enum":["not_started","pending","running","completed","failed","interrupted"]},"visibility":{"type":"string","enum":["private","team","organization","teams"]},"publish_permission":{"type":"string","enum":["view","edit"]},"has_live_connector_data":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"last_refresh_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","team_id","organization_id","created_by_user_id","title","html_code_present","status","visibility","publish_permission","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["artifacts","total","limit","offset"],"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}}}}},"summary":"List Pulse Dashboards","deprecated":true},"post":{"operationId":"createPulseDashboard","tags":["Duvo Pulse"],"description":"Create a new Duvo Pulse dashboard from a natural-language prompt (e.g. 'open cases by queue this week') and dispatch the first generation turn. Generation is asynchronous — poll GET /artifacts/{artifactId} until status is completed. The dashboard is private to you unless you set visibility to 'team', which shares it with your whole team straight away — with permission 'view' (teammates see the dashboard) or 'edit' (teammates can also iterate on it).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":15000},"connection_ids":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}},"visibility":{"type":"string","enum":["private","team"]},"permission":{"type":"string","enum":["view","edit"]}},"required":["message"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid"},"user_message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"artifact_id":{"type":"string","format":"uuid"},"author_user_id":{"nullable":true,"type":"string","format":"uuid"},"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"},"created_at":{"type":"string"},"revision_id":{"nullable":true,"type":"string","format":"uuid"},"message":{"nullable":true},"selected_element":{"nullable":true,"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":2000},"label":{"type":"string","minLength":1,"maxLength":200},"tag_name":{"type":"string","minLength":1,"maxLength":50},"text":{"type":"string","maxLength":500},"outer_html":{"type":"string","minLength":1,"maxLength":4000},"point":{"type":"object","properties":{"x_ratio":{"type":"number","minimum":0,"maximum":1},"y_ratio":{"type":"number","minimum":0,"maximum":1}},"required":["x_ratio","y_ratio"],"additionalProperties":false},"openui_node":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":200},"component":{"type":"string","minLength":1,"maxLength":100},"source":{"type":"string","maxLength":2000}},"required":["statement","component"],"additionalProperties":false}},"required":["selector","label","tag_name","outer_html"],"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"attachment_id":{"type":"string","format":"uuid"},"filename":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","minimum":0,"maximum":26214400},"mime_type":{"type":"string","minLength":1,"maxLength":127},"sandbox_path":{"type":"string","minLength":1,"maxLength":512}},"required":["attachment_id","filename","size_bytes","mime_type","sandbox_path"],"additionalProperties":false}}},"required":["id","artifact_id","role","content","created_at"],"additionalProperties":false}},"required":["artifact_id","user_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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Pulse Dashboard","deprecated":true}},"/v1/artifacts/{artifactId}":{"get":{"operationId":"getPulseDashboard","tags":["Duvo Pulse"],"description":"Get a Duvo Pulse dashboard's metadata and generation status. When status is completed and html_code_present is true, fetch the rendered HTML from GET /artifacts/{artifactId}/render; the conversation is served by GET /artifacts/{artifactId}/messages.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string","format":"uuid"},"organization_id":{"nullable":true,"type":"string","format":"uuid"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"automation_name":{"description":"Name of the owning automation, resolved only on the `automation` list scope — the one surface that renders the composite `<Automation> / <Title>` label. Absent elsewhere; a client reads absence and null the same way.","nullable":true,"type":"string"},"created_by_user_id":{"type":"string","format":"uuid"},"title":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"html_code_present":{"type":"boolean"},"content_format":{"type":"string","description":"The substrate the dashboard is written in. New substrates are added over time.","x-extensible-enum":["html","openui","react"]},"status":{"type":"string","enum":["not_started","pending","running","completed","failed","interrupted"]},"visibility":{"type":"string","enum":["private","team","organization","teams"]},"publish_permission":{"type":"string","enum":["view","edit"]},"has_live_connector_data":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"last_refresh_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","team_id","organization_id","created_by_user_id","title","html_code_present","status","visibility","publish_permission","created_at","updated_at"],"additionalProperties":false},"is_creator":{"type":"boolean"},"can_edit":{"type":"boolean"},"render_enabled":{"type":"boolean"},"pending_question":{"description":"The question an update of this dashboard is paused on, waiting for the user's answer, or null when no update is waiting or the caller cannot edit the dashboard. The status stays running while it waits.","nullable":true,"type":"object","properties":{"tool_call_id":{"type":"string","description":"The question's toolCallId, which POST /artifacts/{artifactId}/answer takes."},"questions":{"minItems":1,"type":"array","items":{"type":"string"},"description":"The text of each question the update is waiting on."}},"required":["tool_call_id","questions"],"additionalProperties":false}},"required":["artifact","is_creator","can_edit"],"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}}}}},"summary":"Get Pulse Dashboard","deprecated":true},"patch":{"operationId":"updatePulseDashboard","tags":["Duvo Pulse"],"description":"Update a Duvo Pulse dashboard's settings — rename it. Only the creator can update it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120}},"required":["title"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string","format":"uuid"},"organization_id":{"nullable":true,"type":"string","format":"uuid"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"automation_name":{"description":"Name of the owning automation, resolved only on the `automation` list scope — the one surface that renders the composite `<Automation> / <Title>` label. Absent elsewhere; a client reads absence and null the same way.","nullable":true,"type":"string"},"created_by_user_id":{"type":"string","format":"uuid"},"title":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"html_code_present":{"type":"boolean"},"content_format":{"type":"string","description":"The substrate the dashboard is written in. New substrates are added over time.","x-extensible-enum":["html","openui","react"]},"status":{"type":"string","enum":["not_started","pending","running","completed","failed","interrupted"]},"visibility":{"type":"string","enum":["private","team","organization","teams"]},"publish_permission":{"type":"string","enum":["view","edit"]},"has_live_connector_data":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"last_refresh_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","team_id","organization_id","created_by_user_id","title","html_code_present","status","visibility","publish_permission","created_at","updated_at"],"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}}}}},"summary":"Update Pulse Dashboard","deprecated":true},"delete":{"operationId":"deletePulseDashboard","tags":["Duvo Pulse"],"description":"Delete a Duvo Pulse dashboard. Only the creator can delete it.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"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"}},"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}}}}},"summary":"Delete Pulse Dashboard","deprecated":true}},"/v1/artifacts/{artifactId}/render":{"get":{"operationId":"getPulseDashboardHtml","tags":["Duvo Pulse"],"description":"Serve a Duvo Pulse dashboard's rendered HTML document (text/html, not JSON). 404 until the first generation turn has produced HTML.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}},"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}}}}},"summary":"Get Pulse Dashboard Html","deprecated":true}},"/v1/artifacts/{artifactId}/export/pdf":{"get":{"operationId":"getPulseDashboardPdf","tags":["Duvo Pulse"],"description":"Render a Duvo Pulse dashboard to a PDF document (application/pdf, not JSON). 404 until the first generation turn has produced HTML; 409 for an openui dashboard, whose substrate this exporter cannot render.","parameters":[{"schema":{"default":"light","type":"string","enum":["light","dark"]},"in":"query","name":"theme","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"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}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Pulse Dashboard Pdf","deprecated":true}},"/v1/artifacts/{artifactId}/export/html":{"get":{"operationId":"exportPulseDashboardHtml","tags":["Duvo Pulse"],"description":"Render a Duvo Pulse dashboard to a self-contained static HTML snapshot (text/html, data baked in). 404 until the first generation turn has produced HTML; 409 for an openui dashboard, whose substrate this exporter cannot render.","parameters":[{"schema":{"default":"light","type":"string","enum":["light","dark"]},"in":"query","name":"theme","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}},"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}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Export Pulse Dashboard Html","deprecated":true}},"/v1/artifacts/{artifactId}/publish":{"post":{"operationId":"publishPulseDashboard","tags":["Duvo Pulse"],"description":"Publish (share) a Duvo Pulse dashboard to your whole team or your whole organization, or revert it to private (creator only). When publishing, set permission to 'view' (teammates see the dashboard) or 'edit' (teammates can also iterate on it); organization-wide viewers outside the team always get view-only access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"type":"string","enum":["private","team","organization"]},"permission":{"type":"string","enum":["view","edit"]}},"required":["visibility"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string","format":"uuid"},"organization_id":{"nullable":true,"type":"string","format":"uuid"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"automation_name":{"description":"Name of the owning automation, resolved only on the `automation` list scope — the one surface that renders the composite `<Automation> / <Title>` label. Absent elsewhere; a client reads absence and null the same way.","nullable":true,"type":"string"},"created_by_user_id":{"type":"string","format":"uuid"},"title":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"html_code_present":{"type":"boolean"},"content_format":{"type":"string","description":"The substrate the dashboard is written in. New substrates are added over time.","x-extensible-enum":["html","openui","react"]},"status":{"type":"string","enum":["not_started","pending","running","completed","failed","interrupted"]},"visibility":{"type":"string","enum":["private","team","organization","teams"]},"publish_permission":{"type":"string","enum":["view","edit"]},"has_live_connector_data":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"last_refresh_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","team_id","organization_id","created_by_user_id","title","html_code_present","status","visibility","publish_permission","created_at","updated_at"],"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}}}}},"summary":"Publish Pulse Dashboard","deprecated":true}},"/v1/artifacts/{artifactId}/duplicate":{"post":{"operationId":"duplicatePulseDashboard","tags":["Duvo Pulse"],"description":"Duplicate a Duvo Pulse dashboard, producing an idle clone of the current rendered dashboard. The conversation history, shares, and connections are not copied.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string","format":"uuid"},"organization_id":{"nullable":true,"type":"string","format":"uuid"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"automation_name":{"description":"Name of the owning automation, resolved only on the `automation` list scope — the one surface that renders the composite `<Automation> / <Title>` label. Absent elsewhere; a client reads absence and null the same way.","nullable":true,"type":"string"},"created_by_user_id":{"type":"string","format":"uuid"},"title":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"html_code_present":{"type":"boolean"},"content_format":{"type":"string","description":"The substrate the dashboard is written in. New substrates are added over time.","x-extensible-enum":["html","openui","react"]},"status":{"type":"string","enum":["not_started","pending","running","completed","failed","interrupted"]},"visibility":{"type":"string","enum":["private","team","organization","teams"]},"publish_permission":{"type":"string","enum":["view","edit"]},"has_live_connector_data":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"last_refresh_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","team_id","organization_id","created_by_user_id","title","html_code_present","status","visibility","publish_permission","created_at","updated_at"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Duplicate Pulse Dashboard","deprecated":true}},"/v1/artifacts/{artifactId}/messages":{"post":{"operationId":"sendPulseDashboardMessage","tags":["Duvo Pulse"],"description":"Send an instruction to iterate on a Duvo Pulse dashboard (e.g. 'make it a bar chart', 'filter to last 14 days'). The creator can always iterate; teammates can too when the Pulse is published to the team with edit access. The agent regenerates asynchronously — poll GET /artifacts/{artifactId} for status.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":15000},"from_revision_id":{"type":"string","format":"uuid"},"selected_element":{"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":2000},"label":{"type":"string","minLength":1,"maxLength":200},"tag_name":{"type":"string","minLength":1,"maxLength":50},"text":{"type":"string","maxLength":500},"outer_html":{"type":"string","minLength":1,"maxLength":4000},"point":{"type":"object","properties":{"x_ratio":{"type":"number","minimum":0,"maximum":1},"y_ratio":{"type":"number","minimum":0,"maximum":1}},"required":["x_ratio","y_ratio"]},"openui_node":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":200},"component":{"type":"string","minLength":1,"maxLength":100},"source":{"type":"string","maxLength":2000}},"required":["statement","component"]}},"required":["selector","label","tag_name","outer_html"]},"attachments":{"description":"Attachments to hand the agent, uploaded beforehand via the upload-urls endpoint (max 5)","maxItems":5,"type":"array","items":{"type":"object","properties":{"attachment_id":{"type":"string","format":"uuid","description":"An attachment_id returned by upload-urls"}},"required":["attachment_id"]}}},"required":["message"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"user_message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"artifact_id":{"type":"string","format":"uuid"},"author_user_id":{"nullable":true,"type":"string","format":"uuid"},"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"},"created_at":{"type":"string"},"revision_id":{"nullable":true,"type":"string","format":"uuid"},"message":{"nullable":true},"selected_element":{"nullable":true,"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":2000},"label":{"type":"string","minLength":1,"maxLength":200},"tag_name":{"type":"string","minLength":1,"maxLength":50},"text":{"type":"string","maxLength":500},"outer_html":{"type":"string","minLength":1,"maxLength":4000},"point":{"type":"object","properties":{"x_ratio":{"type":"number","minimum":0,"maximum":1},"y_ratio":{"type":"number","minimum":0,"maximum":1}},"required":["x_ratio","y_ratio"],"additionalProperties":false},"openui_node":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":200},"component":{"type":"string","minLength":1,"maxLength":100},"source":{"type":"string","maxLength":2000}},"required":["statement","component"],"additionalProperties":false}},"required":["selector","label","tag_name","outer_html"],"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"attachment_id":{"type":"string","format":"uuid"},"filename":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","minimum":0,"maximum":26214400},"mime_type":{"type":"string","minLength":1,"maxLength":127},"sandbox_path":{"type":"string","minLength":1,"maxLength":512}},"required":["attachment_id","filename","size_bytes","mime_type","sandbox_path"],"additionalProperties":false}}},"required":["id","artifact_id","role","content","created_at"],"additionalProperties":false}},"required":["user_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"},"missingAttachmentIds":{"description":"Attachment ids that are no longer usable and must be re-uploaded. Present only when the conflict was caused by attachments.","type":"array","items":{"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":"Send Pulse Dashboard Message","deprecated":true},"get":{"operationId":"listPulseDashboardMessages","tags":["Duvo Pulse"],"description":"List the chat transcript of a Duvo Pulse dashboard's live version (requires edit access). Returns the most recent page by default, oldest first within the page; pass `before` (a message id from a previous page) to walk back through older messages. Messages from other version branches are not included.","parameters":[{"schema":{"type":"integer","exclusiveMinimum":true,"maximum":500},"in":"query","name":"limit","required":false,"description":"Maximum number of messages to return (1-500, default 50)."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"before","required":false,"description":"Message id cursor: return the page of messages immediately older than this message. Omit for the most recent page."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"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"},"artifact_id":{"type":"string","format":"uuid"},"author_user_id":{"nullable":true,"type":"string","format":"uuid"},"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"},"created_at":{"type":"string"},"revision_id":{"nullable":true,"type":"string","format":"uuid"},"message":{"nullable":true},"selected_element":{"nullable":true,"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":2000},"label":{"type":"string","minLength":1,"maxLength":200},"tag_name":{"type":"string","minLength":1,"maxLength":50},"text":{"type":"string","maxLength":500},"outer_html":{"type":"string","minLength":1,"maxLength":4000},"point":{"type":"object","properties":{"x_ratio":{"type":"number","minimum":0,"maximum":1},"y_ratio":{"type":"number","minimum":0,"maximum":1}},"required":["x_ratio","y_ratio"],"additionalProperties":false},"openui_node":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":200},"component":{"type":"string","minLength":1,"maxLength":100},"source":{"type":"string","maxLength":2000}},"required":["statement","component"],"additionalProperties":false}},"required":["selector","label","tag_name","outer_html"],"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"attachment_id":{"type":"string","format":"uuid"},"filename":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","minimum":0,"maximum":26214400},"mime_type":{"type":"string","minLength":1,"maxLength":127},"sandbox_path":{"type":"string","minLength":1,"maxLength":512}},"required":["attachment_id","filename","size_bytes","mime_type","sandbox_path"],"additionalProperties":false}}},"required":["id","artifact_id","role","content","created_at"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"has_more":{"type":"boolean"}},"required":["data","total","has_more"],"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}}}}},"summary":"List Pulse Dashboard Messages","deprecated":true}},"/v1/artifacts/{artifactId}/attachments/upload-urls":{"post":{"operationId":"createPulseDashboardAttachmentUploadUrl","tags":["Duvo Pulse"],"description":"Issue a presigned upload URL for a file to attach to a Duvo Pulse dashboard message (e.g. an HTML dashboard to copy, or a screenshot to match). POST the file bytes to the returned upload_url as multipart form data under the field name 'file', then pass the returned attachment_id in the attachments array of POST /artifacts/{artifactId}/messages. The agent reads the file directly from its sandbox. Files live as long as the dashboard's sandbox (about 12 hours), so upload shortly before sending.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"description":"Name of the file being attached, without any path segments"},"mime_type":{"type":"string","minLength":1,"maxLength":127,"description":"MIME type of the file, e.g. text/html or image/png"},"size_bytes":{"type":"integer","minimum":0,"maximum":26214400,"description":"Size of the file in bytes (max 25MB)"}},"required":["filename","mime_type","size_bytes"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"attachment_id":{"type":"string","format":"uuid","description":"Echo this back in the message body's attachments array"},"sandbox_id":{"type":"string","description":"Sandbox the file will be uploaded into"},"sandbox_path":{"type":"string","description":"Absolute path the file will occupy inside the sandbox"},"upload_url":{"type":"string","maxLength":2048,"format":"uri","description":"Presigned URL to POST the file bytes to as multipart form data"},"expires_in_seconds":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Seconds until upload_url stops being accepted"}},"required":["attachment_id","sandbox_id","sandbox_path","upload_url","expires_in_seconds"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Pulse Dashboard Attachment Upload URL","deprecated":true}},"/v1/artifacts/{artifactId}/attachments/{attachmentId}/download-url":{"get":{"operationId":"getPulseDashboardAttachmentDownloadUrl","tags":["Duvo Pulse"],"description":"Mint a short-lived presigned URL to download or preview a file attached to a Duvo Pulse dashboard message. Returns 410 with code `sandbox_expired` once data retention deleted the dashboard's sandbox, and 404 when the file is otherwise gone.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attachmentId","required":true,"description":"The attachment to mint a download URL for"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"download_url":{"type":"string","maxLength":2048,"format":"uri","description":"Presigned URL to GET the file bytes from"},"expires_in_seconds":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Seconds until download_url stops being accepted"}},"required":["download_url","expires_in_seconds"],"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}}}},"410":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"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 Pulse Dashboard Attachment Download URL","deprecated":true}},"/v1/artifacts/{artifactId}/refresh":{"post":{"operationId":"refreshPulseDashboard","tags":["Duvo Pulse"],"description":"Trigger an on-demand data refresh of a Duvo Pulse dashboard. The dashboard regenerates its connection-sourced values in the background — poll GET /artifacts/{artifactId} for status.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string","format":"uuid"},"organization_id":{"nullable":true,"type":"string","format":"uuid"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"automation_name":{"description":"Name of the owning automation, resolved only on the `automation` list scope — the one surface that renders the composite `<Automation> / <Title>` label. Absent elsewhere; a client reads absence and null the same way.","nullable":true,"type":"string"},"created_by_user_id":{"type":"string","format":"uuid"},"title":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"html_code_present":{"type":"boolean"},"content_format":{"type":"string","description":"The substrate the dashboard is written in. New substrates are added over time.","x-extensible-enum":["html","openui","react"]},"status":{"type":"string","enum":["not_started","pending","running","completed","failed","interrupted"]},"visibility":{"type":"string","enum":["private","team","organization","teams"]},"publish_permission":{"type":"string","enum":["view","edit"]},"has_live_connector_data":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"last_refresh_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","team_id","organization_id","created_by_user_id","title","html_code_present","status","visibility","publish_permission","created_at","updated_at"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Refresh Pulse Dashboard","deprecated":true}},"/v1/artifacts/{artifactId}/stop":{"post":{"operationId":"stopPulseDashboardMessage","tags":["Duvo Pulse"],"description":"Stop an in-flight Duvo Pulse generation turn. Requires edit access to the dashboard. Flips the dashboard to 'interrupted' and keeps any streamed-so-far reply; stopping when nothing is generating is a successful no-op.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"partial_text":{"description":"The assistant text streamed so far, kept in the conversation as the partial reply. Omit when calling from an API client without streaming state.","type":"string"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string","format":"uuid"},"organization_id":{"nullable":true,"type":"string","format":"uuid"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"automation_name":{"description":"Name of the owning automation, resolved only on the `automation` list scope — the one surface that renders the composite `<Automation> / <Title>` label. Absent elsewhere; a client reads absence and null the same way.","nullable":true,"type":"string"},"created_by_user_id":{"type":"string","format":"uuid"},"title":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"html_code_present":{"type":"boolean"},"content_format":{"type":"string","description":"The substrate the dashboard is written in. New substrates are added over time.","x-extensible-enum":["html","openui","react"]},"status":{"type":"string","enum":["not_started","pending","running","completed","failed","interrupted"]},"visibility":{"type":"string","enum":["private","team","organization","teams"]},"publish_permission":{"type":"string","enum":["view","edit"]},"has_live_connector_data":{"type":"boolean"},"thumbnail_url":{"nullable":true,"type":"string"},"last_refresh_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","team_id","organization_id","created_by_user_id","title","html_code_present","status","visibility","publish_permission","created_at","updated_at"],"additionalProperties":false}},"required":["artifact"],"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":"Stop Pulse Dashboard Message","deprecated":true}},"/v1/artifacts/{artifactId}/connections":{"get":{"operationId":"listPulseDashboardConnections","tags":["Duvo Pulse"],"description":"List the connections (data sources) attached to a Duvo Pulse dashboard (requires edit access).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"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"},"integration_id":{"nullable":true,"type":"string","format":"uuid"},"custom_integration_id":{"nullable":true,"type":"string","format":"uuid"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"resolved_via":{"default":"attachment","type":"string","enum":["attachment","slot"]}},"required":["connection_id","integration_id","custom_integration_id","type","created_at","resolved_via"],"additionalProperties":false}},"missing_connections":{"default":[],"type":"array","items":{"type":"object","properties":{"integration_id":{"nullable":true,"type":"string","format":"uuid"},"custom_integration_id":{"nullable":true,"type":"string","format":"uuid"},"type":{"type":"string"},"name":{"type":"string"},"restricted_by_organization":{"default":false,"type":"boolean"}},"required":["integration_id","custom_integration_id","type","name","restricted_by_organization"],"additionalProperties":false}}},"required":["connections","missing_connections"],"additionalProperties":false}}}},"401":{"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}}}}},"summary":"List Pulse Dashboard Connections","deprecated":true},"post":{"operationId":"attachPulseDashboardConnection","tags":["Duvo Pulse"],"description":"Attach one of your connections (data sources) to a Duvo Pulse dashboard so the agent can use its tools (requires edit access).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connection_id":{"type":"string","format":"uuid"}},"required":["connection_id"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"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"}},"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}}}}},"summary":"Attach Pulse Dashboard Connection","deprecated":true}},"/v1/artifacts/{artifactId}/connections/{connectionId}":{"delete":{"operationId":"detachPulseDashboardConnection","tags":["Duvo Pulse"],"description":"Detach a connection (data source) from a Duvo Pulse dashboard (requires edit access).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"connectionId","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"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Detach Pulse Dashboard Connection","deprecated":true}},"/v1/artifacts/{artifactId}/answer":{"post":{"operationId":"answerPulseDashboardQuestion","tags":["Duvo Pulse"],"description":"Answer a pending question the Duvo Pulse agent asked and resume the paused run (creator or team editors). Use the toolCallId from the dashboard's message transcript.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"toolCallId":{"type":"string","minLength":1},"answers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["toolCallId","answers"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"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}}}}},"summary":"Answer Pulse Dashboard Question","deprecated":true}},"/v1/artifacts/{artifactId}/comments":{"get":{"operationId":"listPulseDashboardComments","tags":["Duvo Pulse"],"description":"List the comment threads on a Duvo Pulse dashboard (requires view access). Each thread carries its author, the dashboard element it is pinned to, its replies oldest-first, and whether it has been marked complete.","parameters":[{"schema":{"type":"integer","exclusiveMinimum":true,"maximum":200},"in":"query","name":"limit","required":false,"description":"Maximum number of comment threads to return (1-200, default 50)."},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of comment threads to skip, for paging."},{"schema":{"type":"string","enum":["open","complete"]},"in":"query","name":"status","required":false,"description":"Return only threads in this state: `open` for threads not yet marked complete, `complete` for those that are. Omit for both. `total` and `open_total` always count the whole set, so a filtered page still reports how many threads exist."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"artifact_id":{"type":"string","format":"uuid"},"author":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","name","email"],"additionalProperties":false},"body":{"type":"string"},"element":{"nullable":true,"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":2000},"label":{"type":"string","minLength":1,"maxLength":200},"tag_name":{"type":"string","minLength":1,"maxLength":50},"text":{"type":"string","maxLength":500},"outer_html":{"type":"string","minLength":1,"maxLength":4000},"point":{"type":"object","properties":{"x_ratio":{"type":"number","minimum":0,"maximum":1},"y_ratio":{"type":"number","minimum":0,"maximum":1}},"required":["x_ratio","y_ratio"],"additionalProperties":false},"openui_node":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":200},"component":{"type":"string","minLength":1,"maxLength":100},"source":{"type":"string","maxLength":2000}},"required":["statement","component"],"additionalProperties":false}},"required":["selector","label","tag_name","outer_html"],"additionalProperties":false},"revision_id":{"nullable":true,"type":"string","format":"uuid"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by":{"nullable":true,"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","name","email"],"additionalProperties":false},"deleted_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"artifact_id":{"type":"string","format":"uuid"},"parent_comment_id":{"type":"string","format":"uuid"},"author":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","name","email"],"additionalProperties":false},"body":{"type":"string"},"deleted_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","artifact_id","parent_comment_id","author","body","deleted_at","created_at","updated_at"],"additionalProperties":false}}},"required":["id","artifact_id","author","body","element","revision_id","resolved_at","resolved_by","deleted_at","created_at","updated_at","replies"],"additionalProperties":false}},"total":{"type":"number"},"open_total":{"type":"number"}},"required":["comments","total","open_total"],"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}}}}},"summary":"List Pulse Dashboard Comments","deprecated":true},"post":{"operationId":"createPulseDashboardComment","tags":["Duvo Pulse"],"description":"Start a comment thread on a Duvo Pulse dashboard (requires view access). Pass `element` — captured from the dashboard canvas — to pin the thread to one element; omit it for a comment on the dashboard as a whole.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000},"element":{"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":2000},"label":{"type":"string","minLength":1,"maxLength":200},"tag_name":{"type":"string","minLength":1,"maxLength":50},"text":{"type":"string","maxLength":500},"outer_html":{"type":"string","minLength":1,"maxLength":4000},"point":{"type":"object","properties":{"x_ratio":{"type":"number","minimum":0,"maximum":1},"y_ratio":{"type":"number","minimum":0,"maximum":1}},"required":["x_ratio","y_ratio"]},"openui_node":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":200},"component":{"type":"string","minLength":1,"maxLength":100},"source":{"type":"string","maxLength":2000}},"required":["statement","component"]}},"required":["selector","label","tag_name","outer_html"]},"revision_id":{"type":"string","format":"uuid"}},"required":["body"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"artifact_id":{"type":"string","format":"uuid"},"author":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","name","email"],"additionalProperties":false},"body":{"type":"string"},"element":{"nullable":true,"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":2000},"label":{"type":"string","minLength":1,"maxLength":200},"tag_name":{"type":"string","minLength":1,"maxLength":50},"text":{"type":"string","maxLength":500},"outer_html":{"type":"string","minLength":1,"maxLength":4000},"point":{"type":"object","properties":{"x_ratio":{"type":"number","minimum":0,"maximum":1},"y_ratio":{"type":"number","minimum":0,"maximum":1}},"required":["x_ratio","y_ratio"],"additionalProperties":false},"openui_node":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":200},"component":{"type":"string","minLength":1,"maxLength":100},"source":{"type":"string","maxLength":2000}},"required":["statement","component"],"additionalProperties":false}},"required":["selector","label","tag_name","outer_html"],"additionalProperties":false},"revision_id":{"nullable":true,"type":"string","format":"uuid"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by":{"nullable":true,"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","name","email"],"additionalProperties":false},"deleted_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"artifact_id":{"type":"string","format":"uuid"},"parent_comment_id":{"type":"string","format":"uuid"},"author":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","name","email"],"additionalProperties":false},"body":{"type":"string"},"deleted_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","artifact_id","parent_comment_id","author","body","deleted_at","created_at","updated_at"],"additionalProperties":false}}},"required":["id","artifact_id","author","body","element","revision_id","resolved_at","resolved_by","deleted_at","created_at","updated_at","replies"],"additionalProperties":false}},"required":["comment"],"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}}}}},"summary":"Create Pulse Dashboard Comment","deprecated":true}},"/v1/artifacts/{artifactId}/comments/{commentId}/replies":{"post":{"operationId":"createPulseDashboardCommentReply","tags":["Duvo Pulse"],"description":"Reply to a comment thread on a Duvo Pulse dashboard (requires view access). `commentId` must be a thread root; threads are one level deep. A thread already marked complete still accepts replies and stays complete.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000}},"required":["body"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"commentId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"reply":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"artifact_id":{"type":"string","format":"uuid"},"parent_comment_id":{"type":"string","format":"uuid"},"author":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","name","email"],"additionalProperties":false},"body":{"type":"string"},"deleted_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","artifact_id","parent_comment_id","author","body","deleted_at","created_at","updated_at"],"additionalProperties":false}},"required":["reply"],"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}}}}},"summary":"Create Pulse Dashboard Comment Reply","deprecated":true}},"/v1/artifacts/{artifactId}/comments/{commentId}/resolution":{"post":{"operationId":"setPulseDashboardCommentResolution","tags":["Duvo Pulse"],"description":"Mark a Duvo Pulse dashboard comment thread complete, or reopen it (requires view access). Pass the target state in `resolved`; the call is idempotent, and the response carries the thread with `resolved_at` and `resolved_by` set or cleared.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resolved":{"type":"boolean"}},"required":["resolved"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"commentId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"artifact_id":{"type":"string","format":"uuid"},"author":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","name","email"],"additionalProperties":false},"body":{"type":"string"},"element":{"nullable":true,"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":2000},"label":{"type":"string","minLength":1,"maxLength":200},"tag_name":{"type":"string","minLength":1,"maxLength":50},"text":{"type":"string","maxLength":500},"outer_html":{"type":"string","minLength":1,"maxLength":4000},"point":{"type":"object","properties":{"x_ratio":{"type":"number","minimum":0,"maximum":1},"y_ratio":{"type":"number","minimum":0,"maximum":1}},"required":["x_ratio","y_ratio"],"additionalProperties":false},"openui_node":{"type":"object","properties":{"statement":{"type":"string","minLength":1,"maxLength":200},"component":{"type":"string","minLength":1,"maxLength":100},"source":{"type":"string","maxLength":2000}},"required":["statement","component"],"additionalProperties":false}},"required":["selector","label","tag_name","outer_html"],"additionalProperties":false},"revision_id":{"nullable":true,"type":"string","format":"uuid"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by":{"nullable":true,"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","name","email"],"additionalProperties":false},"deleted_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"artifact_id":{"type":"string","format":"uuid"},"parent_comment_id":{"type":"string","format":"uuid"},"author":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["user_id","name","email"],"additionalProperties":false},"body":{"type":"string"},"deleted_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","artifact_id","parent_comment_id","author","body","deleted_at","created_at","updated_at"],"additionalProperties":false}}},"required":["id","artifact_id","author","body","element","revision_id","resolved_at","resolved_by","deleted_at","created_at","updated_at","replies"],"additionalProperties":false}},"required":["comment"],"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}}}}},"summary":"Set Pulse Dashboard Comment Resolution","deprecated":true}},"/v1/artifacts/{artifactId}/comments/{commentId}":{"delete":{"operationId":"deletePulseDashboardComment","tags":["Duvo Pulse"],"description":"Delete a comment or reply on a Duvo Pulse dashboard. Allowed for the comment's author and for the dashboard's creator. Deleting a thread root keeps its replies, rendered under a deleted opening comment.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"commentId","required":true}],"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"}},"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}}}}},"summary":"Delete Pulse Dashboard Comment","deprecated":true}},"/v1/artifacts/{artifactId}/revisions":{"get":{"operationId":"listPulseDashboardVersions","tags":["Duvo Pulse"],"description":"List the version history of a Duvo Pulse dashboard, newest first (requires edit access). Use the version id with the restore and version-render endpoints.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"artifact_id":{"type":"string","format":"uuid"},"version":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"parent_revision_id":{"nullable":true,"type":"string","format":"uuid"},"restored_from_version":{"nullable":true,"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"content_format":{"type":"string","description":"The substrate the dashboard is written in. New substrates are added over time.","x-extensible-enum":["html","openui","react"]},"author":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"}},"required":["id","name"],"additionalProperties":false},"change_summary":{"nullable":true,"type":"string"},"created_at":{"type":"string"}},"required":["id","artifact_id","version","parent_revision_id","restored_from_version","created_at"],"additionalProperties":false}},"total":{"type":"number"},"current_revision_id":{"nullable":true,"type":"string","format":"uuid"},"current_version":{"nullable":true,"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["revisions","total","current_revision_id","current_version"],"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}}}}},"summary":"List Pulse Dashboard Versions","deprecated":true}},"/v1/artifacts/{artifactId}/revisions/{revisionId}/render":{"get":{"operationId":"getPulseDashboardVersionHtml","tags":["Duvo Pulse"],"description":"Serve a specific version's rendered HTML document for a Duvo Pulse dashboard (text/html, requires edit access).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"revisionId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}},"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}}}}},"summary":"Get Pulse Dashboard Version Html","deprecated":true}},"/v1/artifacts/{artifactId}/revisions/{revisionId}/restore":{"post":{"operationId":"restorePulseDashboardVersion","tags":["Duvo Pulse"],"description":"Restore a previous version of a Duvo Pulse dashboard, making it live again (requires edit access). Non-destructive — it moves the head pointer to the chosen version.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"artifactId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"revisionId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"current_revision_id":{"type":"string","format":"uuid"},"current_version":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["success","current_revision_id","current_version"],"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}}}}},"summary":"Restore Pulse Dashboard Version","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"410":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"410":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"410":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 (Run).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true,"description":"The agent's unique identifier (Agent ID)"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"runId","required":true,"description":"The run's unique identifier (Run 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},"rubrics":{"description":"The Agent-specific rubrics this evaluation scored, as they were when the Run was judged.","type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}},"required":["slug","title","description"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 target revision's custom rubrics, and only `custom__*` rubric flags. Defaults to 'all' (platform + custom rubrics)."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"revision_id","required":false,"description":"Target a specific Assignment revision instead of the live revision. Only honoured when scope='custom' — non-custom scopes aggregate across all revisions. Defaults to the live revision 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":{"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 Run is scored against: the platform default rubrics plus the Agent-specific rubrics for a build. Defaults to the Agent's live build; pass build_id to target the revision a specific Run 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 Run 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Eval Rubrics","deprecated":true},"post":{"operationId":"createEvalRubric","tags":["Agents"],"description":"Add one Agent-specific evaluation rubric to a build. A build may hold at most 5 custom rubrics by default (25 on teams with the newer rubric generator enabled); this fails with 409 once the build's ceiling is reached, and the error message states it. Defaults to the Agent's live build; pass build_id to target a specific revision.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short, human-readable Pass/Fail rubric title."},"description":{"type":"string","minLength":20,"maxLength":400,"description":"A 1-2 sentence Pass condition phrased as a question."},"build_id":{"description":"Add the rubric to this build (revision). Defaults to the agent's live build when omitted.","type":"string","format":"uuid"},"selected_automation_revision_id":{"description":"The automation revision this edit is being made at. Pass a draft and the edit is folded into that draft itself; pass the active revision and the edit lands on a draft branched from it. A historic revision is rejected — it cannot be activated from without an explicit rebase. A revision belonging to a different automation is ignored, and the edit targets the automation the addressed agent belongs to. Omit to target the automation's active revision.","nullable":true,"type":"string","format":"uuid"}},"required":["title","description"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true,"description":"The agent's unique identifier (Assignment ID)"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"rubric":{"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}},"required":["rubric"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Eval Rubric","deprecated":true},"put":{"operationId":"replaceEvalRubrics","tags":["Agents"],"description":"Replace a build's entire Agent-specific evaluation rubric set in one call (at most 5 rubrics by default, 25 on teams with the newer rubric generator enabled). Existing custom rubrics are removed and the supplied list becomes the new set; pass an empty array to clear them. Defaults to the Agent's live build; pass build_id to target a specific revision.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rubrics":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short, human-readable Pass/Fail rubric title."},"description":{"type":"string","minLength":20,"maxLength":400,"description":"A 1-2 sentence Pass condition phrased as a question."}},"required":["title","description"],"additionalProperties":false},"description":"The complete custom rubric set for the build. Replaces every existing custom rubric; pass an empty array to clear them."},"build_id":{"description":"Replace the custom rubrics on this build (revision). Defaults to the agent's live build when omitted.","type":"string","format":"uuid"},"selected_automation_revision_id":{"description":"The automation revision this edit is being made at. Pass a draft and the edit is folded into that draft itself; pass the active revision and the edit lands on a draft branched from it. A historic revision is rejected — it cannot be activated from without an explicit rebase. A revision belonging to a different automation is ignored, and the edit targets the automation the addressed agent belongs to. Omit to target the automation's active revision.","nullable":true,"type":"string","format":"uuid"}},"required":["rubrics"],"additionalProperties":false}}}},"parameters":[{"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}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Replace Eval Rubrics","deprecated":true}},"/v1/agents/{agentId}/eval-rubrics/{rubricId}":{"patch":{"operationId":"updateEvalRubric","tags":["Agents"],"description":"Edit a single Agent-specific evaluation rubric's title and/or description. The edit produces a NEW rubric (with a new id and slug) so previously scored Runs stay attributed to the original criterion; the response contains the new rubric.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short, human-readable Pass/Fail rubric title."},"description":{"type":"string","minLength":20,"maxLength":400,"description":"A 1-2 sentence Pass condition phrased as a question."},"selected_automation_revision_id":{"description":"The automation revision this edit is being made at. Pass a draft and the edit is folded into that draft itself; pass the active revision and the edit lands on a draft branched from it. A historic revision is rejected — it cannot be activated from without an explicit rebase. A revision belonging to a different automation is ignored, and the edit targets the automation the addressed agent belongs to. Omit to target the automation's active revision.","nullable":true,"type":"string","format":"uuid"}},"additionalProperties":false}}}},"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":"rubricId","required":true,"description":"The custom rubric's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"rubric":{"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}},"required":["rubric"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Eval Rubric","deprecated":true},"delete":{"operationId":"deleteEvalRubric","tags":["Agents"],"description":"Remove a single Agent-specific evaluation rubric. Future Runs on the build are no longer scored against it.","parameters":[{"schema":{"nullable":true,"type":"string","format":"uuid"},"in":"query","name":"selected_automation_revision_id","required":false,"description":"The automation revision this edit is being made at. Pass a draft and the edit is folded into that draft itself; pass the active revision and the edit lands on a draft branched from it. A historic revision is rejected — it cannot be activated from without an explicit rebase. A revision belonging to a different automation is ignored, and the edit targets the automation the addressed agent belongs to. Omit to target the automation's active revision."},{"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":"rubricId","required":true,"description":"The custom rubric'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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Eval Rubric","deprecated":true}},"/v1/agents/{agent_id}/schedules/all":{"get":{"operationId":"listAllAgentSchedules","tags":["Schedules"],"description":"List every team member's schedules on an agent, including who created each one. Requires an elevated team role; callers without one receive 403 and should use `GET /agents/{agent_id}/schedules`, which returns only the schedules they own.","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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"},"pending_change":{"nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string"},"enabled":{"nullable":true,"type":"boolean"},"cron":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"task":{"nullable":true,"type":"string"}},"required":["automation_revision_id","enabled","cron","frequency","time","timezone","day","day_of_month","task"],"additionalProperties":false}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at"],"additionalProperties":false},"description":"Every schedule on this agent, across all team members. Each row carries `user_id` plus the `user_name` and `user_email` of the member who created it."},"truncated":{"type":"boolean","description":"True when the agent has more schedules than one response can carry and some were omitted. The rows returned are the oldest by `created_at`."}},"required":["schedules","truncated"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List All Agent Schedules","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}},"pending_change":{"description":"On a team with revisions, a change to this trigger saved to the automation's draft. The trigger keeps its current values until the draft is made active. Null when nothing is waiting.","nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string","description":"The automation's draft revision that holds the change"},"case_queue_id":{"nullable":true,"description":"The queue the draft routes to this agent, or null when the draft takes the trigger away","type":"string"},"enabled":{"type":"boolean","description":"Whether the trigger will be on once the draft is made active"}},"required":["automation_revision_id","case_queue_id","enabled"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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":"Concurrency cap for the target queue. The cap is queue-wide, so this affects every Agent working the queue, not just this trigger. Only 1 (run cases one at a time) or null (reset the whole queue's cap to the platform default) can be set here; higher caps are configured per-queue via PATCH /v2/admin/case-queues/{queueId}/concurrency. Omit to leave the queue's current cap unchanged.","nullable":true,"type":"number","enum":[1]}},"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}},"pending_change":{"description":"On a team with revisions, a change to this trigger saved to the automation's draft. The trigger keeps its current values until the draft is made active. Null when nothing is waiting.","nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string","description":"The automation's draft revision that holds the change"},"case_queue_id":{"nullable":true,"description":"The queue the draft routes to this agent, or null when the draft takes the trigger away","type":"string"},"enabled":{"type":"boolean","description":"Whether the trigger will be on once the draft is made active"}},"required":["automation_revision_id","case_queue_id","enabled"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 queue. Does not modify the trigger.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"case_queue_id","required":true,"description":"The 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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}},"pending_change":{"description":"On a team with revisions, a change to this trigger saved to the automation's draft. The trigger keeps its current values until the draft is made active. Null when nothing is waiting.","nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string","description":"The automation's draft revision that holds the change"},"case_queue_id":{"nullable":true,"description":"The queue the draft routes to this agent, or null when the draft takes the trigger away","type":"string"},"enabled":{"type":"boolean","description":"Whether the trigger will be on once the draft is made active"}},"required":["automation_revision_id","case_queue_id","enabled"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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, and only a builder/admin can change queue concurrency.","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":"Concurrency cap for the trigger's queue. The cap is queue-wide, so this affects every Agent working the queue, not just this trigger. Only 1 (run cases one at a time) or null (reset the whole queue's cap to the platform default) can be set here; higher caps are configured per-queue via PATCH /v2/admin/case-queues/{queueId}/concurrency. Omit to leave the current value unchanged.","nullable":true,"type":"number","enum":[1]}}}}}},"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}},"pending_change":{"description":"On a team with revisions, a change to this trigger saved to the automation's draft. The trigger keeps its current values until the draft is made active. Null when nothing is waiting.","nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string","description":"The automation's draft revision that holds the change"},"case_queue_id":{"nullable":true,"description":"The queue the draft routes to this agent, or null when the draft takes the trigger away","type":"string"},"enabled":{"type":"boolean","description":"Whether the trigger will be on once the draft is made active"}},"required":["automation_revision_id","case_queue_id","enabled"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 (Agent in the Duvo UI). Triggers start a Run 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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"shared_with_automation":{"type":"boolean","description":"Whether this trigger is the caller's subscription to a trigger in its automation's revisions. Its filter is then shared with every teammate subscribed to it, and changing the filter changes the automation's draft, which needs someone who can edit the agent. Pausing, reconnecting or deleting it stays the caller's own."},"pending_change":{"description":"Set on a trigger that belongs to an automation with revisions when its draft changes this trigger. Null otherwise.","nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string","description":"The automation's draft revision that holds the change."},"enabled":{"nullable":true,"description":"True while the draft keeps the trigger, null when the draft removes it. Never false: a revision has no switch of its own, so turning a trigger off for everyone is removing it.","type":"boolean"},"filter_config":{"nullable":true,"description":"The filter the trigger uses once the draft is made active. Null when the draft removes it.","type":"object","additionalProperties":{}}},"required":["automation_revision_id","enabled","filter_config"],"additionalProperties":false}},"required":["id","agent_id","user_id","integration_slug","trigger_type","filter_config","integration_instance_id","enabled","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at","shared_with_automation"],"additionalProperties":false}},"versioned_with_automation":{"type":"boolean","description":"True when the agent belongs to an automation on a team whose triggers or schedules are folded into the automation's revisions, so a trigger added to it joins those revisions: it subscribes to a trigger a teammate already has with the same settings, and adding new settings changes the automation's draft, which needs someone who can edit the agent. Each existing trigger says for itself whether it is shared, in `shared_with_automation`."}},"required":["triggers","versioned_with_automation"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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. 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. An agent holds one trigger per integration for a user, so a save with a different `trigger_type` replaces the existing one — except when that trigger is an @mention trigger, which is managed from the agent's mention setting and answers 409 (`mention_trigger_protected`) here. @mention triggers are best managed from that setting throughout: this route leaves an existing one's `filter_config` untouched, and refuses to create a `teams_mention` trigger without a `filter_config.tenantId` (400, `mention_trigger_workspace_required`) — a Slack mention trigger has no equivalent field to supply.","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. Integrations that enumerate their trigger types (Microsoft Teams, Google Drive, Google Sheets) reject anything else with 400 (`trigger_type_unsupported`), except a save that pauses a trigger already carrying that type."},"filter_config":{"description":"Integration-specific filter config (e.g. sender/subject filters). Shape comes from the integration's filter schema. Replaces the trigger's current config, so send the whole object — except on an @mention trigger, whose config is managed from the agent's mention setting and is left as it is.","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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"shared_with_automation":{"type":"boolean","description":"Whether this trigger is the caller's subscription to a trigger in its automation's revisions. Its filter is then shared with every teammate subscribed to it, and changing the filter changes the automation's draft, which needs someone who can edit the agent. Pausing, reconnecting or deleting it stays the caller's own."},"pending_change":{"description":"Set on a trigger that belongs to an automation with revisions when its draft changes this trigger. Null otherwise.","nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string","description":"The automation's draft revision that holds the change."},"enabled":{"nullable":true,"description":"True while the draft keeps the trigger, null when the draft removes it. Never false: a revision has no switch of its own, so turning a trigger off for everyone is removing it.","type":"boolean"},"filter_config":{"nullable":true,"description":"The filter the trigger uses once the draft is made active. Null when the draft removes it.","type":"object","additionalProperties":{}}},"required":["automation_revision_id","enabled","filter_config"],"additionalProperties":false},"webhook_status":{"nullable":true,"description":"Whether the upstream webhook this trigger needs is registered. Null when the save needed no webhook work: every trigger type but Jira today, and a Jira save with `enabled: false`. Every enabled Jira save reconciles, so saving again retries a failed registration. `registered` means Duvo holds a current subscription covering this trigger's projects. `connection_required` means the Jira Connection this trigger is bound to names no Atlassian site, so there is nothing to register against; reconnect Jira and save again. `project_not_found` means Jira found no project for one of `filter_config.project_keys` that the Connection can open, so that key is left out of the webhook; check the keys and save again. `failed` means Atlassian refused or the call did not complete; see `webhook_error` and retry. The trigger row is saved in every case; anything but `registered` means it will not fire yet.","type":"string","enum":["registered","connection_required","project_not_found","failed"]},"webhook_error":{"nullable":true,"description":"On `failed`, a stable reason code for the refusal (for example `http_403`, `rejected_by_jira`). `conflict_other_binding` means the Connection's Jira account already sends events to another Duvo Connection, in this team or another, and Jira allows one per account; connect a different Jira account. `issue_created_unconfirmed` means Jira has not yet confirmed that the webhook sends new issues, so they may not start Runs; Duvo tries again about every two hours, and saving again tries at once. Null otherwise.","type":"string"}},"required":["id","agent_id","user_id","integration_slug","trigger_type","filter_config","integration_instance_id","enabled","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at","shared_with_automation","webhook_status","webhook_error"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"description":"Stable discriminator for errors a client must tell apart. `connection_missing_scopes` means the bound connection's OAuth grant lacks a scope this trigger needs and must be reconnected. `trigger_type_unsupported` means the integration enumerates its trigger types and `trigger_type` is not one of them, so the trigger could never fire; the message lists the types it does have, and the trigger types endpoint is the general source. A trigger that already carries such a type can still be paused (`enabled: false`, same `trigger_type`) and deleted. `jira_watched_fields_required` means a Jira save that enables or creates the trigger carried no readable watched field in `filter_config.fields` and was not a new-issues trigger (`filter_config.issue_created: true` with no `fields`), so the trigger could never start a Run; send at least one readable field id, or turn on new issues and send no fields. An existing Jira trigger can still be paused without either. `jira_project_keys_required` means such a save carried no project key in `filter_config.project_keys`; send at least one. `jira_project_keys_limit` means it carried more than 50, which is one Jira lookup page. `mention_trigger_protected` means the trigger this save would replace is an @mention trigger, which only the agent's mention setting may change; delete it to free the integration. `mention_trigger_workspace_required` means this save would create a `teams_mention` trigger with no `filter_config.tenantId`, which would match no inbound mention; turn @mentions on from the agent's mention setting, which resolves the tenant from the team's Teams workspace, or send `tenantId` explicitly. Only Teams mention triggers pin a workspace this way — a Slack one needs no such field. `trigger_save_timed_out` means the save did not finish inside the bound this route holds while writing the trigger; nothing is wrong with the request, so retry it. `automation_runs_as_team` means the agent's automation runs as its team, which takes no personal triggers: a save may only pause an existing one.","type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"integration_instance_id":{"description":"On `connection_missing_scopes`, the connection that was rejected — the one to reconnect. Several connections can be bound to one agent, so this names which.","type":"string","format":"uuid"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"`mention_trigger_protected`: the trigger this save would replace is an @mention trigger and the requested `trigger_type` differs. Delete that trigger (`DELETE /v1/triggers/{agentId}/{triggerId}`, id from `GET /v1/triggers/{agentId}`) to use the integration for a different trigger type. `trigger_save_timed_out`: the save did not finish inside the bound this route holds while writing the trigger — retry. `automation_runs_as_team`: the agent's automation runs as its team, which takes no personal triggers; only pausing an existing one is allowed. Without any of these codes, the integration already has a trigger on this agent and the save simply collided.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"description":"Stable discriminator for errors a client must tell apart. `connection_missing_scopes` means the bound connection's OAuth grant lacks a scope this trigger needs and must be reconnected. `trigger_type_unsupported` means the integration enumerates its trigger types and `trigger_type` is not one of them, so the trigger could never fire; the message lists the types it does have, and the trigger types endpoint is the general source. A trigger that already carries such a type can still be paused (`enabled: false`, same `trigger_type`) and deleted. `jira_watched_fields_required` means a Jira save that enables or creates the trigger carried no readable watched field in `filter_config.fields` and was not a new-issues trigger (`filter_config.issue_created: true` with no `fields`), so the trigger could never start a Run; send at least one readable field id, or turn on new issues and send no fields. An existing Jira trigger can still be paused without either. `jira_project_keys_required` means such a save carried no project key in `filter_config.project_keys`; send at least one. `jira_project_keys_limit` means it carried more than 50, which is one Jira lookup page. `mention_trigger_protected` means the trigger this save would replace is an @mention trigger, which only the agent's mention setting may change; delete it to free the integration. `mention_trigger_workspace_required` means this save would create a `teams_mention` trigger with no `filter_config.tenantId`, which would match no inbound mention; turn @mentions on from the agent's mention setting, which resolves the tenant from the team's Teams workspace, or send `tenantId` explicitly. Only Teams mention triggers pin a workspace this way — a Slack one needs no such field. `trigger_save_timed_out` means the save did not finish inside the bound this route holds while writing the trigger; nothing is wrong with the request, so retry it. `automation_runs_as_team` means the agent's automation runs as its team, which takes no personal triggers: a save may only pause an existing one.","type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"integration_instance_id":{"description":"On `connection_missing_scopes`, the connection that was rejected — the one to reconnect. Several connections can be bound to one agent, so this names which.","type":"string","format":"uuid"}},"required":["error"],"additionalProperties":false,"description":"`mention_trigger_protected`: the trigger this save would replace is an @mention trigger and the requested `trigger_type` differs. Delete that trigger (`DELETE /v1/triggers/{agentId}/{triggerId}`, id from `GET /v1/triggers/{agentId}`) to use the integration for a different trigger type. `trigger_save_timed_out`: the save did not finish inside the bound this route holds while writing the trigger — retry. `automation_runs_as_team`: the agent's automation runs as its team, which takes no personal triggers; only pausing an existing one is allowed. Without any of these codes, the integration already has a trigger on this agent and the save simply collided."}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Upsert Agent Trigger","deprecated":true}},"/v1/triggers/{agentId}/{triggerId}":{"delete":{"operationId":"deleteAgentTrigger","summary":"Delete Agent Trigger","tags":["Triggers"],"description":"Permanently delete one of your own event triggers on an agent. The agent stops starting Runs for that event and the trigger's filter config is lost. To keep the trigger but stop it firing, upsert it with `enabled: false` instead.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true,"description":"The agent's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"triggerId","required":true,"description":"The trigger to delete"}],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true}},"/v1/trigger-config/{agentId}":{"get":{"operationId":"listAgentTriggerTypes","tags":["Triggers"],"description":"List the trigger types available for an agent, 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agent Trigger Types","deprecated":true}},"/v1/agents/{agent_id}/slack-triggers":{"post":{"operationId":"createAgentSlackTrigger","summary":"Create Slack Channel Trigger","tags":["Triggers"],"description":"Create a Slack channel trigger on an agent (Agent in the Duvo UI): the agent starts a Run whenever a matching message is posted in the channel. An agent can carry one trigger per channel, so call this once per channel. The Slack workspace must be installed for the team AND bound to the agent's live build first (see the Slack bound-workspaces endpoint) — otherwise this returns 400.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trigger_type":{"type":"string","enum":["slack_channel_message"],"description":"Trigger type. Only `slack_channel_message` (a message posted in a Slack channel) is supported here."},"slack_team_id":{"description":"Slack workspace (team) ID the channel belongs to, e.g. `T0123ABCD`. Defaults to the team's default installed workspace. Discover the workspaces an agent can use with the bound-workspaces endpoint.","type":"string","minLength":1},"channel_id":{"type":"string","minLength":1,"description":"Slack channel ID to watch, e.g. `C0123ABCD`."},"channel_name":{"type":"string","minLength":1,"description":"Slack channel name shown in Duvo, without the leading `#`, e.g. `support-inbox`."},"match_rule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["all"]}},"required":["kind"],"description":"Fire on every message posted in the channel."},{"type":"object","properties":{"kind":{"type":"string","enum":["contains"]},"values":{"description":"Case-insensitive keywords; a message fires the trigger when it contains any of them. Duplicates are deduplicated.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}}},"required":["kind","values"],"description":"Fire only on messages containing one of the keywords."}],"description":"Which channel messages fire the trigger: `{\"kind\":\"all\"}` for every message, or `{\"kind\":\"contains\",\"values\":[\"invoice\"]}` to match keywords."},"is_private":{"description":"Whether the channel is private. Defaults to false. Private channels require the Duvo Slack app to be invited to the channel.","type":"boolean"},"integration_instance_id":{"description":"Specific bound Slack connection to run the trigger off. Omit to use your own connection, or pass one returned by the bound-workspaces endpoint.","type":"string","format":"uuid"}},"required":["trigger_type","channel_id","channel_name","match_rule"]}}}},"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":{"slack_trigger":{"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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"shared_with_automation":{"type":"boolean","description":"Whether this trigger is the caller's subscription to a trigger in its automation's revisions. Its filter is then shared with every teammate subscribed to it, and changing the filter changes the automation's draft, which needs someone who can edit the agent. Pausing, reconnecting or deleting it stays the caller's own."},"pending_change":{"description":"Set on a trigger that belongs to an automation with revisions when its draft changes this trigger. Null otherwise.","nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string","description":"The automation's draft revision that holds the change."},"enabled":{"nullable":true,"description":"True while the draft keeps the trigger, null when the draft removes it. Never false: a revision has no switch of its own, so turning a trigger off for everyone is removing it.","type":"boolean"},"filter_config":{"nullable":true,"description":"The filter the trigger uses once the draft is made active. Null when the draft removes it.","type":"object","additionalProperties":{}}},"required":["automation_revision_id","enabled","filter_config"],"additionalProperties":false}},"required":["id","agent_id","user_id","integration_slug","trigger_type","filter_config","integration_instance_id","enabled","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at","shared_with_automation"],"additionalProperties":false}},"required":["slack_trigger"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true},"get":{"operationId":"listAgentSlackTriggers","summary":"List Slack Channel Triggers","tags":["Triggers"],"description":"List the Slack channel triggers you own on an agent (Agent in the Duvo UI), oldest first. Each trigger's `filter_config` carries the watched `channelId`, `channelName`, Slack `workspaceId`, and `matchRule`. Capped at 100 triggers per 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":{"slack_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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"shared_with_automation":{"type":"boolean","description":"Whether this trigger is the caller's subscription to a trigger in its automation's revisions. Its filter is then shared with every teammate subscribed to it, and changing the filter changes the automation's draft, which needs someone who can edit the agent. Pausing, reconnecting or deleting it stays the caller's own."},"pending_change":{"description":"Set on a trigger that belongs to an automation with revisions when its draft changes this trigger. Null otherwise.","nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string","description":"The automation's draft revision that holds the change."},"enabled":{"nullable":true,"description":"True while the draft keeps the trigger, null when the draft removes it. Never false: a revision has no switch of its own, so turning a trigger off for everyone is removing it.","type":"boolean"},"filter_config":{"nullable":true,"description":"The filter the trigger uses once the draft is made active. Null when the draft removes it.","type":"object","additionalProperties":{}}},"required":["automation_revision_id","enabled","filter_config"],"additionalProperties":false}},"required":["id","agent_id","user_id","integration_slug","trigger_type","filter_config","integration_instance_id","enabled","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at","shared_with_automation"],"additionalProperties":false}}},"required":["slack_triggers"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true}},"/v1/slack-triggers/{trigger_id}":{"patch":{"operationId":"updateSlackTrigger","summary":"Update Slack Channel Trigger","tags":["Triggers"],"description":"Update a Slack channel trigger you own — repoint it at another channel, change which messages match, or pause and resume it with `enabled`. Only the supplied fields change. Resuming a paused trigger requires the Slack connection it runs off to still be available on the agent; changing the channel resets the trigger's seen-message state.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel_id":{"description":"New Slack channel ID to watch. Omit to leave unchanged.","type":"string","minLength":1},"channel_name":{"description":"New Slack channel name, without the leading `#`.","type":"string","minLength":1},"match_rule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["all"]}},"required":["kind"],"description":"Fire on every message posted in the channel."},{"type":"object","properties":{"kind":{"type":"string","enum":["contains"]},"values":{"description":"Case-insensitive keywords; a message fires the trigger when it contains any of them. Duplicates are deduplicated.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}}},"required":["kind","values"],"description":"Fire only on messages containing one of the keywords."}],"description":"Which channel messages fire the trigger: `{\"kind\":\"all\"}` for every message, or `{\"kind\":\"contains\",\"values\":[\"invoice\"]}` to match keywords."},"is_private":{"description":"Whether the channel is private.","type":"boolean"},"enabled":{"description":"Set to false to pause the trigger without deleting it, or true to resume it. Resuming requires the connection the trigger uses to still be available on the agent.","type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"trigger_id","required":true,"description":"The Slack channel trigger's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"slack_trigger":{"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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"shared_with_automation":{"type":"boolean","description":"Whether this trigger is the caller's subscription to a trigger in its automation's revisions. Its filter is then shared with every teammate subscribed to it, and changing the filter changes the automation's draft, which needs someone who can edit the agent. Pausing, reconnecting or deleting it stays the caller's own."},"pending_change":{"description":"Set on a trigger that belongs to an automation with revisions when its draft changes this trigger. Null otherwise.","nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string","description":"The automation's draft revision that holds the change."},"enabled":{"nullable":true,"description":"True while the draft keeps the trigger, null when the draft removes it. Never false: a revision has no switch of its own, so turning a trigger off for everyone is removing it.","type":"boolean"},"filter_config":{"nullable":true,"description":"The filter the trigger uses once the draft is made active. Null when the draft removes it.","type":"object","additionalProperties":{}}},"required":["automation_revision_id","enabled","filter_config"],"additionalProperties":false}},"required":["id","agent_id","user_id","integration_slug","trigger_type","filter_config","integration_instance_id","enabled","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at","shared_with_automation"],"additionalProperties":false}},"required":["slack_trigger"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true},"delete":{"operationId":"deleteSlackTrigger","summary":"Delete Slack Channel Trigger","tags":["Triggers"],"description":"Permanently delete a Slack channel trigger you own. The agent stops starting Runs for that channel. To keep the trigger but stop it firing, update it with `enabled: false` instead.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"trigger_id","required":true,"description":"The Slack channel 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true}},"/v1/agents/{agent_id}/builds/{build_id}/slack-bound-workspaces":{"get":{"operationId":"listAgentSlackBoundWorkspaces","summary":"List Slack Workspaces Bound To An Agent","tags":["Triggers"],"description":"List the Slack workspaces bound to an agent build that you can create channel triggers for. Creating a Slack channel trigger for any other workspace is rejected, so start here to pick a valid `slack_team_id` and `integration_instance_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 agent build (revision) whose bound connections to list"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"slack_team_id":{"type":"string","description":"Slack workspace (team) ID, e.g. `T0123ABCD`."},"slack_workspace_name":{"type":"string","description":"Slack workspace display name."},"integration_instance_id":{"type":"string","description":"Bound Slack connection ID to pass as `integration_instance_id` when creating a trigger for this workspace."},"shared":{"type":"boolean","description":"True when this is a team-shared connection rather than your personal one."}},"required":["slack_team_id","slack_workspace_name","integration_instance_id","shared"],"additionalProperties":false}}},"required":["workspaces"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true}},"/v1/revisions/{build_id}/accept":{"post":{"operationId":"acceptRevisionGeneration","tags":["Automations"],"description":"Accept the reviewed generated configuration and complete the builder run. The saved draft is not activated.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"builder_run_id":{"type":"string","format":"uuid","description":"The builder run returned by generation or status, belonging to this revision."},"expected_started_at":{"nullable":true,"description":"Copy started_at from the status being reviewed. Each prompt has its own builder run ID; stale review identities return 409.","type":"string","format":"date-time"}},"required":["builder_run_id","expected_started_at"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"The revision identifier."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"builder_run":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["not_started","running","completed","failed","cancelled","waiting_for_input","waiting_for_approve"]},"build_id":{"type":"string"},"started_at":{"nullable":true,"type":"string"},"completed_at":{"nullable":true,"type":"string"},"checkpoint_config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"],"description":"Schema version discriminator — must be \"v1\" for the current code-step schema"},"data":{"type":"object","properties":{"language":{"type":"string","enum":["python"],"description":"Language the step's program is written in"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"code":{"type":"string","minLength":1,"description":"Program held in the build config. Written to `main.py` and run with `python main.py`."}},"required":["kind","code"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["files"]},"startCommand":{"type":"string","minLength":1,"maxLength":2000,"description":"Command run from the root of the step's file system, e.g. \"python main.py\"."},"bundle":{"description":"The program's files, as a content-addressed manifest","type":"object","properties":{"bucket":{"type":"string","minLength":1,"description":"GCS bucket the bundle's blobs are stored in"},"files":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path the file is materialised at, relative to the work dir"},"sha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$","description":"Digest of the file's bytes, and the key its blob is stored at"},"sizeBytes":{"type":"integer","minimum":0,"maximum":131072,"description":"UTF-8 byte length of the file's contents"}},"required":["path","sha256","sizeBytes"],"additionalProperties":false},"description":"The program's files, one manifest entry each"}},"required":["bucket","files"],"additionalProperties":false}},"required":["kind","startCommand"],"additionalProperties":false}],"description":"Where the step's program comes from"},"files":{"default":[],"description":"Team file paths this step can read at run time","nullable":true,"type":"array","items":{"type":"string"}},"timeoutMs":{"default":600000,"description":"Wall-clock budget for one execution of the step","type":"integer","exclusiveMinimum":true,"maximum":3600000},"handoverRequired":{"default":false,"description":"When the step declares handover options, whether a run that exits cleanly without requesting one fails. Ignored when the step declares no options.","type":"boolean"},"maxConcurrency":{"description":"Most runs of this step that may be in flight at once on one queue, on top of the queue's own concurrency. Absent means only the queue's limit applies. Every claim enforces it; only cases handed to the step (handover, postpone, reprocess) are also kept out of the queue's free slots while the step is full. Cases a trigger or a revision route sends straight to a capped step can still take queue slots and wait there, delaying other steps on the same queue.","type":"integer","exclusiveMinimum":true,"maximum":1000}},"required":["language","source","files","timeoutMs","handoverRequired"],"additionalProperties":false,"description":"Code step configuration payload"}},"required":["version","data"],"additionalProperties":false},{"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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"pending_user_questions":{"nullable":true,"type":"object","properties":{"questions":{"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":["questions"],"additionalProperties":false},"schedule_suggested":{"type":"boolean"},"warnings":{"nullable":true,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","x-extensible-enum":["connection_not_in_team_catalog","connection_sync_failed"]},"detail":{"type":"string","description":"Human-readable specifics, e.g. the slugs that did not resolve"}},"required":["code","detail"],"additionalProperties":false}}},"required":["id","status","build_id","started_at","completed_at","checkpoint_config","pending_user_questions"],"additionalProperties":false,"description":"Generation status and the checkpoint to review. Acceptance saves the draft without activating it."}},"required":["builder_run"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Accept Revision Generation","deprecated":true}},"/v1/revisions/{build_id}/generate":{"post":{"operationId":"generateRevision","tags":["Automations"],"description":"Generate agent instructions or code into a saved draft. Poll the returned builder run, answer questions if requested, then accept or decline the reviewed checkpoint. This never activates the revision.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Instructions for generating or refining this agent or code step."},"conversation":{"description":"Optional voice conversation transcript","type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user"]},"message":{"type":"string"}},"required":["source","message"]}},"selected_automation_revision_id":{"description":"The automation revision this edit is being made at. Pass a draft and the edit is folded into that draft itself; pass the active revision and the edit lands on a draft branched from it. A historic revision is rejected — it cannot be activated from without an explicit rebase. A revision belonging to a different automation is ignored, and the edit targets the automation the addressed agent belongs to. Omit to target the automation's active revision.","nullable":true,"type":"string","format":"uuid"},"run_id":{"description":"Optional run ID for context","type":"string","format":"uuid"},"process_id":{"description":"Optional process ID for context","type":"string","format":"uuid"},"insight_index":{"description":"Optional insight index for context","type":"number","minimum":0},"previous_build_id":{"description":"Previous build ID for sandbox reuse","type":"string","format":"uuid"},"draft_file_id":{"description":"Temporary source file for this AOP draft. It is not kept on the Agent.","type":"string","format":"uuid"},"draft_file_ids":{"description":"Temporary source files for this AOP draft, in attachment order. They are not kept on the Agent.","maxItems":20,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["prompt"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"Source revision to generate or refine."}],"security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"generation":{"type":"object","properties":{"status":{"type":"string","enum":["generating"],"description":"Generation was accepted; poll the builder run for progress."},"builder_run_id":{"type":"string","format":"uuid","description":"Builder run to poll, resume or cancel."},"build_id":{"type":"string","format":"uuid","description":"Target saved draft revision, which may differ from the requested revision."}},"required":["status","builder_run_id","build_id"],"additionalProperties":false},"draft_source_truncated":{"description":"True when one attached file was cut to the first part that fits in the draft.","type":"boolean"}},"required":["generation"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"file_id":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Generate 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, if a draft revision still has an active builder run, or with 409 if the agent's automation runs as the team and the revision sends cases to a queue that is not in a team automation.","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Promote Revision","deprecated":true}},"/v1/builder-runs/{builder_run_id}/resume":{"post":{"operationId":"resumeBuilderRun","tags":["Automations"],"description":"Resume a builder run that is waiting for user input","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answers":{"type":"object","additionalProperties":{"type":"string"},"description":"Answers keyed by the exact question text in pending_user_questions.questions."}},"required":["answers"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"builder_run_id","required":true,"description":"The builder run waiting for answers."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the answers were accepted. A delivery that timed out counts as accepted; poll the run status."},"message":{"description":"Resume result.","type":"string"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Resume Builder Run","deprecated":true}},"/v1/builder-runs/{builder_run_id}/status":{"patch":{"operationId":"cancelBuilderRun","tags":["Automations"],"description":"Cancel a running builder run and pause its sandbox","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["cancelled"],"description":"Cancel an in-progress generation; review-pending changes must be declined instead."}},"required":["status"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"builder_run_id","required":true,"description":"The builder run identifier."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"builder_run":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["not_started","running","completed","failed","cancelled","waiting_for_input","waiting_for_approve"]},"build_id":{"type":"string"},"started_at":{"nullable":true,"type":"string"},"completed_at":{"nullable":true,"type":"string"},"checkpoint_config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"],"description":"Schema version discriminator — must be \"v1\" for the current code-step schema"},"data":{"type":"object","properties":{"language":{"type":"string","enum":["python"],"description":"Language the step's program is written in"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"code":{"type":"string","minLength":1,"description":"Program held in the build config. Written to `main.py` and run with `python main.py`."}},"required":["kind","code"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["files"]},"startCommand":{"type":"string","minLength":1,"maxLength":2000,"description":"Command run from the root of the step's file system, e.g. \"python main.py\"."},"bundle":{"description":"The program's files, as a content-addressed manifest","type":"object","properties":{"bucket":{"type":"string","minLength":1,"description":"GCS bucket the bundle's blobs are stored in"},"files":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path the file is materialised at, relative to the work dir"},"sha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$","description":"Digest of the file's bytes, and the key its blob is stored at"},"sizeBytes":{"type":"integer","minimum":0,"maximum":131072,"description":"UTF-8 byte length of the file's contents"}},"required":["path","sha256","sizeBytes"],"additionalProperties":false},"description":"The program's files, one manifest entry each"}},"required":["bucket","files"],"additionalProperties":false}},"required":["kind","startCommand"],"additionalProperties":false}],"description":"Where the step's program comes from"},"files":{"default":[],"description":"Team file paths this step can read at run time","nullable":true,"type":"array","items":{"type":"string"}},"timeoutMs":{"default":600000,"description":"Wall-clock budget for one execution of the step","type":"integer","exclusiveMinimum":true,"maximum":3600000},"handoverRequired":{"default":false,"description":"When the step declares handover options, whether a run that exits cleanly without requesting one fails. Ignored when the step declares no options.","type":"boolean"},"maxConcurrency":{"description":"Most runs of this step that may be in flight at once on one queue, on top of the queue's own concurrency. Absent means only the queue's limit applies. Every claim enforces it; only cases handed to the step (handover, postpone, reprocess) are also kept out of the queue's free slots while the step is full. Cases a trigger or a revision route sends straight to a capped step can still take queue slots and wait there, delaying other steps on the same queue.","type":"integer","exclusiveMinimum":true,"maximum":1000}},"required":["language","source","files","timeoutMs","handoverRequired"],"additionalProperties":false,"description":"Code step configuration payload"}},"required":["version","data"],"additionalProperties":false},{"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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"pending_user_questions":{"nullable":true,"type":"object","properties":{"questions":{"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":["questions"],"additionalProperties":false},"schedule_suggested":{"type":"boolean"},"warnings":{"nullable":true,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","x-extensible-enum":["connection_not_in_team_catalog","connection_sync_failed"]},"detail":{"type":"string","description":"Human-readable specifics, e.g. the slugs that did not resolve"}},"required":["code","detail"],"additionalProperties":false}}},"required":["id","status","build_id","started_at","completed_at","checkpoint_config","pending_user_questions"],"additionalProperties":false,"description":"Generation status and the checkpoint to review. Acceptance saves the draft without activating it."}},"required":["builder_run"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Cancel Builder Run","deprecated":true},"get":{"operationId":"getBuilderRun","tags":["Automations"],"description":"Get the status of a builder run","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"builder_run_id","required":true,"description":"The builder run identifier."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"builder_run":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["not_started","running","completed","failed","cancelled","waiting_for_input","waiting_for_approve"]},"build_id":{"type":"string"},"started_at":{"nullable":true,"type":"string"},"completed_at":{"nullable":true,"type":"string"},"checkpoint_config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"],"description":"Schema version discriminator — must be \"v1\" for the current code-step schema"},"data":{"type":"object","properties":{"language":{"type":"string","enum":["python"],"description":"Language the step's program is written in"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"code":{"type":"string","minLength":1,"description":"Program held in the build config. Written to `main.py` and run with `python main.py`."}},"required":["kind","code"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["files"]},"startCommand":{"type":"string","minLength":1,"maxLength":2000,"description":"Command run from the root of the step's file system, e.g. \"python main.py\"."},"bundle":{"description":"The program's files, as a content-addressed manifest","type":"object","properties":{"bucket":{"type":"string","minLength":1,"description":"GCS bucket the bundle's blobs are stored in"},"files":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path the file is materialised at, relative to the work dir"},"sha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$","description":"Digest of the file's bytes, and the key its blob is stored at"},"sizeBytes":{"type":"integer","minimum":0,"maximum":131072,"description":"UTF-8 byte length of the file's contents"}},"required":["path","sha256","sizeBytes"],"additionalProperties":false},"description":"The program's files, one manifest entry each"}},"required":["bucket","files"],"additionalProperties":false}},"required":["kind","startCommand"],"additionalProperties":false}],"description":"Where the step's program comes from"},"files":{"default":[],"description":"Team file paths this step can read at run time","nullable":true,"type":"array","items":{"type":"string"}},"timeoutMs":{"default":600000,"description":"Wall-clock budget for one execution of the step","type":"integer","exclusiveMinimum":true,"maximum":3600000},"handoverRequired":{"default":false,"description":"When the step declares handover options, whether a run that exits cleanly without requesting one fails. Ignored when the step declares no options.","type":"boolean"},"maxConcurrency":{"description":"Most runs of this step that may be in flight at once on one queue, on top of the queue's own concurrency. Absent means only the queue's limit applies. Every claim enforces it; only cases handed to the step (handover, postpone, reprocess) are also kept out of the queue's free slots while the step is full. Cases a trigger or a revision route sends straight to a capped step can still take queue slots and wait there, delaying other steps on the same queue.","type":"integer","exclusiveMinimum":true,"maximum":1000}},"required":["language","source","files","timeoutMs","handoverRequired"],"additionalProperties":false,"description":"Code step configuration payload"}},"required":["version","data"],"additionalProperties":false},{"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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"pending_user_questions":{"nullable":true,"type":"object","properties":{"questions":{"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":["questions"],"additionalProperties":false},"schedule_suggested":{"type":"boolean"},"warnings":{"nullable":true,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","x-extensible-enum":["connection_not_in_team_catalog","connection_sync_failed"]},"detail":{"type":"string","description":"Human-readable specifics, e.g. the slugs that did not resolve"}},"required":["code","detail"],"additionalProperties":false}}},"required":["id","status","build_id","started_at","completed_at","checkpoint_config","pending_user_questions"],"additionalProperties":false,"description":"Generation status and the checkpoint to review. Acceptance saves the draft without activating it."}},"required":["builder_run"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Builder Run","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. An agent step takes the latest agent schema (legacy v1 agent configs are not accepted); a code step takes a code-step config. Omit it to get the step family's default first build.","anyOf":[{"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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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"]}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"additionalProperties":{}}},"required":["models","input"],"description":"Agent configuration payload"}},"required":["version","data"]},{"type":"object","properties":{"version":{"type":"string","enum":["v1"],"description":"Schema version discriminator — must be \"v1\" for the current code-step schema"},"data":{"type":"object","properties":{"language":{"type":"string","enum":["python"],"description":"Language the step's program is written in"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"code":{"type":"string","minLength":1,"description":"Program held in the build config. Written to `main.py` and run with `python main.py`."}},"required":["kind","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["files"]},"startCommand":{"type":"string","minLength":1,"maxLength":2000,"description":"Command run from the root of the step's file system, e.g. \"python main.py\"."},"bundle":{"description":"The program's files, as a content-addressed manifest","type":"object","properties":{"bucket":{"type":"string","minLength":1,"description":"GCS bucket the bundle's blobs are stored in"},"files":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path the file is materialised at, relative to the work dir"},"sha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$","description":"Digest of the file's bytes, and the key its blob is stored at"},"sizeBytes":{"type":"integer","minimum":0,"maximum":131072,"description":"UTF-8 byte length of the file's contents"}},"required":["path","sha256","sizeBytes"]},"description":"The program's files, one manifest entry each"}},"required":["bucket","files"]}},"required":["kind","startCommand"]}],"description":"Where the step's program comes from"},"files":{"default":[],"description":"Team file paths this step can read at run time","nullable":true,"type":"array","items":{"type":"string"}},"timeoutMs":{"default":600000,"description":"Wall-clock budget for one execution of the step","type":"integer","exclusiveMinimum":true,"maximum":3600000},"handoverRequired":{"default":false,"description":"When the step declares handover options, whether a run that exits cleanly without requesting one fails. Ignored when the step declares no options.","type":"boolean"},"maxConcurrency":{"description":"Most runs of this step that may be in flight at once on one queue, on top of the queue's own concurrency. Absent means only the queue's limit applies. Every claim enforces it; only cases handed to the step (handover, postpone, reprocess) are also kept out of the queue's free slots while the step is full. Cases a trigger or a revision route sends straight to a capped step can still take queue slots and wait there, delaying other steps on the same queue.","type":"integer","exclusiveMinimum":true,"maximum":1000}},"required":["language","source"],"description":"Code step configuration payload"}},"required":["version","data"]}]},"handover_target_ids":{"description":"Agent IDs that this agent can hand work off to, used exactly as sent; an empty list means none. Send null or omit it to use the agents the AOP mentions with <DUVO:AGENT> tags. Targets are never copied from the source build.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"handover_to":{"description":"The single agent or code step to run after this one completes (\"Handover to\"). Mutually exclusive with handover_target_ids.","nullable":true,"type":"string","format":"uuid"},"handover_options":{"description":"Code steps only. The targets the program may request, and whether it must. Null clears them; omit to inherit the source build's. Mutually exclusive with handover_to.","nullable":true,"type":"object","properties":{"target_agent_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid"},"description":"Steps in the same automation this code step's program may request"},"required":{"type":"boolean","description":"When true, a run that exits cleanly without requesting a handover fails"}},"required":["target_agent_ids","required"]},"source_build_id":{"description":"Build ID to copy integrations and queue links from. A numbered revision copied this way is recorded as the new build's parent.","type":"string","format":"uuid"},"selected_automation_revision_id":{"description":"The automation revision this edit is being made at. Pass a draft and the edit is folded into that draft itself; pass the active revision and the edit lands on a draft branched from it. A historic revision is rejected — it cannot be activated from without an explicit rebase. A revision belonging to a different automation is ignored, and the edit targets the automation the addressed agent belongs to. Omit to target the automation's active revision.","nullable":true,"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"],"description":"Schema version discriminator — must be \"v1\" for the current code-step schema"},"data":{"type":"object","properties":{"language":{"type":"string","enum":["python"],"description":"Language the step's program is written in"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"code":{"type":"string","minLength":1,"description":"Program held in the build config. Written to `main.py` and run with `python main.py`."}},"required":["kind","code"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["files"]},"startCommand":{"type":"string","minLength":1,"maxLength":2000,"description":"Command run from the root of the step's file system, e.g. \"python main.py\"."},"bundle":{"description":"The program's files, as a content-addressed manifest","type":"object","properties":{"bucket":{"type":"string","minLength":1,"description":"GCS bucket the bundle's blobs are stored in"},"files":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path the file is materialised at, relative to the work dir"},"sha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$","description":"Digest of the file's bytes, and the key its blob is stored at"},"sizeBytes":{"type":"integer","minimum":0,"maximum":131072,"description":"UTF-8 byte length of the file's contents"}},"required":["path","sha256","sizeBytes"],"additionalProperties":false},"description":"The program's files, one manifest entry each"}},"required":["bucket","files"],"additionalProperties":false}},"required":["kind","startCommand"],"additionalProperties":false}],"description":"Where the step's program comes from"},"files":{"default":[],"description":"Team file paths this step can read at run time","nullable":true,"type":"array","items":{"type":"string"}},"timeoutMs":{"default":600000,"description":"Wall-clock budget for one execution of the step","type":"integer","exclusiveMinimum":true,"maximum":3600000},"handoverRequired":{"default":false,"description":"When the step declares handover options, whether a run that exits cleanly without requesting one fails. Ignored when the step declares no options.","type":"boolean"},"maxConcurrency":{"description":"Most runs of this step that may be in flight at once on one queue, on top of the queue's own concurrency. Absent means only the queue's limit applies. Every claim enforces it; only cases handed to the step (handover, postpone, reprocess) are also kept out of the queue's free slots while the step is full. Cases a trigger or a revision route sends straight to a capped step can still take queue slots and wait there, delaying other steps on the same queue.","type":"integer","exclusiveMinimum":true,"maximum":1000}},"required":["language","source","files","timeoutMs","handoverRequired"],"additionalProperties":false,"description":"Code step configuration payload"}},"required":["version","data"],"additionalProperties":false},{"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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"},"pending_change":{"nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string"},"enabled":{"nullable":true,"type":"boolean"},"cron":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"task":{"nullable":true,"type":"string"}},"required":["automation_revision_id","enabled","cron","frequency","time","timezone","day","day_of_month","task"],"additionalProperties":false}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at"],"additionalProperties":false}},"handover_to":{"nullable":true,"type":"string","format":"uuid"},"handover_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Revision","deprecated":true},"get":{"operationId":"listAgentRevisions","tags":["Revisions"],"description":"List revisions for an agent. Pass `config=light` to leave each revision's config out of the page and get its sizes instead; read the AOP with getRevisionBody.","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","enum":["draft","live","historic"]},"in":"query","name":"status","required":false,"description":"Only revisions with this status. `live` returns the active revision, wherever it falls in the history."},{"schema":{"type":"string","enum":["light","full"]},"in":"query","name":"config","required":false,"description":"`full` (default) embeds each revision's config. `light` sets `config` to null and reports its sizes, hash and models in `config_summary`; read the AOP or program text with getRevisionBody. Use `light` unless you need the instructions themselves: a page of revisions can run to millions of characters."},{"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"],"description":"Schema version discriminator — must be \"v1\" for the current code-step schema"},"data":{"type":"object","properties":{"language":{"type":"string","enum":["python"],"description":"Language the step's program is written in"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"code":{"type":"string","minLength":1,"description":"Program held in the build config. Written to `main.py` and run with `python main.py`."}},"required":["kind","code"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["files"]},"startCommand":{"type":"string","minLength":1,"maxLength":2000,"description":"Command run from the root of the step's file system, e.g. \"python main.py\"."},"bundle":{"description":"The program's files, as a content-addressed manifest","type":"object","properties":{"bucket":{"type":"string","minLength":1,"description":"GCS bucket the bundle's blobs are stored in"},"files":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path the file is materialised at, relative to the work dir"},"sha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$","description":"Digest of the file's bytes, and the key its blob is stored at"},"sizeBytes":{"type":"integer","minimum":0,"maximum":131072,"description":"UTF-8 byte length of the file's contents"}},"required":["path","sha256","sizeBytes"],"additionalProperties":false},"description":"The program's files, one manifest entry each"}},"required":["bucket","files"],"additionalProperties":false}},"required":["kind","startCommand"],"additionalProperties":false}],"description":"Where the step's program comes from"},"files":{"default":[],"description":"Team file paths this step can read at run time","nullable":true,"type":"array","items":{"type":"string"}},"timeoutMs":{"default":600000,"description":"Wall-clock budget for one execution of the step","type":"integer","exclusiveMinimum":true,"maximum":3600000},"handoverRequired":{"default":false,"description":"When the step declares handover options, whether a run that exits cleanly without requesting one fails. Ignored when the step declares no options.","type":"boolean"},"maxConcurrency":{"description":"Most runs of this step that may be in flight at once on one queue, on top of the queue's own concurrency. Absent means only the queue's limit applies. Every claim enforces it; only cases handed to the step (handover, postpone, reprocess) are also kept out of the queue's free slots while the step is full. Cases a trigger or a revision route sends straight to a capped step can still take queue slots and wait there, delaying other steps on the same queue.","type":"integer","exclusiveMinimum":true,"maximum":1000}},"required":["language","source","files","timeoutMs","handoverRequired"],"additionalProperties":false,"description":"Code step configuration payload"}},"required":["version","data"],"additionalProperties":false},{"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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"},"pending_change":{"nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string"},"enabled":{"nullable":true,"type":"boolean"},"cron":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"task":{"nullable":true,"type":"string"}},"required":["automation_revision_id","enabled","cron","frequency","time","timezone","day","day_of_month","task"],"additionalProperties":false}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at"],"additionalProperties":false}},"handover_to":{"nullable":true,"type":"string","format":"uuid"},"handover_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"config_summary":{"nullable":true,"type":"object","properties":{"config_hash":{"type":"string","description":"SHA-256 of the stored config; changes with any field of it"},"input_chars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Length of the AOP text (`config.data.input`); 0 for a code step"},"source_chars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Length of the code-step program (`config.data.source`); 0 for an agent step"},"models":{"nullable":true,"description":"The agent step's model configuration; null when the config has none (a code step, or a v1 agent config)","type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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}},"required":["config_hash","input_chars","source_chars","models"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agent Revisions","deprecated":true}},"/v1/revisions/{build_id}/decline":{"post":{"operationId":"declineRevisionGeneration","tags":["Automations"],"description":"Discard generated changes by restoring checkpoint_config and completing the builder run. The saved draft is not activated.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"builder_run_id":{"type":"string","format":"uuid","description":"The builder run returned by generation or status, belonging to this revision."},"expected_started_at":{"nullable":true,"description":"Copy started_at from the status being reviewed. Each prompt has its own builder run ID; stale review identities return 409.","type":"string","format":"date-time"}},"required":["builder_run_id","expected_started_at"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"The revision identifier."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"builder_run":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["not_started","running","completed","failed","cancelled","waiting_for_input","waiting_for_approve"]},"build_id":{"type":"string"},"started_at":{"nullable":true,"type":"string"},"completed_at":{"nullable":true,"type":"string"},"checkpoint_config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"],"description":"Schema version discriminator — must be \"v1\" for the current code-step schema"},"data":{"type":"object","properties":{"language":{"type":"string","enum":["python"],"description":"Language the step's program is written in"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"code":{"type":"string","minLength":1,"description":"Program held in the build config. Written to `main.py` and run with `python main.py`."}},"required":["kind","code"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["files"]},"startCommand":{"type":"string","minLength":1,"maxLength":2000,"description":"Command run from the root of the step's file system, e.g. \"python main.py\"."},"bundle":{"description":"The program's files, as a content-addressed manifest","type":"object","properties":{"bucket":{"type":"string","minLength":1,"description":"GCS bucket the bundle's blobs are stored in"},"files":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path the file is materialised at, relative to the work dir"},"sha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$","description":"Digest of the file's bytes, and the key its blob is stored at"},"sizeBytes":{"type":"integer","minimum":0,"maximum":131072,"description":"UTF-8 byte length of the file's contents"}},"required":["path","sha256","sizeBytes"],"additionalProperties":false},"description":"The program's files, one manifest entry each"}},"required":["bucket","files"],"additionalProperties":false}},"required":["kind","startCommand"],"additionalProperties":false}],"description":"Where the step's program comes from"},"files":{"default":[],"description":"Team file paths this step can read at run time","nullable":true,"type":"array","items":{"type":"string"}},"timeoutMs":{"default":600000,"description":"Wall-clock budget for one execution of the step","type":"integer","exclusiveMinimum":true,"maximum":3600000},"handoverRequired":{"default":false,"description":"When the step declares handover options, whether a run that exits cleanly without requesting one fails. Ignored when the step declares no options.","type":"boolean"},"maxConcurrency":{"description":"Most runs of this step that may be in flight at once on one queue, on top of the queue's own concurrency. Absent means only the queue's limit applies. Every claim enforces it; only cases handed to the step (handover, postpone, reprocess) are also kept out of the queue's free slots while the step is full. Cases a trigger or a revision route sends straight to a capped step can still take queue slots and wait there, delaying other steps on the same queue.","type":"integer","exclusiveMinimum":true,"maximum":1000}},"required":["language","source","files","timeoutMs","handoverRequired"],"additionalProperties":false,"description":"Code step configuration payload"}},"required":["version","data"],"additionalProperties":false},{"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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"pending_user_questions":{"nullable":true,"type":"object","properties":{"questions":{"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":["questions"],"additionalProperties":false},"schedule_suggested":{"type":"boolean"},"warnings":{"nullable":true,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","x-extensible-enum":["connection_not_in_team_catalog","connection_sync_failed"]},"detail":{"type":"string","description":"Human-readable specifics, e.g. the slugs that did not resolve"}},"required":["code","detail"],"additionalProperties":false}}},"required":["id","status","build_id","started_at","completed_at","checkpoint_config","pending_user_questions"],"additionalProperties":false,"description":"Generation status and the checkpoint to review. Acceptance saves the draft without activating it."}},"required":["builder_run"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Decline Revision Generation","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"],"description":"Schema version discriminator — must be \"v1\" for the current code-step schema"},"data":{"type":"object","properties":{"language":{"type":"string","enum":["python"],"description":"Language the step's program is written in"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"code":{"type":"string","minLength":1,"description":"Program held in the build config. Written to `main.py` and run with `python main.py`."}},"required":["kind","code"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["files"]},"startCommand":{"type":"string","minLength":1,"maxLength":2000,"description":"Command run from the root of the step's file system, e.g. \"python main.py\"."},"bundle":{"description":"The program's files, as a content-addressed manifest","type":"object","properties":{"bucket":{"type":"string","minLength":1,"description":"GCS bucket the bundle's blobs are stored in"},"files":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path the file is materialised at, relative to the work dir"},"sha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$","description":"Digest of the file's bytes, and the key its blob is stored at"},"sizeBytes":{"type":"integer","minimum":0,"maximum":131072,"description":"UTF-8 byte length of the file's contents"}},"required":["path","sha256","sizeBytes"],"additionalProperties":false},"description":"The program's files, one manifest entry each"}},"required":["bucket","files"],"additionalProperties":false}},"required":["kind","startCommand"],"additionalProperties":false}],"description":"Where the step's program comes from"},"files":{"default":[],"description":"Team file paths this step can read at run time","nullable":true,"type":"array","items":{"type":"string"}},"timeoutMs":{"default":600000,"description":"Wall-clock budget for one execution of the step","type":"integer","exclusiveMinimum":true,"maximum":3600000},"handoverRequired":{"default":false,"description":"When the step declares handover options, whether a run that exits cleanly without requesting one fails. Ignored when the step declares no options.","type":"boolean"},"maxConcurrency":{"description":"Most runs of this step that may be in flight at once on one queue, on top of the queue's own concurrency. Absent means only the queue's limit applies. Every claim enforces it; only cases handed to the step (handover, postpone, reprocess) are also kept out of the queue's free slots while the step is full. Cases a trigger or a revision route sends straight to a capped step can still take queue slots and wait there, delaying other steps on the same queue.","type":"integer","exclusiveMinimum":true,"maximum":1000}},"required":["language","source","files","timeoutMs","handoverRequired"],"additionalProperties":false,"description":"Code step configuration payload"}},"required":["version","data"],"additionalProperties":false},{"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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"},"pending_change":{"nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string"},"enabled":{"nullable":true,"type":"boolean"},"cron":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"task":{"nullable":true,"type":"string"}},"required":["automation_revision_id","enabled","cron","frequency","time","timezone","day","day_of_month","task"],"additionalProperties":false}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at"],"additionalProperties":false}},"handover_to":{"nullable":true,"type":"string","format":"uuid"},"handover_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Revision","deprecated":true}},"/v1/agents/{agent_id}/revisions/{build_id}/body":{"get":{"operationId":"getRevisionBody","tags":["Revisions"],"description":"Read one section of a revision's config as plain text, in character ranges: the AOP (`input`) or the code-step program (`source`). Use it instead of getRevision when the text is large; listAgents with `config=light` reports each agent's `input_chars` and `source_chars`.","parameters":[{"schema":{"type":"string","enum":["input","source"]},"in":"query","name":"section","required":true,"description":"`input` is an agent step's AOP text; `source` is a code step's program."},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Character offset to start reading from (default 0)"},{"schema":{"default":40000,"type":"integer","minimum":1,"maximum":50000},"in":"query","name":"length","required":false,"description":"Characters to return (1-50000, default 40000). Repeat with a higher offset until offset plus the returned length reaches total_chars."},{"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 revision's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"section":{"type":"string","enum":["input","source"]},"total_chars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Length of the whole section"},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Where `text` starts within the section"},"text":{"type":"string","description":"The requested range of the section"}},"required":["section","total_chars","offset","text"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Revision Body","deprecated":true}},"/v1/revisions/{build_id}":{"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, used exactly as sent; an empty list clears them. Send null to use the agents the AOP mentions with <DUVO:AGENT> tags. Omit it to leave the targets as they are.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"handoverTo":{"description":"The single agent or code step to run after this one completes (\"Handover to\"). Null clears it; omit to leave it unchanged. Mutually exclusive with @-mention handovers in the AOP.","nullable":true,"type":"string","format":"uuid"},"handoverOptions":{"description":"Code steps only. The targets the program may request, and whether it must. Null clears them; omit to leave unchanged. Mutually exclusive with handoverTo in one request.","nullable":true,"type":"object","properties":{"targetAgentIds":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid"},"description":"Steps in the same automation this code step's program may request"},"required":{"type":"boolean","description":"When true, a run that exits cleanly without requesting a handover fails"}},"required":["targetAgentIds","required"]},"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},"selected_automation_revision_id":{"description":"The automation revision this edit is being made at. Pass a draft and the edit is folded into that draft itself; pass the active revision and the edit lands on a draft branched from it. A historic revision is rejected — it cannot be activated from without an explicit rebase. A revision belonging to a different automation is ignored, and the edit targets the automation the addressed agent belongs to. Omit to target the automation's active revision.","nullable":true,"type":"string","format":"uuid"}}}}}},"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"],"description":"Schema version discriminator — must be \"v1\" for the current code-step schema"},"data":{"type":"object","properties":{"language":{"type":"string","enum":["python"],"description":"Language the step's program is written in"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"code":{"type":"string","minLength":1,"description":"Program held in the build config. Written to `main.py` and run with `python main.py`."}},"required":["kind","code"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["files"]},"startCommand":{"type":"string","minLength":1,"maxLength":2000,"description":"Command run from the root of the step's file system, e.g. \"python main.py\"."},"bundle":{"description":"The program's files, as a content-addressed manifest","type":"object","properties":{"bucket":{"type":"string","minLength":1,"description":"GCS bucket the bundle's blobs are stored in"},"files":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path the file is materialised at, relative to the work dir"},"sha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$","description":"Digest of the file's bytes, and the key its blob is stored at"},"sizeBytes":{"type":"integer","minimum":0,"maximum":131072,"description":"UTF-8 byte length of the file's contents"}},"required":["path","sha256","sizeBytes"],"additionalProperties":false},"description":"The program's files, one manifest entry each"}},"required":["bucket","files"],"additionalProperties":false}},"required":["kind","startCommand"],"additionalProperties":false}],"description":"Where the step's program comes from"},"files":{"default":[],"description":"Team file paths this step can read at run time","nullable":true,"type":"array","items":{"type":"string"}},"timeoutMs":{"default":600000,"description":"Wall-clock budget for one execution of the step","type":"integer","exclusiveMinimum":true,"maximum":3600000},"handoverRequired":{"default":false,"description":"When the step declares handover options, whether a run that exits cleanly without requesting one fails. Ignored when the step declares no options.","type":"boolean"},"maxConcurrency":{"description":"Most runs of this step that may be in flight at once on one queue, on top of the queue's own concurrency. Absent means only the queue's limit applies. Every claim enforces it; only cases handed to the step (handover, postpone, reprocess) are also kept out of the queue's free slots while the step is full. Cases a trigger or a revision route sends straight to a capped step can still take queue slots and wait there, delaying other steps on the same queue.","type":"integer","exclusiveMinimum":true,"maximum":1000}},"required":["language","source","files","timeoutMs","handoverRequired"],"additionalProperties":false,"description":"Code step configuration payload"}},"required":["version","data"],"additionalProperties":false},{"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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"},"pending_change":{"nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string"},"enabled":{"nullable":true,"type":"boolean"},"cron":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"task":{"nullable":true,"type":"string"}},"required":["automation_revision_id","enabled","cron","frequency","time","timezone","day","day_of_month","task"],"additionalProperties":false}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at"],"additionalProperties":false}},"handover_to":{"nullable":true,"type":"string","format":"uuid"},"handover_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Revision","deprecated":true}},"/v1/agents/{agent_id}/duplicate":{"post":{"operationId":"duplicateAgent","tags":["Agents"],"description":"Duplicate an existing agent into a new agent named \"Copy of <name>\", carrying over its configuration. Use the include_* flags in the (optional) body to control what is copied; all default on except memory. Builders can duplicate agents they created; duplicating an agent somebody else created requires the Lead Builder team role or above.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"include_connections":{"description":"Copy connected accounts (Connections) and their selected tools. Defaults to true.","type":"boolean"},"include_queue":{"description":"Copy the assigned Queue. Defaults to true.","type":"boolean"},"include_skills_files":{"description":"Copy attached Skills and Files. Defaults to true.","type":"boolean"},"include_logins_secrets":{"description":"Copy saved Logins and Secrets. Defaults to true.","type":"boolean"},"include_plugins":{"description":"Copy installed plugins. Defaults to true.","type":"boolean"},"include_aop":{"description":"Copy the agent's operating procedure (AOP) and its handover targets. Defaults to true.","type":"boolean"},"include_memory":{"description":"Copy what the agent has learned so far (its Memory). Defaults to false. Memory can only be copied from the Duvo app — requesting it here returns an error.","type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The ID of the agent to duplicate"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","description":"The ID of the newly created duplicate agent"}},"required":["agent_id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Duplicate Agent","deprecated":true}},"/v1/agents/{agent_id}":{"get":{"operationId":"getAgent","tags":["Agents"],"description":"Get an agent by ID. The response carries no revision config: use listAgentRevisions and getRevision for a revision, and getRevisionBody to read a large AOP in character ranges.","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"},"type":{"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation.","type":"string","enum":["agent","code"]},"slack_enabled":{"nullable":true,"type":"boolean"},"microsoft_teams_enabled":{"nullable":true,"type":"boolean"},"agentic_memory_enabled":{"nullable":true,"type":"boolean"},"computer_use_sandbox_template_id":{"nullable":true,"type":"string","description":"\"standard\" when durably pinned to the standard Duvo desktop, a template UUID when pinned to a specific desktop, or null when following the team default."},"computer_use_vpn_config_id":{"nullable":true,"type":"string","description":"\"direct\" when durably pinned to direct internet, a VPN config UUID when pinned to a specific network, or null when following the team default."},"team_id":{"nullable":true,"type":"string"},"thread_id":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"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},"user_context":{"type":"object","properties":{"pinned_at":{"nullable":true,"type":"string"}},"required":["pinned_at"],"additionalProperties":false}},"required":["agent","user_context"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 your agents list (true) or unpin it (false). Per-user — each viewer has their own pin. A team on Automations has no agents list for a pin to order, so a pin or unpin there is refused with a 409."},"computer_use_sandbox_template_id":{"nullable":true,"description":"\"standard\" to durably pin the standard Duvo desktop (immune to future team-default changes), a template UUID to pin that desktop, or null to follow the team default.","anyOf":[{"type":"string","enum":["standard"]},{"type":"string","format":"uuid"}]},"computer_use_vpn_config_id":{"nullable":true,"description":"\"direct\" to durably pin direct internet (no VPN, immune to future team-default changes), a VPN config UUID to pin that network, or null to follow the team default.","anyOf":[{"type":"string","enum":["direct"]},{"type":"string","format":"uuid"}]}}}}}},"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"},"type":{"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation.","type":"string","enum":["agent","code"]},"slack_enabled":{"nullable":true,"type":"boolean"},"microsoft_teams_enabled":{"nullable":true,"type":"boolean"},"agentic_memory_enabled":{"nullable":true,"type":"boolean"},"computer_use_sandbox_template_id":{"nullable":true,"type":"string","description":"\"standard\" when durably pinned to the standard Duvo desktop, a template UUID when pinned to a specific desktop, or null when following the team default."},"computer_use_vpn_config_id":{"nullable":true,"type":"string","description":"\"direct\" when durably pinned to direct internet, a VPN config UUID when pinned to a specific network, or null when following the team default."},"team_id":{"nullable":true,"type":"string"},"thread_id":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"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},"user_context":{"type":"object","properties":{"pinned_at":{"nullable":true,"type":"string"}},"required":["pinned_at"],"additionalProperties":false}},"required":["agent","user_context"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Agent","deprecated":true},"delete":{"operationId":"deleteAgent","tags":["Agents"],"description":"Delete an agent 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Agent","deprecated":true}},"/v1/agents/{agent_id}/move":{"post":{"operationId":"moveAgent","tags":["Agents"],"description":"Move an agent (and its connected workspace) to a different team. Pass dry_run=true to preview the closure without applying changes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target_team_id":{"type":"string","format":"uuid","description":"The ID of the team to move the agent into."},"bypass_standalone_gate":{"default":false,"description":"When true, move the agent together with every connected queue, trigger, and handover peer instead of rejecting a non-standalone agent. Defaults to false.","type":"boolean"}},"required":["target_team_id"]}}}},"parameters":[{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true"]},{"type":"string","enum":["false"]}]},"in":"query","name":"dry_run","required":false,"description":"When true, preview the closure and warnings without applying any changes."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The ID of the agent to move."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"source_team_id":{"type":"string"},"target_team_id":{"type":"string"},"root_agent_id":{"type":"string"},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"item_count":{"type":"number"}},"required":["id","name","item_count"],"additionalProperties":false}},"total_case_items":{"type":"number"},"total_runs":{"type":"number"},"skills_to_clone":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"files_to_copy":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"additionalProperties":false}},"warnings":{"type":"object","properties":{"outcome":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["connection","browser_login","credential","event_trigger"]},"agent_id":{"type":"string"},"agent_name":{"type":"string"},"integration_type":{"type":"string"},"integration_name":{"type":"string"},"instance_name":{"type":"string"},"owner_user_id":{"nullable":true,"type":"string"},"owner_name":{"type":"string"},"decision":{"type":"string","x-extensible-enum":["reuse","copy","shared_copy","needs_reconnect","unmatched_integration","blocked_by_org_policy","custom_to_rebuild","drop"]},"target_member_count":{"type":"number"}},"required":["kind","agent_id","agent_name","integration_type","integration_name","instance_name","owner_user_id","owner_name","decision"],"additionalProperties":false}},"instances_reconnected":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string"},"agent_name":{"type":"string"},"integration_type":{"type":"string"},"integration_name":{"type":"string"},"instance_name":{"type":"string"},"decision":{"type":"string","enum":["reuse","needs_reconnect","unmatched_integration","custom_to_rebuild"]}},"required":["agent_id","agent_name","integration_type","integration_name","instance_name","decision"],"additionalProperties":false}},"instances_disconnected":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string"},"agent_name":{"type":"string"},"integration_type":{"type":"string"},"integration_name":{"type":"string"},"instance_name":{"type":"string"},"decision":{"type":"string","enum":["reuse","needs_reconnect","unmatched_integration","custom_to_rebuild"]}},"required":["agent_id","agent_name","integration_type","integration_name","instance_name","decision"],"additionalProperties":false}},"custom_integrations_to_rebuild":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string"},"agent_name":{"type":"string"},"custom_integration_name":{"type":"string"}},"required":["agent_id","agent_name","custom_integration_name"],"additionalProperties":false}},"catalog_rows_created_on_target":{"type":"number"},"event_triggers_dropped":{"type":"number"},"schedules_dropped":{"type":"number"},"case_triggers_dropped":{"type":"number"},"readiness":{"type":"object","properties":{"users_missing_on_target":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"user_name":{"type":"string"},"source_role":{"type":"string"},"connections_dropped":{"type":"number"},"browser_logins_dropped":{"type":"number"},"credentials_dropped":{"type":"number"},"event_triggers_dropped":{"type":"number"},"schedules_dropped":{"type":"number"},"case_triggers_dropped":{"type":"number"},"runs_interrupted":{"type":"number"},"blocks_approvals":{"type":"boolean"},"runs_at_risk":{"type":"number"}},"required":["user_id","user_name","source_role","connections_dropped","browser_logins_dropped","credentials_dropped","event_triggers_dropped","schedules_dropped","case_triggers_dropped","runs_interrupted","blocks_approvals","runs_at_risk"],"additionalProperties":false}}},"required":["users_missing_on_target"],"additionalProperties":false},"in_flight_runs":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string"},"agent_name":{"type":"string"},"count":{"type":"number"}},"required":["agent_id","agent_name","count"],"additionalProperties":false}},"runs_pinned":{"type":"number"},"runs_interrupted":{"type":"number"}},"required":["resources","instances_reconnected","instances_disconnected","custom_integrations_to_rebuild","catalog_rows_created_on_target","event_triggers_dropped","schedules_dropped","case_triggers_dropped","readiness","in_flight_runs","runs_pinned","runs_interrupted"],"additionalProperties":false},"dropped_folders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"dropped_memory_count":{"type":"number"},"files_copied_count":{"type":"number"},"files_skipped_conflict":{"type":"array","items":{"type":"string"}}},"required":["outcome","dropped_folders","dropped_memory_count","files_copied_count","files_skipped_conflict"],"additionalProperties":false},"applied":{"type":"boolean"}},"required":["source_team_id","target_team_id","root_agent_id","agents","queues","total_case_items","total_runs","skills_to_clone","files_to_copy","warnings","applied"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["ASSIGNMENT_NOT_STANDALONE"]},"blockers":{"type":"object","properties":{"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"event_triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"handovers_outgoing":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"handovers_incoming":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["queues","triggers","event_triggers","handovers_outgoing","handovers_incoming"],"additionalProperties":false}},"required":["error","code","blockers"],"additionalProperties":false},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Move Agent","deprecated":true}},"/v1/automations/{automation_id}":{"get":{"operationId":"getAutomation","tags":["Automations"],"description":"Get a single automation with its agent and queue counts, the tab arrangement its detail view navigates by, and `links` to each tab it has right now.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"agent_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code_step_count":{"default":0,"description":"How many of the agent_count members are code steps rather than agents. Defaulted rather than required for the same reason is_setting_up is.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queue_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"},"folder_id":{"default":null,"description":"The agent folder this automation sits in, or null when it sits at the root. Automations reuse the team's existing agent_folder tree rather than a parallel one, so a converted team keeps the grouping it already had. Defaulted rather than required for the same reason is_setting_up is: the client parses this response, and a backend that predates the column must not throw and take the automation's name down with it.","nullable":true,"type":"string"},"process_node_id":{"description":"The process identity this Automation pins, which its People roles hang off. Null when it has none: its team has no organization, or a Module automation is not linked to its process yet.","nullable":true,"type":"string","format":"uuid"},"pinned_at":{"default":null,"description":"When the calling user pinned this automation to the top of their Automations list, or null when they have not. A pin is per user, like an Agent pin: teammates each keep their own. Defaulted rather than required for the same reason folder_id is.","nullable":true,"type":"string"},"is_setting_up":{"default":false,"description":"True while this Module automation's setup is under way. setup_started_at is stamped when the team starts setting up (and again by reopen-setup) and cleared when setup finishes, so this reads as currently in setup, not as a record of a past one. Read together with is_demo, which lives on the detail response: both true is a demo with a build under way; is_demo alone is a demo nobody has begun. On the summary rather than the detail so that a client holding only a list, create or patch response knows the state too, and so every write onto the shared automation collection carries it. Defaulted rather than required: the client parses this response, so a backend that predates the column must not throw and take the automation's name down with it, and nothing on the wire has always meant an automation nobody has set up.","type":"boolean"},"setup_step":{"default":null,"description":"The key of the latest confirmed setup step, null until Start Setup is pressed. The server only ever advances it forward, so reopening a setup can resume where the team got to. Cleared with the rest of the setup state when setup finishes.","nullable":true,"type":"string"},"setup_build_chat_id":{"default":null,"description":"The Ask Duvo chat building the automation from the approved proposal, or null while setup has not reached the build. Not a hard reference: the chat can be deleted while this still names it, which the client reads as no build yet.","nullable":true,"type":"string","format":"uuid"},"setup_progress":{"default":null,"description":"The setup facts behind the tile's Setup badge — captures uploaded, the team's own process map generated, a proposal written — or null while the automation is not being set up (and whenever it has no module process for the facts to hang off).","nullable":true,"type":"object","properties":{"has_captures":{"type":"boolean"},"has_process_map":{"type":"boolean"},"has_proposal":{"type":"boolean"}},"required":["has_captures","has_process_map","has_proposal"],"additionalProperties":false},"run_scope":{"description":"Who the automation's runs execute as: its members, each with their own Connections (`personal`), or the team, with shared Connections only (`team`). An automation becomes `team` once, through convert-to-team, and never goes back. Optional because a backend that predates Team automations does not send it; a client treats absence as `personal` and offers no conversion.","type":"string","enum":["personal","team"]},"viewer_can_edit":{"description":"Whether the caller may change this automation. An automation takes its agents' ownership rule: a Builder may edit one whose every agent they created, and Lead Builder or above may edit any. Sent by the list and detail endpoints; absent from create and update responses, where the client falls back to the caller's role.","type":"boolean"},"process_attributes":{"description":"The attribute values this automation holds through the process it runs (`process_node_id`), ordered by attribute name; join them to listProcessAttributes for names and labels. A value on a process the caller may not see is left out. Sent by the list endpoint while process attributes are enabled for the team; absent otherwise and from create and update responses.","type":"array","items":{"oneOf":[{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["select"]},"value_id":{"type":"string","format":"uuid"}},"required":["attribute_id","type","value_id"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["number"]},"number":{"type":"number"}},"required":["attribute_id","type","number"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["attribute_id","type","text"],"additionalProperties":false}]}},"live_revision_number":{"nullable":true,"description":"Number of the live revision, or null when none is live. It is a number, not a history the user can open: revision history is shown only on the Revisions tab, so when asked for it and `links` has no `revisions`, first say this Automation has no Revisions tab.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"module_template_slug":{"nullable":true,"description":"Slug of the Module template this Automation was created from, or null. Permanent provenance — it survives setup and is not cleared.","type":"string"},"module_template_version":{"nullable":true,"description":"Version of that template, set alongside the slug.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"clarity_process_id":{"default":null,"description":"The Clarity process this Automation runs: its Module's process, or the one it was built from. Null when it runs none. Its map is what the Process tab shows. Defaulted for a backend that predates the field.","nullable":true,"type":"string"},"is_demo":{"type":"boolean","description":"True while this is an unconverted Module demo: its data is sample data and it cannot run. Cleared when the demo is converted into a real automation, which is irreversible and either deletes the sample cases and Runs or closes them out as history. Starting setup does not clear it: that only records that setup began."},"has_draft":{"type":"boolean","description":"Whether an open draft revision exists. Always false for an automation without revisions: an automation-level draft badge is a revision concept, and the agent builder surfaces its own draft build state."},"created_by":{"nullable":true,"description":"User who created the automation (null for migrated teams)","type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"updated_by":{"nullable":true,"description":"User who last updated the automation","type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"dismissed_onboarding_cards":{"default":[],"description":"The onboarding cards someone dismissed from this Automation's Overview. A dismissal is shared by everyone on the team. Defaulted for a backend that predates the field.","type":"array","items":{"type":"string","enum":["agents","connections","people","schedules_triggers"]}}},"required":["id","name","agent_count","code_step_count","queue_count","created_at","updated_at","folder_id","pinned_at","is_setting_up","setup_step","setup_build_chat_id","setup_progress","live_revision_number","module_template_slug","module_template_version","clarity_process_id","is_demo","has_draft","created_by","updated_by","dismissed_onboarding_cards"],"additionalProperties":false},"tabs":{"description":"The detail view's tab arrangement, carried here so opening an automation resolves its navigation in the same request as the automation itself.","type":"object","properties":{"layout":{"type":"object","properties":{"order":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Left-group tab keys in render order"},"hidden":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Native tab keys the user removed from the bar"}},"required":["order","hidden"],"additionalProperties":false},"pulse_tabs":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"Pinned Pulse dashboard"},"title":{"nullable":true,"description":"Dashboard title (null until the agent names it)","type":"string"},"icon":{"description":"Lucide icon name picked when the dashboard was named (null for dashboards generated before icons existed)","nullable":true,"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"status":{"type":"string","enum":["not_started","pending","running","completed","failed","interrupted"],"description":"Generation status of the dashboard"},"has_version":{"description":"Whether the dashboard has a saved version. False while Ask Duvo is still writing its first one.","type":"boolean"}},"required":["artifact_id","title","status"],"additionalProperties":false},"description":"Resolved metadata for the pinned Pulse dashboards in `order`"}},"required":["layout","pulse_tabs"],"additionalProperties":false},"links":{"type":"object","properties":{"overview":{"type":"string","description":"Root-relative path that opens this tab"},"overview_new":{"description":"The Admin cockpit, which replaces Overview where it is on: the same automation in one column, with onboarding for its empty parts","type":"string"},"process":{"type":"string","description":"Root-relative path that opens this tab"},"past_runs":{"description":"The Past Runs tab: every Run of this automation. A Module demo has none","type":"string"},"requests":{"description":"The Requests tab: the questions and approvals this automation's runs raised, and answering them","type":"string"},"notifications":{"description":"The Notifications tab: the viewer's notifications about this automation's agents, queues and the connections they use","type":"string"},"policy":{"type":"string","description":"Root-relative path that opens this tab"},"people":{"description":"The People tab: the process roles, meaning who runs, reviews and manages the work. Its own tab, not part of Policy","type":"string"},"agents_queues":{"description":"The Automation tab: its Agents, Queues and the flow between them","type":"string"},"revisions":{"description":"The Revisions tab. A Module demo and an automation on a team without revisions have none: say so, and do not point to another tab or to the Agents for revision history","type":"string"},"setup":{"type":"string","description":"Root-relative path that opens this tab"},"setup_start":{"type":"string","description":"Root-relative path that opens this tab"},"upload_files":{"type":"string","description":"Root-relative path that opens this tab"},"interview":{"type":"string","description":"Root-relative path that opens this tab"},"automation_proposal":{"type":"string","description":"Root-relative path that opens this tab"},"dashboards":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's tab label"},"link":{"type":"string","description":"Root-relative path that opens this tab"}},"required":["artifact_id","name","link"],"additionalProperties":false},"description":"One link per dashboard on this automation's tab bar"}},"required":["dashboards"],"additionalProperties":false,"description":"Links to the automation's tabs that exist right now, for this viewer. When the user asks where something on the automation is, answer with one of these. A tab the automation does not have is absent: say it has none. Copy these into a reply; never build an automation URL by hand."}},"required":["automation"],"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 Automation","deprecated":true},"patch":{"operationId":"updateAutomation","tags":["Automations"],"description":"Update an automation, e.g. rename it. Only the fields present in the body are changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New human-readable automation name.","type":"string","minLength":1,"maxLength":100}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"agent_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code_step_count":{"default":0,"description":"How many of the agent_count members are code steps rather than agents. Defaulted rather than required for the same reason is_setting_up is.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queue_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"},"folder_id":{"default":null,"description":"The agent folder this automation sits in, or null when it sits at the root. Automations reuse the team's existing agent_folder tree rather than a parallel one, so a converted team keeps the grouping it already had. Defaulted rather than required for the same reason is_setting_up is: the client parses this response, and a backend that predates the column must not throw and take the automation's name down with it.","nullable":true,"type":"string"},"process_node_id":{"description":"The process identity this automation pins: the process whose attributes listProcessAttributeValues reads and whose People roles hang off it. Null when it has none. Set on the list response; optional so the create and patch responses, which share this shape, need not carry it.","nullable":true,"type":"string","format":"uuid"},"pinned_at":{"default":null,"description":"When the calling user pinned this automation to the top of their Automations list, or null when they have not. A pin is per user, like an Agent pin: teammates each keep their own. Defaulted rather than required for the same reason folder_id is.","nullable":true,"type":"string"},"is_setting_up":{"default":false,"description":"True while this Module automation's setup is under way. setup_started_at is stamped when the team starts setting up (and again by reopen-setup) and cleared when setup finishes, so this reads as currently in setup, not as a record of a past one. Read together with is_demo, which lives on the detail response: both true is a demo with a build under way; is_demo alone is a demo nobody has begun. On the summary rather than the detail so that a client holding only a list, create or patch response knows the state too, and so every write onto the shared automation collection carries it. Defaulted rather than required: the client parses this response, so a backend that predates the column must not throw and take the automation's name down with it, and nothing on the wire has always meant an automation nobody has set up.","type":"boolean"},"setup_step":{"default":null,"description":"The key of the latest confirmed setup step, null until Start Setup is pressed. The server only ever advances it forward, so reopening a setup can resume where the team got to. Cleared with the rest of the setup state when setup finishes.","nullable":true,"type":"string"},"setup_build_chat_id":{"default":null,"description":"The Ask Duvo chat building the automation from the approved proposal, or null while setup has not reached the build. Not a hard reference: the chat can be deleted while this still names it, which the client reads as no build yet.","nullable":true,"type":"string","format":"uuid"},"setup_progress":{"default":null,"description":"The setup facts behind the tile's Setup badge — captures uploaded, the team's own process map generated, a proposal written — or null while the automation is not being set up (and whenever it has no module process for the facts to hang off).","nullable":true,"type":"object","properties":{"has_captures":{"type":"boolean"},"has_process_map":{"type":"boolean"},"has_proposal":{"type":"boolean"}},"required":["has_captures","has_process_map","has_proposal"],"additionalProperties":false},"run_scope":{"description":"Who the automation's runs execute as: its members, each with their own Connections (`personal`), or the team, with shared Connections only (`team`). An automation becomes `team` once, through convert-to-team, and never goes back. Optional because a backend that predates Team automations does not send it; a client treats absence as `personal` and offers no conversion.","type":"string","enum":["personal","team"]},"viewer_can_edit":{"description":"Whether the caller may change this automation. An automation takes its agents' ownership rule: a Builder may edit one whose every agent they created, and Lead Builder or above may edit any. Sent by the list and detail endpoints; absent from create and update responses, where the client falls back to the caller's role.","type":"boolean"},"process_attributes":{"description":"The attribute values this automation holds through the process it runs (`process_node_id`), ordered by attribute name; join them to listProcessAttributes for names and labels. A value on a process the caller may not see is left out. Sent by the list endpoint while process attributes are enabled for the team; absent otherwise and from create and update responses.","type":"array","items":{"oneOf":[{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["select"]},"value_id":{"type":"string","format":"uuid"}},"required":["attribute_id","type","value_id"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["number"]},"number":{"type":"number"}},"required":["attribute_id","type","number"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["attribute_id","type","text"],"additionalProperties":false}]}}},"required":["id","name","agent_count","code_step_count","queue_count","created_at","updated_at","folder_id","pinned_at","is_setting_up","setup_step","setup_build_chat_id","setup_progress"],"additionalProperties":false}},"required":["automation"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Automation","deprecated":true},"delete":{"operationId":"deleteAutomation","tags":["Automations"],"description":"Soft-delete an automation. Its member agents and queues stop dispatching and disappear from listings, but their underlying rows and run history are preserved (not erased). Runs still in progress on its agents are interrupted.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation 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"}},"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":"Delete Automation","deprecated":true}},"/v1/automations/{automation_id}/setup/process-map":{"post":{"operationId":"generateAutomationProcessMap","tags":["Automations"],"description":"Start the setup step Generate current process map for a Module automation being set up, the same as pressing it in the web app: Duvo writes the map of how the work runs today from the uploaded files, the interviews and the Policy. Returns 202 at once; the map takes a few minutes and appears on the setup's Current Process step (`url`). Over a map the team already has, it writes a new version. Refused with 409 while required Policy questions are open, a file or interview is still being transcribed, nothing usable is uploaded, or Duvo is already writing the map or the proposal, and with 403 unless the caller created the process or is a Lead Builder or above. Confirm with the user before calling: say it writes the map from what setup has collected. Next comes `generateAutomationProposal`.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"process_map":{"type":"object","properties":{"status":{"type":"string","enum":["generating"],"description":"Duvo is writing the map now. It takes a few minutes and appears on the setup's Current Process step."},"process_id":{"type":"string","format":"uuid","description":"The Clarity process the Module documents."},"process_name":{"type":"string","description":"The process's name."},"regenerating":{"type":"boolean","description":"True when the team already had its own map, so this writes a new version of it."},"link":{"nullable":true,"description":"Root-relative web-app path to the setup's Current Process step, or null when this viewer has no such tab.","type":"string"},"url":{"nullable":true,"description":"The full web-app URL of `link`.","type":"string"}},"required":["status","process_id","process_name","regenerating","link","url"],"additionalProperties":false}},"required":["process_map"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Generate Automation Process Map","deprecated":true}},"/v1/automations/{automation_id}/setup/automation-proposal":{"post":{"operationId":"generateAutomationProposal","tags":["Automations"],"description":"Approve the current process map of a Module automation being set up and start writing the automation proposal from it, the same as the setup's Approve and continue in the web app. The proposal says what Duvo automates, what stays with the team and where work hands over. Returns 202 at once; the proposal takes a few minutes and appears on the setup's Automation Proposal step (`url`). Needs the team's own live current process map (call `generateAutomationProcessMap` first) and no proposal yet; `current_process_snapshot_id`, when given, must be that live map. Refused with 409 otherwise, or while required Policy questions are open or Duvo is already writing, and with 403 unless the caller created the process or is a Lead Builder or above. Confirm with the user before calling: say that approving the map writes the proposal from it. Next comes `approveAutomationProposal`.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"current_process_snapshot_id":{"description":"The current process map being approved. Must be the live map; leave out to approve whichever map is live.","type":"string","format":"uuid"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"automation_proposal":{"type":"object","properties":{"status":{"type":"string","enum":["generating"],"description":"Duvo is writing the proposal now. It takes a few minutes and appears on the setup's Automation Proposal step."},"process_id":{"type":"string","format":"uuid","description":"The Clarity process the Module documents."},"process_name":{"type":"string","description":"The process's name."},"current_process_snapshot_id":{"type":"string","format":"uuid","description":"The approved current process map the proposal is written from."},"link":{"nullable":true,"description":"Root-relative web-app path to the setup's Automation Proposal step, or null when this viewer has no such tab.","type":"string"},"url":{"nullable":true,"description":"The full web-app URL of `link`.","type":"string"}},"required":["status","process_id","process_name","current_process_snapshot_id","link","url"],"additionalProperties":false}},"required":["automation_proposal"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Generate Automation Proposal","deprecated":true}},"/v1/automations/{automation_id}/setup/approve-proposal":{"post":{"operationId":"approveAutomationProposal","tags":["Automations"],"description":"Approve the automation proposal of a Module automation being set up, the same as the setup's Approve and build in the web app: it opens an Ask Duvo conversation that reads the proposal and the Policy, proposes which Agents, Queues and dashboards change, makes the changes once the user agrees there, and finishes the setup. Give the user the conversation's `url`; they answer Duvo's plan in it. `proposal_snapshot_id`, when given, must be the live proposal. A build already started is returned with status `already_started` rather than started twice. Refused with 409 when there is no live proposal, required Policy questions are open, or Ask Duvo isn't available to the team, and with 403 below Builder. With Automation conversion in Ask Duvo on for the team, the conversation runs the same build specification flow as Clarity's Create automation against this automation, and takes its access too: 403 unless the caller created the process, is a Lead Builder or above, or the team's Clarity access is unrestricted. Confirm with the user before calling: approving starts the build.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"proposal_snapshot_id":{"description":"The automation proposal being approved. Must be the live proposal; leave out to approve whichever proposal is live.","type":"string","format":"uuid"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"build":{"type":"object","properties":{"status":{"type":"string","enum":["started","already_started"],"description":"`started`: the approval opened an Ask Duvo conversation that builds the automation. `already_started`: the approved proposal was handed to that conversation before, so nothing new started."},"chat_id":{"type":"string","format":"uuid","description":"The Ask Duvo conversation building the automation."},"proposal_snapshot_id":{"nullable":true,"description":"The approved automation proposal, or null when the build had already started.","type":"string","format":"uuid"},"link":{"type":"string","description":"Root-relative web-app path to the build conversation, where the user reads Duvo's plan and answers it."},"url":{"type":"string","description":"The full web-app URL of `link`."}},"required":["status","chat_id","proposal_snapshot_id","link","url"],"additionalProperties":false}},"required":["build"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Approve Automation Proposal","deprecated":true}},"/v1/automations/{automation_id}/tabs":{"get":{"operationId":"getAutomationTabs","tags":["Automations"],"description":"Get the automation detail view's tab arrangement, plus metadata for the Pulse dashboards pinned into it. Pinned dashboards are filtered to the ones the calling identity may see.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"layout":{"type":"object","properties":{"order":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Left-group tab keys in render order"},"hidden":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Native tab keys the user removed from the bar"}},"required":["order","hidden"],"additionalProperties":false},"pulse_tabs":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"Pinned Pulse dashboard"},"title":{"nullable":true,"description":"Dashboard title (null until the agent names it)","type":"string"},"icon":{"description":"Lucide icon name picked when the dashboard was named (null for dashboards generated before icons existed)","nullable":true,"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"status":{"type":"string","enum":["not_started","pending","running","completed","failed","interrupted"],"description":"Generation status of the dashboard"},"has_version":{"description":"Whether the dashboard has a saved version. False while Ask Duvo is still writing its first one.","type":"boolean"}},"required":["artifact_id","title","status"],"additionalProperties":false},"description":"Resolved metadata for the pinned Pulse dashboards in `order`"}},"required":["layout","pulse_tabs"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Automation Tabs","deprecated":true},"put":{"operationId":"updateAutomationTabs","tags":["Automations"],"description":"Replace the automation detail view's tab arrangement. Pinning, unpinning, reordering and hiding a tab are all expressed as a different arrangement.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"order":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Left-group tab keys in render order"},"hidden":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Native tab keys the user removed from the bar"}},"required":["order","hidden"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"layout":{"type":"object","properties":{"order":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Left-group tab keys in render order"},"hidden":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Native tab keys the user removed from the bar"}},"required":["order","hidden"],"additionalProperties":false},"pulse_tabs":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"Pinned Pulse dashboard"},"title":{"nullable":true,"description":"Dashboard title (null until the agent names it)","type":"string"},"icon":{"description":"Lucide icon name picked when the dashboard was named (null for dashboards generated before icons existed)","nullable":true,"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"status":{"type":"string","enum":["not_started","pending","running","completed","failed","interrupted"],"description":"Generation status of the dashboard"},"has_version":{"description":"Whether the dashboard has a saved version. False while Ask Duvo is still writing its first one.","type":"boolean"}},"required":["artifact_id","title","status"],"additionalProperties":false},"description":"Resolved metadata for the pinned Pulse dashboards in `order`"}},"required":["layout","pulse_tabs"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Automation Tabs","deprecated":true}},"/v1/automations/{automation_id}/duplicate":{"post":{"operationId":"duplicateAutomation","tags":["Automations"],"description":"Duplicate an automation into a new one named \"Copy of <name>\", copying what it runs today: its live agents and builds, its queues (empty), the routing and handovers between them, and each agent's Memory when the team holds Memory and the agent has it on. The caller's own triggers and schedules are copied switched off, so the copy starts no run until they turn them on; other members' triggers and schedules are not copied. An automation built by hand also gets its Policy: sections, questions, answers, and which agents read them. Cases and run history are not copied. A Module demo, and a Module automation with Policy questions, can't be duplicated.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"The automation to duplicate"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"agent_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code_step_count":{"default":0,"description":"How many of the agent_count members are code steps rather than agents. Defaulted rather than required for the same reason is_setting_up is.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queue_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"},"folder_id":{"default":null,"description":"The agent folder this automation sits in, or null when it sits at the root. Automations reuse the team's existing agent_folder tree rather than a parallel one, so a converted team keeps the grouping it already had. Defaulted rather than required for the same reason is_setting_up is: the client parses this response, and a backend that predates the column must not throw and take the automation's name down with it.","nullable":true,"type":"string"},"process_node_id":{"description":"The process identity this automation pins: the process whose attributes listProcessAttributeValues reads and whose People roles hang off it. Null when it has none. Set on the list response; optional so the create and patch responses, which share this shape, need not carry it.","nullable":true,"type":"string","format":"uuid"},"pinned_at":{"default":null,"description":"When the calling user pinned this automation to the top of their Automations list, or null when they have not. A pin is per user, like an Agent pin: teammates each keep their own. Defaulted rather than required for the same reason folder_id is.","nullable":true,"type":"string"},"is_setting_up":{"default":false,"description":"True while this Module automation's setup is under way. setup_started_at is stamped when the team starts setting up (and again by reopen-setup) and cleared when setup finishes, so this reads as currently in setup, not as a record of a past one. Read together with is_demo, which lives on the detail response: both true is a demo with a build under way; is_demo alone is a demo nobody has begun. On the summary rather than the detail so that a client holding only a list, create or patch response knows the state too, and so every write onto the shared automation collection carries it. Defaulted rather than required: the client parses this response, so a backend that predates the column must not throw and take the automation's name down with it, and nothing on the wire has always meant an automation nobody has set up.","type":"boolean"},"setup_step":{"default":null,"description":"The key of the latest confirmed setup step, null until Start Setup is pressed. The server only ever advances it forward, so reopening a setup can resume where the team got to. Cleared with the rest of the setup state when setup finishes.","nullable":true,"type":"string"},"setup_build_chat_id":{"default":null,"description":"The Ask Duvo chat building the automation from the approved proposal, or null while setup has not reached the build. Not a hard reference: the chat can be deleted while this still names it, which the client reads as no build yet.","nullable":true,"type":"string","format":"uuid"},"setup_progress":{"default":null,"description":"The setup facts behind the tile's Setup badge — captures uploaded, the team's own process map generated, a proposal written — or null while the automation is not being set up (and whenever it has no module process for the facts to hang off).","nullable":true,"type":"object","properties":{"has_captures":{"type":"boolean"},"has_process_map":{"type":"boolean"},"has_proposal":{"type":"boolean"}},"required":["has_captures","has_process_map","has_proposal"],"additionalProperties":false},"run_scope":{"description":"Who the automation's runs execute as: its members, each with their own Connections (`personal`), or the team, with shared Connections only (`team`). An automation becomes `team` once, through convert-to-team, and never goes back. Optional because a backend that predates Team automations does not send it; a client treats absence as `personal` and offers no conversion.","type":"string","enum":["personal","team"]},"viewer_can_edit":{"description":"Whether the caller may change this automation. An automation takes its agents' ownership rule: a Builder may edit one whose every agent they created, and Lead Builder or above may edit any. Sent by the list and detail endpoints; absent from create and update responses, where the client falls back to the caller's role.","type":"boolean"},"process_attributes":{"description":"The attribute values this automation holds through the process it runs (`process_node_id`), ordered by attribute name; join them to listProcessAttributes for names and labels. A value on a process the caller may not see is left out. Sent by the list endpoint while process attributes are enabled for the team; absent otherwise and from create and update responses.","type":"array","items":{"oneOf":[{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["select"]},"value_id":{"type":"string","format":"uuid"}},"required":["attribute_id","type","value_id"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["number"]},"number":{"type":"number"}},"required":["attribute_id","type","number"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["attribute_id","type","text"],"additionalProperties":false}]}}},"required":["id","name","agent_count","code_step_count","queue_count","created_at","updated_at","folder_id","pinned_at","is_setting_up","setup_step","setup_build_chat_id","setup_progress"],"additionalProperties":false,"description":"The new automation: a copy of the source's live agents, builds, queues and the routing between them."}},"required":["automation"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Duplicate Automation","deprecated":true}},"/v1/automations/{automation_id}/current":{"get":{"operationId":"getAutomationCurrent","tags":["Automations"],"description":"Get what the automation is set up to do right now: its member agents with the builds that are live, its queues' routing, and the triggers and schedules firing for it. The revision-less counterpart of the revision detail — an automation without revisions is read here. `links` holds a link to each tab the automation has right now.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"current":{"type":"object","properties":{"automation_id":{"type":"string","format":"uuid","description":"Automation this view was computed for"},"ai_description":{"nullable":true,"description":"AI-generated short description of what the automation does (null until generated). Read from the automation itself, not from a revision — the revision-less home for the overview.","type":"string"},"ai_summary":{"nullable":true,"description":"AI-generated detailed overview of the automation — business and technical (null until generated)","type":"string"},"overview_generated_at":{"nullable":true,"description":"ISO 8601 timestamp of the automation's last AI overview generation","type":"string"},"agent_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of member agents with a live build — the length of `agents`, matching the revision detail's semantics. Not the automation's member count: a member with no live build has no binding to report and is absent from both. Use `automation.agent_count` for members."},"queue_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of member queues"},"trigger_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of triggers firing for the members"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","description":"Agent identifier"},"build_id":{"type":"string","format":"uuid","description":"Build referenced for the agent in this revision"}},"required":["agent_id","build_id"],"additionalProperties":false},"description":"Member agents, each with the build that runs now"},"queues":{"type":"array","items":{"type":"object","properties":{"case_queue_id":{"type":"string","format":"uuid","description":"Queue identifier"},"agent_id":{"nullable":true,"description":"Agent the queue routes to in this revision (null when unrouted)","type":"string","format":"uuid"},"enabled":{"type":"boolean","description":"Whether the queue's routing is enabled"},"name":{"nullable":true,"description":"Per-revision queue name override (null to keep the queue's own name)","type":"string"},"description":{"nullable":true,"description":"Per-revision queue description override","type":"string"}},"required":["case_queue_id","agent_id","enabled","name","description"],"additionalProperties":false},"description":"Member queues with the agent each routes new cases to"},"triggers":{"type":"array","items":{"type":"object","properties":{"automation_trigger_id":{"type":"string","nullable":true,"enum":[null],"description":"Always null: the current view is derived from legacy trigger rows, which carry no declaration identity"},"agent_id":{"type":"string","format":"uuid","description":"Agent this trigger routes to"},"integration_slug":{"type":"string","description":"Integration the declaration watches, e.g. `gmail`"},"trigger_type":{"type":"string","description":"Trigger type within the integration, e.g. `new_email`"},"filter_config":{"type":"object","additionalProperties":{},"description":"Per-revision trigger filter configuration"},"enabled":{"type":"boolean","description":"Whether the trigger is switched on for any member"}},"required":["automation_trigger_id","agent_id","integration_slug","trigger_type","filter_config","enabled"],"additionalProperties":false},"description":"Triggers firing for the member agents"},"schedules":{"type":"array","items":{"type":"object","properties":{"automation_schedule_id":{"type":"string","nullable":true,"enum":[null],"description":"Always null: the current view is derived from legacy schedule rows, which carry no declaration identity"},"agent_id":{"type":"string","format":"uuid","description":"Agent this schedule fires"},"cron":{"nullable":true,"description":"5-field cron expression; when set, the frequency form is unused","type":"string"},"frequency":{"nullable":true,"description":"Frequency form, used when `cron` is null","type":"string","enum":["hourly","daily","workday","weekly","monthly"]},"time":{"nullable":true,"description":"Local time of day as HH:MM, for the frequency form","type":"string"},"timezone":{"type":"string","description":"IANA timezone the schedule is evaluated in"},"day":{"nullable":true,"description":"Day of week for a weekly schedule","type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"day_of_month":{"nullable":true,"description":"Day of month for a monthly schedule","type":"integer","minimum":1,"maximum":31},"task":{"nullable":true,"description":"Prompt passed as the run's initial user message","type":"string"},"enabled":{"type":"boolean","description":"Whether the schedule is switched on for any member"}},"required":["automation_schedule_id","agent_id","cron","frequency","time","timezone","day","day_of_month","task","enabled"],"additionalProperties":false},"description":"Recurring schedules firing for the member agents"}},"required":["automation_id","ai_description","ai_summary","overview_generated_at","agent_count","queue_count","trigger_count","agents","queues","triggers","schedules"],"additionalProperties":false,"description":"The automation's current setup"},"links":{"type":"object","properties":{"overview":{"type":"string","description":"Root-relative path that opens this tab"},"overview_new":{"description":"The Admin cockpit, which replaces Overview where it is on: the same automation in one column, with onboarding for its empty parts","type":"string"},"process":{"type":"string","description":"Root-relative path that opens this tab"},"past_runs":{"description":"The Past Runs tab: every Run of this automation. A Module demo has none","type":"string"},"requests":{"description":"The Requests tab: the questions and approvals this automation's runs raised, and answering them","type":"string"},"notifications":{"description":"The Notifications tab: the viewer's notifications about this automation's agents, queues and the connections they use","type":"string"},"policy":{"type":"string","description":"Root-relative path that opens this tab"},"people":{"description":"The People tab: the process roles, meaning who runs, reviews and manages the work. Its own tab, not part of Policy","type":"string"},"agents_queues":{"description":"The Automation tab: its Agents, Queues and the flow between them","type":"string"},"revisions":{"description":"The Revisions tab. A Module demo and an automation on a team without revisions have none: say so, and do not point to another tab or to the Agents for revision history","type":"string"},"setup":{"type":"string","description":"Root-relative path that opens this tab"},"setup_start":{"type":"string","description":"Root-relative path that opens this tab"},"upload_files":{"type":"string","description":"Root-relative path that opens this tab"},"interview":{"type":"string","description":"Root-relative path that opens this tab"},"automation_proposal":{"type":"string","description":"Root-relative path that opens this tab"},"dashboards":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's tab label"},"link":{"type":"string","description":"Root-relative path that opens this tab"}},"required":["artifact_id","name","link"],"additionalProperties":false},"description":"One link per dashboard on this automation's tab bar"}},"required":["dashboards"],"additionalProperties":false,"description":"Links to the automation's tabs that exist right now, for this viewer. When the user asks where something on the automation is, answer with one of these. A tab the automation does not have is absent: say it has none. Copy these into a reply; never build an automation URL by hand."}},"required":["current"],"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 Automation Current","deprecated":true}},"/v1/automations/{automation_id}/current/flow":{"get":{"operationId":"getAutomationCurrentFlow","tags":["Automations"],"description":"Get the automation's flow graph as it stands right now: the agents and queues it currently wires together, plus the producer, consumer, and handover edges between them. The revision-less counterpart of the revision flow.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"flow":{"type":"object","properties":{"revision_id":{"type":"string","nullable":true,"enum":[null],"description":"Always null: the current view describes no revision"},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Agent identifier"},"name":{"type":"string","description":"Agent name"}},"required":["id","name"],"additionalProperties":false},"description":"Agent nodes in the flow"},"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Queue identifier"},"name":{"type":"string","description":"Queue name (per-revision override or canonical)"},"item_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Active (non-deleted) case count in the queue"},"producer_agent_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Agents that add cases to this queue"},"consumer_agent_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Agents that process cases from this queue"},"routed_consumer_agent_id":{"nullable":true,"description":"Consumer the revision routes new cases to (null when unrouted or disabled)","type":"string","format":"uuid"}},"required":["id","name","item_count","producer_agent_ids","consumer_agent_ids","routed_consumer_agent_id"],"additionalProperties":false},"description":"Queue nodes in the flow"},"handovers":{"type":"array","items":{"type":"object","properties":{"source_agent_id":{"type":"string","format":"uuid","description":"Node that hands work over"},"target_agent_id":{"type":"string","format":"uuid","description":"Node that receives the handover"},"kind":{"type":"string","description":"Who decides this edge: the model (aop), the platform always (configured), or the code step's own program (code_option)","x-extensible-enum":["aop","configured","code_option"]}},"required":["source_agent_id","target_agent_id","kind"],"additionalProperties":false},"description":"Handover edges between nodes, model-decided and deterministic"}},"required":["revision_id","agents","queues","handovers"],"additionalProperties":false,"description":"The automation's current flow graph"}},"required":["flow"],"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 Automation Current Flow","deprecated":true}},"/v1/automations/{automation_id}/readiness":{"get":{"operationId":"getAutomationReadiness","tags":["Automations"],"description":"What still has to be set up before an automation can run on real work. Call this first for a readiness question (\"what do I still need to set up\", \"is it ready to run\", \"why isn't it running\") and before checking an automation's Connections, Logins or Secrets one by one. Each of `items` is `{ key, label, status: ok | missing | broken, detail, link, link_tab }` and covers one of: required Policy questions still open, Connections with no working account pinned or that need reconnecting, Logins and Secrets (present or missing, never their values), Queue slots with no Queue linked, Queues with routing off, no Agent or an Agent that is not live yet, what starts it (a Trigger, a Schedule, or Cases added to a routed Queue), the active revision and a pending draft, and whether it is still a demo. While a Module is being set up and its proposal has not been approved, `items` covers only its setup: required Policy questions, the current process map (`setup:process_map`) and the automation proposal (`setup:automation_proposal`), or, when its setup progress is unavailable, one `setup` item linked to the setup's Get started page, whose approval builds the automation; Connections, Queues and what starts it are checked again once the approved proposal is being built. Lead with what is `missing` or `broken`, each with its own `link` (named by `link_tab`); never build a link. Quote counts from `summary`, including `connections_to_fix`, rather than counting items. `ready` is null when the caller can't read the Policy; `note` then says what to tell the user. A Connection only the caller can see counts for the caller. When `links_note` is present, give no link to the automation at all. Each `link` is a path in the Duvo web app; give the user the full URL beside it (`url`, and `urls` for `links`).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"readiness":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"ready":{"nullable":true,"description":"True when every item is ok. Null when the caller can't read the Policy, so readiness can't be judged; `note` then says so","type":"boolean"},"note":{"description":"Present when `ready` is null: what to tell the person asking","type":"string"},"summary":{"type":"object","properties":{"ok":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"missing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"broken":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"connections_to_fix":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many Connection items are missing or broken"}},"required":["ok","missing","broken","connections_to_fix"],"additionalProperties":false,"description":"Counts over `items`; quote these rather than recounting"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable id of the check, such as `policy`, `connection:<agent>:<integration>` or `trigger`"},"label":{"type":"string","description":"What the check covers, in the product's words"},"status":{"type":"string","enum":["ok","missing","broken"],"description":"`ok`, `missing` (not set up yet) or `broken` (set up, failing)"},"detail":{"type":"string","description":"What was found, written for the person asking"},"link":{"nullable":true,"description":"Root-relative path of the tab where this item is fixed; null when there is none for this viewer","type":"string"},"link_tab":{"nullable":true,"description":"The name of the tab `link` opens, as the tab bar shows it","type":"string"},"url":{"nullable":true,"type":"string","description":"The same page as `link`, as a full web-app URL to give the user"}},"required":["key","label","status","detail","link","link_tab","url"],"additionalProperties":false}},"links":{"type":"object","properties":{"overview":{"type":"string","description":"Root-relative path that opens this tab"},"overview_new":{"description":"The Admin cockpit, which replaces Overview where it is on: the same automation in one column, with onboarding for its empty parts","type":"string"},"process":{"type":"string","description":"Root-relative path that opens this tab"},"past_runs":{"description":"The Past Runs tab: every Run of this automation. A Module demo has none","type":"string"},"requests":{"description":"The Requests tab: the questions and approvals this automation's runs raised, and answering them","type":"string"},"notifications":{"description":"The Notifications tab: the viewer's notifications about this automation's agents, queues and the connections they use","type":"string"},"policy":{"type":"string","description":"Root-relative path that opens this tab"},"people":{"description":"The People tab: the process roles, meaning who runs, reviews and manages the work. Its own tab, not part of Policy","type":"string"},"agents_queues":{"description":"The Automation tab: its Agents, Queues and the flow between them","type":"string"},"revisions":{"description":"The Revisions tab. A Module demo and an automation on a team without revisions have none: say so, and do not point to another tab or to the Agents for revision history","type":"string"},"setup":{"type":"string","description":"Root-relative path that opens this tab"},"setup_start":{"type":"string","description":"Root-relative path that opens this tab"},"upload_files":{"type":"string","description":"Root-relative path that opens this tab"},"interview":{"type":"string","description":"Root-relative path that opens this tab"},"automation_proposal":{"type":"string","description":"Root-relative path that opens this tab"},"dashboards":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's tab label"},"link":{"type":"string","description":"Root-relative path that opens this tab"}},"required":["artifact_id","name","link"],"additionalProperties":false},"description":"One link per dashboard on this automation's tab bar"}},"required":["dashboards"],"additionalProperties":false,"description":"Links to the automation's tabs that exist right now, for this viewer. When the user asks where something on the automation is, answer with one of these. A tab the automation does not have is absent: say it has none. Copy these into a reply; never build an automation URL by hand."},"links_note":{"description":"Present when no link to the automation is available for this caller: give no link to it or any of its tabs","type":"string"},"urls":{"type":"object","properties":{"overview":{"type":"string","description":"Root-relative path that opens this tab"},"overview_new":{"description":"The Admin cockpit, which replaces Overview where it is on: the same automation in one column, with onboarding for its empty parts","type":"string"},"process":{"type":"string","description":"Root-relative path that opens this tab"},"past_runs":{"description":"The Past Runs tab: every Run of this automation. A Module demo has none","type":"string"},"requests":{"description":"The Requests tab: the questions and approvals this automation's runs raised, and answering them","type":"string"},"notifications":{"description":"The Notifications tab: the viewer's notifications about this automation's agents, queues and the connections they use","type":"string"},"policy":{"type":"string","description":"Root-relative path that opens this tab"},"people":{"description":"The People tab: the process roles, meaning who runs, reviews and manages the work. Its own tab, not part of Policy","type":"string"},"agents_queues":{"description":"The Automation tab: its Agents, Queues and the flow between them","type":"string"},"revisions":{"description":"The Revisions tab. A Module demo and an automation on a team without revisions have none: say so, and do not point to another tab or to the Agents for revision history","type":"string"},"setup":{"type":"string","description":"Root-relative path that opens this tab"},"setup_start":{"type":"string","description":"Root-relative path that opens this tab"},"upload_files":{"type":"string","description":"Root-relative path that opens this tab"},"interview":{"type":"string","description":"Root-relative path that opens this tab"},"automation_proposal":{"type":"string","description":"Root-relative path that opens this tab"},"dashboards":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's tab label"},"link":{"type":"string","description":"Root-relative path that opens this tab"}},"required":["artifact_id","name","link"],"additionalProperties":false},"description":"One link per dashboard on this automation's tab bar"}},"required":["dashboards"],"additionalProperties":false,"description":"`links` as full web-app URLs; give these to the user"}},"required":["automation","ready","summary","items","links","urls"],"additionalProperties":false}},"required":["readiness"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Automation Readiness","deprecated":true}},"/v1/automations/{automation_id}/dashboard-data":{"get":{"operationId":"readAutomationDashboardData","tags":["Automations"],"description":"The figures a Module automation's Pulse dashboards show, computed server-side the same way the dashboard computes them: each tile's `label`, `value`, `unit` and `display` (the value as the dashboard prints it), with a `description` where the label alone leaves the figure unclear and a `note` for what the tile shows besides it. Call this for any number on a Module dashboard instead of reading the dashboard's HTML (`getPulseDashboardHtml` refuses Module dashboards for size) or paging through Cases: a recount can disagree with the tile the user sees. Pass `dashboard_id` for one dashboard, or leave it out for every dashboard of the automation the caller may open. `range` applies to dashboards with a time range control; the result names the range it read. Pass `time_zone` with the user's IANA zone so a day starts at their midnight, as their dashboard's do; without it days start at midnight UTC, and `range.time_zone` says which zone was used. Quote `display`, say the period it covers, and name and link the dashboard with its `link`. A dashboard whose figures are not declared, or that was changed since it was installed, comes back `unsupported`; one that could not be read comes back `error`; both carry a `hint`. Needs Queues on the team's plan. Each `link` is a path in the Duvo web app; give the user the full URL beside it (`url`).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"dashboard_id","required":false,"description":"One of the automation's Module dashboards; leave out to read every one"},{"schema":{"type":"string","enum":["today","yesterday","week","month","ytd","all"]},"in":"query","name":"range","required":false,"description":"today, yesterday, week, month, ytd or all, for dashboards with a time range control; leave out for the range the dashboard opens on"},{"schema":{"type":"string"},"in":"query","name":"time_zone","required":false,"description":"IANA zone the range's days start in, such as Europe/Prague. Pass the user's own zone so Today matches their dashboard; UTC when left out"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"dashboards":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"dashboard":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's name, as its tab shows it"},"link":{"type":"string","description":"Root-relative path that opens the dashboard; link it when quoting its figures"},"url":{"type":"string","description":"The same page as `link`, as a full web-app URL to give the user"}},"required":["id","name","link","url"],"additionalProperties":false},"metrics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string","description":"The tile's label"},"value":{"nullable":true,"description":"Null where the dashboard shows no number","type":"number"},"unit":{"type":"string","description":"`count`, `percent`, `minutes`, or the ISO currency of a money figure"},"display":{"type":"string","description":"The value as the dashboard prints it; quote this"},"description":{"description":"What the figure is, when the label alone leaves it unclear","type":"string"},"note":{"description":"What the tile shows besides its figure","type":"string"}},"required":["key","label","value","unit","display"],"additionalProperties":false}},"range":{"type":"object","properties":{"key":{"nullable":true,"description":"The range read: today, yesterday, week, month, ytd or all","type":"string"},"label":{"type":"string"},"from":{"nullable":true,"type":"string"},"to":{"nullable":true,"type":"string"},"time_zone":{"nullable":true,"description":"The zone the range's days start in; null for a dashboard with no range control","type":"string"}},"required":["key","label","from","to","time_zone"],"additionalProperties":false},"as_of":{"type":"string","description":"When the figures were computed"},"note":{"description":"Present when the figures cover only part of the queue","type":"string"}},"required":["status","dashboard","metrics","range","as_of"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["unsupported","error"],"description":"`unsupported`: its figures are not declared, or it changed since install. `error`: it could not be read"},"dashboard":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's name, as its tab shows it"},"link":{"type":"string","description":"Root-relative path that opens the dashboard; link it when quoting its figures"},"url":{"type":"string","description":"The same page as `link`, as a full web-app URL to give the user"}},"required":["id","name","link","url"],"additionalProperties":false},"hint":{"type":"string","description":"Why, and what to do instead"}},"required":["status","dashboard","hint"],"additionalProperties":false}]}},"hint":{"description":"Present when the automation has no Module dashboard to read","type":"string"}},"required":["dashboards"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Read Automation Dashboard Data","deprecated":true}},"/v1/automations/{automation_id}/process-roles":{"get":{"operationId":"listProcessRoles","tags":["Automations"],"description":"List the process roles of an automation (Operator, Executive, Approver and the like, defined on that one automation, not the team's Admin/Member/Builder roles) with what each can do and who holds it. Answer \"who can see X\", \"who has which role\" and \"what does each role see\" on an automation from this, not from team membership or dashboard sharing. Each role has its `key` (pass it to assignProcessMember), `label`, `can_act_on_cases`, `can_view_manage`, the `dashboards` it opens, its `members` and its `pending_invites`. `dashboards_shared_individually` are pinned dashboards a role alone does not open: say they must be shared with the person too. `dashboards_creator_only` read a live Connection and open only for their creator. When `roster.complete` is false the lists were cut off: say so, give the totals, and point to the People tab (`urls.people`) instead of saying who holds a role. Give the user the full `url`s, not the paths. Managers and above only.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"process_roles":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The automation"},"name":{"type":"string","description":"The automation's name"}},"required":["id","name"],"additionalProperties":false,"description":"The automation these roles belong to"},"roles":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Pass to assignProcessMember as `role_key`, never the label"},"label":{"type":"string","description":"The role's name as the People tab shows it"},"can_act_on_cases":{"type":"boolean","description":"Opens and acts on the Cases behind its dashboards"},"can_view_manage":{"type":"boolean","description":"Sees the automation's Manage section"},"sees_all_dashboards":{"type":"boolean","description":"Opens every dashboard the automation pins"},"dashboards":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's tab label"},"link":{"type":"string","description":"Root-relative path of the dashboard's tab"},"url":{"type":"string","description":"The dashboard's tab as a full web-app URL"}},"required":["artifact_id","name","link","url"],"additionalProperties":false},"description":"The dashboards this role opens"},"members":{"type":"array","items":{"type":"object","properties":{"name":{"nullable":true,"description":"The member's name","type":"string"},"email":{"nullable":true,"description":"The member's email","type":"string"}},"required":["name","email"],"additionalProperties":false},"description":"People who hold this role"},"pending_invites":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","description":"The invited address"}},"required":["email"],"additionalProperties":false},"description":"Invitations to this role not yet accepted"}},"required":["key","label","can_act_on_cases","can_view_manage","sees_all_dashboards","dashboards","members","pending_invites"],"additionalProperties":false}},"dashboards_shared_individually":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's tab label"},"link":{"type":"string","description":"Root-relative path of the dashboard's tab"},"url":{"type":"string","description":"The dashboard's tab as a full web-app URL"}},"required":["artifact_id","name","link","url"],"additionalProperties":false},"description":"Pinned dashboards that are private or shared one by one: a role alone does not open them; they must be shared with the person too"},"dashboards_creator_only":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's tab label"},"link":{"type":"string","description":"Root-relative path of the dashboard's tab"},"url":{"type":"string","description":"The dashboard's tab as a full web-app URL"}},"required":["artifact_id","name","link","url"],"additionalProperties":false},"description":"Pinned dashboards that read a live Connection: only their creator can open them, whatever the role"},"roster":{"type":"object","properties":{"complete":{"type":"boolean","description":"False when the role or member lists were cut off: give the totals and point to the People tab instead of saying who holds a role"},"roles_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Roles on the process"},"members_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Role holders, all roles"},"pending_invites_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Invitations not yet accepted, all roles"}},"required":["complete","roles_total","members_total","pending_invites_total"],"additionalProperties":false,"description":"Totals behind the lists above"},"links":{"type":"object","properties":{"overview":{"type":"string","description":"Root-relative path that opens this tab"},"overview_new":{"description":"The Admin cockpit, which replaces Overview where it is on: the same automation in one column, with onboarding for its empty parts","type":"string"},"process":{"type":"string","description":"Root-relative path that opens this tab"},"past_runs":{"description":"The Past Runs tab: every Run of this automation. A Module demo has none","type":"string"},"requests":{"description":"The Requests tab: the questions and approvals this automation's runs raised, and answering them","type":"string"},"notifications":{"description":"The Notifications tab: the viewer's notifications about this automation's agents, queues and the connections they use","type":"string"},"policy":{"type":"string","description":"Root-relative path that opens this tab"},"people":{"description":"The People tab: the process roles, meaning who runs, reviews and manages the work. Its own tab, not part of Policy","type":"string"},"agents_queues":{"description":"The Automation tab: its Agents, Queues and the flow between them","type":"string"},"revisions":{"description":"The Revisions tab. A Module demo and an automation on a team without revisions have none: say so, and do not point to another tab or to the Agents for revision history","type":"string"},"setup":{"type":"string","description":"Root-relative path that opens this tab"},"setup_start":{"type":"string","description":"Root-relative path that opens this tab"},"upload_files":{"type":"string","description":"Root-relative path that opens this tab"},"interview":{"type":"string","description":"Root-relative path that opens this tab"},"automation_proposal":{"type":"string","description":"Root-relative path that opens this tab"},"dashboards":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's tab label"},"link":{"type":"string","description":"Root-relative path that opens this tab"}},"required":["artifact_id","name","link"],"additionalProperties":false},"description":"One link per dashboard on this automation's tab bar"}},"required":["dashboards"],"additionalProperties":false,"description":"Links to the automation's tabs that exist right now, for this viewer. When the user asks where something on the automation is, answer with one of these. A tab the automation does not have is absent: say it has none. Copy these into a reply; never build an automation URL by hand."},"urls":{"type":"object","properties":{"overview":{"type":"string","description":"Root-relative path that opens this tab"},"overview_new":{"description":"The Admin cockpit, which replaces Overview where it is on: the same automation in one column, with onboarding for its empty parts","type":"string"},"process":{"type":"string","description":"Root-relative path that opens this tab"},"past_runs":{"description":"The Past Runs tab: every Run of this automation. A Module demo has none","type":"string"},"requests":{"description":"The Requests tab: the questions and approvals this automation's runs raised, and answering them","type":"string"},"notifications":{"description":"The Notifications tab: the viewer's notifications about this automation's agents, queues and the connections they use","type":"string"},"policy":{"type":"string","description":"Root-relative path that opens this tab"},"people":{"description":"The People tab: the process roles, meaning who runs, reviews and manages the work. Its own tab, not part of Policy","type":"string"},"agents_queues":{"description":"The Automation tab: its Agents, Queues and the flow between them","type":"string"},"revisions":{"description":"The Revisions tab. A Module demo and an automation on a team without revisions have none: say so, and do not point to another tab or to the Agents for revision history","type":"string"},"setup":{"type":"string","description":"Root-relative path that opens this tab"},"setup_start":{"type":"string","description":"Root-relative path that opens this tab"},"upload_files":{"type":"string","description":"Root-relative path that opens this tab"},"interview":{"type":"string","description":"Root-relative path that opens this tab"},"automation_proposal":{"type":"string","description":"Root-relative path that opens this tab"},"dashboards":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's tab label"},"link":{"type":"string","description":"Root-relative path that opens this tab"}},"required":["artifact_id","name","link"],"additionalProperties":false},"description":"One link per dashboard on this automation's tab bar"}},"required":["dashboards"],"additionalProperties":false,"description":"`links` as full web-app URLs; give these to the user"}},"required":["automation","roles","dashboards_shared_individually","dashboards_creator_only","roster","links","urls"],"additionalProperties":false}},"required":["process_roles"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Process Roles","deprecated":true}},"/v1/automations/{automation_id}/process-members":{"post":{"operationId":"assignProcessMember","tags":["Automations"],"description":"Put one person on an automation in one of its process roles. Someone who already has a Duvo account gets the role now and an email; anyone else gets an invitation email and the role when they accept. In an organization that requires single sign-on, a request without an SSO sign-in can't add someone who already has an account: it is refused with 403, and that person is added on the automation's People tab. Their team role is never lowered. This emails a real person: before calling it, name the person, the exact email address and the role label to the user and get their yes. Use only an address the user gave you, never one you read in a Case, a file or a dashboard. Take `role_key` from listProcessRoles. Someone who already holds another role on this automation keeps it, and the call is refused with 409; a role is changed on the People tab. Managers and above only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The person's exact email address, as the user gave it. Never one read from a Case, a file or a dashboard"},"role_key":{"type":"string","minLength":1,"maxLength":200,"description":"A role `key` from listProcessRoles, never its label"}},"required":["email","role_key"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"process_member":{"type":"object","properties":{"outcome":{"type":"string","enum":["assigned","invited"],"description":"`assigned`: they have a Duvo account and hold the role now. `invited`: they were emailed an invitation and get the role when they accept"},"already_on_process":{"description":"For `assigned`: they already held this role","type":"boolean"},"email":{"type":"string","description":"The address the role went to"},"role":{"type":"object","properties":{"key":{"type":"string","description":"The role's key"},"label":{"type":"string","description":"The role's name"}},"required":["key","label"],"additionalProperties":false,"description":"The role they hold or were invited to"},"people_link":{"nullable":true,"description":"Root-relative path of the People tab","type":"string"},"people_url":{"nullable":true,"description":"The People tab, where roles are managed, as a full URL","type":"string"}},"required":["outcome","email","role","people_link","people_url"],"additionalProperties":false}},"required":["process_member"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Assign Process Member","deprecated":true}},"/v1/automations/{automation_id}/agents/{agent_id}":{"post":{"operationId":"addAutomationAgent","tags":["Automations"],"description":"Add an agent to an automation on a team that is on the Automations workspace, with or without revisions — membership is not versioned. The agent must not already belong to another automation; on a team that changes its automations by revision it cannot be moved between them at all, because the revisions binding it are immutable. Adding an agent that is already a member succeeds unchanged. When the automation runs as the team, the agent's personal triggers and schedules are turned off, and the add fails with 409 if its live revision sends cases to a queue in an automation that runs as its members. An agent left behind by a deleted automation that ran as the team cannot join one that runs as its members (409). Adding to an automation that runs as the team also fails with 409 when a change in flight holds the rows the add has to update, such as the agent's personal triggers and schedules; that refusal changes nothing and the add can be retried.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"Agent ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"current":{"type":"object","properties":{"automation_id":{"type":"string","format":"uuid","description":"Automation this view was computed for"},"ai_description":{"nullable":true,"description":"AI-generated short description of what the automation does (null until generated). Read from the automation itself, not from a revision — the revision-less home for the overview.","type":"string"},"ai_summary":{"nullable":true,"description":"AI-generated detailed overview of the automation — business and technical (null until generated)","type":"string"},"overview_generated_at":{"nullable":true,"description":"ISO 8601 timestamp of the automation's last AI overview generation","type":"string"},"agent_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of member agents with a live build — the length of `agents`, matching the revision detail's semantics. Not the automation's member count: a member with no live build has no binding to report and is absent from both. Use `automation.agent_count` for members."},"queue_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of member queues"},"trigger_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of triggers firing for the members"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","description":"Agent identifier"},"build_id":{"type":"string","format":"uuid","description":"Build referenced for the agent in this revision"}},"required":["agent_id","build_id"],"additionalProperties":false},"description":"Member agents, each with the build that runs now"},"queues":{"type":"array","items":{"type":"object","properties":{"case_queue_id":{"type":"string","format":"uuid","description":"Queue identifier"},"agent_id":{"nullable":true,"description":"Agent the queue routes to in this revision (null when unrouted)","type":"string","format":"uuid"},"enabled":{"type":"boolean","description":"Whether the queue's routing is enabled"},"name":{"nullable":true,"description":"Per-revision queue name override (null to keep the queue's own name)","type":"string"},"description":{"nullable":true,"description":"Per-revision queue description override","type":"string"}},"required":["case_queue_id","agent_id","enabled","name","description"],"additionalProperties":false},"description":"Member queues with the agent each routes new cases to"},"triggers":{"type":"array","items":{"type":"object","properties":{"automation_trigger_id":{"type":"string","nullable":true,"enum":[null],"description":"Always null: the current view is derived from legacy trigger rows, which carry no declaration identity"},"agent_id":{"type":"string","format":"uuid","description":"Agent this trigger routes to"},"integration_slug":{"type":"string","description":"Integration the declaration watches, e.g. `gmail`"},"trigger_type":{"type":"string","description":"Trigger type within the integration, e.g. `new_email`"},"filter_config":{"type":"object","additionalProperties":{},"description":"Per-revision trigger filter configuration"},"enabled":{"type":"boolean","description":"Whether the trigger is switched on for any member"}},"required":["automation_trigger_id","agent_id","integration_slug","trigger_type","filter_config","enabled"],"additionalProperties":false},"description":"Triggers firing for the member agents"},"schedules":{"type":"array","items":{"type":"object","properties":{"automation_schedule_id":{"type":"string","nullable":true,"enum":[null],"description":"Always null: the current view is derived from legacy schedule rows, which carry no declaration identity"},"agent_id":{"type":"string","format":"uuid","description":"Agent this schedule fires"},"cron":{"nullable":true,"description":"5-field cron expression; when set, the frequency form is unused","type":"string"},"frequency":{"nullable":true,"description":"Frequency form, used when `cron` is null","type":"string","enum":["hourly","daily","workday","weekly","monthly"]},"time":{"nullable":true,"description":"Local time of day as HH:MM, for the frequency form","type":"string"},"timezone":{"type":"string","description":"IANA timezone the schedule is evaluated in"},"day":{"nullable":true,"description":"Day of week for a weekly schedule","type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"day_of_month":{"nullable":true,"description":"Day of month for a monthly schedule","type":"integer","minimum":1,"maximum":31},"task":{"nullable":true,"description":"Prompt passed as the run's initial user message","type":"string"},"enabled":{"type":"boolean","description":"Whether the schedule is switched on for any member"}},"required":["automation_schedule_id","agent_id","cron","frequency","time","timezone","day","day_of_month","task","enabled"],"additionalProperties":false},"description":"Recurring schedules firing for the member agents"}},"required":["automation_id","ai_description","ai_summary","overview_generated_at","agent_count","queue_count","trigger_count","agents","queues","triggers","schedules"],"additionalProperties":false,"description":"The automation's setup after the change"}},"required":["current"],"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"},"code":{"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":"Add Automation Agent","deprecated":true},"delete":{"operationId":"removeAutomationAgent","tags":["Automations"],"description":"Remove an agent from an automation on a team that is on the Automations workspace, with or without revisions — membership is not versioned. Deleting the agent interrupts its active runs and pauses their sandboxes, exactly as a standalone agent delete does. On a team that changes its automations by revision, an agent the active revision binds is refused: activate a revision that omits it first.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"Agent ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"current":{"nullable":true,"description":"The automation's setup after the removal, or null if it could not be recomputed","type":"object","properties":{"automation_id":{"type":"string","format":"uuid","description":"Automation this view was computed for"},"ai_description":{"nullable":true,"description":"AI-generated short description of what the automation does (null until generated). Read from the automation itself, not from a revision — the revision-less home for the overview.","type":"string"},"ai_summary":{"nullable":true,"description":"AI-generated detailed overview of the automation — business and technical (null until generated)","type":"string"},"overview_generated_at":{"nullable":true,"description":"ISO 8601 timestamp of the automation's last AI overview generation","type":"string"},"agent_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of member agents with a live build — the length of `agents`, matching the revision detail's semantics. Not the automation's member count: a member with no live build has no binding to report and is absent from both. Use `automation.agent_count` for members."},"queue_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of member queues"},"trigger_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of triggers firing for the members"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","description":"Agent identifier"},"build_id":{"type":"string","format":"uuid","description":"Build referenced for the agent in this revision"}},"required":["agent_id","build_id"],"additionalProperties":false},"description":"Member agents, each with the build that runs now"},"queues":{"type":"array","items":{"type":"object","properties":{"case_queue_id":{"type":"string","format":"uuid","description":"Queue identifier"},"agent_id":{"nullable":true,"description":"Agent the queue routes to in this revision (null when unrouted)","type":"string","format":"uuid"},"enabled":{"type":"boolean","description":"Whether the queue's routing is enabled"},"name":{"nullable":true,"description":"Per-revision queue name override (null to keep the queue's own name)","type":"string"},"description":{"nullable":true,"description":"Per-revision queue description override","type":"string"}},"required":["case_queue_id","agent_id","enabled","name","description"],"additionalProperties":false},"description":"Member queues with the agent each routes new cases to"},"triggers":{"type":"array","items":{"type":"object","properties":{"automation_trigger_id":{"type":"string","nullable":true,"enum":[null],"description":"Always null: the current view is derived from legacy trigger rows, which carry no declaration identity"},"agent_id":{"type":"string","format":"uuid","description":"Agent this trigger routes to"},"integration_slug":{"type":"string","description":"Integration the declaration watches, e.g. `gmail`"},"trigger_type":{"type":"string","description":"Trigger type within the integration, e.g. `new_email`"},"filter_config":{"type":"object","additionalProperties":{},"description":"Per-revision trigger filter configuration"},"enabled":{"type":"boolean","description":"Whether the trigger is switched on for any member"}},"required":["automation_trigger_id","agent_id","integration_slug","trigger_type","filter_config","enabled"],"additionalProperties":false},"description":"Triggers firing for the member agents"},"schedules":{"type":"array","items":{"type":"object","properties":{"automation_schedule_id":{"type":"string","nullable":true,"enum":[null],"description":"Always null: the current view is derived from legacy schedule rows, which carry no declaration identity"},"agent_id":{"type":"string","format":"uuid","description":"Agent this schedule fires"},"cron":{"nullable":true,"description":"5-field cron expression; when set, the frequency form is unused","type":"string"},"frequency":{"nullable":true,"description":"Frequency form, used when `cron` is null","type":"string","enum":["hourly","daily","workday","weekly","monthly"]},"time":{"nullable":true,"description":"Local time of day as HH:MM, for the frequency form","type":"string"},"timezone":{"type":"string","description":"IANA timezone the schedule is evaluated in"},"day":{"nullable":true,"description":"Day of week for a weekly schedule","type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"day_of_month":{"nullable":true,"description":"Day of month for a monthly schedule","type":"integer","minimum":1,"maximum":31},"task":{"nullable":true,"description":"Prompt passed as the run's initial user message","type":"string"},"enabled":{"type":"boolean","description":"Whether the schedule is switched on for any member"}},"required":["automation_schedule_id","agent_id","cron","frequency","time","timezone","day","day_of_month","task","enabled"],"additionalProperties":false},"description":"Recurring schedules firing for the member agents"}},"required":["automation_id","ai_description","ai_summary","overview_generated_at","agent_count","queue_count","trigger_count","agents","queues","triggers","schedules"],"additionalProperties":false},"interrupted_run_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Runs that were interrupted because their agent was deleted"}},"required":["current","interrupted_run_ids"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Remove Automation Agent","deprecated":true}},"/v1/automations/{automation_id}/queues/{case_queue_id}":{"post":{"operationId":"addAutomationQueue","tags":["Automations"],"description":"Add a queue to an automation on a team that is on the Automations workspace, with or without revisions — membership is not versioned. The queue must not already belong to another automation; on a team that changes its automations by revision it cannot be moved between them at all, because the revisions binding it are immutable. Adding a queue that is already a member succeeds unchanged. A queue left behind by a deleted automation that ran as the team cannot join one that runs as its members (409 team_to_personal_move), and neither can a queue that an agent in an automation running as the team sends cases to (409 team_to_personal_queue).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"case_queue_id","required":true,"description":"Queue ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"current":{"type":"object","properties":{"automation_id":{"type":"string","format":"uuid","description":"Automation this view was computed for"},"ai_description":{"nullable":true,"description":"AI-generated short description of what the automation does (null until generated). Read from the automation itself, not from a revision — the revision-less home for the overview.","type":"string"},"ai_summary":{"nullable":true,"description":"AI-generated detailed overview of the automation — business and technical (null until generated)","type":"string"},"overview_generated_at":{"nullable":true,"description":"ISO 8601 timestamp of the automation's last AI overview generation","type":"string"},"agent_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of member agents with a live build — the length of `agents`, matching the revision detail's semantics. Not the automation's member count: a member with no live build has no binding to report and is absent from both. Use `automation.agent_count` for members."},"queue_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of member queues"},"trigger_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of triggers firing for the members"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","description":"Agent identifier"},"build_id":{"type":"string","format":"uuid","description":"Build referenced for the agent in this revision"}},"required":["agent_id","build_id"],"additionalProperties":false},"description":"Member agents, each with the build that runs now"},"queues":{"type":"array","items":{"type":"object","properties":{"case_queue_id":{"type":"string","format":"uuid","description":"Queue identifier"},"agent_id":{"nullable":true,"description":"Agent the queue routes to in this revision (null when unrouted)","type":"string","format":"uuid"},"enabled":{"type":"boolean","description":"Whether the queue's routing is enabled"},"name":{"nullable":true,"description":"Per-revision queue name override (null to keep the queue's own name)","type":"string"},"description":{"nullable":true,"description":"Per-revision queue description override","type":"string"}},"required":["case_queue_id","agent_id","enabled","name","description"],"additionalProperties":false},"description":"Member queues with the agent each routes new cases to"},"triggers":{"type":"array","items":{"type":"object","properties":{"automation_trigger_id":{"type":"string","nullable":true,"enum":[null],"description":"Always null: the current view is derived from legacy trigger rows, which carry no declaration identity"},"agent_id":{"type":"string","format":"uuid","description":"Agent this trigger routes to"},"integration_slug":{"type":"string","description":"Integration the declaration watches, e.g. `gmail`"},"trigger_type":{"type":"string","description":"Trigger type within the integration, e.g. `new_email`"},"filter_config":{"type":"object","additionalProperties":{},"description":"Per-revision trigger filter configuration"},"enabled":{"type":"boolean","description":"Whether the trigger is switched on for any member"}},"required":["automation_trigger_id","agent_id","integration_slug","trigger_type","filter_config","enabled"],"additionalProperties":false},"description":"Triggers firing for the member agents"},"schedules":{"type":"array","items":{"type":"object","properties":{"automation_schedule_id":{"type":"string","nullable":true,"enum":[null],"description":"Always null: the current view is derived from legacy schedule rows, which carry no declaration identity"},"agent_id":{"type":"string","format":"uuid","description":"Agent this schedule fires"},"cron":{"nullable":true,"description":"5-field cron expression; when set, the frequency form is unused","type":"string"},"frequency":{"nullable":true,"description":"Frequency form, used when `cron` is null","type":"string","enum":["hourly","daily","workday","weekly","monthly"]},"time":{"nullable":true,"description":"Local time of day as HH:MM, for the frequency form","type":"string"},"timezone":{"type":"string","description":"IANA timezone the schedule is evaluated in"},"day":{"nullable":true,"description":"Day of week for a weekly schedule","type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"day_of_month":{"nullable":true,"description":"Day of month for a monthly schedule","type":"integer","minimum":1,"maximum":31},"task":{"nullable":true,"description":"Prompt passed as the run's initial user message","type":"string"},"enabled":{"type":"boolean","description":"Whether the schedule is switched on for any member"}},"required":["automation_schedule_id","agent_id","cron","frequency","time","timezone","day","day_of_month","task","enabled"],"additionalProperties":false},"description":"Recurring schedules firing for the member agents"}},"required":["automation_id","ai_description","ai_summary","overview_generated_at","agent_count","queue_count","trigger_count","agents","queues","triggers","schedules"],"additionalProperties":false,"description":"The automation's setup after the change"}},"required":["current"],"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"},"code":{"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":"Add Automation Queue","deprecated":true},"delete":{"operationId":"removeAutomationQueue","tags":["Automations"],"description":"Remove a queue from an automation, deleting the queue. Its cases are cleared and the runs working them interrupted, exactly as a standalone queue delete does. Queue membership is not versioned, so this behaves the same whether or not the team changes its automations by revision.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"case_queue_id","required":true,"description":"Queue ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"current":{"nullable":true,"description":"The automation's setup after the removal, or null if it could not be recomputed","type":"object","properties":{"automation_id":{"type":"string","format":"uuid","description":"Automation this view was computed for"},"ai_description":{"nullable":true,"description":"AI-generated short description of what the automation does (null until generated). Read from the automation itself, not from a revision — the revision-less home for the overview.","type":"string"},"ai_summary":{"nullable":true,"description":"AI-generated detailed overview of the automation — business and technical (null until generated)","type":"string"},"overview_generated_at":{"nullable":true,"description":"ISO 8601 timestamp of the automation's last AI overview generation","type":"string"},"agent_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of member agents with a live build — the length of `agents`, matching the revision detail's semantics. Not the automation's member count: a member with no live build has no binding to report and is absent from both. Use `automation.agent_count` for members."},"queue_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of member queues"},"trigger_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of triggers firing for the members"},"agents":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","description":"Agent identifier"},"build_id":{"type":"string","format":"uuid","description":"Build referenced for the agent in this revision"}},"required":["agent_id","build_id"],"additionalProperties":false},"description":"Member agents, each with the build that runs now"},"queues":{"type":"array","items":{"type":"object","properties":{"case_queue_id":{"type":"string","format":"uuid","description":"Queue identifier"},"agent_id":{"nullable":true,"description":"Agent the queue routes to in this revision (null when unrouted)","type":"string","format":"uuid"},"enabled":{"type":"boolean","description":"Whether the queue's routing is enabled"},"name":{"nullable":true,"description":"Per-revision queue name override (null to keep the queue's own name)","type":"string"},"description":{"nullable":true,"description":"Per-revision queue description override","type":"string"}},"required":["case_queue_id","agent_id","enabled","name","description"],"additionalProperties":false},"description":"Member queues with the agent each routes new cases to"},"triggers":{"type":"array","items":{"type":"object","properties":{"automation_trigger_id":{"type":"string","nullable":true,"enum":[null],"description":"Always null: the current view is derived from legacy trigger rows, which carry no declaration identity"},"agent_id":{"type":"string","format":"uuid","description":"Agent this trigger routes to"},"integration_slug":{"type":"string","description":"Integration the declaration watches, e.g. `gmail`"},"trigger_type":{"type":"string","description":"Trigger type within the integration, e.g. `new_email`"},"filter_config":{"type":"object","additionalProperties":{},"description":"Per-revision trigger filter configuration"},"enabled":{"type":"boolean","description":"Whether the trigger is switched on for any member"}},"required":["automation_trigger_id","agent_id","integration_slug","trigger_type","filter_config","enabled"],"additionalProperties":false},"description":"Triggers firing for the member agents"},"schedules":{"type":"array","items":{"type":"object","properties":{"automation_schedule_id":{"type":"string","nullable":true,"enum":[null],"description":"Always null: the current view is derived from legacy schedule rows, which carry no declaration identity"},"agent_id":{"type":"string","format":"uuid","description":"Agent this schedule fires"},"cron":{"nullable":true,"description":"5-field cron expression; when set, the frequency form is unused","type":"string"},"frequency":{"nullable":true,"description":"Frequency form, used when `cron` is null","type":"string","enum":["hourly","daily","workday","weekly","monthly"]},"time":{"nullable":true,"description":"Local time of day as HH:MM, for the frequency form","type":"string"},"timezone":{"type":"string","description":"IANA timezone the schedule is evaluated in"},"day":{"nullable":true,"description":"Day of week for a weekly schedule","type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"day_of_month":{"nullable":true,"description":"Day of month for a monthly schedule","type":"integer","minimum":1,"maximum":31},"task":{"nullable":true,"description":"Prompt passed as the run's initial user message","type":"string"},"enabled":{"type":"boolean","description":"Whether the schedule is switched on for any member"}},"required":["automation_schedule_id","agent_id","cron","frequency","time","timezone","day","day_of_month","task","enabled"],"additionalProperties":false},"description":"Recurring schedules firing for the member agents"}},"required":["automation_id","ai_description","ai_summary","overview_generated_at","agent_count","queue_count","trigger_count","agents","queues","triggers","schedules"],"additionalProperties":false},"deleted_case_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Cases deleted along with the queue"},"interrupted_run_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Runs that were interrupted because their queue was deleted"}},"required":["current","deleted_case_count","interrupted_run_ids"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Remove Automation Queue","deprecated":true}},"/v1/process-attributes/{attribute_id}":{"put":{"operationId":"updateProcessAttribute","tags":["Automations"],"description":"Replace an attribute's definition (an attribute from listProcessAttributes). The body's type must be the attribute's own — a type never changes. A select attribute's values are replaced: a value with an id is kept (and may be renamed or recolored), one without is created, and an existing value left out is deleted, which clears it from every process that held it. Requires the team's Manager role or above. A number attribute takes a new name and unit, a text attribute a new name. Pass the attribute's `revision` as `expected_revision` to fail with 409 rather than overwrite a save made since it was read.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["select"]},"name":{"type":"string","minLength":1,"maxLength":80},"expected_revision":{"type":"string","minLength":1},"values":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string","minLength":1,"maxLength":80},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["value","color_hue"]}}},"required":["type","name","values"]},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"name":{"type":"string","minLength":1,"maxLength":80},"expected_revision":{"type":"string","minLength":1},"unit":{"nullable":true,"type":"string","maxLength":16},"is_unit_prefix":{"default":true,"type":"boolean"}},"required":["type","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"name":{"type":"string","minLength":1,"maxLength":80},"expected_revision":{"type":"string","minLength":1}},"required":["type","name"]}]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attribute_id","required":true,"description":"Process attribute ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"attribute":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"process_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"show_in_list":{"default":false,"type":"boolean"},"revision":{"type":"string"},"type":{"type":"string","enum":["select"]},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","value","color_hue"],"additionalProperties":false}}},"required":["id","name","process_count","show_in_list","revision","type","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"process_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"show_in_list":{"default":false,"type":"boolean"},"revision":{"type":"string"},"type":{"type":"string","enum":["number"]},"unit":{"nullable":true,"type":"string"},"is_unit_prefix":{"type":"boolean"}},"required":["id","name","process_count","show_in_list","revision","type","unit","is_unit_prefix"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"process_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"show_in_list":{"default":false,"type":"boolean"},"revision":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["id","name","process_count","show_in_list","revision","type"],"additionalProperties":false}]}},"required":["attribute"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Process Attribute","deprecated":true},"delete":{"operationId":"deleteProcessAttribute","tags":["Automations"],"description":"Delete an attribute, which clears it from every automation and process. Confirm with the user first, naming the attribute and how many processes hold it (`process_count`). The attribute and its values are soft-deleted, and the processes' values for it are removed. Requires the team's Manager role or above.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attribute_id","required":true,"description":"Process attribute 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"}},"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":"Delete Process Attribute","deprecated":true}},"/v1/processes/{id}/attributes":{"get":{"operationId":"listProcessAttributeValues","tags":["Automations"],"description":"List the attribute values a process holds, one per attribute, ordered by attribute name: what the app shows as \"Attributes\" on the automation that runs it (Severity: High, Cost: USD 1,200). Each names its `attribute_id` and `type`, and holds a select value's `value_id`, a `number` or a `text`. Join them to listProcessAttributes for the attribute names and select value labels. An attribute the process does not hold is not listed: report it as not set.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Process ID: for an automation, its `process_node_id` from listAutomations or getAutomation. An automation without one holds no attributes."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"assignments":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["select"]},"value_id":{"type":"string","format":"uuid"}},"required":["attribute_id","type","value_id"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["number"]},"number":{"type":"number"}},"required":["attribute_id","type","number"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["attribute_id","type","text"],"additionalProperties":false}]}}},"required":["assignments"],"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":"List Process Attribute Values","deprecated":true}},"/v1/processes/{id}/attributes/{attribute_id}":{"put":{"operationId":"setProcessAttributeValue","tags":["Automations"],"description":"Set the value a process holds for an attribute, replacing any value it held. The body's type must be the attribute's: a value id for a select attribute, a number for a number attribute, text for a text attribute. Returns every attribute value the process holds afterwards. Requires the Builder role or above and edit access to the automation that runs the process.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["select"]},"value_id":{"type":"string","format":"uuid"}},"required":["type","value_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"number":{"type":"number"}},"required":["type","number"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","minLength":1,"maxLength":500}},"required":["type","text"]}]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Process ID: for an automation, its `process_node_id` from listAutomations or getAutomation. An automation without one holds no attributes."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attribute_id","required":true,"description":"Attribute ID, from listProcessAttributes"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"assignments":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["select"]},"value_id":{"type":"string","format":"uuid"}},"required":["attribute_id","type","value_id"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["number"]},"number":{"type":"number"}},"required":["attribute_id","type","number"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["attribute_id","type","text"],"additionalProperties":false}]}}},"required":["assignments"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Set Process Attribute Value","deprecated":true},"delete":{"operationId":"clearProcessAttributeValue","tags":["Automations"],"description":"Clear the value a process holds for an attribute, leaving it not set; the attribute itself stays on the team. Returns every attribute value the process holds afterwards. Requires the Builder role or above and edit access to the automation that runs the process.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Process ID: for an automation, its `process_node_id` from listAutomations or getAutomation. An automation without one holds no attributes."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attribute_id","required":true,"description":"Attribute ID, from listProcessAttributes"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"assignments":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["select"]},"value_id":{"type":"string","format":"uuid"}},"required":["attribute_id","type","value_id"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["number"]},"number":{"type":"number"}},"required":["attribute_id","type","number"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["attribute_id","type","text"],"additionalProperties":false}]}}},"required":["assignments"],"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":"Clear Process Attribute Value","deprecated":true}},"/v1/automations/{automation_id}/config-fields":{"get":{"operationId":"listConfigFields","tags":["Automations"],"description":"Read an automation's module config fields (its Policy), grouped by section in the automation's section order, with each field's current value, default, and fill provenance.","parameters":[{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"include_hidden","required":false,"description":"Also return the questions a person hid, marked active: false, in their sections, and every empty section a person added, with no fields. Questions the module template retired are never returned. The counts still cover the visible questions only. Defaults to false."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"The automation's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"object","properties":{"key":{"default":null,"description":"Stable identifier of the section within its automation, such as 'about-you'. Null for fields whose section is not one of the automation's sections, grouped by their section name.","nullable":true,"type":"string"},"section":{"type":"string","description":"Section name"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique config field identifier"},"key":{"type":"string","description":"Stable field key referenced by the automation"},"section":{"type":"string","description":"Catalog section this field is grouped under"},"position":{"type":"number","description":"Order of the field within its section"},"label":{"type":"string","description":"Short name for the field, shown as its row heading"},"question":{"type":"string","description":"The setup question shown for this field"},"guidance":{"default":null,"description":"What to fill in for the question, in plain sentences, or null when it carries none","nullable":true,"type":"string"},"example":{"default":null,"description":"An example answer to the question, or null when it carries none","nullable":true,"type":"string"},"type":{"type":"string","enum":["freeText","identifier","number","select","multiSelect","list","orderedList","personList","table","compound","sourcePointer"],"description":"Value type (e.g. freeText, number, select, compound)"},"type_config":{"nullable":true,"description":"Per-type options (e.g. select choices, number unit/min), or null","type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationConfigJsonValue"}},"labels":{"default":null,"description":"Readable names for the options, columns and parts type_config declares, or null when the field names none","nullable":true,"type":"object","properties":{"options":{"description":"Readable name of each enum value the field declares, by value","type":"object","additionalProperties":{"type":"string"}},"columns":{"description":"Readable name of each table column, by column","type":"object","additionalProperties":{"type":"string"}},"parts":{"description":"Readable name of each compound part, by part, and of `combine` when the field declares combineOptions","type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"bindings":{"type":"array","items":{"type":"string","enum":["context","parameter","tool","structural","readOnly"]},"description":"How the value reaches the automation (context, parameter, tool)"},"required":{"type":"boolean","description":"Whether the field must be filled"},"fill_mode":{"type":"string","enum":["interview","setup","module_default"],"description":"How the field is filled (interview, setup, module_default)"},"roles":{"default":[],"description":"Keys of the process roles whose holders answer this question in a setup interview. Empty means anyone can.","type":"array","items":{"type":"string"}},"value":{"nullable":true,"description":"The current answer, or null when unfilled","allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"default_value":{"nullable":true,"description":"The module default value, or null","allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"status":{"type":"string","enum":["default","filled"],"description":"'filled' when the field has a value, else 'default'"},"provenance":{"nullable":true,"description":"Who filled the value and how, or null when unfilled","type":"object","properties":{"filled_via":{"type":"string","x-extensible-enum":["manual","interview","document","template_default","org_default","ask_duvo"],"description":"How the value was filled (e.g. interview, document, manual)"},"filled_by_user_id":{"nullable":true,"description":"ID of the user who filled the value, when a person did","type":"string"},"filled_by_name":{"nullable":true,"description":"Display name of the user who filled the value","type":"string"},"filled_at":{"type":"string","description":"ISO 8601 timestamp when the value was filled"},"filled_by_email":{"default":null,"description":"Email of the person who filled the value, when no profile names them","nullable":true,"type":"string"},"source_capture_id":{"nullable":true,"description":"ID of the capture the value was extracted from, when applicable","type":"string"},"source_file_name":{"default":null,"description":"File name of the uploaded document the value was read from","nullable":true,"type":"string"}},"required":["filled_via","filled_by_user_id","filled_by_name","filled_at","filled_by_email","source_capture_id","source_file_name"],"additionalProperties":false},"origin":{"default":"template","description":"'template' for a question the module template ships, 'added' for one a person added to this automation","type":"string","enum":["template","added"]},"customized":{"default":false,"description":"Whether a person has changed this template question since the template last set it; always false for an added question","type":"boolean"},"active":{"default":true,"description":"False for a hidden question, which only a list read with include_hidden returns","type":"boolean"}},"required":["id","key","section","position","label","question","guidance","example","type","type_config","labels","bindings","required","fill_mode","roles","value","default_value","status","provenance","origin","customized","active"],"additionalProperties":false},"description":"Fields in this section, in position order"}},"required":["key","section","fields"],"additionalProperties":false},"description":"Config fields grouped by section, in the automation's section order. A section with no returned field is left out, except that a read with include_hidden also returns each empty section a person added, with no fields."},"filled_count":{"type":"number","description":"Number of fields that have a value"},"required_count":{"type":"number","description":"Number of required fields"},"required_filled_count":{"type":"number","description":"Number of required fields that have a value"},"total_count":{"type":"number","description":"Total number of fields"},"process_roles":{"default":[],"description":"The roles on the automation's process that a question can name, in the order the process lists them. Empty when the automation has no process identity.","type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The role's stable key, as a question's roles name it"},"label":{"type":"string","description":"The role's name on the process"}},"required":["key","label"],"additionalProperties":false}}},"required":["sections","filled_count","required_count","required_filled_count","total_count","process_roles"],"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":"List Config Fields","deprecated":true},"post":{"operationId":"addConfigField","tags":["Automations"],"description":"Add a Policy question to this automation. Its key is `custom_` plus the label in snake_case, with `_2`, `_3` and so on appended when the key is taken, and it is placed at the end of its section. A module template reinstall never changes a field added here.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200,"description":"Short name for the field, shown as its row heading"},"key":{"description":"Code for the field, unique within the automation; derived from the label when left out","type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9][a-z0-9_]*$"},"question":{"type":"string","minLength":1,"maxLength":2000,"description":"The setup question asked for this field"},"guidance":{"description":"What to fill in for the question, in plain sentences; left out or null for none","nullable":true,"type":"string","minLength":1,"maxLength":2000},"example":{"description":"An example answer to the question; left out or null for none","nullable":true,"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","enum":["freeText","identifier","number","select","multiSelect","list","orderedList","personList","table"],"description":"Value type; compound and sourcePointer are template-only"},"section":{"default":null,"description":"Section to add the field to, or null for none","nullable":true,"type":"string","minLength":1,"maxLength":200},"fill_mode":{"default":"interview","description":"How the field is filled (interview, setup)","type":"string","enum":["interview","setup"]},"options":{"description":"Required for select and multiSelect, refused otherwise","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"columns":{"description":"Required for table, refused otherwise","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"bindings":{"default":["context"],"description":"How the value reaches the automation (context, tool)","minItems":1,"type":"array","items":{"type":"string","enum":["context","tool"]}},"roles":{"description":"Keys of the process roles whose holders answer this question; empty means anyone","maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}}},"required":["label","question","type"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"The automation's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"field":{"type":"object","properties":{"id":{"type":"string","description":"Unique config field identifier"},"key":{"type":"string","description":"Stable field key referenced by the automation"},"section":{"type":"string","description":"Catalog section this field is grouped under"},"position":{"type":"number","description":"Order of the field within its section"},"label":{"type":"string","description":"Short name for the field, shown as its row heading"},"question":{"type":"string","description":"The setup question shown for this field"},"guidance":{"default":null,"description":"What to fill in for the question, in plain sentences, or null when it carries none","nullable":true,"type":"string"},"example":{"default":null,"description":"An example answer to the question, or null when it carries none","nullable":true,"type":"string"},"type":{"type":"string","enum":["freeText","identifier","number","select","multiSelect","list","orderedList","personList","table","compound","sourcePointer"],"description":"Value type (e.g. freeText, number, select, compound)"},"type_config":{"nullable":true,"description":"Per-type options (e.g. select choices, number unit/min), or null","type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationConfigJsonValue"}},"labels":{"default":null,"description":"Readable names for the options, columns and parts type_config declares, or null when the field names none","nullable":true,"type":"object","properties":{"options":{"description":"Readable name of each enum value the field declares, by value","type":"object","additionalProperties":{"type":"string"}},"columns":{"description":"Readable name of each table column, by column","type":"object","additionalProperties":{"type":"string"}},"parts":{"description":"Readable name of each compound part, by part, and of `combine` when the field declares combineOptions","type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"bindings":{"type":"array","items":{"type":"string","enum":["context","parameter","tool","structural","readOnly"]},"description":"How the value reaches the automation (context, parameter, tool)"},"required":{"type":"boolean","description":"Whether the field must be filled"},"fill_mode":{"type":"string","enum":["interview","setup","module_default"],"description":"How the field is filled (interview, setup, module_default)"},"roles":{"default":[],"description":"Keys of the process roles whose holders answer this question in a setup interview. Empty means anyone can.","type":"array","items":{"type":"string"}},"value":{"nullable":true,"description":"The current answer, or null when unfilled","allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"default_value":{"nullable":true,"description":"The module default value, or null","allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"status":{"type":"string","enum":["default","filled"],"description":"'filled' when the field has a value, else 'default'"},"provenance":{"nullable":true,"description":"Who filled the value and how, or null when unfilled","type":"object","properties":{"filled_via":{"type":"string","x-extensible-enum":["manual","interview","document","template_default","org_default","ask_duvo"],"description":"How the value was filled (e.g. interview, document, manual)"},"filled_by_user_id":{"nullable":true,"description":"ID of the user who filled the value, when a person did","type":"string"},"filled_by_name":{"nullable":true,"description":"Display name of the user who filled the value","type":"string"},"filled_at":{"type":"string","description":"ISO 8601 timestamp when the value was filled"},"filled_by_email":{"default":null,"description":"Email of the person who filled the value, when no profile names them","nullable":true,"type":"string"},"source_capture_id":{"nullable":true,"description":"ID of the capture the value was extracted from, when applicable","type":"string"},"source_file_name":{"default":null,"description":"File name of the uploaded document the value was read from","nullable":true,"type":"string"}},"required":["filled_via","filled_by_user_id","filled_by_name","filled_at","filled_by_email","source_capture_id","source_file_name"],"additionalProperties":false},"origin":{"default":"template","description":"'template' for a question the module template ships, 'added' for one a person added to this automation","type":"string","enum":["template","added"]},"customized":{"default":false,"description":"Whether a person has changed this template question since the template last set it; always false for an added question","type":"boolean"},"active":{"default":true,"description":"False for a hidden question, which only a list read with include_hidden returns","type":"boolean"}},"required":["id","key","section","position","label","question","guidance","example","type","type_config","labels","bindings","required","fill_mode","roles","value","default_value","status","provenance","origin","customized","active"],"additionalProperties":false}},"required":["field"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Add Config Field","deprecated":true}},"/v1/automations/{automation_id}/policy":{"get":{"operationId":"readAutomationPolicy","tags":["Automations"],"description":"Read an automation's whole Policy before answering anything about it: every question by section, with its `id` (the field id updateConfigField takes), key, type, answer and who gave it; `counts.questions` as the Policy screen's header counts them (`required_open` is what still blocks a run) apart from the module's pre-filled `module_defaults`; answers proposed by interviews and waiting for review; accepted and pending process-context notes; the interviews assigned; and `pending_apply`, the structural answers and notes not yet written into an Agent. `running` says whether the automation runs on live work: there a changed answer reaches its Agents from their next run, so name the question, its current answer and the new one, and change it only after the user says yes. A question whose `bindings` include `structural` changes how the Agents run; propose the matching Agent change too. Never invent an answer for a question shown as open. Give the user the full URLs in `urls`.","parameters":[{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"include_hidden","required":false,"description":"Also list the questions a person hid, under hidden_fields. Defaults to false."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"policy":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The automation"},"name":{"type":"string","description":"The automation's name"}},"required":["id","name"],"additionalProperties":false,"description":"The automation this Policy belongs to"},"running":{"type":"boolean","description":"Whether the automation runs on live work: a changed answer is used from its Agents' next run, so confirm each change with the user first"},"sections":{"type":"array","items":{"type":"object","properties":{"key":{"nullable":true,"description":"Null for the questions that sit in no section","type":"string"},"section":{"type":"string","description":"The section's name"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Pass as the field id to updateConfigField and its siblings"},"key":{"type":"string","description":"Stable key an Agent's AOP references"},"label":{"type":"string","description":"Short name of the question"},"question":{"type":"string","description":"The question as the Policy tab asks it"},"type":{"type":"string","enum":["freeText","identifier","number","select","multiSelect","list","orderedList","personList","table","compound","sourcePointer"],"description":"What kind of answer it takes"},"options":{"description":"The choices of a select or multiSelect question","type":"array","items":{}},"columns":{"description":"The columns of a table question","type":"array","items":{}},"origin":{"type":"string","enum":["template","added"],"description":"`template`: shipped with the module. `added`: a person added it"},"customized":{"type":"boolean","description":"A template question someone has edited since install"},"bindings":{"type":"array","items":{"type":"string","enum":["context","parameter","tool","structural","readOnly"]},"description":"`structural` means its answer changes how the module's Agents run: changing it also needs a matching Agent change"},"required":{"type":"boolean","description":"An open required question blocks a Run"},"fill_mode":{"type":"string","enum":["interview","setup","module_default"],"description":"How the question is meant to be answered"},"status":{"type":"string","enum":["answered","open"],"description":"Whether it has an answer"},"value":{"nullable":true,"description":"The current answer; never invent one for an open question","allOf":[{"$ref":"#/components/schemas/AutomationPolicyJsonValue"}]},"provenance":{"nullable":true,"description":"Who answered it, how and when","type":"object","properties":{"filled_via":{"type":"string","enum":["manual","interview","document","template_default","org_default","ask_duvo"],"description":"How the answer was given"},"filled_by_name":{"nullable":true,"description":"Who gave it, when a person did","type":"string"},"filled_at":{"type":"string","description":"When, as an ISO timestamp"}},"required":["filled_via","filled_by_name","filled_at"],"additionalProperties":false}},"required":["id","key","label","question","type","origin","customized","bindings","required","fill_mode","status","value","provenance"],"additionalProperties":false},"description":"The section's questions, in Policy order"}},"required":["key","section","fields"],"additionalProperties":false},"description":"Every visible question, by section"},"hidden_fields":{"description":"Present with include_hidden: questions a person hid","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The question"},"key":{"type":"string","description":"Its key"},"label":{"type":"string","description":"Its short name"},"question":{"type":"string","description":"The question"},"section":{"nullable":true,"description":"Its section's name","type":"string"}},"required":["id","key","label","question","section"],"additionalProperties":false}},"counts":{"type":"object","properties":{"questions":{"type":"object","properties":{"answered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Questions with an answer"},"open":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Questions without one"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"All of them"},"required_open":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Required questions still open: these block a Run"}},"required":["answered","open","total","required_open"],"additionalProperties":false,"description":"The team's own questions, as the Policy screen's header counts them"},"module_defaults":{"type":"object","properties":{"filled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Pre-filled values in place"},"open":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Ones left empty"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"All of them"}},"required":["filled","open","total"],"additionalProperties":false,"description":"Values the module pre-fills; open ones are not the team's backlog"}},"required":["questions","module_defaults"],"additionalProperties":false,"description":"Answered and open counts"},"pending_proposals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The proposal"},"field_key":{"type":"string","description":"The question it answers"},"question":{"type":"string","description":"That question's text"},"proposed_value":{"nullable":true,"description":"The proposed answer","allOf":[{"$ref":"#/components/schemas/AutomationPolicyJsonValue"}]},"rationale":{"nullable":true,"description":"Why; null below the role that may read it","type":"string"},"confidence":{"description":"How sure the extraction was"},"interview_id":{"nullable":true,"description":"The interview it came from","type":"string","format":"uuid"},"interviewee":{"nullable":true,"description":"Who said it; null below the role that may read it","type":"string"}},"required":["id","field_key","question","proposed_value","rationale","confidence","interview_id","interviewee"],"additionalProperties":false},"description":"Answers extracted from interviews, waiting for review"},"context_notes":{"type":"object","properties":{"accepted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The note"},"title":{"type":"string","description":"The note's title"},"note":{"type":"string","description":"What the note says"},"rationale":{"nullable":true,"description":"The interview's own words; null below the role that may read them","type":"string"},"source":{"type":"string","description":"Where the note came from"},"interviewee":{"nullable":true,"description":"Who said it; null below the role that may read it","type":"string"}},"required":["id","title","note","rationale","source","interviewee"],"additionalProperties":false},"description":"Notes accepted into the Policy"},"pending":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The note"},"title":{"type":"string","description":"The note's title"},"note":{"type":"string","description":"What the note says"},"rationale":{"nullable":true,"description":"The interview's own words; null below the role that may read them","type":"string"},"source":{"type":"string","description":"Where the note came from"},"interviewee":{"nullable":true,"description":"Who said it; null below the role that may read it","type":"string"}},"required":["id","title","note","rationale","source","interviewee"],"additionalProperties":false},"description":"Notes waiting for review"}},"required":["accepted","pending"],"additionalProperties":false,"description":"Process context gathered from interviews"},"interviews":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The interview"},"invited_email":{"nullable":true,"description":"Who it was sent to; null for an unassigned slot","type":"string"},"status":{"type":"string","description":"Where the interview stands"},"context":{"nullable":true,"description":"Who the person is, as given when assigning it","type":"string"},"created_at":{"type":"string","description":"When it was assigned"},"answers_written":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many Policy answers this interview wrote"}},"required":["id","invited_email","status","context","created_at","answers_written"],"additionalProperties":false},"description":"The automation's Policy interviews"},"pending_apply":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many items wait"},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"nullable":true,"description":"The question's key","type":"string"},"question":{"type":"string","description":"The question"},"value":{"nullable":true,"description":"The answer to write in","allOf":[{"$ref":"#/components/schemas/AutomationPolicyJsonValue"}]}},"required":["key","question","value"],"additionalProperties":false},"description":"Structural answers waiting"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The note"},"title":{"type":"string","description":"Its title"}},"required":["id","title"],"additionalProperties":false},"description":"Accepted notes waiting"}},"required":["count","fields","notes"],"additionalProperties":false,"description":"Structural answers and accepted notes not yet written into an Agent build"},"links":{"type":"object","properties":{"overview":{"type":"string","description":"Root-relative path that opens this tab"},"overview_new":{"description":"The Admin cockpit, which replaces Overview where it is on: the same automation in one column, with onboarding for its empty parts","type":"string"},"process":{"type":"string","description":"Root-relative path that opens this tab"},"past_runs":{"description":"The Past Runs tab: every Run of this automation. A Module demo has none","type":"string"},"requests":{"description":"The Requests tab: the questions and approvals this automation's runs raised, and answering them","type":"string"},"notifications":{"description":"The Notifications tab: the viewer's notifications about this automation's agents, queues and the connections they use","type":"string"},"policy":{"type":"string","description":"Root-relative path that opens this tab"},"people":{"description":"The People tab: the process roles, meaning who runs, reviews and manages the work. Its own tab, not part of Policy","type":"string"},"agents_queues":{"description":"The Automation tab: its Agents, Queues and the flow between them","type":"string"},"revisions":{"description":"The Revisions tab. A Module demo and an automation on a team without revisions have none: say so, and do not point to another tab or to the Agents for revision history","type":"string"},"setup":{"type":"string","description":"Root-relative path that opens this tab"},"setup_start":{"type":"string","description":"Root-relative path that opens this tab"},"upload_files":{"type":"string","description":"Root-relative path that opens this tab"},"interview":{"type":"string","description":"Root-relative path that opens this tab"},"automation_proposal":{"type":"string","description":"Root-relative path that opens this tab"},"dashboards":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's tab label"},"link":{"type":"string","description":"Root-relative path that opens this tab"}},"required":["artifact_id","name","link"],"additionalProperties":false},"description":"One link per dashboard on this automation's tab bar"}},"required":["dashboards"],"additionalProperties":false,"description":"Root-relative paths of the automation's tabs"},"urls":{"type":"object","properties":{"overview":{"type":"string","description":"Root-relative path that opens this tab"},"overview_new":{"description":"The Admin cockpit, which replaces Overview where it is on: the same automation in one column, with onboarding for its empty parts","type":"string"},"process":{"type":"string","description":"Root-relative path that opens this tab"},"past_runs":{"description":"The Past Runs tab: every Run of this automation. A Module demo has none","type":"string"},"requests":{"description":"The Requests tab: the questions and approvals this automation's runs raised, and answering them","type":"string"},"notifications":{"description":"The Notifications tab: the viewer's notifications about this automation's agents, queues and the connections they use","type":"string"},"policy":{"type":"string","description":"Root-relative path that opens this tab"},"people":{"description":"The People tab: the process roles, meaning who runs, reviews and manages the work. Its own tab, not part of Policy","type":"string"},"agents_queues":{"description":"The Automation tab: its Agents, Queues and the flow between them","type":"string"},"revisions":{"description":"The Revisions tab. A Module demo and an automation on a team without revisions have none: say so, and do not point to another tab or to the Agents for revision history","type":"string"},"setup":{"type":"string","description":"Root-relative path that opens this tab"},"setup_start":{"type":"string","description":"Root-relative path that opens this tab"},"upload_files":{"type":"string","description":"Root-relative path that opens this tab"},"interview":{"type":"string","description":"Root-relative path that opens this tab"},"automation_proposal":{"type":"string","description":"Root-relative path that opens this tab"},"dashboards":{"type":"array","items":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","description":"The dashboard"},"name":{"type":"string","description":"The dashboard's tab label"},"link":{"type":"string","description":"Root-relative path that opens this tab"}},"required":["artifact_id","name","link"],"additionalProperties":false},"description":"One link per dashboard on this automation's tab bar"}},"required":["dashboards"],"additionalProperties":false,"description":"`links` as full web-app URLs; give these to the user"}},"required":["automation","running","sections","counts","pending_proposals","context_notes","interviews","pending_apply","links","urls"],"additionalProperties":false,"description":"The automation's whole Policy"}},"required":["policy"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Read Automation Policy","deprecated":true}},"/v1/automations/{automation_id}/policy-interviews":{"post":{"operationId":"assignPolicyInterview","tags":["Automations"],"description":"Assign a Policy interview: a Clarity voice interview covering the automation's open Policy questions, whose answers are written back onto them. Pass `invited_email` to email it to someone, and `context` to say who they are; leave `invited_email` out to create an unassigned interview slot. This emails a real person: name them, give the exact address and say what the interview covers, and call this only after the user says yes. Use only an address the user gave you. Administrators and above only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invited_email":{"description":"Who to email the interview to, exactly as the user gave it; leave out to create an unassigned interview slot","type":"string","format":"email"},"context":{"description":"Who this person is, for the interview's guidance","type":"string","minLength":1,"maxLength":300}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"Automation ID"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"interview":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The interview"},"invited_email":{"nullable":true,"description":"Who it was sent to; null for an unassigned slot","type":"string"},"join_url":{"nullable":true,"description":"Anyone with this link can join. Null for an unassigned slot, and under impersonation, where only the email carries it","type":"string"}},"required":["id","invited_email","join_url"],"additionalProperties":false}},"required":["interview"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Assign Policy Interview","deprecated":true}},"/v1/automations/{automationId}/config-fields/{fieldId}":{"patch":{"operationId":"updateConfigField","tags":["Automations"],"description":"Set or clear a config field's value. `value: null` removes the answer and does not restore the module default, so a Run that reads the field is refused until it is answered again. To use the default, send `default_value` as `value`. On a running automation (`running` in readAutomationPolicy) the change reaches its Agents from their next run: name the question, its current answer and the new one, change it only after the user says yes, and pass the current answer you showed, not the new one, as `expected_value` so a change someone made in between is not overwritten. A compound question takes every part in one write. When the field's `bindings` include `structural`, the module's Agents also need a matching change; propose it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValueInput"}]},"expected_value":{"description":"The current answer, as you read it and showed the user, not the new one (null if it was unanswered). If the answer has changed since, nothing is written and the call fails with 409; read the Policy again","nullable":true,"allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValueInput"}]}},"required":["value"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automationId","required":true,"description":"Automation ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"fieldId","required":true,"description":"Config field ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"section":{"type":"string"},"position":{"type":"number"},"label":{"type":"string"},"question":{"type":"string"},"guidance":{"default":null,"description":"What to fill in for the question, in plain sentences, or null when it carries none","nullable":true,"type":"string"},"example":{"default":null,"description":"An example answer to the question, or null when it carries none","nullable":true,"type":"string"},"type":{"type":"string","enum":["freeText","identifier","number","select","multiSelect","list","orderedList","personList","table","compound","sourcePointer"]},"typeConfig":{"nullable":true,"type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationConfigJsonValue"}},"labels":{"default":null,"description":"Readable names for what typeConfig declares, or null when the field names none","nullable":true,"type":"object","properties":{"options":{"description":"Readable name of each enum value the field declares, by value","type":"object","additionalProperties":{"type":"string"}},"columns":{"description":"Readable name of each table column, by column","type":"object","additionalProperties":{"type":"string"}},"parts":{"description":"Readable name of each compound part, by part, and of `combine` when the field declares combineOptions","type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"bindings":{"type":"array","items":{"type":"string","enum":["context","parameter","tool","structural","readOnly"]}},"required":{"type":"boolean"},"fillMode":{"type":"string","enum":["interview","setup","module_default"]},"roles":{"default":[],"type":"array","items":{"type":"string"}},"value":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"defaultValue":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"status":{"type":"string","enum":["default","filled"]},"provenance":{"nullable":true,"type":"object","properties":{"filledVia":{"type":"string","x-extensible-enum":["manual","interview","document","template_default","org_default","ask_duvo"]},"filledByUserId":{"nullable":true,"type":"string"},"filledByName":{"nullable":true,"type":"string"},"filledByEmail":{"default":null,"nullable":true,"type":"string"},"filledAt":{"type":"string"},"sourceCaptureId":{"nullable":true,"type":"string"},"sourceFileName":{"default":null,"nullable":true,"type":"string"}},"required":["filledVia","filledByUserId","filledByName","filledByEmail","filledAt","sourceCaptureId","sourceFileName"],"additionalProperties":false}},"required":["id","key","section","position","label","question","guidance","example","type","typeConfig","labels","bindings","required","fillMode","roles","value","defaultValue","status","provenance"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Config Field","deprecated":true}},"/v1/automations/{automation_id}/config-fields/{field_id}/definition":{"patch":{"operationId":"updateConfigFieldDefinition","tags":["Automations"],"description":"Edit a Policy question: its label, question, guidance, example answer, section, the roles that answer it, the options of a select or multiSelect field, and the columns of an unanswered table field a person added. A reworded question gets a new version, and a new section moves the field to that section's end. The type of a field added through the API can change while it has no answer; a field from the module template keeps its type. The answer is never changed, and a module template reinstall keeps the edit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200,"description":"Short name for the field, shown as its row heading"},"key":{"description":"New code, only for a field added to this automation that no Agent or Code step reads yet","type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9][a-z0-9_]*$"},"question":{"description":"New question; a reworded question gets a new version","type":"string","minLength":1,"maxLength":2000},"guidance":{"description":"New guidance on what to fill in, in plain sentences, or null to remove it","nullable":true,"type":"string","minLength":1,"maxLength":2000},"example":{"description":"New example answer, or null to remove it","nullable":true,"type":"string","minLength":1,"maxLength":500},"section":{"description":"Section to move the field to the end of, or null for none","nullable":true,"type":"string","minLength":1,"maxLength":200},"options":{"description":"Select and multiSelect fields only; replaces the whole list","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"columns":{"description":"Table fields only, while the field has no answer; replaces the whole list","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"type":{"description":"New value type, only for a field added through the API that has no answer yet","type":"string","enum":["freeText","identifier","number","select","multiSelect","list","orderedList","personList","table"]},"roles":{"description":"Keys of the process roles whose holders answer this question; replaces the whole list, and empty means anyone","maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"The automation's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"field_id","required":true,"description":"The config field's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"field":{"type":"object","properties":{"id":{"type":"string","description":"Unique config field identifier"},"key":{"type":"string","description":"Stable field key referenced by the automation"},"section":{"type":"string","description":"Catalog section this field is grouped under"},"position":{"type":"number","description":"Order of the field within its section"},"label":{"type":"string","description":"Short name for the field, shown as its row heading"},"question":{"type":"string","description":"The setup question shown for this field"},"guidance":{"default":null,"description":"What to fill in for the question, in plain sentences, or null when it carries none","nullable":true,"type":"string"},"example":{"default":null,"description":"An example answer to the question, or null when it carries none","nullable":true,"type":"string"},"type":{"type":"string","enum":["freeText","identifier","number","select","multiSelect","list","orderedList","personList","table","compound","sourcePointer"],"description":"Value type (e.g. freeText, number, select, compound)"},"type_config":{"nullable":true,"description":"Per-type options (e.g. select choices, number unit/min), or null","type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationConfigJsonValue"}},"labels":{"default":null,"description":"Readable names for the options, columns and parts type_config declares, or null when the field names none","nullable":true,"type":"object","properties":{"options":{"description":"Readable name of each enum value the field declares, by value","type":"object","additionalProperties":{"type":"string"}},"columns":{"description":"Readable name of each table column, by column","type":"object","additionalProperties":{"type":"string"}},"parts":{"description":"Readable name of each compound part, by part, and of `combine` when the field declares combineOptions","type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"bindings":{"type":"array","items":{"type":"string","enum":["context","parameter","tool","structural","readOnly"]},"description":"How the value reaches the automation (context, parameter, tool)"},"required":{"type":"boolean","description":"Whether the field must be filled"},"fill_mode":{"type":"string","enum":["interview","setup","module_default"],"description":"How the field is filled (interview, setup, module_default)"},"roles":{"default":[],"description":"Keys of the process roles whose holders answer this question in a setup interview. Empty means anyone can.","type":"array","items":{"type":"string"}},"value":{"nullable":true,"description":"The current answer, or null when unfilled","allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"default_value":{"nullable":true,"description":"The module default value, or null","allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"status":{"type":"string","enum":["default","filled"],"description":"'filled' when the field has a value, else 'default'"},"provenance":{"nullable":true,"description":"Who filled the value and how, or null when unfilled","type":"object","properties":{"filled_via":{"type":"string","x-extensible-enum":["manual","interview","document","template_default","org_default","ask_duvo"],"description":"How the value was filled (e.g. interview, document, manual)"},"filled_by_user_id":{"nullable":true,"description":"ID of the user who filled the value, when a person did","type":"string"},"filled_by_name":{"nullable":true,"description":"Display name of the user who filled the value","type":"string"},"filled_at":{"type":"string","description":"ISO 8601 timestamp when the value was filled"},"filled_by_email":{"default":null,"description":"Email of the person who filled the value, when no profile names them","nullable":true,"type":"string"},"source_capture_id":{"nullable":true,"description":"ID of the capture the value was extracted from, when applicable","type":"string"},"source_file_name":{"default":null,"description":"File name of the uploaded document the value was read from","nullable":true,"type":"string"}},"required":["filled_via","filled_by_user_id","filled_by_name","filled_at","filled_by_email","source_capture_id","source_file_name"],"additionalProperties":false},"origin":{"default":"template","description":"'template' for a question the module template ships, 'added' for one a person added to this automation","type":"string","enum":["template","added"]},"customized":{"default":false,"description":"Whether a person has changed this template question since the template last set it; always false for an added question","type":"boolean"},"active":{"default":true,"description":"False for a hidden question, which only a list read with include_hidden returns","type":"boolean"}},"required":["id","key","section","position","label","question","guidance","example","type","type_config","labels","bindings","required","fill_mode","roles","value","default_value","status","provenance","origin","customized","active"],"additionalProperties":false}},"required":["field"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Config Field Definition","deprecated":true}},"/v1/automations/{automation_id}/config-fields/{field_id}/hide":{"post":{"operationId":"hideConfigField","tags":["Automations"],"description":"Hide a Policy question from the Policy screen, interviews and every agent's context. Nothing is deleted: the answer and its history stay, and the restore operation shows it again. Returns the agents whose live version still reads the field; hiding is never refused because of them. A module template reinstall keeps the field hidden.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"The automation's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"field_id","required":true,"description":"The config field's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"field":{"type":"object","properties":{"id":{"type":"string","description":"Unique config field identifier"},"key":{"type":"string","description":"Stable field key referenced by the automation"},"section":{"type":"string","description":"Catalog section this field is grouped under"},"position":{"type":"number","description":"Order of the field within its section"},"label":{"type":"string","description":"Short name for the field, shown as its row heading"},"question":{"type":"string","description":"The setup question shown for this field"},"guidance":{"default":null,"description":"What to fill in for the question, in plain sentences, or null when it carries none","nullable":true,"type":"string"},"example":{"default":null,"description":"An example answer to the question, or null when it carries none","nullable":true,"type":"string"},"type":{"type":"string","enum":["freeText","identifier","number","select","multiSelect","list","orderedList","personList","table","compound","sourcePointer"],"description":"Value type (e.g. freeText, number, select, compound)"},"type_config":{"nullable":true,"description":"Per-type options (e.g. select choices, number unit/min), or null","type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationConfigJsonValue"}},"labels":{"default":null,"description":"Readable names for the options, columns and parts type_config declares, or null when the field names none","nullable":true,"type":"object","properties":{"options":{"description":"Readable name of each enum value the field declares, by value","type":"object","additionalProperties":{"type":"string"}},"columns":{"description":"Readable name of each table column, by column","type":"object","additionalProperties":{"type":"string"}},"parts":{"description":"Readable name of each compound part, by part, and of `combine` when the field declares combineOptions","type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"bindings":{"type":"array","items":{"type":"string","enum":["context","parameter","tool","structural","readOnly"]},"description":"How the value reaches the automation (context, parameter, tool)"},"required":{"type":"boolean","description":"Whether the field must be filled"},"fill_mode":{"type":"string","enum":["interview","setup","module_default"],"description":"How the field is filled (interview, setup, module_default)"},"roles":{"default":[],"description":"Keys of the process roles whose holders answer this question in a setup interview. Empty means anyone can.","type":"array","items":{"type":"string"}},"value":{"nullable":true,"description":"The current answer, or null when unfilled","allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"default_value":{"nullable":true,"description":"The module default value, or null","allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"status":{"type":"string","enum":["default","filled"],"description":"'filled' when the field has a value, else 'default'"},"provenance":{"nullable":true,"description":"Who filled the value and how, or null when unfilled","type":"object","properties":{"filled_via":{"type":"string","x-extensible-enum":["manual","interview","document","template_default","org_default","ask_duvo"],"description":"How the value was filled (e.g. interview, document, manual)"},"filled_by_user_id":{"nullable":true,"description":"ID of the user who filled the value, when a person did","type":"string"},"filled_by_name":{"nullable":true,"description":"Display name of the user who filled the value","type":"string"},"filled_at":{"type":"string","description":"ISO 8601 timestamp when the value was filled"},"filled_by_email":{"default":null,"description":"Email of the person who filled the value, when no profile names them","nullable":true,"type":"string"},"source_capture_id":{"nullable":true,"description":"ID of the capture the value was extracted from, when applicable","type":"string"},"source_file_name":{"default":null,"description":"File name of the uploaded document the value was read from","nullable":true,"type":"string"}},"required":["filled_via","filled_by_user_id","filled_by_name","filled_at","filled_by_email","source_capture_id","source_file_name"],"additionalProperties":false},"origin":{"default":"template","description":"'template' for a question the module template ships, 'added' for one a person added to this automation","type":"string","enum":["template","added"]},"customized":{"default":false,"description":"Whether a person has changed this template question since the template last set it; always false for an added question","type":"boolean"},"active":{"default":true,"description":"False for a hidden question, which only a list read with include_hidden returns","type":"boolean"}},"required":["id","key","section","position","label","question","guidance","example","type","type_config","labels","bindings","required","fill_mode","roles","value","default_value","status","provenance","origin","customized","active"],"additionalProperties":false},"readers":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","description":"ID of the agent that reads the field"},"name":{"type":"string","description":"The agent's name"},"type":{"type":"string","enum":["agent","code"],"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation — a step's builds all belong to the matching config family."},"origin":{"type":"string","enum":["aop","configured"],"description":"'aop' when the agent's instructions mention the field, 'configured' when it was picked on the agent's Policy setup"}},"required":["agent_id","name","origin"],"additionalProperties":false},"description":"Agents whose live version still reads the field"}},"required":["field","readers"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Hide Config Field","deprecated":true}},"/v1/automations/{automation_id}/config-fields/{field_id}/restore":{"post":{"operationId":"restoreConfigField","tags":["Automations"],"description":"Show a hidden Policy question again, with the answer it had.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"The automation's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"field_id","required":true,"description":"The config field's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"field":{"type":"object","properties":{"id":{"type":"string","description":"Unique config field identifier"},"key":{"type":"string","description":"Stable field key referenced by the automation"},"section":{"type":"string","description":"Catalog section this field is grouped under"},"position":{"type":"number","description":"Order of the field within its section"},"label":{"type":"string","description":"Short name for the field, shown as its row heading"},"question":{"type":"string","description":"The setup question shown for this field"},"guidance":{"default":null,"description":"What to fill in for the question, in plain sentences, or null when it carries none","nullable":true,"type":"string"},"example":{"default":null,"description":"An example answer to the question, or null when it carries none","nullable":true,"type":"string"},"type":{"type":"string","enum":["freeText","identifier","number","select","multiSelect","list","orderedList","personList","table","compound","sourcePointer"],"description":"Value type (e.g. freeText, number, select, compound)"},"type_config":{"nullable":true,"description":"Per-type options (e.g. select choices, number unit/min), or null","type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationConfigJsonValue"}},"labels":{"default":null,"description":"Readable names for the options, columns and parts type_config declares, or null when the field names none","nullable":true,"type":"object","properties":{"options":{"description":"Readable name of each enum value the field declares, by value","type":"object","additionalProperties":{"type":"string"}},"columns":{"description":"Readable name of each table column, by column","type":"object","additionalProperties":{"type":"string"}},"parts":{"description":"Readable name of each compound part, by part, and of `combine` when the field declares combineOptions","type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"bindings":{"type":"array","items":{"type":"string","enum":["context","parameter","tool","structural","readOnly"]},"description":"How the value reaches the automation (context, parameter, tool)"},"required":{"type":"boolean","description":"Whether the field must be filled"},"fill_mode":{"type":"string","enum":["interview","setup","module_default"],"description":"How the field is filled (interview, setup, module_default)"},"roles":{"default":[],"description":"Keys of the process roles whose holders answer this question in a setup interview. Empty means anyone can.","type":"array","items":{"type":"string"}},"value":{"nullable":true,"description":"The current answer, or null when unfilled","allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"default_value":{"nullable":true,"description":"The module default value, or null","allOf":[{"$ref":"#/components/schemas/AutomationConfigJsonValue"}]},"status":{"type":"string","enum":["default","filled"],"description":"'filled' when the field has a value, else 'default'"},"provenance":{"nullable":true,"description":"Who filled the value and how, or null when unfilled","type":"object","properties":{"filled_via":{"type":"string","x-extensible-enum":["manual","interview","document","template_default","org_default","ask_duvo"],"description":"How the value was filled (e.g. interview, document, manual)"},"filled_by_user_id":{"nullable":true,"description":"ID of the user who filled the value, when a person did","type":"string"},"filled_by_name":{"nullable":true,"description":"Display name of the user who filled the value","type":"string"},"filled_at":{"type":"string","description":"ISO 8601 timestamp when the value was filled"},"filled_by_email":{"default":null,"description":"Email of the person who filled the value, when no profile names them","nullable":true,"type":"string"},"source_capture_id":{"nullable":true,"description":"ID of the capture the value was extracted from, when applicable","type":"string"},"source_file_name":{"default":null,"description":"File name of the uploaded document the value was read from","nullable":true,"type":"string"}},"required":["filled_via","filled_by_user_id","filled_by_name","filled_at","filled_by_email","source_capture_id","source_file_name"],"additionalProperties":false},"origin":{"default":"template","description":"'template' for a question the module template ships, 'added' for one a person added to this automation","type":"string","enum":["template","added"]},"customized":{"default":false,"description":"Whether a person has changed this template question since the template last set it; always false for an added question","type":"boolean"},"active":{"default":true,"description":"False for a hidden question, which only a list read with include_hidden returns","type":"boolean"}},"required":["id","key","section","position","label","question","guidance","example","type","type_config","labels","bindings","required","fill_mode","roles","value","default_value","status","provenance","origin","customized","active"],"additionalProperties":false}},"required":["field"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Restore Config Field","deprecated":true}},"/v1/automations/{automation_id}/config-sections":{"get":{"operationId":"listConfigSections","tags":["Automations"],"description":"List the sections of an automation's Policy in display order, empty ones included, each with its key, name, origin and question count. No offset/limit params: this is the automation's whole set of sections.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"The automation's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"description":"Stable identifier of the section within its automation"},"name":{"type":"string","description":"The section heading shown on the Policy screen, unique within the automation ignoring case"},"position":{"type":"number","description":"Display order among the automation's sections, lowest first; gaps are allowed"},"origin":{"type":"string","enum":["template","added"],"description":"'template' for a section the module template declares, 'added' for one a person added to this automation"},"customized":{"type":"boolean","description":"Whether a person has renamed or moved this template section since the template last set it; always false for an added section"},"question_count":{"type":"number","description":"Number of questions in the section, hidden ones included and ones the module template no longer ships left out. Only an added section with none can be removed."}},"required":["key","name","position","origin","customized","question_count"],"additionalProperties":false},"description":"Every section of the automation, in display order"}},"required":["sections"],"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":"List Config Sections","deprecated":true},"post":{"operationId":"addConfigSection","tags":["Automations"],"description":"Add an empty section to this automation's Policy, last or right after after_key. Its key is the name in lowercase words joined by hyphens, with `-2`, `-3` and so on appended when the key is taken. A name another section has, ignoring case, is refused with a 409. A module template reinstall never changes a section added here.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"The section heading shown on the Policy screen, unique within the automation ignoring case"},"after_key":{"description":"Key of the section to place the new one right after; omitted, it goes last","type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"The automation's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"section":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"description":"Stable identifier of the section within its automation"},"name":{"type":"string","description":"The section heading shown on the Policy screen, unique within the automation ignoring case"},"position":{"type":"number","description":"Display order among the automation's sections, lowest first; gaps are allowed"},"origin":{"type":"string","enum":["template","added"],"description":"'template' for a section the module template declares, 'added' for one a person added to this automation"},"customized":{"type":"boolean","description":"Whether a person has renamed or moved this template section since the template last set it; always false for an added section"},"question_count":{"type":"number","description":"Number of questions in the section, hidden ones included and ones the module template no longer ships left out. Only an added section with none can be removed."}},"required":["key","name","position","origin","customized","question_count"],"additionalProperties":false}},"required":["section"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Add Config Section","deprecated":true}},"/v1/automations/{automation_id}/config-sections/{section_key}":{"patch":{"operationId":"renameConfigSection","tags":["Automations"],"description":"Rename a section of this automation's Policy. Its key and its questions stay as they are, and every reader shows the new name. A name another section has, ignoring case, is refused with a 409; the current name changes nothing. A module template reinstall keeps the rename.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"The new heading; the section's key and its questions stay as they are"}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"The automation's unique identifier"},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"section_key","required":true,"description":"The section's key within the automation, such as 'about-you'"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"section":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"description":"Stable identifier of the section within its automation"},"name":{"type":"string","description":"The section heading shown on the Policy screen, unique within the automation ignoring case"},"position":{"type":"number","description":"Display order among the automation's sections, lowest first; gaps are allowed"},"origin":{"type":"string","enum":["template","added"],"description":"'template' for a section the module template declares, 'added' for one a person added to this automation"},"customized":{"type":"boolean","description":"Whether a person has renamed or moved this template section since the template last set it; always false for an added section"},"question_count":{"type":"number","description":"Number of questions in the section, hidden ones included and ones the module template no longer ships left out. Only an added section with none can be removed."}},"required":["key","name","position","origin","customized","question_count"],"additionalProperties":false}},"required":["section"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Rename Config Section","deprecated":true},"delete":{"operationId":"removeConfigSection","tags":["Automations"],"description":"Remove a section a person added to this automation's Policy, once it holds no question, hidden ones included. A section with questions, or one from the module template, is refused with a 409. Returns the removed section.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"The automation's unique identifier"},{"schema":{"type":"string","minLength":1,"maxLength":120},"in":"path","name":"section_key","required":true,"description":"The section's key within the automation, such as 'about-you'"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"section":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"description":"Stable identifier of the section within its automation"},"name":{"type":"string","description":"The section heading shown on the Policy screen, unique within the automation ignoring case"},"position":{"type":"number","description":"Display order among the automation's sections, lowest first; gaps are allowed"},"origin":{"type":"string","enum":["template","added"],"description":"'template' for a section the module template declares, 'added' for one a person added to this automation"},"customized":{"type":"boolean","description":"Whether a person has renamed or moved this template section since the template last set it; always false for an added section"},"question_count":{"type":"number","description":"Number of questions in the section, hidden ones included and ones the module template no longer ships left out. Only an added section with none can be removed."}},"required":["key","name","position","origin","customized","question_count"],"additionalProperties":false}},"required":["section"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Remove Config Section","deprecated":true}},"/v1/automations/{automation_id}/config-sections/order":{"put":{"operationId":"reorderConfigSections","tags":["Automations"],"description":"Replace the display order of this automation's Policy sections. keys must list every section key of the automation exactly once, else a 400 names what is missing, unknown or repeated. Returns every section in its new order. A module template reinstall keeps the order of the sections moved here.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"description":"Stable identifier of the section within its automation"},"description":"Every section key of the automation exactly once, in the new display order"}},"required":["keys"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"automation_id","required":true,"description":"The automation's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"description":"Stable identifier of the section within its automation"},"name":{"type":"string","description":"The section heading shown on the Policy screen, unique within the automation ignoring case"},"position":{"type":"number","description":"Display order among the automation's sections, lowest first; gaps are allowed"},"origin":{"type":"string","enum":["template","added"],"description":"'template' for a section the module template declares, 'added' for one a person added to this automation"},"customized":{"type":"boolean","description":"Whether a person has renamed or moved this template section since the template last set it; always false for an added section"},"question_count":{"type":"number","description":"Number of questions in the section, hidden ones included and ones the module template no longer ships left out. Only an added section with none can be removed."}},"required":["key","name","position","origin","customized","question_count"],"additionalProperties":false},"description":"Every section of the automation, in display order"}},"required":["sections"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Reorder Config Sections","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"selected_automation_revision_id":{"description":"The automation revision this edit is being made at. Pass a draft and the edit is folded into that draft itself; pass the active revision and the edit lands on a draft branched from it. A historic revision is rejected — it cannot be activated from without an explicit rebase. A revision belonging to a different automation is ignored, and the edit targets the automation the addressed agent belongs to. Omit to target the automation's active revision.","nullable":true,"type":"string","format":"uuid"}},"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"},"build_id":{"type":"string","format":"uuid","description":"The revision the integrations were attached to. On a migrated team the edit is staged onto the agent's draft revision, so this may differ from the requested build_id — pin connections against this value."}},"required":["success","count","build_id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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":{"nullable":true,"type":"string","format":"uuid"},"in":"query","name":"selected_automation_revision_id","required":false,"description":"The automation revision this edit is being made at. Pass a draft and the edit is folded into that draft itself; pass the active revision and the edit lands on a draft branched from it. A historic revision is rejected — it cannot be activated from without an explicit rebase. A revision belonging to a different automation is ignored, and the edit targets the automation the addressed agent belongs to. Omit to target the automation's active revision."},{"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"},"build_id":{"type":"string","format":"uuid","description":"The revision the integration was removed from. On a migrated team the edit is staged onto the agent's draft revision, so this may differ from the requested build_id."}},"required":["success","build_id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 any queue is available to bind (scoped to the agent's automation on a migrated team, team-wide otherwise). 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 queues currently linked to this slot"}},"required":["config_id","integration_type","linked_queue_count"],"additionalProperties":false},"description":"Per-slot queue link summary for the build"},"has_available_queues":{"type":"boolean","description":"True if at least one queue is available to bind. Scoped to the agent's automation on a migrated team; team-wide for a standalone agent."}},"required":["configs","has_available_queues"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Revision Integration Queues","deprecated":true},"put":{"operationId":"replaceRevisionIntegrationQueues","tags":["Revision Integrations"],"description":"Replace the set of 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."},"selected_automation_revision_id":{"description":"The automation revision this edit is being made at. Pass a draft and the edit is folded into that draft itself; pass the active revision and the edit lands on a draft branched from it. A historic revision is rejected — it cannot be activated from without an explicit rebase. A revision belonging to a different automation is ignored, and the edit targets the automation the addressed agent belongs to. Omit to target the automation's active revision.","nullable":true,"type":"string","format":"uuid"}},"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}},"build_id":{"type":"string","format":"uuid","description":"The revision the queue links were replaced on. On a migrated team the edit is staged onto the agent's draft revision, so this may differ from the requested build_id."}},"required":["queues","build_id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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","aop_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":{"base_build_id":{"type":"string","format":"uuid"},"base_revision_number":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"applied_build_id":{"type":"string","format":"uuid"},"apply":{"type":"object","properties":{"state":{"type":"string","enum":["running","failed"]},"started_at":{"type":"string"},"error":{"type":"string"}},"required":["state","started_at"],"additionalProperties":false}},"required":["base_build_id","base_revision_number"],"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"toSlug":{"type":"string","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agent Suggestions","deprecated":true}},"/v1/agents/suggestions/{id}":{"get":{"operationId":"getAgentSuggestion","tags":["Suggestions"],"description":"Fetch a single suggestion. Poll this after a 202 from consume: an AOP apply in flight reports payload.apply.state (running/failed); once consumed, applied_revision_id carries the draft revision the change was staged onto.","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","aop_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":{"base_build_id":{"type":"string","format":"uuid"},"base_revision_number":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"applied_build_id":{"type":"string","format":"uuid"},"apply":{"type":"object","properties":{"state":{"type":"string","enum":["running","failed"]},"started_at":{"type":"string"},"error":{"type":"string"}},"required":["state","started_at"],"additionalProperties":false}},"required":["base_build_id","base_revision_number"],"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"toSlug":{"type":"string","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Agent Suggestion","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"},"create_new_draft":{"type":"boolean"},"selected_automation_revision_id":{"description":"The automation revision this edit is being made at. Pass a draft and the edit is folded into that draft itself; pass the active revision and the edit lands on a draft branched from it. A historic revision is rejected — it cannot be activated from without an explicit rebase. A revision belonging to a different automation is ignored, and the edit targets the automation the addressed agent belongs to. Omit to target the automation's active revision.","nullable":true,"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","aop_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":{"base_build_id":{"type":"string","format":"uuid"},"base_revision_number":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"applied_build_id":{"type":"string","format":"uuid"},"apply":{"type":"object","properties":{"state":{"type":"string","enum":["running","failed"]},"started_at":{"type":"string"},"error":{"type":"string"}},"required":["state","started_at"],"additionalProperties":false}},"required":["base_build_id","base_revision_number"],"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"toSlug":{"type":"string","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]}},"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}}}},"202":{"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","aop_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":{"base_build_id":{"type":"string","format":"uuid"},"base_revision_number":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"applied_build_id":{"type":"string","format":"uuid"},"apply":{"type":"object","properties":{"state":{"type":"string","enum":["running","failed"]},"started_at":{"type":"string"},"error":{"type":"string"}},"required":["state","started_at"],"additionalProperties":false}},"required":["base_build_id","base_revision_number"],"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"toSlug":{"type":"string","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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","aop_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":{"base_build_id":{"type":"string","format":"uuid"},"base_revision_number":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"applied_build_id":{"type":"string","format":"uuid"},"apply":{"type":"object","properties":{"state":{"type":"string","enum":["running","failed"]},"started_at":{"type":"string"},"error":{"type":"string"}},"required":["state","started_at"],"additionalProperties":false}},"required":["base_build_id","base_revision_number"],"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"toSlug":{"type":"string","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]},"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","aop_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","description":"Integration catalog slug. New slugs are added over time.","x-extensible-enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder"]}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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, overwriting the active revision in place — the previous content is not recoverable. Prefer the non-destructive flow when you can: createSkillRevision to open a draft, updateSkillRevisionFile to edit it, promoteSkillRevision to activate it. 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}}}},"409":{"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}/ask-duvo":{"patch":{"operationId":"updateSkillAskDuvo","tags":["Skills"],"description":"Mark a team skill as available in Ask Duvo, or take it back off. Every NEW Ask Duvo chat in the team starts with the marked skills on disk. A chat that is already open keeps the set it started with until its sandbox is replaced, and picks up the current set from then on.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"use_in_ask_duvo":{"type":"boolean"}},"required":["use_in_ask_duvo"]}}}},"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":{"skill":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"use_in_ask_duvo":{"type":"boolean"}},"required":["id","name","use_in_ask_duvo"],"additionalProperties":false}},"required":["skill"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Skill Ask Duvo","deprecated":true}},"/v1/skills/{skill_id}/assignments":{"get":{"operationId":"listSkillAssignments","tags":["Skills"],"description":"List the agents in the current team whose live build references the given skill. Used to warn users that editing a skill will affect every agent 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":"Agents 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Skill Assignments","deprecated":true}},"/v1/skills/{skill_id}/revisions":{"get":{"operationId":"listSkillRevisions","tags":["Skills"],"description":"List a skill's version history. Each revision is a snapshot of the skill's files; at most one is active (live) at a time, plus at most one open draft.","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":"skill_id","required":true,"description":"Skill ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"revisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique revision identifier"},"skill_id":{"type":"string","description":"The skill this revision belongs to"},"revision_number":{"nullable":true,"description":"Sequential version number, null while the revision is a draft","type":"number"},"status":{"type":"string","enum":["draft","live","historic"],"description":"Lifecycle state of the revision"},"revision_name":{"nullable":true,"description":"Optional user-defined name for this revision","type":"string"},"revision_description":{"nullable":true,"description":"Optional user-defined description for this revision","type":"string"},"created_by":{"nullable":true,"description":"Profile id of the user who created the revision","type":"string"},"created_by_name":{"nullable":true,"description":"Display name of the user who created the revision","type":"string"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"}},"required":["id","skill_id","revision_number","status","revision_name","revision_description","created_by","created_by_name","created_at","updated_at"],"additionalProperties":false},"description":"Revisions of the skill, newest first"},"total":{"type":"number","description":"Total number of revisions for the skill"},"limit":{"type":"number","description":"The page size that was applied"},"offset":{"type":"number","description":"The offset that was applied"}},"required":["revisions","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Skill Revisions","deprecated":true},"post":{"operationId":"createSkillRevision","tags":["Skills"],"description":"Open a draft revision of a skill, copying its files from the active revision (or from `source_revision_id`). Edit the draft with updateSkillRevisionFile and deleteSkillRevisionFile, then activate it with promoteSkillRevision — the previously active revision stays intact and can be re-activated later. A skill has at most one open draft: if one already exists this returns it with `created: false`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{},"type":"object","properties":{"source_revision_id":{"description":"Revision to fork the new draft from. Defaults to the live revision (or the skill's current files if there is no live revision yet).","type":"string","format":"uuid"}}}}}},"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":{"revision":{"type":"object","properties":{"id":{"type":"string","description":"Unique revision identifier"},"skill_id":{"type":"string","description":"The skill this revision belongs to"},"revision_number":{"nullable":true,"description":"Sequential version number, null while the revision is a draft","type":"number"},"status":{"type":"string","enum":["draft","live","historic"],"description":"Lifecycle state of the revision"},"revision_name":{"nullable":true,"description":"Optional user-defined name for this revision","type":"string"},"revision_description":{"nullable":true,"description":"Optional user-defined description for this revision","type":"string"},"created_by":{"nullable":true,"description":"Profile id of the user who created the revision","type":"string"},"created_by_name":{"nullable":true,"description":"Display name of the user who created the revision","type":"string"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"}},"required":["id","skill_id","revision_number","status","revision_name","revision_description","created_by","created_by_name","created_at","updated_at"],"additionalProperties":false,"description":"The open draft revision"},"created":{"type":"boolean","description":"True if a new draft was created, false if one already existed"}},"required":["revision","created"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"object","properties":{"id":{"type":"string","description":"Unique revision identifier"},"skill_id":{"type":"string","description":"The skill this revision belongs to"},"revision_number":{"nullable":true,"description":"Sequential version number, null while the revision is a draft","type":"number"},"status":{"type":"string","enum":["draft","live","historic"],"description":"Lifecycle state of the revision"},"revision_name":{"nullable":true,"description":"Optional user-defined name for this revision","type":"string"},"revision_description":{"nullable":true,"description":"Optional user-defined description for this revision","type":"string"},"created_by":{"nullable":true,"description":"Profile id of the user who created the revision","type":"string"},"created_by_name":{"nullable":true,"description":"Display name of the user who created the revision","type":"string"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"}},"required":["id","skill_id","revision_number","status","revision_name","revision_description","created_by","created_by_name","created_at","updated_at"],"additionalProperties":false,"description":"The open draft revision"},"created":{"type":"boolean","description":"True if a new draft was created, false if one already existed"}},"required":["revision","created"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Skill Revision","deprecated":true}},"/v1/skill-revisions/{skill_revision_id}/promote":{"post":{"operationId":"promoteSkillRevision","tags":["Skills"],"description":"Make a skill revision the active (live) one. The previously active revision becomes historic and can be re-activated later. Idempotent: promoting the already-active revision succeeds rather than erroring, and still applies any revision_name / revision_description supplied in the body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{},"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":"skill_revision_id","required":true,"description":"Skill revision ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"object","properties":{"id":{"type":"string","description":"Unique revision identifier"},"skill_id":{"type":"string","description":"The skill this revision belongs to"},"revision_number":{"nullable":true,"description":"Sequential version number, null while the revision is a draft","type":"number"},"status":{"type":"string","enum":["draft","live","historic"],"description":"Lifecycle state of the revision"},"revision_name":{"nullable":true,"description":"Optional user-defined name for this revision","type":"string"},"revision_description":{"nullable":true,"description":"Optional user-defined description for this revision","type":"string"},"created_by":{"nullable":true,"description":"Profile id of the user who created the revision","type":"string"},"created_by_name":{"nullable":true,"description":"Display name of the user who created the revision","type":"string"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"}},"required":["id","skill_id","revision_number","status","revision_name","revision_description","created_by","created_by_name","created_at","updated_at"],"additionalProperties":false,"description":"The now-active revision"}},"required":["revision"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Promote Skill Revision","deprecated":true}},"/v1/skill-revisions/{skill_revision_id}/files":{"get":{"operationId":"listSkillRevisionFiles","tags":["Skills"],"description":"List the files in a skill revision, one page at a time. When `has_more` is true, pass `next_cursor` back as `cursor` to fetch the next page.","parameters":[{"schema":{"default":100,"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"limit","required":false,"description":"Maximum number of files to return per page (1-1000, default 100)"},{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false,"description":"Opaque continuation token from a previous response's `next_cursor`. Omit for the first page."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"skill_revision_id","required":true,"description":"Skill revision 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 revision"},"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 revision"},"limit":{"type":"number","description":"The page size that was applied"},"has_more":{"type":"boolean","description":"True when further pages remain for this revision"},"next_cursor":{"nullable":true,"description":"Pass back as `cursor` to fetch the next page; null on the last page","type":"string"}},"required":["files","limit","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Skill Revision Files","deprecated":true}},"/v1/skill-revisions/{skill_revision_id}/files/{*}":{"get":{"operationId":"getSkillRevisionFileContent","tags":["Skills"],"description":"Get the content of a text file in a skill revision.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"skill_revision_id","required":true,"description":"Skill revision ID."},{"schema":{"type":"string","minLength":1},"in":"path","name":"*","required":true,"description":"Relative path to the file inside the revision, 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 revision"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Skill Revision File Content","deprecated":true},"put":{"operationId":"updateSkillRevisionFile","tags":["Skills"],"description":"Write a text file into a skill revision. Writing into a draft leaves the active revision untouched until the draft is promoted; writing into the active revision changes what the skill runs immediately. Historic revisions are read-only: create a draft from one to edit it.","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_revision_id","required":true,"description":"Skill revision ID."},{"schema":{"type":"string","minLength":1},"in":"path","name":"*","required":true,"description":"Relative path to the file inside the revision, 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 written"},"message":{"type":"string","description":"Human-readable result message"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Skill Revision File","deprecated":true},"delete":{"operationId":"deleteSkillRevisionFile","tags":["Skills"],"description":"Delete a file from a skill revision. Deleting from a draft leaves the active revision untouched until the draft is promoted; deleting from the active revision changes what the skill runs immediately. SKILL.md can't be deleted. Historic revisions are read-only: create a draft from one to edit it.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"skill_revision_id","required":true,"description":"Skill revision ID."},{"schema":{"type":"string","minLength":1},"in":"path","name":"*","required":true,"description":"Relative path to the file inside the revision, e.g. scripts/helper.py."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the file was deleted"},"message":{"type":"string","description":"Human-readable result message"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Skill Revision File","deprecated":true}},"/v1/skill-revisions/{skill_revision_id}":{"patch":{"operationId":"updateSkillRevision","tags":["Skills"],"description":"Rename a skill revision or change its description. Works for drafts, the active revision, and historic revisions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"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":"skill_revision_id","required":true,"description":"Skill revision ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"object","properties":{"id":{"type":"string","description":"Unique revision identifier"},"skill_id":{"type":"string","description":"The skill this revision belongs to"},"revision_number":{"nullable":true,"description":"Sequential version number, null while the revision is a draft","type":"number"},"status":{"type":"string","enum":["draft","live","historic"],"description":"Lifecycle state of the revision"},"revision_name":{"nullable":true,"description":"Optional user-defined name for this revision","type":"string"},"revision_description":{"nullable":true,"description":"Optional user-defined description for this revision","type":"string"},"created_by":{"nullable":true,"description":"Profile id of the user who created the revision","type":"string"},"created_by_name":{"nullable":true,"description":"Display name of the user who created the revision","type":"string"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"}},"required":["id","skill_id","revision_number","status","revision_name","revision_description","created_by","created_by_name","created_at","updated_at"],"additionalProperties":false,"description":"The updated revision"}},"required":["revision"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Skill Revision","deprecated":true},"delete":{"operationId":"deleteSkillRevision","tags":["Skills"],"description":"Delete a draft or historic skill revision and its files. The active revision can't be deleted — activate another revision first.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"skill_revision_id","required":true,"description":"Skill revision ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the revision was deleted"},"message":{"type":"string","description":"Human-readable result message"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Skill Revision","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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, automation 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"},"userEmail":{"type":"string"},"type":{"type":"string","x-extensible-enum":["video","interview","document","screenshare","meeting","image"]},"videoUrl":{"nullable":true,"type":"string"},"videoTranscript":{"nullable":true,"type":"string"},"documentFileName":{"nullable":true,"type":"string"},"documentTextMetadata":{"nullable":true,"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"lines":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"lineNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pageNumber","lineNumber","startOffset","endOffset"],"additionalProperties":false}}},"required":["pageNumber","startOffset","endOffset","lines"],"additionalProperties":false}},"sourceArtifactGeneration":{"type":"string"},"pageImagesPrefix":{"type":"string"},"pageImageCount":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["pages"],"additionalProperties":false},"processingFailureReason":{"nullable":true,"type":"string","maxLength":500},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"},"isExtraCapture":{"type":"boolean"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"speakerName":{"type":"string"},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"hasTranscript":{"type":"boolean"},"hasVideoTranscript":{"type":"boolean"},"transcriptQuestionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","recording","processing","complete","failed"]},"isDistillingPolicy":{"type":"boolean"},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","processId","userId","type","videoUrl","videoTranscript","scheduledJoinAt","transcript","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","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},"patch":{"operationId":"updateClarityProcess","tags":["Clarity"],"description":"Update a Clarity process name, guidance, interview independence, visibility, or completion status. Team Builders can edit names, guidance, and interview independence, only the creator or a team manager can change visibility, and completing or reopening a process for review requires a Lead Builder role.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New process name","type":"string","minLength":1,"maxLength":255},"status":{"description":"Mark a review-stage process complete, or reopen a completed process for review","type":"string","enum":["complete","review"]},"customPrompt":{"description":"Process-specific guidance, or null to clear it","nullable":true,"type":"string","maxLength":5000},"visibility":{"description":"Process visibility within the team","type":"string","enum":["team","restricted"]},"independentInterviews":{"description":"Run each interview independently: no briefing from earlier interviews and a neutral opener","type":"boolean"},"mapLanguage":{"description":"Language Duvo writes this process's map in, or null to use the team's map language","nullable":true,"type":"string","enum":["cs","de","de-CH","en","en-GB","es","es-MX","fr","hu","pl","pt","pt-BR","sk","sl","th","uk","ar-EG","ar-SA","da-DK","de-AT","el-GR","en-AU","en-GB-scotland","en-IE","en-IN","en-NG","en-ZA","es-AR","fi-FI","fr-BE","fr-CA","gsw-CH","he-IL","hi-IN","hi-Latn-IN","id-ID","it-IT","ja-JP","ko-KR","nb-NO","nl-BE","nl-NL","ro-RO","sv-SE","tr-TR","vi-VN","yue-HK","zh-Hans-CN","zh-Hant-TW","af-ZA","ak-GH","sq-AL","am-ET","hy-AM","as-IN","az-AZ","eu-ES","be-BY","bn-BD","bs-BA","bg-BG","my-MM","ca-ES","ceb-PH","hr-HR","et-EE","fo-FO","fil-PH","gl-ES","ka-GE","gu-IN","ha-NG","is-IS","ga-IE","kn-IN","kk-KZ","km-KH","rw-RW","ku-TR","ky-KG","lo-LA","lv-LV","lt-LT","mk-MK","ms-MY","ml-IN","mt-MT","mi-NZ","mr-IN","mn-MN","ne-NP","or-IN","om-ET","ps-AF","fa-IR","pa-IN","qu-PE","rm-CH","ru-RU","sr-RS","sd-PK","si-LK","so-SO","st-ZA","sw-TZ","tg-TJ","ta-IN","te-IN","tn-ZA","tk-TM","ur-PK","uz-UZ","cy-GB","fy-NL","wo-SN","yo-NG","zu-ZA","bn-IN","ur-IN","fr-CH","it-CH","de-BE","sw-KE","sw-UG","ms-SG","zh-Hans-SG","ta-SG","ta-LK","yue-CN","ar-IL","ar-MA","fr-MA","sv-FI","es-US","ru-BY","ru-KZ","fa-AF","ar-DZ","fr-DZ","ar-TN","fr-TN","ar-LY","ar-SD","ar-IQ","ku-IQ","ar-SY","ar-JO","ar-AE","ar-QA","ar-KW","ar-OM","ar-YE","ar-LB","fr-LB","pt-AO","pt-MZ","es-CO","es-PE","es-CL","es-VE","es-EC","es-BO","qu-BO","es-PY","es-UY","es-CU","es-GT","es-HN","es-NI","es-CR","es-PA","es-DO","es-SV","sr-ME","fr-CD","fr-CI","fr-SN","fr-ML","fr-CM","da-GL","tn-BW","af-NA","el-CY","tr-CY","fr-LU","de-LU","en-CA","en-NZ","en-SG","en-PH","en-KE","en-GH","en-PK"]}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Clarity process id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"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"]},"customPrompt":{"nullable":true,"type":"string"},"independentInterviews":{"type":"boolean"},"mapLanguage":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","status","visibility","customPrompt","independentInterviews","mapLanguage","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Clarity Process","deprecated":true},"delete":{"operationId":"deleteClarityProcess","tags":["Clarity"],"description":"Delete a Clarity process. The creator or a team admin can delete it unless capture analysis is still in progress, or a Module runs it — a Module's process is part of the Module, so the Module has to be removed first. An automation built from the process keeps running, with its setup answers and people, but is no longer linked to it.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Clarity Process","deprecated":true}},"/v1/clarity/processes/{id}/members":{"get":{"operationId":"listClarityProcessMembers","tags":["Clarity"],"description":"List users with accepted access to a clarity process, the people invited who have not accepted yet, and anyone else who has recorded a capture on it","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"contributorsAfter","required":false,"description":"Cursor from contributorsNextCursor; returns the next page of contributors."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Clarity process ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"type":"string","enum":["team","restricted"]},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string","format":"email"},"role":{"nullable":true,"type":"string"}},"required":["id","name","email","role"],"additionalProperties":false},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string","format":"email"}},"required":["id","name","email"],"additionalProperties":false},"role":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","user","role","createdAt"],"additionalProperties":false}},"pending":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"createdAt":{"type":"string"}},"required":["id","email","createdAt"],"additionalProperties":false}},"contributors":{"type":"array","items":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string","format":"email"}},"required":["id","name","email"],"additionalProperties":false},"role":{"nullable":true,"type":"string"}},"required":["user","role"],"additionalProperties":false},"description":"One page of contributors, ordered by user ID."},"contributorsNextCursor":{"nullable":true,"description":"Pass as contributorsAfter to fetch the next page; null on the last page.","type":"string","format":"uuid"},"withoutInterview":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string","format":"uuid"},"userId":{"nullable":true,"type":"string","format":"uuid"},"email":{"nullable":true,"type":"string","format":"email"}},"required":["personId","userId","email"],"additionalProperties":false},"description":"People given access to the process without being asked to record an interview."}},"required":["visibility","owner","members","pending","contributors","contributorsNextCursor","withoutInterview"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Process Members","deprecated":true}},"/v1/clarity/processes/{id}/members/{invitationId}":{"delete":{"operationId":"removeClarityProcessMember","tags":["Clarity"],"description":"Remove accepted access to a clarity process","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Clarity process ID."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"invitationId","required":true,"description":"Accepted process invitation to remove."}],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Remove Clarity Process Member","deprecated":true}},"/v1/clarity/processes/{id}/duplicate":{"post":{"operationId":"duplicateClarityProcess","tags":["Clarity"],"description":"Duplicate a Clarity process with its analysis, captures, message history, and, for v2 processes, its live current map and automation proposal. Requires a team manager role.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Source Clarity process id"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Duplicated Clarity process id"},"sourceTeamId":{"type":"string","format":"uuid"},"organizationId":{"nullable":true,"type":"string","format":"uuid"},"process":{"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"]},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]},"summary":{"nullable":true,"type":"string"},"captureCount":{"type":"number"},"captureCounts":{"type":"object","properties":{"video":{"type":"number"},"interview":{"type":"number"},"document":{"type":"number"},"meeting":{"type":"number"},"other":{"type":"number"}},"required":["video","interview","document"],"additionalProperties":false},"updatedAt":{"type":"string","format":"date-time"},"contributors":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"userName":{"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["userId","userName"],"additionalProperties":false}},"people":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"name":{"type":"string"},"askedAt":{"type":"string","format":"date-time"},"captureState":{"nullable":true,"type":"string","enum":["in_progress","captured","failed","waiting"]},"askedByName":{"nullable":true,"type":"string"},"lastRemindedAt":{"nullable":true,"type":"string","format":"date-time"},"reminderCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"captureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastCaptureAt":{"nullable":true,"type":"string","format":"date-time"},"failureReason":{"nullable":true,"type":"string"},"isInvitationPending":{"type":"boolean"}},"required":["id","userId","email","name"],"additionalProperties":false}},"hasAutomationProposal":{"type":"boolean"},"failedArtifactKind":{"nullable":true,"type":"string","enum":["current_process","transformation_proposal"]},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"type":"string","format":"uuid"},"createdByDisplay":{"nullable":true,"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["userId","name"],"additionalProperties":false},"insightsCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"vulnerabilityCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"acceptedInviteeUserIds":{"type":"array","items":{"type":"string","format":"uuid"}},"acceptedInviteeDisplays":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["userId","name"],"additionalProperties":false}},"currentUserConnections":{"type":"array","items":{"type":"string","enum":["owner","contributor","assigned","accepted_invitation"]}},"teamId":{"type":"string","format":"uuid"},"teamName":{"nullable":true,"type":"string"},"labels":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"colorHue":{"type":"integer","minimum":0,"maximum":360},"source":{"type":"string","enum":["human","agent"]}},"required":["id","value","colorHue","source"],"additionalProperties":false}}},"required":["id","name","status","version","summary","captureCount","captureCounts","updatedAt","contributors","people","teamId","teamName","labels"],"additionalProperties":false},"node":{"nullable":true,"type":"object","properties":{"access":{"type":"string","enum":["full"]},"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"nodeKind":{"type":"string","enum":["area","process"]},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"depth":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"process":{"nullable":true,"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"]},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]},"summary":{"nullable":true,"type":"string"},"captureCount":{"type":"number"},"captureCounts":{"type":"object","properties":{"video":{"type":"number"},"interview":{"type":"number"},"document":{"type":"number"},"meeting":{"type":"number"},"other":{"type":"number"}},"required":["video","interview","document"],"additionalProperties":false},"updatedAt":{"type":"string","format":"date-time"},"contributors":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"userName":{"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["userId","userName"],"additionalProperties":false}},"people":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"name":{"type":"string"},"askedAt":{"type":"string","format":"date-time"},"captureState":{"nullable":true,"type":"string","enum":["in_progress","captured","failed","waiting"]},"askedByName":{"nullable":true,"type":"string"},"lastRemindedAt":{"nullable":true,"type":"string","format":"date-time"},"reminderCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"captureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastCaptureAt":{"nullable":true,"type":"string","format":"date-time"},"failureReason":{"nullable":true,"type":"string"},"isInvitationPending":{"type":"boolean"}},"required":["id","userId","email","name"],"additionalProperties":false}},"hasAutomationProposal":{"type":"boolean"},"failedArtifactKind":{"nullable":true,"type":"string","enum":["current_process","transformation_proposal"]},"createdAt":{"type":"string","format":"date-time"},"createdByUserId":{"type":"string","format":"uuid"},"createdByDisplay":{"nullable":true,"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["userId","name"],"additionalProperties":false},"insightsCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"vulnerabilityCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"acceptedInviteeUserIds":{"type":"array","items":{"type":"string","format":"uuid"}},"acceptedInviteeDisplays":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"nullable":true,"type":"string"}},"required":["userId","name"],"additionalProperties":false}},"currentUserConnections":{"type":"array","items":{"type":"string","enum":["owner","contributor","assigned","accepted_invitation"]}}},"required":["id","name","status","version","summary","captureCount","captureCounts","updatedAt","contributors","people"],"additionalProperties":false},"proposedSummary":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"teamId":{"nullable":true,"type":"string","format":"uuid"},"teamName":{"nullable":true,"type":"string"},"team":{"not":{}},"assignedTeam":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"teamAssignmentSuggestions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"suggestedTeamId":{"nullable":true,"type":"string","format":"uuid"},"suggestedTeamName":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"rationale":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","dismissed"]},"createdAt":{"type":"string"}},"required":["id","suggestedTeamId","suggestedTeamName","confidence","rationale","status","createdAt"],"additionalProperties":false}},"labels":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"colorHue":{"type":"integer","minimum":0,"maximum":360},"source":{"type":"string","enum":["human","agent"]}},"required":["id","value","colorHue","source"],"additionalProperties":false}}},"required":["access","id","parentId","processId","name","ownerLabel","sortOrder","depth","existence","contentConfirmedAt","existenceConfirmedAt","source","createdAt","updatedAt","process","proposedSummary","teamAssignmentSuggestions","labels"],"additionalProperties":false},"directProcessHref":{"type":"string"}},"required":["id","sourceTeamId","organizationId","process","node","directProcessHref"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Duplicate Clarity Process","deprecated":true}},"/v1/clarity/processes/{id}/captures/video/create-upload-url":{"post":{"operationId":"createClarityVideoUploadUrl","tags":["Clarity"],"description":"Create a signed URL for uploading a video file directly to GCS","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"description":"Name of the video file"},"contentType":{"type":"string","enum":["video/mp4","video/mov","video/webm","video/mpeg","video/mpg","video/avi","video/x-flv","video/wmv","video/3gpp"],"description":"MIME type of the video"},"extraCaptureRequestId":{"description":"Extra-capture-request id to bind this capture to","type":"string","format":"uuid"}},"required":["fileName","contentType"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The clarity process ID"}],"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"},"captureId":{"type":"string","format":"uuid","description":"The capture ID for completing upload"},"expiresAt":{"type":"string","format":"date-time","description":"When the URL expires"},"gcsPath":{"type":"string","description":"The GCS path where file will be stored"}},"required":["signedUrl","captureId","expiresAt","gcsPath"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Video Upload URL","deprecated":true}},"/v1/clarity/processes/{id}/captures/video/{captureId}/complete":{"post":{"operationId":"completeClarityVideoUpload","tags":["Clarity"],"description":"Complete a video capture after uploading to GCS via signed URL","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"description":"Name of the uploaded video file"}},"required":["fileName"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The clarity process ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"captureId","required":true,"description":"The capture ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"processId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"userName":{"type":"string"},"userEmail":{"type":"string"},"type":{"type":"string","x-extensible-enum":["video","interview","document","screenshare","meeting","image"]},"videoUrl":{"nullable":true,"type":"string"},"videoTranscript":{"nullable":true,"type":"string"},"documentFileName":{"nullable":true,"type":"string"},"documentTextMetadata":{"nullable":true,"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"lines":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"lineNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pageNumber","lineNumber","startOffset","endOffset"],"additionalProperties":false}}},"required":["pageNumber","startOffset","endOffset","lines"],"additionalProperties":false}},"sourceArtifactGeneration":{"type":"string"},"pageImagesPrefix":{"type":"string"},"pageImageCount":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["pages"],"additionalProperties":false},"processingFailureReason":{"nullable":true,"type":"string","maxLength":500},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"},"isExtraCapture":{"type":"boolean"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"speakerName":{"type":"string"},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"hasTranscript":{"type":"boolean"},"hasVideoTranscript":{"type":"boolean"},"transcriptQuestionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","recording","processing","complete","failed"]},"isDistillingPolicy":{"type":"boolean"},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","processId","userId","type","videoUrl","videoTranscript","scheduledJoinAt","transcript","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Complete Clarity Video Upload","deprecated":true}},"/v1/clarity/processes/{id}/captures/document/create-upload-url":{"post":{"operationId":"createClarityDocumentUploadUrl","tags":["Clarity"],"description":"Create a signed URL for uploading a PDF, Word (.docx), TXT, Markdown, BPMN, XLSX, or CSV document directly to GCS","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"description":"Name of the document file"},"contentType":{"type":"string","enum":["application/pdf","text/plain","text/markdown","application/xml","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv","application/vnd.ms-excel"],"description":"MIME type of the document"},"extraCaptureRequestId":{"description":"Extra-capture-request id to bind this capture to","type":"string","format":"uuid"}},"required":["fileName","contentType"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The clarity process ID"}],"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"},"captureId":{"type":"string","format":"uuid","description":"The capture ID for completing upload"},"expiresAt":{"type":"string","format":"date-time","description":"When the URL expires"},"gcsPath":{"type":"string","description":"The GCS path where file will be stored"}},"required":["signedUrl","captureId","expiresAt","gcsPath"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string","enum":["CLARITY_PII_BACKEND_UPLOAD_REQUIRED","CLARITY_SIGNED_UPLOAD_REQUIRED"]},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Document Upload URL","deprecated":true}},"/v1/clarity/processes/{id}/captures/document/{captureId}/complete":{"post":{"operationId":"completeClarityDocumentUpload","tags":["Clarity"],"description":"Complete a document capture after uploading to GCS via signed URL","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"description":"Name of the uploaded document file"}},"required":["fileName"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The clarity process ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"captureId","required":true,"description":"The capture ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"processId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"userName":{"type":"string"},"userEmail":{"type":"string"},"type":{"type":"string","x-extensible-enum":["video","interview","document","screenshare","meeting","image"]},"videoUrl":{"nullable":true,"type":"string"},"videoTranscript":{"nullable":true,"type":"string"},"documentFileName":{"nullable":true,"type":"string"},"documentTextMetadata":{"nullable":true,"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"lines":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"lineNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pageNumber","lineNumber","startOffset","endOffset"],"additionalProperties":false}}},"required":["pageNumber","startOffset","endOffset","lines"],"additionalProperties":false}},"sourceArtifactGeneration":{"type":"string"},"pageImagesPrefix":{"type":"string"},"pageImageCount":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["pages"],"additionalProperties":false},"processingFailureReason":{"nullable":true,"type":"string","maxLength":500},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"},"isExtraCapture":{"type":"boolean"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"speakerName":{"type":"string"},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"hasTranscript":{"type":"boolean"},"hasVideoTranscript":{"type":"boolean"},"transcriptQuestionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","recording","processing","complete","failed"]},"isDistillingPolicy":{"type":"boolean"},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","processId","userId","type","videoUrl","videoTranscript","scheduledJoinAt","transcript","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string","enum":["CLARITY_PII_BACKEND_UPLOAD_REQUIRED","CLARITY_SIGNED_UPLOAD_REQUIRED"]},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Complete Clarity Document Upload","deprecated":true}},"/v1/clarity/processes/{id}/captures/image/create-upload-url":{"post":{"operationId":"createClarityImageUploadUrl","tags":["Clarity"],"description":"Create a signed URL for uploading a PNG, JPEG, WebP, or SVG image directly to GCS","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"description":"Name of the image file"},"contentType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/svg+xml"],"description":"MIME type of the image"},"extraCaptureRequestId":{"description":"Extra-capture-request id to bind this capture to","type":"string","format":"uuid"}},"required":["fileName","contentType"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The clarity process ID"}],"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"},"captureId":{"type":"string","format":"uuid","description":"The capture ID for completing upload"},"expiresAt":{"type":"string","format":"date-time","description":"When the URL expires"},"gcsPath":{"type":"string","description":"The GCS path where file will be stored"}},"required":["signedUrl","captureId","expiresAt","gcsPath"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Image Upload URL","deprecated":true}},"/v1/clarity/processes/{id}/captures/image/{captureId}/complete":{"post":{"operationId":"completeClarityImageUpload","tags":["Clarity"],"description":"Complete an image capture after uploading it to GCS via a signed URL","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"description":"Name of the uploaded image file"}},"required":["fileName"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The clarity process ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"captureId","required":true,"description":"The capture ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"processId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"userName":{"type":"string"},"userEmail":{"type":"string"},"type":{"type":"string","x-extensible-enum":["video","interview","document","screenshare","meeting","image"]},"videoUrl":{"nullable":true,"type":"string"},"videoTranscript":{"nullable":true,"type":"string"},"documentFileName":{"nullable":true,"type":"string"},"documentTextMetadata":{"nullable":true,"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"lines":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"lineNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pageNumber","lineNumber","startOffset","endOffset"],"additionalProperties":false}}},"required":["pageNumber","startOffset","endOffset","lines"],"additionalProperties":false}},"sourceArtifactGeneration":{"type":"string"},"pageImagesPrefix":{"type":"string"},"pageImageCount":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["pages"],"additionalProperties":false},"processingFailureReason":{"nullable":true,"type":"string","maxLength":500},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"},"isExtraCapture":{"type":"boolean"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"speakerName":{"type":"string"},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"hasTranscript":{"type":"boolean"},"hasVideoTranscript":{"type":"boolean"},"transcriptQuestionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","recording","processing","complete","failed"]},"isDistillingPolicy":{"type":"boolean"},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","processId","userId","type","videoUrl","videoTranscript","scheduledJoinAt","transcript","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Complete Clarity Image Upload","deprecated":true}},"/v1/clarity/processes/{id}/captures/meeting":{"post":{"operationId":"inviteClarityMeetingNotetaker","tags":["Clarity"],"description":"Invite the in-meeting notetaker bot (Recall.ai) to a live meeting; the recording lands as a 'meeting' capture on the process","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"meetingUrl":{"type":"string","maxLength":2048,"format":"uri"},"extraCaptureRequestId":{"type":"string","format":"uuid"},"joinAt":{"type":"string","format":"date-time"}},"required":["meetingUrl"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The clarity process ID"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"captureId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending"]}},"required":["captureId","status"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Invite Clarity Meeting Notetaker","deprecated":true}},"/v1/clarity/processes/{id}/captures/{captureId}":{"delete":{"operationId":"deleteClarityCapture","tags":["Clarity"],"description":"Delete a capture from a clarity process","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The clarity process ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"captureId","required":true,"description":"The capture ID to delete"}],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Clarity Capture","deprecated":true}},"/v1/clarity/processes/{id}/guidance":{"post":{"operationId":"createClarityGuidance","tags":["Clarity"],"description":"Create a new automation guidance message for a clarity process","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000,"description":"Automation guidance to add to the process."}},"required":["content"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The clarity process ID"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"processId":{"type":"string","format":"uuid"},"content":{"type":"string"},"author":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","processId","content","author","createdAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Guidance","deprecated":true},"patch":{"operationId":"updateClarityGuidance","tags":["Clarity"],"description":"Update the automation guidance message for a clarity process","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000,"description":"Replacement automation guidance for the process."}},"required":["content"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The clarity process ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"processId":{"type":"string","format":"uuid"},"content":{"type":"string"},"author":{"nullable":true,"type":"string"},"updatedAt":{"type":"string"}},"required":["id","processId","content","author","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Clarity Guidance","deprecated":true}},"/v1/clarity/processes/{id}/sharing":{"get":{"operationId":"getClarityProcessSharing","tags":["Clarity"],"description":"Get the sharing status for a clarity process","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Clarity process ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"shareEnabled":{"type":"boolean"},"shareToken":{"nullable":true,"type":"string"},"shareUrl":{"nullable":true,"type":"string"},"proposalShareEnabled":{"type":"boolean"}},"required":["shareEnabled","shareToken","shareUrl","proposalShareEnabled"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Process Sharing","deprecated":true},"post":{"operationId":"updateClarityProcessSharing","tags":["Clarity"],"description":"Enable or disable sharing for a clarity process","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether public process sharing is enabled."},"proposalShareEnabled":{"description":"Whether the automation proposal is included. Public sharing must already be enabled when only changing this setting.","type":"boolean"}},"required":["enabled"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"Clarity process ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"shareEnabled":{"type":"boolean"},"shareToken":{"nullable":true,"type":"string"},"shareUrl":{"nullable":true,"type":"string"},"proposalShareEnabled":{"type":"boolean"}},"required":["shareEnabled","shareToken","shareUrl","proposalShareEnabled"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Clarity Process Sharing","deprecated":true}},"/v1/clarity/processes/{id}/interview-invites":{"post":{"operationId":"sendClarityInterviewInvites","tags":["Clarity Guest Interviews"],"description":"Invite people to record an interview about this Clarity process, and email each of them. To invite people from the organization chart or landscape, first use the Clarity hierarchy people tools to find their names and email addresses, then pass them as invitees. Set includeProcessPeople to true to also invite everyone already listed as a person on this process. At most 25 unique recipients per call. Each invitee gets a Clarity process invitation, exactly as the Invite dialog creates one; someone already invited is sent their invitation again rather than a second one. Where the team has account-free interview links on, people without a Duvo account get a link that opens the interview directly and expires after 30 days, or seven days after a scheduled interview ends if that is later; everyone else gets the normal invitation that asks them to sign in. Pass schedule to book the interview: the email then carries a calendar invite for that time, sending again with a new time moves the same calendar event, and revoking the invitation cancels it. Revoke a pending invitation with deleteTeamInvite.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitees":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The interview invitee's email address."},"name":{"type":"string","maxLength":200,"description":"The invitee's name, if it is known."}},"required":["email"]},"description":"People found through org-chart or landscape people tools. At most 25 unique recipients per call, counting includeProcessPeople."},"includeProcessPeople":{"type":"boolean","description":"Also invite every active process person with an email address. Use this for people already assigned to the process."},"message":{"type":"string","maxLength":500,"description":"Optional plain-text note added to each invitation email, at most 500 characters. Line breaks are collapsed and markup is shown as text."},"schedule":{"type":"object","properties":{"startAt":{"type":"string","format":"date-time","description":"When the interview starts, as an ISO 8601 date-time with an offset or Z, e.g. 2026-10-28T10:00:00+01:00. Must be in the future and at most 90 days ahead."},"durationMinutes":{"type":"integer","minimum":15,"maximum":240,"description":"How long the interview is booked for, 15 to 240 minutes."},"timeZone":{"type":"string","minLength":1,"maxLength":64,"description":"IANA time zone the time is shown in, e.g. Europe/Prague. The calendar shows it in each reader's own zone."}},"required":["startAt","durationMinutes","timeZone"],"description":"Optional time for the interview. The invitation email then carries a calendar invite for it, the interview link stays valid until a week after it, and a later send with a new time moves the same calendar event. At most 90 days ahead. Only available while calendar invites are on for the team."}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The Clarity process ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"invites":{"type":"array","items":{"type":"object","properties":{"invitationId":{"nullable":true,"description":"The Clarity process invitation ID. Pass it to deleteTeamInvite to revoke a pending invitation. Null when no invitation could be created.","type":"string","format":"uuid"},"email":{"type":"string","format":"email","description":"The invitee's normalized email address."},"name":{"nullable":true,"description":"The invitee's name, if known.","type":"string"},"status":{"type":"string","enum":["sent","failed"],"description":"sent: the invitation exists and its email was sent. failed: see error; when invitationId is set the invitation exists and the email can be retried with sendTeamInviteEmail."},"delivery":{"nullable":true,"type":"string","enum":["guest_link","sign_in"],"description":"How the invitation was emailed: guest_link is an account-free interview link; sign_in is the normal invitation that asks the person to sign in (used for people who already have a Duvo account, SSO-enforced organizations, or when account-free links are off)."},"calendarInvite":{"description":"Whether the email carried a calendar invite for the scheduled interview. Absent from servers that predate calendar invites.","type":"boolean"},"error":{"nullable":true,"description":"Why the invitation or its email failed, if it did.","type":"string"}},"required":["invitationId","email","name","status","delivery","error"],"additionalProperties":false},"description":"The result for each unique invitee."}},"required":["invites"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Send Clarity Interview Invites","deprecated":true},"get":{"operationId":"listClarityInterviewInvites","tags":["Clarity Guest Interviews"],"description":"List a Clarity process's pending and accepted invitations, newest first, with whether each was accepted, whether it was sent an account-free interview link, and whether the invitee has opened that link or submitted an interview. Paginate with limit and offset; total is the number of invitations. Revoke a pending invitation by passing its id to deleteTeamInvite.","parameters":[{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Maximum number of invitations to return, newest first."},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of invitations to skip, for the next page."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The Clarity process ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Clarity process invitation ID. Pass it to deleteTeamInvite to revoke a pending invitation."},"email":{"type":"string","format":"email","description":"The invitee's email address."},"name":{"nullable":true,"description":"The invitee's name, if known.","type":"string"},"status":{"type":"string","enum":["pending","opened","completed","expired"],"description":"pending: no interview link opened and no interview yet. opened: the invitee opened at least one of the invitation's account-free interview links but has not submitted an interview; expiresAt says when the newest link expires. completed: at least one interview is processing or complete. expired: none of its links was ever opened and the newest one has expired; send the invitation again to issue a new one."},"accepted":{"type":"boolean","description":"Whether the invitation was accepted. Teammates are accepted as soon as they are invited, so this alone does not mean the person engaged."},"guestLink":{"type":"boolean","description":"Whether an account-free interview link was emailed."},"openedAt":{"nullable":true,"description":"When the invitee last opened an interview link.","type":"string"},"expiresAt":{"nullable":true,"description":"When the newest account-free link expires, if any. A link also stops working before then if the invitation is revoked, the guest leaves the team, or account-free links are turned off for the team.","type":"string"},"createdAt":{"type":"string","description":"When this invitation was created."},"interviewCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of non-deleted interviews submitted by the invitee."}},"required":["id","email","name","status","accepted","guestLink","openedAt","expiresAt","createdAt","interviewCount"],"additionalProperties":false},"description":"One page of the process's pending and accepted invitations."},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["invites","total","limit","offset"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Interview Invites","deprecated":true}},"/v1/clarity/processes/{id}/invite-link":{"get":{"operationId":"getClarityProcessInviteLink","tags":["Clarity Process Invite Links"],"description":"Get the active interview invite link for a process.","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":{"hasLink":{"type":"boolean"},"link":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string"},"createdBy":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["id","name","email"],"additionalProperties":false}},"required":["id","createdAt","createdBy"],"additionalProperties":false}},"required":["hasLink"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Process Invite Link","deprecated":true},"delete":{"operationId":"deleteClarityProcessInviteLink","tags":["Clarity Process Invite Links"],"description":"Delete the active interview invite link for a process.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Clarity Process Invite Link","deprecated":true}},"/v1/clarity-join/{token}":{"get":{"operationId":"getClarityProcessJoinInfo","tags":["Clarity Process Invite Links"],"description":"Get information about a clarity interview invite link (public).","parameters":[{"schema":{"type":"string"},"in":"path","name":"token","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"processName":{"type":"string"},"processId":{"type":"string","format":"uuid"},"teamId":{"type":"string","format":"uuid"},"reason":{"type":"string","enum":["invalid","expired"]},"setupInterview":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"automationName":{"type":"string"},"invitedByName":{"nullable":true,"type":"string"}},"required":["id","automationName","invitedByName"],"additionalProperties":false}},"required":["valid"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Process Join Info","deprecated":true}},"/v1/clarity-join/{token}/accept":{"post":{"operationId":"acceptClarityProcessJoin","tags":["Clarity Process Invite Links"],"description":"Accept a clarity interview invite link and gain process access.","parameters":[{"schema":{"type":"string"},"in":"path","name":"token","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"processId":{"type":"string","format":"uuid"},"teamId":{"type":"string","format":"uuid"},"configInterviewId":{"type":"string","format":"uuid"}},"required":["success","processId"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Accept Clarity Process Join","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/nodes/{nodeId}":{"patch":{"operationId":"updateClarityLandscapeNode","tags":["Clarity"],"description":"Rename a process landscape node or update its owner label (team manager or above for team processes; organization admin for areas)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"ownerLabel":{"nullable":true,"type":"string","maxLength":200}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"team":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","parentId","processId","name","ownerLabel","sortOrder","existence","contentConfirmedAt","existenceConfirmedAt","source","priority","priorityReasoning","priorityAssessedAt","createdAt","updatedAt","team"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Clarity Landscape Node","deprecated":true},"delete":{"operationId":"deleteClarityLandscapeNode","tags":["Clarity"],"description":"Soft-delete a tree node and its descendants. Organization admins may delete any subtree; team managers may delete a childless process node owned by their team. The targeted node's linked clarity process and captures are deleted, while nested processes detach to the Unsorted bag.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deletedCount":{"type":"number"},"detachedCount":{"type":"number"}},"required":["deletedCount","detachedCount"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Clarity Landscape Node","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/nodes/{nodeId}/accept":{"post":{"operationId":"acceptClarityLandscapeNode","tags":["Clarity"],"description":"Accept a proposed area folder into the active process landscape, so it stops being a proposal and becomes part of the real structure (organization admin+). Only area folders can be accepted; a proposed process becomes real through assignClarityLandscapeNodeTeam instead. Re-accepting an already-active area is a no-op.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true,"description":"The proposed area folder to accept."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"team":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","parentId","processId","name","ownerLabel","sortOrder","existence","contentConfirmedAt","existenceConfirmedAt","source","priority","priorityReasoning","priorityAssessedAt","createdAt","updatedAt","team"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Accept Clarity Landscape Node","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/nodes/{nodeId}/decline":{"post":{"operationId":"declineClarityLandscapeNode","tags":["Clarity"],"description":"Reject a proposed process landscape node while it is still a proposal, removing it and any proposed descendants. Real processes nested underneath survive and move back to Unsorted. Only proposals can be declined — an accepted node is removed with deleteClarityLandscapeNode.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true,"description":"The proposed node to reject."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deletedCount":{"type":"number","description":"How many proposed nodes were removed, including descendants."},"detachedCount":{"type":"number","description":"How many real processes under the declined node moved back to Unsorted instead of being deleted."}},"required":["deletedCount","detachedCount"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Decline Clarity Landscape Node","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/nodes/{nodeId}/placement":{"put":{"operationId":"setClarityLandscapeNodePlacement","tags":["Clarity"],"description":"Move a process landscape node (team builder or above for team processes; team manager or above for team proposals; organization admin for areas)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parentId":{"nullable":true,"type":"string","format":"uuid"}},"required":["parentId"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"team":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","parentId","processId","name","ownerLabel","sortOrder","existence","contentConfirmedAt","existenceConfirmedAt","source","priority","priorityReasoning","priorityAssessedAt","createdAt","updatedAt","team"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Set Clarity Landscape Node Placement","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/areas/order":{"put":{"operationId":"reorderClarityLandscapeAreas","tags":["Clarity"],"description":"Reorder a sibling group of the organization's process landscape area folders left-to-right — the top-level areas by default, or the folder children of parentId (organization admin+). This changes display order only; use setClarityLandscapeNodePlacement to move a node to a different parent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orderedAreaIds":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid"},"description":"Every area folder in the sibling group, exactly once, in the order you want them displayed left-to-right. Read the current siblings first (getClarityProcessTree); a partial list is rejected with 400."},"parentId":{"description":"The parent area whose folder children are being reordered. Omit or pass null to reorder the top-level areas.","nullable":true,"type":"string","format":"uuid"}},"required":["orderedAreaIds"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"team":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","parentId","processId","name","ownerLabel","sortOrder","existence","contentConfirmedAt","existenceConfirmedAt","source","priority","priorityReasoning","priorityAssessedAt","createdAt","updatedAt","team"],"additionalProperties":false}}},"required":["nodes"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Reorder Clarity Landscape Areas","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/nodes/{nodeId}/team":{"put":{"operationId":"assignClarityLandscapeNodeTeam","tags":["Clarity"],"description":"Set the owning team of a process in the process landscape (organization admin+). On a proposed process this accepts the proposal and creates the real process for that team; on an existing process it moves the process, its captures and its brief to another team.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"nullable":true,"description":"The team that owns the process from now on. A process always belongs to a team, so null is rejected.","type":"string","format":"uuid"},"intent":{"description":"Pass \"accept-proposal\" when the node is expected to still be a proposed process; the call then fails if someone already accepted it, instead of silently moving a real process.","type":"string","enum":["assign","accept-proposal"]}},"required":["teamId"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true,"description":"The process node whose owning team changes."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"team":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"assignedTeam":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","parentId","processId","name","ownerLabel","sortOrder","existence","contentConfirmedAt","existenceConfirmedAt","source","priority","priorityReasoning","priorityAssessedAt","createdAt","updatedAt","team","assignedTeam"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Assign Clarity Landscape Node Team","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/process-nodes":{"post":{"operationId":"createClarityProcessNode","tags":["Clarity"],"description":"File an existing Clarity process into an area of the process landscape (team builder or organization admin+). Use this for a process that already exists but sits in Unsorted; use proposeClarityLandscapeProcess to create a brand-new one.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string","format":"uuid","description":"An existing Clarity process to file into the landscape. Unsorted processes are listed as `unlinkedProcesses` by getClarityProcessLandscape."},"parentId":{"type":"string","format":"uuid","description":"The area folder the process is filed under."}},"required":["processId","parentId"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"team":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","parentId","processId","name","ownerLabel","sortOrder","existence","contentConfirmedAt","existenceConfirmedAt","source","priority","priorityReasoning","priorityAssessedAt","createdAt","updatedAt","team"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Process Node","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/proposed-processes":{"post":{"operationId":"proposeClarityLandscapeProcess","tags":["Organizations","Clarity"],"description":"Create a manual process in the organization's Process Landscape, either as an unassigned proposal or atomically assigned to an eligible team.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"description":"One short paragraph (1-3 sentences) saying why this process belongs in the landscape. Use only what you saw in the captures. Say what the process is (don't just repeat the name), show proof it really happens, and name where you heard it - be as specific as the captures allow, like \"a warehouse lead said so in their interview\" or \"it came up in two returns recordings\". Use only facts from the captures: never make up sources, people, dates, quotes, or numbers, and don't stretch what was said. If you have no real proof the process happens, don't propose it.","nullable":true,"type":"string","maxLength":5000},"parentId":{"default":null,"nullable":true,"type":"string","format":"uuid"},"teamId":{"default":null,"nullable":true,"type":"string","format":"uuid"},"materializationMode":{"description":"Use \"proposal\" to record a process the organization plausibly needs, owned by `teamId` for review, WITHOUT creating a real process record. `teamId` is then required. Chat-scoped callers may only propose for their pinned team; every caller needs Manager-or-above authority for that team. A proposal is idempotent: an equivalent live proposal under the same parent is returned untouched rather than duplicated. Defaults to \"auto\", which materializes a real process when `teamId` is set.","type":"string","enum":["auto","proposal"]}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"team":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"outcome":{"type":"string","enum":["created","reused"],"description":"Whether this call inserted a new node or returned an equivalent one that already existed. Only \"proposal\" mode can report \"reused\"."}},"required":["id","parentId","processId","name","ownerLabel","sortOrder","existence","contentConfirmedAt","existenceConfirmedAt","source","priority","priorityReasoning","priorityAssessedAt","createdAt","updatedAt","team","outcome"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Propose Clarity Landscape Process","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/people/batch":{"post":{"operationId":"batchAddClarityLandscapeNodePeople","tags":["Clarity"],"description":"Add one or more people to multiple Process Landscape nodes in a bounded batch. Email entries can create invitations; each node-person outcome reports success, conflict, or delivery failure.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nodeIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid"}},"people":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"nullable":true,"type":"string","maxLength":200},"email":{"nullable":true,"type":"string"},"processRole":{"nullable":true,"type":"string","maxLength":200},"teamRole":{"type":"string","enum":["team:owner","team:superadmin","team:admin","team:manager","team:builder","team:member","team:clarity-member"]}},"required":["name","email","processRole","teamRole"],"additionalProperties":false}}},"required":["nodeIds","people"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"outcomes":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"nodeId":{"type":"string","format":"uuid"},"email":{"nullable":true,"type":"string","format":"email"},"name":{"nullable":true,"type":"string"},"outcome":{"type":"string","enum":["assigned"]},"processPerson":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"nullable":true,"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string","format":"email"},"role":{"nullable":true,"type":"string"},"interviewRequested":{"default":true,"type":"boolean"},"status":{"nullable":true,"type":"string","enum":["pending"]},"invitationId":{"nullable":true,"type":"string","format":"uuid"},"captureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"captureStatusCounts":{"default":{"completed":0,"inProgress":0,"failed":0},"type":"object","properties":{"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"inProgress":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["completed","inProgress","failed"],"additionalProperties":false},"createdAt":{"type":"string"},"askedByName":{"nullable":true,"type":"string"},"lastRemindedAt":{"nullable":true,"type":"string","format":"date-time"},"reminderCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","userId","name","email","role","interviewRequested","status","invitationId","captureCount","captureStatusCounts","createdAt"],"additionalProperties":false},"invitationDeliveryStatus":{"type":"string","enum":["sent","not_needed","failed"]}},"required":["nodeId","email","name","outcome","processPerson","invitationDeliveryStatus"],"additionalProperties":false},{"type":"object","properties":{"nodeId":{"type":"string","format":"uuid"},"email":{"nullable":true,"type":"string","format":"email"},"name":{"nullable":true,"type":"string"},"outcome":{"type":"string","enum":["already_present"]},"processPerson":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"nullable":true,"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string","format":"email"},"role":{"nullable":true,"type":"string"},"interviewRequested":{"default":true,"type":"boolean"},"status":{"nullable":true,"type":"string","enum":["pending"]},"invitationId":{"nullable":true,"type":"string","format":"uuid"},"captureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"captureStatusCounts":{"default":{"completed":0,"inProgress":0,"failed":0},"type":"object","properties":{"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"inProgress":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["completed","inProgress","failed"],"additionalProperties":false},"createdAt":{"type":"string"},"askedByName":{"nullable":true,"type":"string"},"lastRemindedAt":{"nullable":true,"type":"string","format":"date-time"},"reminderCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","userId","name","email","role","interviewRequested","status","invitationId","captureCount","captureStatusCounts","createdAt"],"additionalProperties":false},"invitationDeliveryStatus":{"type":"string","enum":["not_needed"]}},"required":["nodeId","email","name","outcome","processPerson","invitationDeliveryStatus"],"additionalProperties":false},{"type":"object","properties":{"nodeId":{"type":"string","format":"uuid"},"email":{"nullable":true,"type":"string","format":"email"},"name":{"nullable":true,"type":"string"},"outcome":{"type":"string","enum":["failed"]},"processPerson":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"nullable":true,"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string","format":"email"},"role":{"nullable":true,"type":"string"},"interviewRequested":{"default":true,"type":"boolean"},"status":{"nullable":true,"type":"string","enum":["pending"]},"invitationId":{"nullable":true,"type":"string","format":"uuid"},"captureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"captureStatusCounts":{"default":{"completed":0,"inProgress":0,"failed":0},"type":"object","properties":{"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"inProgress":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["completed","inProgress","failed"],"additionalProperties":false},"createdAt":{"type":"string"},"askedByName":{"nullable":true,"type":"string"},"lastRemindedAt":{"nullable":true,"type":"string","format":"date-time"},"reminderCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","userId","name","email","role","interviewRequested","status","invitationId","captureCount","captureStatusCounts","createdAt"],"additionalProperties":false},"invitationDeliveryStatus":{"type":"string","enum":["not_needed"]},"error":{"type":"object","properties":{"code":{"type":"string","enum":["NODE_NOT_FOUND","PROCESS_NOT_FOUND","CONCURRENT_CONFLICT","ASSIGNMENT_FAILED","INVITE_LIMIT_REACHED"]},"message":{"type":"string","minLength":1},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["nodeId","email","name","outcome","processPerson","invitationDeliveryStatus","error"],"additionalProperties":false}]}},"counts":{"type":"object","properties":{"requested":{"type":"integer","minimum":1,"maximum":100},"assigned":{"type":"integer","minimum":0,"maximum":100},"alreadyPresent":{"type":"integer","minimum":0,"maximum":100},"failed":{"type":"integer","minimum":0,"maximum":100},"invitationsSent":{"type":"integer","minimum":0,"maximum":100},"invitationFailures":{"type":"integer","minimum":0,"maximum":100}},"required":["requested","assigned","alreadyPresent","failed","invitationsSent","invitationFailures"],"additionalProperties":false}},"required":["outcomes","counts"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Batch Add Clarity Landscape Node People","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/nodes/{nodeId}/people":{"get":{"operationId":"listClarityLandscapeNodePeople","tags":["Clarity"],"description":"List the people involved in the process behind one process landscape node. To read the people across the whole landscape in one request, use getClarityHierarchyPeople instead.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"teamId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true,"description":"A process landscape node that is linked to a real process."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"nullable":true,"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string","format":"email"},"role":{"nullable":true,"type":"string"},"interviewRequested":{"default":true,"type":"boolean"},"status":{"nullable":true,"type":"string","enum":["pending"]},"invitationId":{"nullable":true,"type":"string","format":"uuid"},"captureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"captureStatusCounts":{"default":{"completed":0,"inProgress":0,"failed":0},"type":"object","properties":{"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"inProgress":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["completed","inProgress","failed"],"additionalProperties":false},"createdAt":{"type":"string"},"askedByName":{"nullable":true,"type":"string"},"lastRemindedAt":{"nullable":true,"type":"string","format":"date-time"},"reminderCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","userId","name","email","role","interviewRequested","status","invitationId","captureCount","captureStatusCounts","createdAt"],"additionalProperties":false}}},"required":["people"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Landscape Node People","deprecated":true},"post":{"operationId":"addClarityLandscapeNodePerson","tags":["Clarity"],"description":"Add a person involved in the process behind a process landscape node. Name only records a placeholder; supplying an email also gives that person access to the process and emails them an invitation, so only pass an email the user asked you to invite.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"nullable":true,"type":"string","maxLength":200},"email":{"nullable":true,"type":"string","format":"email"},"role":{"nullable":true,"type":"string","maxLength":200},"teamRole":{"nullable":true,"type":"string","enum":["team:owner","team:superadmin","team:admin","team:manager","team:builder","team:member","team:clarity-member"]}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"teamId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true,"description":"A process landscape node that is linked to a real process."}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"nullable":true,"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string","format":"email"},"role":{"nullable":true,"type":"string"},"interviewRequested":{"default":true,"type":"boolean"},"status":{"nullable":true,"type":"string","enum":["pending"]},"invitationId":{"nullable":true,"type":"string","format":"uuid"},"captureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"captureStatusCounts":{"default":{"completed":0,"inProgress":0,"failed":0},"type":"object","properties":{"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"inProgress":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["completed","inProgress","failed"],"additionalProperties":false},"createdAt":{"type":"string"},"askedByName":{"nullable":true,"type":"string"},"lastRemindedAt":{"nullable":true,"type":"string","format":"date-time"},"reminderCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","userId","name","email","role","interviewRequested","status","invitationId","captureCount","captureStatusCounts","createdAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Add Clarity Landscape Node Person","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/nodes/{nodeId}/people/{personId}":{"patch":{"operationId":"updateClarityLandscapeNodePerson","tags":["Clarity"],"description":"Change the role a person plays in the process behind a process landscape node (for example \"Approver\"). Send role: null to clear it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"nullable":true,"type":"string","maxLength":200}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"teamId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true,"description":"A process landscape node that is linked to a real process."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true,"description":"The person entry to change, as returned by listClarityLandscapeNodePeople."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"nullable":true,"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string","format":"email"},"role":{"nullable":true,"type":"string"},"interviewRequested":{"default":true,"type":"boolean"},"status":{"nullable":true,"type":"string","enum":["pending"]},"invitationId":{"nullable":true,"type":"string","format":"uuid"},"captureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"captureStatusCounts":{"default":{"completed":0,"inProgress":0,"failed":0},"type":"object","properties":{"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"inProgress":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["completed","inProgress","failed"],"additionalProperties":false},"createdAt":{"type":"string"},"askedByName":{"nullable":true,"type":"string"},"lastRemindedAt":{"nullable":true,"type":"string","format":"date-time"},"reminderCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","userId","name","email","role","interviewRequested","status","invitationId","captureCount","captureStatusCounts","createdAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Clarity Landscape Node Person","deprecated":true},"delete":{"operationId":"removeClarityLandscapeNodePerson","tags":["Clarity"],"description":"Remove a person from the process behind a process landscape node, and revoke the process access they were granted when they were added.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"teamId","required":false},{"schema":{"type":"string"},"in":"query","name":"pendingOnly","required":false,"description":"Pass 'true' to cancel a pending invitation only. If the person has already accepted, nothing is removed and the request fails with 409."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true,"description":"A process landscape node that is linked to a real process."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"personId","required":true,"description":"The person entry to change, as returned by listClarityLandscapeNodePeople."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Remove Clarity Landscape Node Person","deprecated":true}},"/v1/clarity/hierarchy/nodes/{nodeId}/team-assignment-suggestions/{suggestionId}/accept":{"post":{"operationId":"acceptClarityTeamAssignmentSuggestion","tags":["Clarity"],"description":"Accept a pending Process Landscape team-assignment suggestion and durably assign the suggested team (manager+).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"suggestionId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"node":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"team":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","parentId","processId","name","ownerLabel","sortOrder","existence","contentConfirmedAt","existenceConfirmedAt","source","priority","priorityReasoning","priorityAssessedAt","createdAt","updatedAt","team"],"additionalProperties":false},"suggestion":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"suggestedTeamId":{"nullable":true,"type":"string","format":"uuid"},"suggestedTeamName":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"rationale":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","dismissed"]},"createdAt":{"type":"string"}},"required":["id","suggestedTeamId","suggestedTeamName","confidence","rationale","status","createdAt"],"additionalProperties":false}},"required":["node","suggestion"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Accept Clarity Team Assignment Suggestion","deprecated":true}},"/v1/clarity/hierarchy/nodes/{nodeId}/team-assignment-suggestions/{suggestionId}/dismiss":{"post":{"operationId":"dismissClarityTeamAssignmentSuggestion","tags":["Clarity"],"description":"Dismiss a pending Process Landscape team-assignment suggestion without changing the node's owner (manager+).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"suggestionId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"suggestedTeamId":{"nullable":true,"type":"string","format":"uuid"},"suggestedTeamName":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"rationale":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","dismissed"]},"createdAt":{"type":"string"}},"required":["id","suggestedTeamId","suggestedTeamName","confidence","rationale","status","createdAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Dismiss Clarity Team Assignment Suggestion","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/nodes/{nodeId}/interviews":{"get":{"operationId":"listClarityLandscapeNodeInterviews","tags":["ClarityInterview"],"description":"List Clarity interviews linked to a process folder","parameters":[{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of interviews per page (1-100, default 50)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of interviews to skip"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true,"description":"The organization ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true,"description":"The clarity process folder node ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"interviews":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"title":{"type":"string"},"type":{"type":"string","enum":["interview","document"]},"status":{"type":"string","x-extensible-enum":["pending","recording","processing","complete","failed"]},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"},"processingFailureReason":{"nullable":true,"type":"string","maxLength":500},"hasTranscript":{"default":false,"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","title","type","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","scheduledJoinAt","hasTranscript","createdAt","updatedAt"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["interviews","total"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Landscape Node Interviews","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/nodes/{nodeId}/interviews/{interviewId}":{"delete":{"operationId":"deleteClarityLandscapeNodeInterview","tags":["ClarityInterview"],"description":"Delete an organization-scoped folder interview","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true,"description":"The organization ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"nodeId","required":true,"description":"The clarity process folder node ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"interviewId","required":true,"description":"The folder interview ID"}],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Clarity Landscape Node Interview","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, generation_started_at, generation_last_activity_at, 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 unified per-snapshot detail endpoint (`GET .../snapshots/:kind/:id`); this read model deliberately doesn't carry it so the response stays small.","parameters":[{"schema":{"default":"full","type":"string","enum":["full","lite"]},"in":"query","name":"captures","required":false,"description":"Capture payload mode. `full` (default) embeds each capture's transcript content. `lite` omits `transcript`/`videoTranscript` (returned as null) and relies on the `hasTranscript`/`hasVideoTranscript` flags; fetch content on demand via `GET .../captures/:capture_id`."},{"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},"generation_started_at":{"default":null,"description":"ISO 8601 timestamp for the most recent generation kickoff; useful for generation-duration reporting","nullable":true,"type":"string","format":"date-time"},"generation_last_activity_at":{"default":null,"description":"ISO 8601 timestamp of the latest process or message activity while generation is in flight; use it for stale-generation detection","nullable":true,"type":"string","format":"date-time"},"custom_prompt":{"nullable":true,"description":"User-supplied custom prompt that steers generation","type":"string"},"independent_interviews":{"default":false,"description":"When true, each interview starts fresh: no briefing from earlier interviews and no context from other people's captures","type":"boolean"},"map_language":{"default":null,"description":"Language Duvo writes this process's map in; null uses the team's map language","nullable":true,"type":"string","x-extensible-enum":["cs","de","de-CH","en","en-GB","es","es-MX","fr","hu","pl","pt","pt-BR","sk","sl","th","uk","ar-EG","ar-SA","da-DK","de-AT","el-GR","en-AU","en-GB-scotland","en-IE","en-IN","en-NG","en-ZA","es-AR","fi-FI","fr-BE","fr-CA","gsw-CH","he-IL","hi-IN","hi-Latn-IN","id-ID","it-IT","ja-JP","ko-KR","nb-NO","nl-BE","nl-NL","ro-RO","sv-SE","tr-TR","vi-VN","yue-HK","zh-Hans-CN","zh-Hant-TW","af-ZA","ak-GH","sq-AL","am-ET","hy-AM","as-IN","az-AZ","eu-ES","be-BY","bn-BD","bs-BA","bg-BG","my-MM","ca-ES","ceb-PH","hr-HR","et-EE","fo-FO","fil-PH","gl-ES","ka-GE","gu-IN","ha-NG","is-IS","ga-IE","kn-IN","kk-KZ","km-KH","rw-RW","ku-TR","ky-KG","lo-LA","lv-LV","lt-LT","mk-MK","ms-MY","ml-IN","mt-MT","mi-NZ","mr-IN","mn-MN","ne-NP","or-IN","om-ET","ps-AF","fa-IR","pa-IN","qu-PE","rm-CH","ru-RU","sr-RS","sd-PK","si-LK","so-SO","st-ZA","sw-TZ","tg-TJ","ta-IN","te-IN","tn-ZA","tk-TM","ur-PK","uz-UZ","cy-GB","fy-NL","wo-SN","yo-NG","zu-ZA","bn-IN","ur-IN","fr-CH","it-CH","de-BE","sw-KE","sw-UG","ms-SG","zh-Hans-SG","ta-SG","ta-LK","yue-CN","ar-IL","ar-MA","fr-MA","sv-FI","es-US","ru-BY","ru-KZ","fa-AF","ar-DZ","fr-DZ","ar-TN","fr-TN","ar-LY","ar-SD","ar-IQ","ku-IQ","ar-SY","ar-JO","ar-AE","ar-QA","ar-KW","ar-OM","ar-YE","ar-LB","fr-LB","pt-AO","pt-MZ","es-CO","es-PE","es-CL","es-VE","es-EC","es-BO","qu-BO","es-PY","es-UY","es-CU","es-GT","es-HN","es-NI","es-CR","es-PA","es-DO","es-SV","sr-ME","fr-CD","fr-CI","fr-SN","fr-ML","fr-CM","da-GL","tn-BW","af-NA","el-CY","tr-CY","fr-LU","de-LU","en-CA","en-NZ","en-SG","en-PH","en-KE","en-GH","en-PK"]},"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","generation_started_at","generation_last_activity_at","custom_prompt","independent_interviews","map_language","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"},"version_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"1-based position of this snapshot in the process's full chronological history for its kind, counted over every non-deleted row — not the row's index in the returned page."},"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","x-extensible-enum":["human","ai","seed"],"description":"Whether this row was created by a user edit ('human'), an AI pipeline run ('ai'), or a module template's seeded document ('seed'). The value set may grow; see x-extensible-enum."},"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"},"user_email":{"description":"Email of the creator user, resolved from `user_id`; null when the user is unknown or was deleted.","nullable":true,"type":"string"}},"required":["id","process_id","parent_current_process_id","created_at","version_number","status","creator_type","user_id","sandbox_id","last_session_id"],"additionalProperties":false},"description":"The newest page of non-deleted current-process snapshots, newest first (at most CLARITY_VERSIONS_PAGE_SIZE rows). Lightweight rows (no `data`) for the version-picker UI. Clients lazy-fetch the live (or selected) snapshot via the per-snapshot detail endpoint, and page the older history from the snapshots list endpoint."},"current_process_versions_total":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Total non-deleted current-process snapshots for this process. Compare against the embedded array's length to tell whether older versions remain to be paged in."},"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 automation proposal snapshot this draft forked from","type":"string","format":"uuid"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"version_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"1-based position of this snapshot in the process's full chronological history for its kind, counted over every non-deleted row — not the row's index in the returned page."},"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","x-extensible-enum":["human","ai","seed"],"description":"Whether this row was created by a user edit ('human'), an AI pipeline run ('ai'), or a module template's seeded document ('seed'). The value set may grow; see x-extensible-enum."},"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"},"user_email":{"description":"Email of the creator user, resolved from `user_id`; null when the user is unknown or was deleted.","nullable":true,"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 automation 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"},"suggested_person":{"nullable":true,"description":"Process person nominated to fill this gap in a follow-up interview, if the agent could identify one","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The suggested clarity_process_person id"},"user_id":{"nullable":true,"description":"The Duvo user this person maps to, if a team member","type":"string","format":"uuid"},"name":{"nullable":true,"description":"Display name of the suggested person","type":"string"},"role":{"nullable":true,"description":"Role of the suggested person within the process, if known","type":"string"},"reason":{"nullable":true,"description":"One-line rationale for why this person can fill the gap","type":"string"}},"required":["id","user_id","name","role","reason"],"additionalProperties":false},"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","suggested_person","priority","created_at","updated_at"],"additionalProperties":false}}},"required":["id","process_id","clarity_current_process_id","parent_transformation_proposal_id","created_at","version_number","status","creator_type","user_id","sandbox_id","last_session_id"],"additionalProperties":false},"description":"The newest page of non-deleted automation proposal snapshots, newest first (at most CLARITY_VERSIONS_PAGE_SIZE rows). Lightweight rows (no `data`) for the version-picker UI."},"transformation_proposal_versions_total":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Total non-deleted automation proposal snapshots for this process."},"removed_captures":{"description":"Usable captures removed since each live snapshot was generated. Counts are scoped to base captures or the live proposal's linked captures; deleted content is never returned.","type":"object","properties":{"current_process":{"type":"integer","minimum":0,"maximum":9007199254740991},"transformation_proposal":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["current_process","transformation_proposal"],"additionalProperties":false},"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"},"userEmail":{"type":"string"},"type":{"type":"string","x-extensible-enum":["video","interview","document","screenshare","meeting","image"]},"videoUrl":{"nullable":true,"type":"string"},"videoTranscript":{"nullable":true,"type":"string"},"documentFileName":{"nullable":true,"type":"string"},"documentTextMetadata":{"nullable":true,"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"lines":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"lineNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pageNumber","lineNumber","startOffset","endOffset"],"additionalProperties":false}}},"required":["pageNumber","startOffset","endOffset","lines"],"additionalProperties":false}},"sourceArtifactGeneration":{"type":"string"},"pageImagesPrefix":{"type":"string"},"pageImageCount":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["pages"],"additionalProperties":false},"processingFailureReason":{"nullable":true,"type":"string","maxLength":500},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"},"isExtraCapture":{"type":"boolean"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"speakerName":{"type":"string"},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"hasTranscript":{"type":"boolean"},"hasVideoTranscript":{"type":"boolean"},"transcriptQuestionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","recording","processing","complete","failed"]},"isDistillingPolicy":{"type":"boolean"},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","processId","userId","type","videoUrl","videoTranscript","scheduledJoinAt","transcript","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","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."},"missing_info_questions":{"default":false,"description":"When true, Duvo asks missing-info questions on the current process. When false, the automation proposal lists the extra captures it needs instead. Resolved for the process's team.","type":"boolean"}},"required":["process","current_process_versions","current_process_versions_total","transformation_proposal_versions","transformation_proposal_versions_total","captures","missing_info_questions"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Process","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/captures/{capture_id}":{"get":{"operationId":"getClarityCapture","tags":["ClarityV2"],"description":"Get a single Clarity v2 capture including full transcript and video transcript. Use this when the process was loaded with captures=lite, or when only one capture's transcript is needed.","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 capture id"}],"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"},"userEmail":{"type":"string"},"type":{"type":"string","x-extensible-enum":["video","interview","document","screenshare","meeting","image"]},"videoUrl":{"nullable":true,"type":"string"},"videoTranscript":{"nullable":true,"type":"string"},"documentFileName":{"nullable":true,"type":"string"},"documentTextMetadata":{"nullable":true,"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"lines":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"lineNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pageNumber","lineNumber","startOffset","endOffset"],"additionalProperties":false}}},"required":["pageNumber","startOffset","endOffset","lines"],"additionalProperties":false}},"sourceArtifactGeneration":{"type":"string"},"pageImagesPrefix":{"type":"string"},"pageImageCount":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["pages"],"additionalProperties":false},"processingFailureReason":{"nullable":true,"type":"string","maxLength":500},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"},"isExtraCapture":{"type":"boolean"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"speakerName":{"type":"string"},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"hasTranscript":{"type":"boolean"},"hasVideoTranscript":{"type":"boolean"},"transcriptQuestionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","recording","processing","complete","failed"]},"isDistillingPolicy":{"type":"boolean"},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","processId","userId","type","videoUrl","videoTranscript","scheduledJoinAt","transcript","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","createdAt","updatedAt"],"additionalProperties":false}},"required":["capture"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Capture","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 automation 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."},"scope":{"type":"string","enum":["all","missing_info"],"description":"Which current-process agents to re-run. `missing_info` re-runs only the missing-info agent. Defaults to `all`."}},"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"],"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"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Postprocess Clarity Snapshot","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/snapshots/current_process/{snapshot_id}/step-frames":{"get":{"operationId":"listClarityStepFrames","tags":["ClarityV2"],"description":"Return one representative screenshare frame for each current-process step. Explicit frame evidence wins. Otherwise, a timestamped screenshare transcript source selects the closest persisted frame at or after that timestamp, with the closest earlier frame as fallback. Pass `window` (1-5) to also receive that many neighbouring frames on each side as candidates, for recovering when the selected frame does not show the step. Pass `size=thumb` for 768px copies that are cheaper to download and inspect. Signed URLs are short-lived and can be null when signing is unavailable.","parameters":[{"schema":{"type":"string"},"in":"query","name":"step_ids","required":false,"description":"Optional comma-separated step ids to resolve, for example `task-a,task-b` (maximum 100). Omit to resolve every step."},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":5},"in":"query","name":"window","required":false,"description":"Number of neighbouring persisted frames to return on each side of the selected frame as `candidates` (0-5, default 0). Use to recover when the selected frame does not show the step."},{"schema":{"default":"full","type":"string","enum":["full","thumb"]},"in":"query","name":"size","required":false,"description":"full: the persisted screenshot (1920px wide). thumb: a 768px-wide copy, cheaper to download and to inspect visually; use it to check whether a frame shows the step, then fetch full for the document."},{"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":"snapshot_id","required":true,"description":"The current-process snapshot id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string","minLength":1},"frame":{"nullable":true,"type":"object","properties":{"capture_id":{"type":"string","format":"uuid"},"timestamp_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"selection":{"type":"string","enum":["step_source","nearest_transcript_source"],"description":"step_source: explicit screenshare_frame evidence on the step. nearest_transcript_source: closest persisted frame to a screenshare transcript timestamp; review before publishing."},"signed_url":{"nullable":true,"description":"Short-lived download URL for the frame; null when signing is unavailable. Download promptly rather than storing the URL.","type":"string","format":"uri"},"candidates":{"type":"array","items":{"type":"object","properties":{"timestamp_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position relative to the selected frame in the capture's persisted frame sequence: -1 is the frame just before it, 1 the frame just after."},"signed_url":{"nullable":true,"description":"Short-lived download URL for the frame; null when signing is unavailable. Download promptly rather than storing the URL.","type":"string","format":"uri"}},"required":["timestamp_ms","offset","signed_url"],"additionalProperties":false},"description":"Neighbouring frames from the same capture, ordered by offset. Empty unless the `window` query parameter is greater than 0."}},"required":["capture_id","timestamp_ms","selection","signed_url","candidates"],"additionalProperties":false}},"required":["step_id","frame"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Step Frames","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/snapshots/current_process/{snapshot_id}/conflicts":{"get":{"operationId":"listClarityProcessConflicts","tags":["ClarityV2"],"description":"Return the conflict detection run status for a current-process snapshot and the conflicts bound to it, grouped by step. Quotes from captures that were deleted or marked unusable are left out, and a conflict left with fewer than two captures is hidden. Reading never starts a run; use analyzeClarityProcessConflicts to re-detect.","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":"snapshot_id","required":true,"description":"The current-process snapshot id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"status":{"anyOf":[{"type":"string","enum":["none"]},{"type":"string","enum":["queued","running","succeeded","failed","superseded"]}]},"finishedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["status","finishedAt"],"additionalProperties":false},"steps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"question":{"type":"string","minLength":1},"kind":{"type":"string","enum":["incompatible","variant"]},"markerStepIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"mappedVersionIndex":{"description":"Zero-based index of the account the step text describes on this snapshot. Describes the diagram; it does not resolve the conflict.","type":"integer","minimum":0,"maximum":9007199254740991},"versions":{"minItems":2,"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.\""},"captureId":{"type":"string","format":"uuid"},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]},"claimId":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1},"supporters":{"minItems":1,"type":"array","items":{"type":"object","properties":{"claimId":{"type":"string","format":"uuid"},"captureId":{"type":"string","format":"uuid"},"attribution":{"type":"string","minLength":1},"excerpt":{"type":"string","minLength":1},"locator":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]}},"required":["claimId","captureId","attribution","excerpt"],"additionalProperties":false}}},"required":["attribution","excerpt","captureId","claimId","supporters"],"additionalProperties":false}},"resolution":{"type":"object","properties":{"answer":{"type":"string","minLength":1,"maxLength":4000},"selectedClaimId":{"nullable":true,"type":"string","format":"uuid"},"resolvedBy":{"type":"string","format":"uuid"},"resolvedAt":{"type":"string","format":"date-time"},"sourceSnapshotId":{"type":"string","format":"uuid"},"resolvedByName":{"nullable":true,"type":"string","minLength":1}},"required":["answer","selectedClaimId","resolvedBy","resolvedAt","sourceSnapshotId"],"additionalProperties":false}},"required":["id","question","kind","markerStepIds","versions"],"additionalProperties":false}}},"required":["stepId","conflicts"],"additionalProperties":false}},"summary":{"description":"Absent from servers older than the finding types.","type":"object","properties":{"blocking":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Open contradictions among the returned conflicts: those without a saved decision. Completion asks for confirmation while this is above zero."}},"required":["blocking"],"additionalProperties":false}},"required":["run","steps"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Process Conflicts","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/snapshots/current_process/{snapshot_id}/conflicts/analyze":{"post":{"operationId":"analyzeClarityProcessConflicts","tags":["ClarityV2"],"description":"Queue a new conflict detection run for the live current-process snapshot, keeping the map as it is. Use this to re-detect conflicts without regenerating the map. Editors only. The run starts after about a minute; read the result with listClarityProcessConflicts. Answers 409 while a run is queued or running, when the snapshot is not the live one, or when the team has conflict detection off.","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":"snapshot_id","required":true,"description":"The current-process snapshot id"}],"security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"status":{"anyOf":[{"type":"string","enum":["none"]},{"type":"string","enum":["queued","running","succeeded","failed","superseded"]}]},"finishedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["status","finishedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Analyze Clarity Process Conflicts","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/automation":{"post":{"operationId":"buildClarityAutomation","tags":["ClarityV2"],"description":"Hand an automation proposal for a v2 clarity process off to the workflow-builder pipeline. Builds from `transformation_proposal_id` when supplied, otherwise from the process's live proposal. The proposal id is the durable idempotency key, so retries return the same run and a different proposal starts a new run. Returns 202 while the LLM run completes asynchronously, or 409 when the resolved proposal is still being written.","requestBody":{"required":false,"content":{"application/json":{"schema":{"default":{},"type":"object","properties":{"transformation_proposal_id":{"description":"Automation-proposal snapshot to build the automation from. Defaults to the process's live proposal.","type":"string","format":"uuid"}},"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":{"automation_run":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Workflow-builder run id"},"status":{"type":"string","enum":["generating","draft","approved","generation_failed"]}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 automation 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 automation 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 automation 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"},"suggested_person":{"nullable":true,"description":"Process person nominated to fill this gap in a follow-up interview, if the agent could identify one","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The suggested clarity_process_person id"},"user_id":{"nullable":true,"description":"The Duvo user this person maps to, if a team member","type":"string","format":"uuid"},"name":{"nullable":true,"description":"Display name of the suggested person","type":"string"},"role":{"nullable":true,"description":"Role of the suggested person within the process, if known","type":"string"},"reason":{"nullable":true,"description":"One-line rationale for why this person can fill the gap","type":"string"}},"required":["id","user_id","name","role","reason"],"additionalProperties":false},"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","suggested_person","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 Lead Builders and above.","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 automation 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 automation 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"},"suggested_person":{"nullable":true,"description":"Process person nominated to fill this gap in a follow-up interview, if the agent could identify one","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The suggested clarity_process_person id"},"user_id":{"nullable":true,"description":"The Duvo user this person maps to, if a team member","type":"string","format":"uuid"},"name":{"nullable":true,"description":"Display name of the suggested person","type":"string"},"role":{"nullable":true,"description":"Role of the suggested person within the process, if known","type":"string"},"reason":{"nullable":true,"description":"One-line rationale for why this person can fill the gap","type":"string"}},"required":["id","user_id","name","role","reason"],"additionalProperties":false},"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","suggested_person","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"userEmail":{"type":"string"},"type":{"type":"string","x-extensible-enum":["video","interview","document","screenshare","meeting","image"]},"videoUrl":{"nullable":true,"type":"string"},"videoTranscript":{"nullable":true,"type":"string"},"documentFileName":{"nullable":true,"type":"string"},"documentTextMetadata":{"nullable":true,"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"lines":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"lineNumber":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991},"endOffset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pageNumber","lineNumber","startOffset","endOffset"],"additionalProperties":false}}},"required":["pageNumber","startOffset","endOffset","lines"],"additionalProperties":false}},"sourceArtifactGeneration":{"type":"string"},"pageImagesPrefix":{"type":"string"},"pageImageCount":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["pages"],"additionalProperties":false},"processingFailureReason":{"nullable":true,"type":"string","maxLength":500},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"},"isExtraCapture":{"type":"boolean"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"speakerName":{"type":"string"},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"hasTranscript":{"type":"boolean"},"hasVideoTranscript":{"type":"boolean"},"transcriptQuestionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","recording","processing","complete","failed"]},"isDistillingPolicy":{"type":"boolean"},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","processId","userId","type","videoUrl","videoTranscript","scheduledJoinAt","transcript","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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}]}},"draft_snapshot_id":{"nullable":true,"type":"string","format":"uuid"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Artifact Chat Messages","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/artifact-chat/conversations/{conversation_id}":{"delete":{"operationId":"deleteClarityArtifactChatConversation","tags":["ClarityV2"],"description":"Soft-delete an open or running artifact-chat conversation for the current user.","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":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Clarity Artifact Chat Conversation","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}]}},"draft_snapshot_id":{"nullable":true,"type":"string","format":"uuid"},"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"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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}]}},"draft_snapshot_id":{"nullable":true,"type":"string","format":"uuid"},"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"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true}},"/v1/clarity-v2/processes/{process_id}/artifact-chat/conversations/{conversation_id}/stop":{"post":{"operationId":"stopClarityArtifactChatConversation","tags":["ClarityV2"],"description":"Stop an in-flight artifact-chat turn. Flips the conversation back to `open` first so the interrupted run's late webhooks are dropped as stale, then best-effort interrupts the cc-server execution.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"conversation_id","required":true}],"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},"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}]}},"draft_snapshot_id":{"nullable":true,"type":"string","format":"uuid"},"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"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Stop Clarity Artifact Chat Conversation","deprecated":true}},"/v1/clarity-v2/processes/{id}/upgrade":{"post":{"operationId":"upgradeClarityProcess","tags":["ClarityV2"],"description":"Move a v1 clarity process into v2. Rows with generated analysis are reset in place and regenerated; rows without analysis migrate in place when not generating.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Upgrade Clarity Process","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/snapshots/{kind}":{"get":{"operationId":"listClarityProcessSnapshots","tags":["ClarityV2"],"description":"List lightweight Clarity v2 process snapshots for one kind.","parameters":[{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"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":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","enum":["current_process","transformation_proposal"]},"in":"path","name":"kind","required":true,"description":"Snapshot kind to list"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"snapshots":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Snapshot id"},"process_id":{"type":"string","format":"uuid","description":"Parent clarity_process id"},"source_snapshot_id":{"type":"string","nullable":true,"enum":[null]},"parent_id":{"nullable":true,"description":"Parent snapshot this row forked from, if any","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","x-extensible-enum":["human","ai","seed"],"description":"Whether this row was created by a user edit ('human'), an AI pipeline run ('ai'), or a module template's seeded document ('seed'). The value set may grow; see x-extensible-enum."},"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"},"kind":{"type":"string","enum":["current_process"]},"version_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"1-based position of this snapshot in the process's full chronological history for its kind, counted over every non-deleted row — not the row's index in the returned page."},"user_email":{"description":"Email of the creator user, resolved from `user_id`; null when the user is unknown or was deleted.","nullable":true,"type":"string"}},"required":["id","process_id","source_snapshot_id","parent_id","created_at","status","creator_type","user_id","sandbox_id","last_session_id","kind","version_number"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Snapshot id"},"process_id":{"type":"string","format":"uuid","description":"Parent clarity_process id"},"source_snapshot_id":{"type":"string","format":"uuid"},"parent_id":{"nullable":true,"description":"Parent snapshot this row forked from, if any","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","x-extensible-enum":["human","ai","seed"],"description":"Whether this row was created by a user edit ('human'), an AI pipeline run ('ai'), or a module template's seeded document ('seed'). The value set may grow; see x-extensible-enum."},"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"},"kind":{"type":"string","enum":["transformation_proposal"]},"version_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"1-based position of this snapshot in the process's full chronological history for its kind, counted over every non-deleted row — not the row's index in the returned page."},"user_email":{"description":"Email of the creator user, resolved from `user_id`; null when the user is unknown or was deleted.","nullable":true,"type":"string"}},"required":["id","process_id","source_snapshot_id","parent_id","created_at","status","creator_type","user_id","sandbox_id","last_session_id","kind","version_number"],"additionalProperties":false}]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Total number of snapshots of this kind for the process"}},"required":["snapshots","total"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Process Snapshots","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/snapshots/{kind}/{snapshot_id}":{"get":{"operationId":"getClarityProcessSnapshot","tags":["ClarityV2"],"description":"Fetch the full payload for a Clarity v2 process snapshot of either kind.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","enum":["current_process","transformation_proposal"]},"in":"path","name":"kind","required":true,"description":"Snapshot kind to list"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"snapshot_id","required":true,"description":"Snapshot id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Snapshot id"},"process_id":{"type":"string","format":"uuid","description":"Parent clarity_process id"},"source_snapshot_id":{"type":"string","nullable":true,"enum":[null]},"parent_id":{"nullable":true,"description":"Parent snapshot this row forked from, if any","type":"string","format":"uuid"},"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","x-extensible-enum":["human","ai","seed"],"description":"Whether this row was created by a user edit ('human'), an AI pipeline run ('ai'), or a module template's seeded document ('seed'). The value set may grow; see x-extensible-enum."},"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"},"kind":{"type":"string","enum":["current_process"]},"data":{"anyOf":[{"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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},"processEffort":{"description":"Time each interviewee spends on the whole process, for figures given for the process as a whole rather than for one step. One entry per person per capture.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[2]},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false}]}},"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},"processEffort":{"description":"Time each interviewee spends on the whole process, for figures given for the process as a whole rather than for one step. One entry per person per capture.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false}],"description":"Opaque BPMN payload describing the captured current process."}},"required":["id","process_id","source_snapshot_id","parent_id","created_at","updated_at","status","creator_type","user_id","sandbox_id","last_session_id","kind","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Snapshot id"},"process_id":{"type":"string","format":"uuid","description":"Parent clarity_process id"},"source_snapshot_id":{"type":"string","format":"uuid"},"parent_id":{"nullable":true,"description":"Parent snapshot this row forked from, if any","type":"string","format":"uuid"},"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","x-extensible-enum":["human","ai","seed"],"description":"Whether this row was created by a user edit ('human'), an AI pipeline run ('ai'), or a module template's seeded document ('seed'). The value set may grow; see x-extensible-enum."},"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"},"kind":{"type":"string","enum":["transformation_proposal"]},"data":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Schema version for the automation 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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[2]},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false}]}},"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},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false}],"description":"Opaque BPMN payload for the proposed transformed process."}},"required":["id","process_id","source_snapshot_id","parent_id","created_at","updated_at","status","creator_type","user_id","sandbox_id","last_session_id","kind","data"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Process Snapshot","deprecated":true},"delete":{"operationId":"revertClarityProcessSnapshot","tags":["ClarityV2"],"description":"Archive a Clarity v2 snapshot of either kind. If the live row is archived, the repository auto-promotes the latest historic row of the same kind.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","enum":["current_process","transformation_proposal"]},"in":"path","name":"kind","required":true,"description":"Snapshot kind to list"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"snapshot_id","required":true,"description":"Snapshot id"}],"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"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Revert Clarity Process Snapshot","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/snapshots/{kind}/save":{"post":{"operationId":"saveClarityProcessSnapshot","tags":["ClarityV2"],"description":"Save user edits as the live Clarity v2 snapshot for the selected kind.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"steps":{"minItems":1,"type":"array","items":{"anyOf":[{"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"]},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"]}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"]}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"]},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"]}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"]},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"]},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"]},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"]}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"required":["attribution","excerpt"]},"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"]},"extraCaptureNeeds":{"type":"array","items":{"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"]}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"]},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"]}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"]}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"]}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"]},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","createdAt"]}},"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"]},{"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"]},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"]}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"]}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"]},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"]}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"]},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"]},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"]},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"]}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"required":["attribution","excerpt"]},"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"]},"extraCaptureNeeds":{"type":"array","items":{"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"]}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"]},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"]}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"]}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"]}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"]},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","createdAt"]}},"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"]},{"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"]},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"]}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"]}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"]},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"]}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"]},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"]},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"]},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"]}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"required":["attribution","excerpt"]},"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"]},"extraCaptureNeeds":{"type":"array","items":{"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"]}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"]},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"]}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"]}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"]}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"]},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","createdAt"]}},"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"]}]},{"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"]},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"]}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"]}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"]}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"]},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"]},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"]},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"]}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"required":["attribution","excerpt"]},"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"]},"extraCaptureNeeds":{"type":"array","items":{"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"]}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"]},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"]}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"]}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"]}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"]},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","createdAt"]}},"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"]},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"]}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"]}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"]}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"]},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"]},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"]},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"]}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"required":["attribution","excerpt"]},"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"]},"extraCaptureNeeds":{"type":"array","items":{"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"]}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"]},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"]}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"]}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"]}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"]},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","createdAt"]}},"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"]},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"]}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"]}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"]}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"]},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"]},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"]},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"]}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"required":["attribution","excerpt"]},"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"]},"extraCaptureNeeds":{"type":"array","items":{"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"]}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"]},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"]}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"]}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"]}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"]},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"]},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"]},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","createdAt"]}},"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false}]}]}},"baselineSnapshotId":{"type":"string","format":"uuid"},"clarityCurrentProcessId":{"type":"string","format":"uuid"},"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"]},"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},"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},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"]}}},"required":["steps","baselineSnapshotId"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","enum":["current_process","transformation_proposal"]},"in":"path","name":"kind","required":true,"description":"Snapshot kind to list"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Snapshot id"},"process_id":{"type":"string","format":"uuid","description":"Parent clarity_process id"},"source_snapshot_id":{"type":"string","nullable":true,"enum":[null]},"parent_id":{"nullable":true,"description":"Parent snapshot this row forked from, if any","type":"string","format":"uuid"},"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","x-extensible-enum":["human","ai","seed"],"description":"Whether this row was created by a user edit ('human'), an AI pipeline run ('ai'), or a module template's seeded document ('seed'). The value set may grow; see x-extensible-enum."},"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"},"kind":{"type":"string","enum":["current_process"]},"data":{"anyOf":[{"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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},"processEffort":{"description":"Time each interviewee spends on the whole process, for figures given for the process as a whole rather than for one step. One entry per person per capture.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[2]},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false}]}},"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},"processEffort":{"description":"Time each interviewee spends on the whole process, for figures given for the process as a whole rather than for one step. One entry per person per capture.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false}],"description":"Opaque BPMN payload describing the captured current process."}},"required":["id","process_id","source_snapshot_id","parent_id","created_at","updated_at","status","creator_type","user_id","sandbox_id","last_session_id","kind","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Snapshot id"},"process_id":{"type":"string","format":"uuid","description":"Parent clarity_process id"},"source_snapshot_id":{"type":"string","format":"uuid"},"parent_id":{"nullable":true,"description":"Parent snapshot this row forked from, if any","type":"string","format":"uuid"},"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","x-extensible-enum":["human","ai","seed"],"description":"Whether this row was created by a user edit ('human'), an AI pipeline run ('ai'), or a module template's seeded document ('seed'). The value set may grow; see x-extensible-enum."},"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"},"kind":{"type":"string","enum":["transformation_proposal"]},"data":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Schema version for the automation 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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[2]},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false}]}},"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},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false}],"description":"Opaque BPMN payload for the proposed transformed process."}},"required":["id","process_id","source_snapshot_id","parent_id","created_at","updated_at","status","creator_type","user_id","sandbox_id","last_session_id","kind","data"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Save Clarity Process Snapshot","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/snapshots/{kind}/{snapshot_id}/promote":{"post":{"operationId":"promoteClarityProcessSnapshot","tags":["ClarityV2"],"description":"Promote a draft or historic Clarity v2 snapshot to live for its kind.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","enum":["current_process","transformation_proposal"]},"in":"path","name":"kind","required":true,"description":"Snapshot kind to list"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"snapshot_id","required":true,"description":"Snapshot id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Snapshot id"},"process_id":{"type":"string","format":"uuid","description":"Parent clarity_process id"},"source_snapshot_id":{"type":"string","nullable":true,"enum":[null]},"parent_id":{"nullable":true,"description":"Parent snapshot this row forked from, if any","type":"string","format":"uuid"},"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","x-extensible-enum":["human","ai","seed"],"description":"Whether this row was created by a user edit ('human'), an AI pipeline run ('ai'), or a module template's seeded document ('seed'). The value set may grow; see x-extensible-enum."},"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"},"kind":{"type":"string","enum":["current_process"]},"data":{"anyOf":[{"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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},"processEffort":{"description":"Time each interviewee spends on the whole process, for figures given for the process as a whole rather than for one step. One entry per person per capture.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[2]},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false}]}},"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},"processEffort":{"description":"Time each interviewee spends on the whole process, for figures given for the process as a whole rather than for one step. One entry per person per capture.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false}],"description":"Opaque BPMN payload describing the captured current process."}},"required":["id","process_id","source_snapshot_id","parent_id","created_at","updated_at","status","creator_type","user_id","sandbox_id","last_session_id","kind","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Snapshot id"},"process_id":{"type":"string","format":"uuid","description":"Parent clarity_process id"},"source_snapshot_id":{"type":"string","format":"uuid"},"parent_id":{"nullable":true,"description":"Parent snapshot this row forked from, if any","type":"string","format":"uuid"},"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","x-extensible-enum":["human","ai","seed"],"description":"Whether this row was created by a user edit ('human'), an AI pipeline run ('ai'), or a module template's seeded document ('seed'). The value set may grow; see x-extensible-enum."},"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"},"kind":{"type":"string","enum":["transformation_proposal"]},"data":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Schema version for the automation 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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"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},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"number","enum":[2]},"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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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; title it with the duration, deadline, or cadence the captures give, e.g. \"Supplier reply: 2-3 days\"), \"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","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\"; for an edge into another role's lane or another party's pool, what is handed over and how. Examples: \"Approved\", \"> $5k\", \"Otherwise\", \"Signed contract, by email\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of a branching exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges, including the single edge leaving a merge gateway."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways that branch must have ≥2 entries with exactly one isDefault: true; a merge gateway (≥2 incoming paths) has exactly 1 entry."},"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. The process map draws one lane per distinct role, so decide the process's roles once and give every step a role performs the exact same text; never combine two roles in one value such as \"Buyer or Commercial\". Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"pool":{"description":"The organization or party outside the process owner's own organization that performs this step, such as \"Supplier\", \"Customer\", \"Bank\", or \"Tax authority\". The process map draws each party as its own pool, with its roles as lanes inside it. Null for every step the process owner's own organization performs, which is most of them. Use one spelling per party, and give every step of one role the same pool.","nullable":true,"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"},"dataObjects":{"description":"Documents or records this step reads or writes, such as an invoice, a purchase order, or a price list. The process map draws each distinct name and state once and links it to every step that lists it. Omit or use an empty array when the captures name none.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the document or record, as the captures call it. Use the exact same name on every step that touches the same object. Examples: \"Invoice\", \"Purchase order\", \"Price list\""},"state":{"nullable":true,"description":"State the object is in at this step, only when the captures name one. Null otherwise. Examples: \"approved\", \"draft\", null","type":"string","minLength":1},"access":{"type":"string","enum":["read","write"],"description":"\"read\" when the step uses the object as input; \"write\" when the step creates or updates it."}},"required":["name","state","access"],"additionalProperties":false}},"interactions":{"description":"Field-level detail of the step: each field the person reads, fills or selects and each button they press, in the order they do it. Omit or use an empty array when the captures do not show or name the fields.","type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["read","enter","select","click"],"description":"\"read\" when the person reads or checks the field, \"enter\" when they type or paste into it, \"select\" when they pick from a list, a lookup or a checkbox, \"click\" when they press a button, a link or a menu item."},"field":{"type":"string","minLength":1,"description":"Label of the field, button or control, exactly as the screen or the person names it. Examples: \"Invoice number\", \"Cost centre\", \"Post\""},"screen":{"nullable":true,"description":"Screen, form, tab or dialog the field is on, when the captures name or show it. Null otherwise. Examples: \"Vendor bill\", \"Payment run - Parameters\", null","type":"string","minLength":1},"system":{"nullable":true,"description":"System or application the screen belongs to. Null when it is the step's own system. Examples: \"SAP\", \"Outlook\", null","type":"string","minLength":1},"value":{"nullable":true,"description":"What goes into the field or what is read from it, as a kind of value or a rule. Null for a click and when the captures do not say. Never copy a value that identifies a person, a customer or an account, and never copy an amount of money. Examples: \"Supplier VAT number\", \"Today's date\", \"Always EUR\", null","type":"string","minLength":1},"valueSource":{"nullable":true,"description":"Where the entered or selected value comes from: another screen, system, document or the person's own judgment. Null for a read or a click and when the captures do not say. Examples: \"Invoice PDF, header\", \"Customer record in CRM\", \"Copied from the previous step\", null","type":"string","minLength":1}},"required":["action","field","screen","system","value","valueSource"],"additionalProperties":false}},"exceptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for this exception. Preserve it when the same exception is edited or regenerated. Example: \"exception-po-mismatch\""},"exception":{"type":"string","minLength":1,"description":"A distinct failure mode that can happen at this step."},"handling":{"nullable":true,"description":"How the team responds to this exception. Null when the response was not documented.","type":"string","minLength":1},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["id","exception","handling","frequency"],"additionalProperties":false},"description":"Distinct failure modes for this step in display order. Use an empty array when none are documented. Preserve each id when the same exception is edited or regenerated."},"effort":{"description":"Time each interviewee spends on this step, one entry per person per capture. Omit when no interviewee spoke to this step's time or frequency.","type":"array","items":{"type":"object","properties":{"person":{"type":"string","minLength":1,"description":"Who reported this effort, matching the source attribution. Example: \"Anna, AP Clerk\""},"userId":{"description":"The answering user's id, when this entry comes from a missing-info answer.","nullable":true,"type":"string"},"captureId":{"description":"Durable clarity_capture id of the interview the figure came from. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"basis":{"type":"string","enum":["stated","estimated","unknown"],"description":"\"stated\" = the person gave the number; \"estimated\" = they gave or accepted a rough guess when pressed; \"unknown\" = they were asked but gave no figure, so timeSpent and frequency are both null."},"excerpt":{"type":"string","minLength":1,"description":"Verbatim quote the figure comes from. Example: \"Probably two hours every morning, more at month end.\""}},"required":["person","timeSpent","frequency","basis","excerpt"],"additionalProperties":false}},"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.\""},"captureId":{"description":"Durable clarity_capture id for this source. Use app-owned ids from the evidence index, never sandbox file paths.","type":"string","minLength":1},"evidenceId":{"description":"Stable id of the evidence unit from /workspace/captures/evidence-index.json when generation used that index.","type":"string","minLength":1},"locator":{"description":"Durable in-capture location for the excerpt. Missing means legacy free-text source; unresolved means a structured citation was attempted but could not be resolved.","oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["transcript_message"]},"messageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based index into the capture transcript message array. This is the durable key; timestampMs is only supplemental."},"timestampMs":{"description":"Optional epoch-millisecond timestamp for the transcript message when the capture supplied one.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","messageIndex"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document_text_range"]},"startOffset":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based character offset into the stored capture text."},"endOffset":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"description":"Exclusive character offset into the stored capture text. Must be greater than startOffset."},"pageNumber":{"description":"Optional one-based PDF page number when the stored capture has page metadata.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"startLine":{"description":"Optional one-based line number where the cited text starts on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"endLine":{"description":"Optional one-based line number where the cited text ends on pageNumber.","type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["type","startOffset","endOffset"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bpmn_element"]},"elementId":{"type":"string","minLength":1,"description":"BPMN XML element id within an uploaded .bpmn document."},"elementType":{"description":"Optional BPMN element type as parsed from the XML, for example \"bpmn:UserTask\" or \"bpmn:ExclusiveGateway\".","type":"string","minLength":1},"name":{"description":"Optional BPMN element name as parsed from the XML. The element id is the durable key.","type":"string","minLength":1}},"required":["type","elementId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["screenshare_frame"]},"timestampMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Epoch-millisecond frame timestamp matching a screenshare frame filename."}},"required":["type","timestampMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unresolved"]},"reason":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":false}]},"sourceConfidence":{"description":"Confidence in this individual source citation. \"high\" = direct quote at the locator, \"medium\" = strong nearby evidence, \"low\" = weak or inferred support.","type":"string","enum":["low","medium","high"]},"resolutionStatus":{"description":"Resolution status for the structured source link. Legacy sources may omit this field.","type":"string","enum":["resolved","unresolved","legacy","manual"]}},"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},"extraCaptureNeeds":{"type":"array","items":{"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}},"missingInfo":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Server-minted id, stable across versions"},"factKey":{"type":"string","minLength":1,"description":"Short slug naming the missing fact, e.g. `approval_threshold`. Identifies the question across reviews and across the process's steps."},"target":{"type":"string","enum":["role","system","input","output","condition","exceptions","effort","description"],"description":"Where an accepted answer is written into the step"},"scope":{"description":"`process` when the question is about the whole process; it then sits on the start event. Absent for a step question.","type":"string","enum":["step","process"]},"ask":{"type":"string","minLength":1,"description":"Duvo's original question. Follow-ups go into `thread`."},"proposal":{"description":"What a capture should walk through to answer it","nullable":true,"type":"string"},"status":{"type":"string","enum":["open","answered","skipped"]},"thread":{"default":[],"description":"Replies and Duvo's follow-ups, oldest first","type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["person"]},"text":{"type":"string","description":"What the person wrote"},"userId":{"type":"string","description":"Who wrote it"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","text","userId","at"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["duvo"]},"outcome":{"type":"string","enum":["follow_up","unknown"]},"text":{"type":"string","description":"Duvo's next ask. Stands on its own: what is known so far and what is still missing"},"at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["role","outcome","text","at"],"additionalProperties":false}]}},"fact":{"description":"The settled fact written into the step, once answered","nullable":true,"type":"string"},"applied":{"description":"What the answer wrote into the step, once answered","nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string"},"exceptions":{"type":"array","items":{"type":"object","properties":{"exception":{"type":"string"},"handling":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exception","handling","frequency"],"additionalProperties":false}},"handlings":{"type":"array","items":{"type":"object","properties":{"exceptionId":{"type":"string"},"handling":{"type":"string"},"frequency":{"nullable":true,"description":"Observed frequency. Null unless evidence explicitly supports rare, occasional, or frequent.","type":"string","enum":["rare","occasional","frequent"]}},"required":["exceptionId","handling","frequency"],"additionalProperties":false}},"timeSpent":{"nullable":true,"description":"Time this person spends on the work. Null when they gave no time figure; whether they were asked is carried by basis (\"unknown\" when asked and both figures are null).","type":"object","properties":{"hours":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Hours this person spends on the work per period. Use one best value; for a range (\"1 to 2 hours\") use the midpoint and keep the range in excerpt. Example: 2"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the hours cover. Example: \"day\""}},"required":["hours","period"],"additionalProperties":false},"frequency":{"nullable":true,"description":"How often the work happens for this person. Null unless they gave a count.","type":"object","properties":{"count":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"How many times the work happens per period. Example: 40"},"period":{"type":"string","enum":["day","week","month"],"description":"Period the count covers. Example: \"day\""}},"required":["count","period"],"additionalProperties":false},"person":{"nullable":true,"description":"The answering user's display name","type":"string"},"excerpt":{"type":"string","description":"The closing reply, verbatim"}},"required":["person","excerpt"],"additionalProperties":false},"mapChange":{"description":"A change to the map the answer calls for, as a request to Ask Duvo. Set only when the answer describes a path the map does not show, such as a new step or branch","nullable":true,"type":"string"},"decidedByUserId":{"nullable":true,"type":"string"},"decidedAt":{"nullable":true,"type":"string"},"assignedUserId":{"description":"The team member asked to answer it, while it is open","nullable":true,"type":"string"},"assignedByUserId":{"nullable":true,"type":"string"},"assignedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"}},"required":["id","factKey","target","ask","status","thread","createdAt"],"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"},"linkedAgentId":{"description":"Id of the Duvo Agent that performs this step. Set by a person in edit mode, never by a generating or postprocessing agent; the save route rejects an id that is not a live Agent on the process's team.","nullable":true,"type":"string","format":"uuid"},"laneId":{"description":"Id of the lane in the snapshot's lanes array that performs this step. Null when the step has no role. The server keeps it in step with `role`.","nullable":true,"type":"string","minLength":1}},"required":["id","targetSteps","title","action","role","system","input","output","exceptions","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false}]}},"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},"captureBaseline":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"captureIds":{"type":"array","items":{"type":"string","format":"uuid"}},"omittedCaptureIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["generatedAt"],"additionalProperties":false},"lanes":{"description":"Role lanes of the process map, each defined once. Absent on snapshots written before lanes existed; the read model derives them from each step's role.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the lane, referenced by each step's laneId. Example: \"lane-1\""},"name":{"type":"string","minLength":1,"description":"The role, team, or system this lane stands for, as the reader sees it in the lane header. Example: \"Finance Analyst\""}},"required":["id","name"],"additionalProperties":false}}},"required":["version","steps"],"additionalProperties":false}],"description":"Opaque BPMN payload for the proposed transformed process."}},"required":["id","process_id","source_snapshot_id","parent_id","created_at","updated_at","status","creator_type","user_id","sandbox_id","last_session_id","kind","data"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Promote Clarity Process Snapshot","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/snapshots/{kind}/generate":{"post":{"operationId":"generateClarityProcessSnapshot","tags":["ClarityV2"],"description":"Trigger a snapshot generation pipeline for a v2 clarity process, selected by kind. `current_process` runs the generateCurrentProcess pipeline (body fields are proposal-only and rejected); `transformation_proposal` runs the generate or regenerate proposal pipeline. 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":{"source_snapshot_id":{"description":"Automation proposals only: id of the current-process snapshot to anchor the new proposal to. Defaults to the latest snapshot for the process.","type":"string","format":"uuid"},"regenerate_from":{"description":"Automation proposals only: id of a prior proposal snapshot 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":"Automation proposals only: optional freeform guidance for this generation. Used as high-priority design guidance, not source-of-truth evidence.","type":"string","maxLength":2000},"transformation_aggressiveness":{"default":"aggressive","description":"Transformation proposals only: the transformation appetite. `aggressive`, `conservative`, and `none` redesign around Duvo automation with decreasing freedom to change the process; `optimize` standardizes and streamlines the process while every step stays performed by people.","type":"string","enum":["none","conservative","aggressive","optimize"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","enum":["current_process","transformation_proposal"]},"in":"path","name":"kind","required":true,"description":"Snapshot kind to list"}],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Generate Clarity Process Snapshot","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/snapshots/{kind}/stop":{"post":{"operationId":"stopClarityProcessSnapshot","tags":["ClarityV2"],"description":"Stop an in-flight snapshot generation for the selected kind. 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"},{"schema":{"type":"string","enum":["current_process","transformation_proposal"]},"in":"path","name":"kind","required":true,"description":"Snapshot kind to list"}],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Stop Clarity Process Snapshot","deprecated":true}},"/v1/clarity-v2/processes/snapshots/{kind}/generate":{"post":{"operationId":"bulkGenerateClarityProcessSnapshots","tags":["ClarityV2"],"description":"Start snapshot generation for many v2 clarity processes in the current team. Starts at most a share of the free sandbox capacity per call; the rest come back in `deferred` and should be sent again once some of the started runs finish. Processes that cannot start (already generating, no usable interviews, not found) come back in `skipped` with the reason.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"process_ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid"},"description":"Clarity v2 process ids to generate maps for"},"transformation_aggressiveness":{"default":"aggressive","description":"Transformation proposals only: the transformation appetite. `aggressive`, `conservative`, and `none` redesign around Duvo automation with decreasing freedom to change the process; `optimize` standardizes and streamlines the process while every step stays performed by people.","type":"string","enum":["none","conservative","aggressive","optimize"]}},"required":["process_ids"]}}}},"parameters":[{"schema":{"type":"string","enum":["current_process","transformation_proposal"]},"in":"path","name":"kind","required":true,"description":"Snapshot kind to list"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"started":{"type":"array","items":{"type":"string"},"description":"Process ids whose generation started"},"skipped":{"type":"array","items":{"type":"object","properties":{"process_id":{"type":"string","description":"Process id that was not started"},"reason":{"type":"string","description":"Why the process was not started"}},"required":["process_id","reason"],"additionalProperties":false},"description":"Processes that cannot start, with the reason"},"deferred":{"type":"array","items":{"type":"string"},"description":"Process ids not started for lack of free capacity; submit them again later"}},"required":["started","skipped","deferred"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Bulk Generate Clarity Process Snapshots","deprecated":true}},"/v1/workspaces":{"post":{"operationId":"createWorkspace","tags":["Organizations"],"description":"Set up the user's Duvo workspace, or return the one they already have (`created: false`, nothing created). Call it first when the user has no workspace: other tools fail with 'User has no current team' until one exists. A new workspace is on the Free plan, with Clarity and Automation. `has_clarity_access` says whether the team's plan includes Clarity, `interviews_remaining` counts interviews left on the plan without subtracting people invited but not yet interviewed, and `billing_url` is where the user upgrades. If the user's organization or email domain is already on Duvo, the call is refused with a link the user must open.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"nullable":true,"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"created":{"type":"boolean"},"has_clarity_access":{"type":"boolean"},"interviews_remaining":{"anyOf":[{"type":"number"},{"type":"string","enum":["unlimited"]}]},"billing_url":{"type":"string","format":"uri"}},"required":["organization_id","team_id","created","has_clarity_access","interviews_remaining","billing_url"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"nullable":true,"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"created":{"type":"boolean"},"has_clarity_access":{"type":"boolean"},"interviews_remaining":{"anyOf":[{"type":"number"},{"type":"string","enum":["unlimited"]}]},"billing_url":{"type":"string","format":"uri"}},"required":["organization_id","team_id","created","has_clarity_access","interviews_remaining","billing_url"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Workspace","deprecated":true}},"/v1/organizations/{orgId}/members":{"post":{"operationId":"inviteOrgMember","tags":["Organizations"],"description":"Invite a person to an organization you administer, optionally assigning them to a team in that organization. Requires an organization Admin, Executive, or Owner role. You cannot grant a role higher than your own.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["organization:executive","organization:owner","organization:admin","organization:member"]},"frontendUrl":{"description":"Deprecated. Use `sendEmail` instead. Kept because its presence is the legacy opt-in for sending the invitation email; the value never sets the link host, which is always the server's configured frontend URL.","type":"string","format":"uri"},"sendEmail":{"description":"Email the invitation to the recipient. `false` always suppresses the email. When omitted, the legacy opt-in applies instead: the email is sent only if the deprecated `frontendUrl` is present. Omit both to create the invitation without notifying anyone.","type":"boolean"},"teamId":{"type":"string","format":"uuid"}},"required":["email","role"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true,"description":"Organization ID"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"invitationId":{"type":"string","format":"uuid"},"emailSent":{"type":"boolean"}},"required":["success","invitationId","emailSent"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Invite Org Member","deprecated":true}},"/v1/organizations/{orgId}/teams":{"get":{"operationId":"listOrgTeams","tags":["Organizations"],"description":"List teams belonging to an organization you are a member of, including your membership and role in each.","parameters":[{"schema":{"default":50,"type":"number","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of teams per page (1-100, default 50)"},{"schema":{"type":"number","minimum":0},"in":"query","name":"offset","required":false,"description":"Number of teams to skip"},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false,"description":"Filter teams by name (case-insensitive substring match)"},{"schema":{"default":"createdAt","type":"string","enum":["createdAt","name"]},"in":"query","name":"sortBy","required":false,"description":"Sort order: createdAt (newest first, default) or name (alphabetical)"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true,"description":"Organization ID"}],"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"},"createdAt":{"type":"string"},"discoveryMode":{"type":"string","enum":["request","auto"]},"memberCount":{"type":"number"},"pendingInvitationCount":{"type":"number"},"pendingJoinRequestCount":{"type":"number"},"userIsMember":{"type":"boolean"},"userRole":{"nullable":true,"type":"string"},"userHasPendingJoinRequest":{"type":"boolean"},"assignmentCount":{"type":"number"},"jobCount":{"type":"number"},"scheduledJobCount":{"type":"number"},"processCount":{"type":"number"}},"required":["id","name","createdAt","discoveryMode","memberCount","pendingInvitationCount","pendingJoinRequestCount","userIsMember","userRole","userHasPendingJoinRequest","assignmentCount","jobCount","scheduledJobCount"],"additionalProperties":false}},"total":{"type":"number"}},"required":["teams","total"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Org Teams","deprecated":true},"post":{"operationId":"createOrgTeam","tags":["Organizations"],"description":"Create a new team under an organization you administer. Requires an organization Admin, Executive, or Owner role.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true,"description":"Organization ID"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Org Team","deprecated":true}},"/v1/organizations/{orgId}/agents":{"get":{"operationId":"listOrgAgents","tags":["Organizations"],"description":"List every agent across all teams in an organization, with the team it belongs to, the state of its most recent run and the state of its schedules. Intended for external monitoring: it answers 'which agents have gone silent' and 'which agents were switched off' without a request per team or per agent. Requires an organization Admin, Executive, or Owner role, and an API key scoped to all teams you can access — a key pinned to a single team is rejected, because this endpoint spans every team in the organization.","parameters":[{"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"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"team_id","required":false,"description":"Filter to agents on this team"},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"schedule_enabled","required":false,"description":"If true, only agents with at least one enabled schedule; if false, only agents with none (including agents that are never scheduled)"},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"auto_disabled","required":false,"description":"If true, only agents whose schedule was switched off automatically (e.g. after repeated missing-connection failures); if false, only agents with no auto-disabled schedule"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true,"description":"The organization's unique identifier"}],"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","description":"Unique agent identifier"},"name":{"type":"string","description":"Human-readable agent name"},"team_id":{"type":"string","format":"uuid","description":"Identifier of the team the agent belongs to"},"team_name":{"type":"string","description":"Name of the team the agent belongs to"},"created_at":{"nullable":true,"description":"ISO 8601 creation timestamp","type":"string"},"updated_at":{"nullable":true,"description":"ISO 8601 last-update timestamp","type":"string"},"last_run_at":{"nullable":true,"description":"ISO 8601 creation timestamp of the agent's most recent run, or null when it has never run","type":"string"},"last_run_status":{"nullable":true,"description":"Status of the agent's most recent run, or null if it never ran","type":"string"},"schedule_enabled":{"type":"boolean","description":"Whether at least one of the agent's schedules is enabled"},"auto_disabled_at":{"nullable":true,"description":"ISO 8601 timestamp at which a schedule was switched off automatically, or null when none was","type":"string"},"auto_disabled_reason":{"nullable":true,"description":"Why a schedule was switched off automatically, when it was","type":"string"}},"required":["id","name","team_id","team_name","created_at","updated_at","last_run_at","last_run_status","schedule_enabled","auto_disabled_at","auto_disabled_reason"],"additionalProperties":false}},"total":{"type":"number","description":"Total agents matching the filters, ignoring pagination"},"limit":{"type":"number","description":"The limit that was applied"},"offset":{"type":"number","description":"The offset that was applied"}},"required":["agents","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Org Agents","deprecated":true}},"/v1/organizations/{orgId}/runs":{"get":{"operationId":"listOrgRuns","tags":["Organizations"],"description":"List runs across every team in an organization, filtered by status, agent, team, source, evaluation issues and time. Intended for external monitoring: one call covers the whole org instead of one per team. Requires an organization Admin, Executive, or Owner role, and an API key scoped to all teams you can access — a key pinned to a single team is rejected, because this endpoint spans every team in the organization.","parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false,"description":"Number of runs per page (1-500, default 20). The cap is higher than the team runs endpoint's because this route serves bulk export: at 100 requests a minute per key, page size is what bounds how fast a month of runs can be pulled."},{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false,"description":"Resume after the run a previous page ended on: pass the `next_cursor` that page returned, with the same filters and sort_order. Runs created or resolved in between cannot shift a boundary you have already passed, so a sweep sees every run exactly once, and a sweep that started under the default 7-day window keeps that window on every page. This list has no offset parameter: skipping rows costs the database every skipped row, and a run created between two requests shifts every later offset by one, so an offset sweep can repeat or miss a run. 400 when the value is not a cursor this endpoint issued."},{"schema":{"default":"desc","type":"string","enum":["asc","desc"]},"in":"query","name":"sort_order","required":false,"description":"Sort direction on created_at (default desc)"},{"schema":{"type":"string","enum":["not_started","pending","starting","running","waiting","completed","failed","interrupted","expired","stopped","needs_attention"]},"in":"query","name":"status","required":false,"description":"Filter to runs with this status. `needs_attention` is the monitoring status: runs that are waiting on a human or failed, plus runs whose latest evaluation flagged a critical issue — a run can finish as `completed` and still have accomplished nothing."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"team_id","required":false,"description":"Filter to runs on this team"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"agent_id","required":false,"description":"Filter to runs for this agent"},{"schema":{"type":"string"},"in":"query","name":"source","required":false,"description":"Filter to runs created from this source (e.g. api, scheduling)"},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"has_issues","required":false,"description":"Filter on the run's latest successful evaluation: true returns only runs it flagged, false only runs it did not. Only the latest evaluation counts — an older flag does not match — and a run whose latest evaluation errored, or that has none, counts as unflagged. Omit to return both."},{"schema":{"type":"string","enum":["critical","medium","low"]},"in":"query","name":"issue_severity","required":false,"description":"Only runs whose latest successful evaluation has at least one failing rubric at this severity (critical | medium | low). Implies has_issues."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"created_after","required":false,"description":"Return runs created at or after this ISO-8601 timestamp. Every run has a creation time, so this is the window that returns all runs in a period whatever state they reached — unlike the started and completed windows below, which exclude runs that never started and runs still in flight respectively. When the request carries no lower time bound (`created_after`, `started_after`, `completed_after` or `since`), this defaults to 7 days ago and `default_window_applied` is true in the response: an organization's run history is unbounded, and a monitor wants what is recent. An upper bound alone keeps the default floor. Pass any lower bound to replace it."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"created_before","required":false,"description":"Return runs created before this ISO-8601 timestamp (exclusive). Pair with `created_after` for a period. A closed creation window is also the stable one to paginate: results are ordered by creation time, so runs arriving mid-sweep cannot shift a closed window's pages."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"started_after","required":false,"description":"Return runs that started at or after this ISO-8601 timestamp. Runs that never started are excluded. Pair with `started_before` to bound a stuck-run query to a window — without a lower bound, `status=running` also counts every run left running months ago."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"started_before","required":false,"description":"Return runs that started before this ISO-8601 timestamp. Combine with status=running to find stuck runs — `since`/`until` filter on completion, so they never match a run that is still going."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"completed_after","required":false,"description":"Return runs completed at or after this ISO-8601 timestamp. Runs that have not completed are excluded, including every stuck one — reach for `started_after`/`started_before` to bound those. Alias of `since`; pass one or the other, not both."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"completed_before","required":false,"description":"Return runs completed before this ISO-8601 timestamp (exclusive). Runs that have not completed are excluded. Alias of `until`; pass one or the other, not both."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"since","required":false,"description":"Alias of `completed_after`, kept because it is the name the public team runs endpoint ships. Prefer `completed_after`: this endpoint carries a creation and a start window too, and only the column-named pair says which one this is."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"until","required":false,"description":"Alias of `completed_before`, kept because it is the name the public team runs endpoint ships. Prefer `completed_before`."},{"schema":{"default":"false","type":"string","enum":["true","false"]},"in":"query","name":"count_only","required":false,"description":"Skip row selection and enrichment. The normal list response shape is returned with an empty row array and the matching total."},{"schema":{"default":"false","type":"string","enum":["true","false"]},"in":"query","name":"include_total","required":false,"description":"Return `total`, the count of every matching run ignoring pagination. Off by default: counting walks every match where the page stops at `limit`, so on a large organization it costs orders of magnitude more than the rows themselves. Ask for it when you are driving a pager, not when you are polling. Implied by `count_only`."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true,"description":"The organization'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","description":"Unique run identifier"},"status":{"type":"string","description":"Current run status"},"source":{"nullable":true,"description":"What triggered the run","type":"string"},"team_id":{"type":"string","format":"uuid","description":"Team that owns the run. This is the run's own team, which a cross-team transfer pins to the source team — so it is not always the team the agent belongs to now."},"team_name":{"nullable":true,"description":"Name of that team, or null when the team no longer exists — a run stays pinned to the team that owned it, and that team can since have been deleted.","type":"string"},"agent_id":{"type":"string","format":"uuid","description":"Agent that ran"},"agent_name":{"type":"string","description":"Name of that agent"},"build_id":{"nullable":true,"description":"Revision the run executed","type":"string","format":"uuid"},"automation_id":{"nullable":true,"description":"Owning automation, if any","type":"string","format":"uuid"},"automation_name":{"nullable":true,"description":"Name of that automation","type":"string"},"user_id":{"nullable":true,"description":"User the run belongs to, if any","type":"string","format":"uuid"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"},"started_at":{"nullable":true,"description":"ISO 8601 start timestamp","type":"string"},"completed_at":{"nullable":true,"description":"ISO 8601 completion timestamp","type":"string"}},"required":["id","status","source","team_id","team_name","agent_id","agent_name","build_id","automation_id","automation_name","user_id","created_at","updated_at","started_at","completed_at"],"additionalProperties":false}},"total":{"nullable":true,"description":"Total runs matching the filters, ignoring pagination. Null unless `include_total=true` or `count_only=true` — null means not requested, distinct from a count of 0.","type":"number"},"limit":{"type":"number","description":"The limit that was applied"},"has_more":{"type":"boolean","description":"Whether another page exists past this one, determined by looking one row ahead rather than inferred from a full page. False on a count_only response."},"next_cursor":{"nullable":true,"description":"Pass as `cursor` (same filters, same sort_order) to fetch the next page. Null when `has_more` is false. Exact continuation from the last run on this page, unaffected by runs created or resolved in the meantime.","type":"string"},"created_after":{"nullable":true,"description":"The creation lower bound the query ran with, as ISO 8601: the caller's `created_after`, or 7 days ago when the request carried no time bound at all. Null when the caller bounded the query on another timestamp only.","type":"string"},"default_window_applied":{"type":"boolean","description":"True when the request carried no time bound and the 7-day creation window was applied for it. A caller that meant \"everything\" should pass an explicit `created_after`."}},"required":["runs","total","limit","has_more","next_cursor","created_after","default_window_applied"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Org Runs","deprecated":true}},"/v1/organizations/{orgId}/insights/headline":{"get":{"operationId":"getOrgInsightsHeadline","tags":["Organizations"],"description":"Get org-wide headline insight KPIs (run totals, success rate, distinct active agents and users) aggregated across every team in the organization. Requires an organization Admin, Executive, or Owner role.","parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"startDate","required":false,"description":"Start of the aggregation window (ISO 8601 datetime). Defaults to 30 days ago; clamped to at most 365 days ago."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"endDate","required":false,"description":"End of the aggregation window (ISO 8601 datetime, exclusive). Defaults to now; clamped to now."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true,"description":"The organization's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"headline":{"type":"object","properties":{"total_runs":{"type":"number","description":"Billable runs started in the window across all org teams; excludes postpone re-checks, which still count towards completed_runs, failed_runs and the active counts"},"completed_runs":{"type":"number","description":"Runs that finished with completed status"},"failed_runs":{"type":"number","description":"Runs that finished with failed status"},"success_rate":{"nullable":true,"description":"completed_runs / (completed_runs + failed_runs), null when no runs finished in the window","type":"number"},"active_agents":{"type":"number","description":"Distinct agents with at least one run in the window (org-wide, includes since-deleted agents so totals reconcile with run counts)"},"active_users":{"type":"number","description":"Distinct users who started at least one run in the window, deduplicated across teams"},"start_date":{"type":"string","description":"Effective window start after clamping (ISO 8601)"},"end_date":{"type":"string","description":"Effective window end after clamping (ISO 8601)"},"truncated":{"type":"boolean","description":"True when the org has more teams than the aggregation limit — figures cover only the first teams up to the cap"},"aggregated_teams":{"type":"number","description":"Number of teams actually included in the aggregation"},"total_teams":{"type":"number","description":"Actual team count on the org, even when truncated"}},"required":["total_runs","completed_runs","failed_runs","success_rate","active_agents","active_users","start_date","end_date","truncated","aggregated_teams","total_teams"],"additionalProperties":false}},"required":["headline"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Org Insights Headline","deprecated":true}},"/v1/organizations/{orgId}/insights/metrics":{"get":{"operationId":"getOrgInsightsMetrics","tags":["Organizations"],"description":"Get org-level insights metrics (runs, assignments, schedules) broken down per team across the organization. Requires an organization Admin, Executive, or Owner role.","parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"startDate","required":false,"description":"Start of the aggregation window (ISO 8601 datetime). Defaults to 7 days ago; clamped to at most 365 days ago."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"endDate","required":false,"description":"End of the aggregation window (ISO 8601 datetime). Defaults to now; clamped to now."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true,"description":"The organization's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"object","properties":{"team_id":{"type":"string","format":"uuid","description":"Team's unique identifier"},"team_name":{"type":"string","description":"Team name"},"is_deleted":{"type":"boolean","description":"Whether the team is soft-deleted"},"member_count":{"type":"number","description":"Number of members on the team"},"assignment_count":{"type":"number","description":"Number of (non-deleted) agents on the team"},"scheduled_job_count":{"type":"number","description":"Number of enabled schedules on the team's agents"},"total_jobs":{"type":"number","description":"Scheduled runs in the window (source = scheduling)"},"completed_jobs":{"type":"number","description":"Scheduled runs that completed"},"failed_jobs":{"type":"number","description":"Scheduled runs that failed"},"total_runs":{"type":"number","description":"All runs in the window across sources"},"standard_runs":{"description":"Runs using Standard models","type":"number"},"preview_runs":{"description":"Runs using a Preview model","type":"number"}},"required":["team_id","team_name","is_deleted","member_count","assignment_count","scheduled_job_count","total_jobs","completed_jobs","failed_jobs","total_runs"],"additionalProperties":false},"description":"Per-team metric breakdown"},"start_date":{"type":"string","description":"Effective window start after clamping (ISO 8601)"},"end_date":{"type":"string","description":"Effective window end after clamping (ISO 8601)"},"truncated":{"type":"boolean","description":"True when the org has more teams than the aggregation limit — the team list is partial"},"total_teams":{"type":"number","description":"Actual team count on the org, even when truncated"},"org_member_count":{"type":"number","description":"Distinct organization members (not the sum of per-team memberships)"}},"required":["teams","start_date","end_date","truncated","total_teams","org_member_count"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Org Insights Metrics","deprecated":true}},"/v1/organizations/{orgId}/insights/usage-chart":{"get":{"operationId":"getOrgInsightsUsageChart","tags":["Organizations"],"description":"Get org-level run-volume buckets (scheduled vs on-demand) at day/week/month granularity across the organization. Requires an organization Admin, Executive, or Owner role.","parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"startDate","required":true,"description":"Start of the chart window (ISO 8601 datetime). Clamped to at most 365 days ago."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"endDate","required":true,"description":"End of the chart window (ISO 8601 datetime). Clamped to now."},{"schema":{"type":"string","enum":["day","week","month"]},"in":"query","name":"granularity","required":true,"description":"Bucket size: day, week, or month"},{"schema":{"type":"string","maxLength":64,"pattern":"^[A-Za-z_]+(?:\\/[A-Za-z_\\-+0-9]+){0,2}$"},"in":"query","name":"timezone","required":false,"description":"IANA timezone for bucket boundaries (e.g. America/New_York). Defaults to UTC."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true,"description":"The organization's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"buckets":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string","description":"Bucket label (YYYY-MM-DD for day/week, YYYY-MM for month)"},"total_runs":{"type":"number","description":"Total runs in the bucket"},"scheduled_runs":{"type":"number","description":"Runs started by a schedule (source = scheduling)"},"on_demand_runs":{"type":"number","description":"Runs started on demand (any non-scheduling source)"}},"required":["period","total_runs","scheduled_runs","on_demand_runs"],"additionalProperties":false},"description":"Time buckets ordered ascending by period"},"granularity":{"type":"string","enum":["day","week","month"],"description":"Bucket size used"},"truncated":{"type":"boolean","description":"True when the org has more teams than the aggregation limit — buckets cover a partial team set"},"total_teams":{"type":"number","description":"Actual team count on the org, even when truncated"}},"required":["buckets","granularity","truncated","total_teams"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Org Insights Usage Chart","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/organize":{"post":{"operationId":"organizeClarityProcessLandscape","tags":["Organizations","Clarity"],"description":"Start an asynchronous organization pass over the organization's unfiled processes, placing them into the Process Landscape where possible (organization admin+). Results appear progressively; started is false when there is nothing to organize.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"description":"Deprecated: ignored. The organize pass takes no instructions.","type":"string"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"started":{"type":"boolean"},"bagSize":{"type":"number"}},"required":["started","bagSize"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Organize Clarity Process Landscape","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/tree":{"get":{"operationId":"getClarityProcessTree","tags":["Clarity"],"description":"Fetch the organization's process tree, or the subtree under rootId. Narrow a large organization with `rootId` (one subtree) or `ownerTeamId` (one team's processes) — a whole-organization tree is large enough to be refused by response-size caps","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"rootId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"ownerTeamId","required":false,"description":"Only return process nodes owned by this team, plus the folder nodes that carry them. 404s when the team has no readable Process Landscape"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"team":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"depth":{"type":"number"}},"required":["id","parentId","processId","name","ownerLabel","sortOrder","existence","contentConfirmedAt","existenceConfirmedAt","source","priority","priorityReasoning","priorityAssessedAt","createdAt","updatedAt","team","depth"],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":["nodes","truncated"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Process Tree","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/landscape":{"get":{"operationId":"getClarityProcessLandscape","tags":["Organizations","Clarity"],"description":"Fetch the organization's full process landscape with process summaries, team assignments, and page-level stats","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"rootId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"teamId","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"nodeKind":{"type":"string","enum":["area","process"]},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"depth":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"proposedSummary":{"nullable":true,"type":"string"},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"teamId":{"nullable":true,"type":"string","format":"uuid"},"teamName":{"nullable":true,"type":"string"},"team":{"not":{}},"assignedTeam":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"teamAssignmentSuggestions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"suggestedTeamId":{"nullable":true,"type":"string","format":"uuid"},"suggestedTeamName":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"rationale":{"type":"string"},"status":{"type":"string","enum":["pending","accepted","dismissed"]},"createdAt":{"type":"string"}},"required":["id","suggestedTeamId","suggestedTeamName","confidence","rationale","status","createdAt"],"additionalProperties":false}},"labels":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"colorHue":{"type":"integer","minimum":0,"maximum":360},"source":{"type":"string","enum":["human","agent"]}},"required":["id","value","colorHue","source"],"additionalProperties":false}},"process":{"nullable":true,"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"]},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]},"summary":{"nullable":true,"type":"string"},"captureCount":{"type":"number"},"captureCounts":{"type":"object","properties":{"video":{"type":"number"},"interview":{"type":"number"},"document":{"type":"number"}},"required":["video","interview","document"],"additionalProperties":false},"updatedAt":{"type":"string","format":"date-time"},"contributors":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"userName":{"type":"string"}},"required":["userId","userName"],"additionalProperties":false}},"people":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"name":{"type":"string"},"askedAt":{"type":"string","format":"date-time"},"captureState":{"nullable":true,"type":"string","enum":["in_progress","captured","failed","waiting"]},"askedByName":{"nullable":true,"type":"string"},"lastRemindedAt":{"nullable":true,"type":"string","format":"date-time"},"reminderCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"captureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastCaptureAt":{"nullable":true,"type":"string","format":"date-time"},"failureReason":{"nullable":true,"type":"string"},"isInvitationPending":{"type":"boolean"}},"required":["id","userId","email","name"],"additionalProperties":false}}},"required":["id","name","status","version","summary","captureCount","captureCounts","updatedAt","contributors","people"],"additionalProperties":false}},"required":["id","parentId","processId","name","ownerLabel","sortOrder","depth","existence","contentConfirmedAt","existenceConfirmedAt","source","createdAt","updatedAt","proposedSummary","labels","process"],"additionalProperties":false}},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sourceNodeId":{"type":"string","format":"uuid"},"targetNodeId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["hands_off_to","shares_step_with","variant_of"]},"state":{"type":"string","enum":["suggested","confirmed"]},"confidence":{"nullable":true,"type":"number"},"rationale":{"default":null,"nullable":true,"type":"string"}},"required":["id","sourceNodeId","targetNodeId","type","state","confidence","rationale"],"additionalProperties":false}},"unlinkedProcesses":{"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"]},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]},"summary":{"nullable":true,"type":"string"},"captureCount":{"type":"number"},"captureCounts":{"type":"object","properties":{"video":{"type":"number"},"interview":{"type":"number"},"document":{"type":"number"}},"required":["video","interview","document"],"additionalProperties":false},"updatedAt":{"type":"string","format":"date-time"},"contributors":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"userName":{"type":"string"}},"required":["userId","userName"],"additionalProperties":false}},"people":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"name":{"type":"string"},"askedAt":{"type":"string","format":"date-time"},"captureState":{"nullable":true,"type":"string","enum":["in_progress","captured","failed","waiting"]},"askedByName":{"nullable":true,"type":"string"},"lastRemindedAt":{"nullable":true,"type":"string","format":"date-time"},"reminderCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"captureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastCaptureAt":{"nullable":true,"type":"string","format":"date-time"},"failureReason":{"nullable":true,"type":"string"},"isInvitationPending":{"type":"boolean"}},"required":["id","userId","email","name"],"additionalProperties":false}},"teamId":{"type":"string","format":"uuid"},"teamName":{"nullable":true,"type":"string"},"labels":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"colorHue":{"type":"integer","minimum":0,"maximum":360},"source":{"type":"string","enum":["human","agent"]}},"required":["id","value","colorHue","source"],"additionalProperties":false}}},"required":["id","name","status","version","summary","captureCount","captureCounts","updatedAt","contributors","people","teamId","teamName","labels"],"additionalProperties":false}},"stats":{"type":"object","properties":{"totalNodes":{"type":"number"},"processNodes":{"type":"number"},"proposedNodes":{"type":"number"},"unsortedProcesses":{"type":"number"},"latestUpdatedAt":{"nullable":true,"type":"string"}},"required":["totalNodes","processNodes","proposedNodes","unsortedProcesses","latestUpdatedAt"],"additionalProperties":false},"canGenerate":{"default":false,"type":"boolean"},"generationId":{"default":null,"nullable":true,"type":"string","format":"uuid"},"generationStatus":{"default":"idle","type":"string","enum":["idle","starting","running","completed","failed"]},"generation":{"nullable":true,"type":"object","properties":{"eligibleCaptureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"eligibleProcessCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["idle","starting","running","completed","failed"]},"lastCompletedAt":{"nullable":true,"type":"string"},"newCaptureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"newProcessCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["eligibleCaptureCount","eligibleProcessCount","status","lastCompletedAt","newCaptureCount","newProcessCount"],"additionalProperties":false},"truncated":{"type":"boolean"}},"required":["nodes","links","unlinkedProcesses","stats","canGenerate","generationId","generationStatus","generation","truncated"],"additionalProperties":false}}}}},"summary":"Get Clarity Process Landscape","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/people":{"get":{"operationId":"getClarityHierarchyPeople","tags":["Organizations","Clarity"],"description":"List the people attached to every authorized linked process node in the organization's Process Landscape. Returns a flat list where each person carries `nodeId` and `processId`, plus their role, invite status, and capture count. Narrow it with `rootId` (one subtree), `ownerTeamId` (one owning team), and `userId` or `search` (one person) — an unfiltered organization roster is large enough to be refused by response-size caps. To find the processes where one person has not captured yet, filter to that person and read `captureCount` per row. `truncated` is true when the node subtree or any single process roster was capped.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"rootId","required":false,"description":"Only return rosters for nodes in the subtree under this node"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"ownerTeamId","required":false,"description":"Only return rosters for processes owned by this team. 404s when the team has no readable Process Landscape"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"userId","required":false,"description":"Only return rows for this platform user, matched on the same resolved identity the roster reports (an email-only row resolves through its organization profile)"},{"schema":{"type":"string","maxLength":200},"in":"query","name":"search","required":false,"description":"Only return rows whose person name or email contains this text, case-insensitively"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"nullable":true,"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string","format":"email"},"role":{"nullable":true,"type":"string"},"interviewRequested":{"default":true,"type":"boolean"},"status":{"nullable":true,"type":"string","enum":["pending"]},"invitationId":{"nullable":true,"type":"string","format":"uuid"},"captureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"captureStatusCounts":{"default":{"completed":0,"inProgress":0,"failed":0},"type":"object","properties":{"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"inProgress":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["completed","inProgress","failed"],"additionalProperties":false},"createdAt":{"type":"string"},"askedByName":{"nullable":true,"type":"string"},"lastRemindedAt":{"nullable":true,"type":"string","format":"date-time"},"reminderCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"nodeId":{"type":"string","format":"uuid"},"processId":{"type":"string","format":"uuid"}},"required":["id","userId","name","email","role","interviewRequested","status","invitationId","captureCount","captureStatusCounts","createdAt","nodeId","processId"],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":["people","truncated"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Hierarchy People","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/captures":{"get":{"operationId":"listClarityLandscapeCaptures","tags":["Organizations","Clarity"],"description":"List the organization's Process Landscape captures. By default, only captures eligible to seed new process proposals are returned; excluded captures can be included for inspection.","parameters":[{"schema":{"default":100,"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false,"description":"Number of captures to return (1-200, default 100)"},{"schema":{"default":"false","type":"string","enum":["true","false"]},"in":"query","name":"includeTranscripts","required":false,"description":"Include full capture transcripts (large); off by default. Pass the literal string 'true' or 'false' (z.coerce.boolean treats any non-empty value, including 'false', as true)."},{"schema":{"default":"false","type":"string","enum":["true","false"]},"in":"query","name":"include_excluded","required":false,"description":"Include captures excluded from Process Landscape analysis"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"captures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique capture identifier"},"scope":{"type":"string","enum":["team","organization"],"description":"Whether the capture is owned by a team or the organization"},"type":{"type":"string","enum":["interview","document"],"description":"Capture source: a voice interview or an uploaded document"},"title":{"type":"string","description":"Human-readable capture title"},"organizationId":{"nullable":true,"description":"Owning organization id, when org-scoped","type":"string","format":"uuid"},"organizationName":{"nullable":true,"description":"Owning organization name, when available","type":"string"},"teamId":{"nullable":true,"description":"Owning team id, when team-scoped","type":"string","format":"uuid"},"teamName":{"nullable":true,"description":"Owning team name, when available","type":"string"},"processNodeId":{"nullable":true,"description":"Hierarchy node the capture is filed under, when any","type":"string","format":"uuid"},"createdAt":{"type":"string","description":"ISO 8601 creation timestamp"},"transcriptMessageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of messages in the capture transcript"},"usability_status":{"type":"string","enum":["usable","excluded"]},"usability_reason":{"nullable":true,"type":"string"},"usability_source":{"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usability_confidence":{"nullable":true,"type":"string","enum":["high","medium","low"]},"transcript":{"description":"Full capture transcript, included only when requested","type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"speakerName":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}}},"required":["id","scope","type","title","organizationId","organizationName","teamId","teamName","processNodeId","createdAt","transcriptMessageCount","usability_status","usability_reason","usability_source","usability_confidence"],"additionalProperties":false},"description":"Process Landscape captures matching the query, newest first"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total captures matching the requested inclusion filter"},"truncated":{"type":"boolean","description":"True when more captures exist than were returned"}},"required":["captures","total","truncated"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Landscape Captures","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/landscape/generate":{"post":{"operationId":"generateClarityProcessLandscape","tags":["Organizations","Clarity"],"description":"Start a process-landscape generation run for the organization from its eligible Clarity captures (organization executives and owners)","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"started":{"type":"boolean","enum":[true]},"generationId":{"type":"string","format":"uuid"},"eligibleCaptureCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"eligibleProcessCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["started","generationId","eligibleCaptureCount","eligibleProcessCount"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Generate Clarity Process Landscape","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/nodes":{"post":{"operationId":"createClarityLandscapeNode","tags":["Clarity"],"description":"Create an area folder in the process tree. An active area (the default) requires organization admin+ or manager+ on a team of the organization; a \"proposal\" area may be added by any organization member.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"parentId":{"default":null,"nullable":true,"type":"string","format":"uuid"},"ownerLabel":{"default":null,"nullable":true,"type":"string","maxLength":200},"description":{"default":null,"description":"One or two sentences saying what family of work this area groups. Persisted as the area's summary.","nullable":true,"type":"string","maxLength":2000},"creationMode":{"description":"Use \"proposal\" to add an area for review instead of asserting it exists. A proposal is idempotent: an equivalent live area under the same parent is returned untouched rather than duplicated. Defaults to \"active\".","type":"string","enum":["active","proposal"]}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parentId":{"nullable":true,"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"ownerLabel":{"nullable":true,"type":"string"},"sortOrder":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"contentConfirmedAt":{"nullable":true,"type":"string"},"existenceConfirmedAt":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priorityReasoning":{"nullable":true,"type":"string"},"priorityAssessedAt":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"team":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"outcome":{"type":"string","enum":["created","reused"],"description":"Whether this call inserted a new node or returned an equivalent one that already existed. Only \"proposal\" mode can report \"reused\"."}},"required":["id","parentId","processId","name","ownerLabel","sortOrder","existence","contentConfirmedAt","existenceConfirmedAt","source","priority","priorityReasoning","priorityAssessedAt","createdAt","updatedAt","team","outcome"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Landscape Node","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/process-links":{"get":{"operationId":"listClarityProcessLinks","tags":["Clarity"],"description":"List process-to-process links in the organization's Clarity landscape that are visible within the caller's team access scope. Use `node_id` to find links touching a specific process node.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"node_id","required":false,"description":"Only return links that touch this hierarchy process node"},{"schema":{"default":100,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"limit","required":false,"description":"Number of links per page (1-500, default 100)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of links to skip (default 0)"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"process_links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique process-link identifier"},"source_node_id":{"type":"string","format":"uuid","description":"Hierarchy node id for the source process"},"target_node_id":{"type":"string","format":"uuid","description":"Hierarchy node id for the target process"},"type":{"type":"string","enum":["hands_off_to","shares_step_with","variant_of"],"description":"Relationship type between the source process node and target process node"},"state":{"type":"string","enum":["suggested","confirmed"],"description":"Whether the link is suggested by Duvo or confirmed by a user"},"confidence":{"nullable":true,"description":"Optional confidence score from 0 to 1","type":"number","minimum":0,"maximum":1},"rationale":{"nullable":true,"description":"Why Duvo suggested this process relationship","type":"string"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-updated timestamp"}},"required":["id","source_node_id","target_node_id","type","state","confidence","rationale","created_at","updated_at"],"additionalProperties":false},"description":"Process links in the current team"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total links matching the query"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of links requested"},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of links skipped"}},"required":["process_links","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Process Links","deprecated":true},"post":{"operationId":"createClarityProcessLink","tags":["Clarity"],"description":"Create a process-to-process link in the organization's Clarity landscape when the caller can manage both endpoint teams. If the same live source, target, and type already exists, the existing link is returned.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_node_id":{"type":"string","format":"uuid","description":"Hierarchy node id for the source process"},"target_node_id":{"type":"string","format":"uuid","description":"Hierarchy node id for the target process"},"type":{"type":"string","enum":["hands_off_to","shares_step_with","variant_of"],"description":"Relationship type between the source process node and target process node"},"state":{"default":"confirmed","type":"string","enum":["suggested","confirmed"],"description":"Whether the link is suggested by Duvo or confirmed by a user"},"confidence":{"description":"Optional confidence score from 0 to 1","nullable":true,"type":"number","minimum":0,"maximum":1}},"required":["source_node_id","target_node_id","type"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"process_link":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique process-link identifier"},"source_node_id":{"type":"string","format":"uuid","description":"Hierarchy node id for the source process"},"target_node_id":{"type":"string","format":"uuid","description":"Hierarchy node id for the target process"},"type":{"type":"string","enum":["hands_off_to","shares_step_with","variant_of"],"description":"Relationship type between the source process node and target process node"},"state":{"type":"string","enum":["suggested","confirmed"],"description":"Whether the link is suggested by Duvo or confirmed by a user"},"confidence":{"nullable":true,"description":"Optional confidence score from 0 to 1","type":"number","minimum":0,"maximum":1},"rationale":{"nullable":true,"description":"Why Duvo suggested this process relationship","type":"string"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-updated timestamp"}},"required":["id","source_node_id","target_node_id","type","state","confidence","rationale","created_at","updated_at"],"additionalProperties":false},"created":{"description":"True when a create request inserted a new link","type":"boolean"}},"required":["process_link"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"process_link":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique process-link identifier"},"source_node_id":{"type":"string","format":"uuid","description":"Hierarchy node id for the source process"},"target_node_id":{"type":"string","format":"uuid","description":"Hierarchy node id for the target process"},"type":{"type":"string","enum":["hands_off_to","shares_step_with","variant_of"],"description":"Relationship type between the source process node and target process node"},"state":{"type":"string","enum":["suggested","confirmed"],"description":"Whether the link is suggested by Duvo or confirmed by a user"},"confidence":{"nullable":true,"description":"Optional confidence score from 0 to 1","type":"number","minimum":0,"maximum":1},"rationale":{"nullable":true,"description":"Why Duvo suggested this process relationship","type":"string"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-updated timestamp"}},"required":["id","source_node_id","target_node_id","type","state","confidence","rationale","created_at","updated_at"],"additionalProperties":false},"created":{"description":"True when a create request inserted a new link","type":"boolean"}},"required":["process_link"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Process Link","deprecated":true}},"/v1/organizations/{orgId}/clarity/hierarchy/process-links/{process_link_id}":{"patch":{"operationId":"updateClarityProcessLink","tags":["Clarity"],"description":"Update a process-to-process link in the organization's Clarity landscape when the caller can manage both endpoint teams.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_node_id":{"description":"Replacement hierarchy node id for the source process","type":"string","format":"uuid"},"target_node_id":{"description":"Replacement hierarchy node id for the target process","type":"string","format":"uuid"},"type":{"type":"string","enum":["hands_off_to","shares_step_with","variant_of"],"description":"Relationship type between the source process node and target process node"},"state":{"type":"string","enum":["suggested","confirmed"],"description":"Whether the link is suggested by Duvo or confirmed by a user"},"confidence":{"description":"Confidence score from 0 to 1, or null to clear it","nullable":true,"type":"number","minimum":0,"maximum":1}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_link_id","required":true,"description":"Unique process-link identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"process_link":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique process-link identifier"},"source_node_id":{"type":"string","format":"uuid","description":"Hierarchy node id for the source process"},"target_node_id":{"type":"string","format":"uuid","description":"Hierarchy node id for the target process"},"type":{"type":"string","enum":["hands_off_to","shares_step_with","variant_of"],"description":"Relationship type between the source process node and target process node"},"state":{"type":"string","enum":["suggested","confirmed"],"description":"Whether the link is suggested by Duvo or confirmed by a user"},"confidence":{"nullable":true,"description":"Optional confidence score from 0 to 1","type":"number","minimum":0,"maximum":1},"rationale":{"nullable":true,"description":"Why Duvo suggested this process relationship","type":"string"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-updated timestamp"}},"required":["id","source_node_id","target_node_id","type","state","confidence","rationale","created_at","updated_at"],"additionalProperties":false},"created":{"description":"True when a create request inserted a new link","type":"boolean"}},"required":["process_link"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Clarity Process Link","deprecated":true},"delete":{"operationId":"deleteClarityProcessLink","tags":["Clarity"],"description":"Delete a process-to-process link from the organization's Clarity landscape when the caller can manage both endpoint teams.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_link_id","required":true,"description":"Unique process-link identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","description":"True when the process link was deleted"}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Clarity Process Link","deprecated":true}},"/v1/organizations/{org_id}/clarity/hierarchy/priorities":{"put":{"operationId":"setClarityLandscapePriorities","tags":["Clarity"],"description":"Set or clear heatmap priorities in one batch (team managers for their processes; organization admin+ across the organization)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"priorities":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"node_id":{"type":"string","format":"uuid","description":"Process landscape node receiving the assessment."},"priority":{"nullable":true,"description":"Priority to set, or null to clear the assessment.","type":"string","enum":["high","medium","low"]},"reasoning":{"description":"Brief rationale for the priority.","nullable":true,"type":"string","maxLength":2000}},"required":["node_id","priority"]},"description":"Process priority updates applied atomically."}},"required":["priorities"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"org_id","required":true,"description":"Organization whose landscape is being assessed."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parent_id":{"nullable":true,"type":"string","format":"uuid"},"process_id":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"owner_label":{"nullable":true,"type":"string"},"sort_order":{"type":"number"},"existence":{"type":"string","enum":["proposed","active"]},"content_confirmed_at":{"nullable":true,"type":"string"},"existence_confirmed_at":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["ai","human"]},"priority":{"nullable":true,"type":"string","enum":["high","medium","low"]},"priority_reasoning":{"nullable":true,"type":"string"},"priority_assessed_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"team":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","parent_id","process_id","name","owner_label","sort_order","existence","content_confirmed_at","existence_confirmed_at","source","priority","priority_reasoning","priority_assessed_at","created_at","updated_at","team"],"additionalProperties":false}}},"required":["nodes"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Set Clarity Landscape Priorities","deprecated":true}},"/v1/organizations/{orgId}/clarity/interviews":{"get":{"operationId":"listClarityOrganizationInterviews","tags":["Organizations","ClarityInterview"],"description":"List Clarity interviews across an organization","parameters":[{"schema":{"type":"string","enum":["team","organization"]},"in":"query","name":"scope","required":false},{"schema":{"default":50,"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},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"interviews":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"title":{"type":"string"},"type":{"type":"string","enum":["interview","document"]},"status":{"type":"string","x-extensible-enum":["pending","recording","processing","complete","failed"]},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"},"processingFailureReason":{"default":null,"nullable":true,"type":"string"},"hasTranscript":{"default":false,"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scope":{"type":"string","enum":["team","organization"]},"teamId":{"nullable":true,"type":"string","format":"uuid"},"teamName":{"nullable":true,"type":"string"},"organizationId":{"type":"string","format":"uuid"}},"required":["id","userId","title","type","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","scheduledJoinAt","processingFailureReason","hasTranscript","createdAt","updatedAt","scope","teamId","teamName","organizationId"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["interviews","total"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Organization Interviews","deprecated":true}},"/v1/organizations/{orgId}/clarity/interviews/{interviewId}":{"get":{"operationId":"getClarityOrganizationInterview","tags":["Organizations","ClarityInterview"],"description":"Load a single organization Clarity interview with transcript","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"interviewId","required":true,"description":"The organization interview ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["organization"]},"type":{"type":"string","enum":["interview","document"]},"teamId":{"type":"string","nullable":true,"enum":[null]},"organizationId":{"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"processNodeId":{"nullable":true,"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string","x-extensible-enum":["pending","recording","processing","complete","failed"]},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"processingFailureReason":{"default":null,"nullable":true,"type":"string"},"recordingUrl":{"nullable":true,"type":"string"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"speakerName":{"type":"string"},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"}},"required":["id","scope","type","teamId","organizationId","processId","processNodeId","userId","title","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","processingFailureReason","recordingUrl","transcript","createdAt","updatedAt","scheduledJoinAt"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Organization Interview","deprecated":true},"patch":{"operationId":"updateClarityOrganizationInterview","tags":["Organizations","ClarityInterview"],"description":"Rename an organization landscape Clarity capture","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160}},"required":["title"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"interviewId","required":true,"description":"The organization interview ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"title":{"type":"string"},"type":{"type":"string","enum":["interview","document"]},"status":{"type":"string","x-extensible-enum":["pending","recording","processing","complete","failed"]},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"},"processingFailureReason":{"default":null,"nullable":true,"type":"string"},"hasTranscript":{"default":false,"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scope":{"type":"string","enum":["team","organization"]},"teamId":{"nullable":true,"type":"string","format":"uuid"},"teamName":{"nullable":true,"type":"string"},"organizationId":{"type":"string","format":"uuid"}},"required":["id","userId","title","type","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","scheduledJoinAt","processingFailureReason","hasTranscript","createdAt","updatedAt","scope","teamId","teamName","organizationId"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Clarity Organization Interview","deprecated":true},"delete":{"operationId":"deleteClarityOrganizationInterview","tags":["Organizations","ClarityInterview"],"description":"Delete an organization-level Clarity interview","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"interviewId","required":true,"description":"The organization interview ID"}],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Clarity Organization Interview","deprecated":true}},"/v1/organizations/{orgId}/clarity/interviews/notetaker":{"post":{"operationId":"inviteClarityOrganizationNotetaker","tags":["Organizations","ClarityInterview"],"description":"Invite the in-meeting notetaker bot (Recall.ai) to a live meeting; the recording lands as an organization Clarity interview","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"meetingUrl":{"type":"string","maxLength":2048,"format":"uri"},"extraCaptureRequestId":{"type":"string","format":"uuid"},"joinAt":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["meetingUrl"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"interviewId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending"]}},"required":["interviewId","status"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string","enum":["CLARITY_ORG_INTERVIEWS_NOT_IN_PLAN"]},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Invite Clarity Organization Notetaker","deprecated":true}},"/v1/organizations/{orgId}/clarity/interviews/{interviewId}/finalize":{"post":{"operationId":"finalizeClarityOrganizationInterview","tags":["Organizations","ClarityInterview"],"description":"Manually mark an in-progress organization interview as complete without requiring final media uploads","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"interviewId","required":true,"description":"The organization interview ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["organization"]},"type":{"type":"string","enum":["interview","document"]},"teamId":{"type":"string","nullable":true,"enum":[null]},"organizationId":{"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"processNodeId":{"nullable":true,"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string","x-extensible-enum":["pending","recording","processing","complete","failed"]},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"processingFailureReason":{"default":null,"nullable":true,"type":"string"},"recordingUrl":{"nullable":true,"type":"string"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"speakerName":{"type":"string"},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"}},"required":["id","scope","type","teamId","organizationId","processId","processNodeId","userId","title","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","processingFailureReason","recordingUrl","transcript","createdAt","updatedAt","scheduledJoinAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Finalize Clarity Organization Interview","deprecated":true}},"/v1/organizations/{orgId}/clarity/interviews/document/create-upload-url":{"post":{"operationId":"createClarityOrganizationDocumentUploadUrl","tags":["Organizations","ClarityInterview"],"description":"Create a signed URL for uploading a PDF, Word (.docx), TXT, Markdown, or BPMN document as an organization-level Clarity capture","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"description":"Name of the document file"},"contentType":{"type":"string","enum":["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/plain","text/markdown","application/xml"],"description":"MIME type of the document"}},"required":["fileName","contentType"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"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"},"captureId":{"type":"string","format":"uuid","description":"The organization interview/capture ID"},"expiresAt":{"type":"string","format":"date-time","description":"When the URL expires"},"gcsPath":{"type":"string","description":"The GCS path where the file will be stored"}},"required":["signedUrl","captureId","expiresAt","gcsPath"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string","enum":["CLARITY_ORG_INTERVIEWS_NOT_IN_PLAN"]},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Organization Document Upload URL","deprecated":true}},"/v1/organizations/{orgId}/clarity/interviews/document/{interviewId}/complete":{"post":{"operationId":"completeClarityOrganizationDocumentUpload","tags":["Organizations","ClarityInterview"],"description":"Complete an organization document capture after uploading to GCS; extracts text and stores it as a transcript so it feeds Process Landscape generation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"description":"Name of the uploaded document file"}},"required":["fileName"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"interviewId","required":true,"description":"The organization interview ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["organization"]},"type":{"type":"string","enum":["interview","document"]},"teamId":{"type":"string","nullable":true,"enum":[null]},"organizationId":{"type":"string","format":"uuid"},"processId":{"nullable":true,"type":"string","format":"uuid"},"processNodeId":{"nullable":true,"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string","x-extensible-enum":["pending","recording","processing","complete","failed"]},"usabilityStatus":{"default":"usable","type":"string","enum":["usable","excluded"]},"usabilityReason":{"default":null,"nullable":true,"type":"string"},"usabilitySource":{"default":null,"nullable":true,"type":"string","enum":["agent","interviewee","manager"]},"usabilityConfidence":{"default":null,"nullable":true,"type":"string","enum":["high","medium","low"]},"processingFailureReason":{"default":null,"nullable":true,"type":"string"},"recordingUrl":{"nullable":true,"type":"string"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"speakerName":{"type":"string"},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scheduledJoinAt":{"default":null,"nullable":true,"type":"string"},"meetingUrl":{"nullable":true,"type":"string"}},"required":["id","scope","type","teamId","organizationId","processId","processNodeId","userId","title","status","usabilityStatus","usabilityReason","usabilitySource","usabilityConfidence","processingFailureReason","recordingUrl","transcript","createdAt","updatedAt","scheduledJoinAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Complete Clarity Organization Document Upload","deprecated":true}},"/v1/organizations/mine":{"get":{"operationId":"listMyOrganizations","tags":["Organizations"],"description":"List the organizations the current user belongs to, with their role (organization:member, organization:admin, organization:owner, or organization:executive) and member count in each. Use this to check whether the user has an admin-or-above role before calling organization-scoped endpoints, which reject lower roles with 403.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"memberships":{"type":"array","items":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"discoveryMode":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","discoveryMode","createdAt"],"additionalProperties":false},"role":{"type":"string"},"memberCount":{"type":"number"}},"required":["organization","role","memberCount"],"additionalProperties":false}}},"required":["memberships"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List My Organizations","deprecated":true}},"/v1/clarity-export/{id}":{"get":{"operationId":"getClarityExport","tags":["Clarity Export"],"description":"Get a Clarity export run by ID","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"},"target":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"processId":{"type":"string","format":"uuid"},"teamId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"connectionInstanceId":{"type":"string","format":"uuid"},"sandboxId":{"nullable":true,"type":"string"},"result":{"nullable":true,"type":"object","properties":{"diagramId":{"type":"string"},"diagramName":{"type":"string"},"folderId":{"type":"string"},"folderName":{"type":"string"},"diagramUrl":{"type":"string"}},"additionalProperties":false},"error":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","target","status","processId","teamId","userId","connectionInstanceId","sandboxId","result","error","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Export","deprecated":true}},"/v1/queues/{queue_id}":{"get":{"operationId":"getQueue","tags":["Queues"],"description":"Get a 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"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string"},"created_at":{"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},"paused_at":{"description":"When the queue was paused, or null while it runs. A paused queue starts no new case: runs already in progress finish, and its pending cases stay pending until it is resumed.","nullable":true,"type":"string"},"paused_by":{"description":"The user who paused the queue, or null while it runs or when that user's profile is gone.","nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"has_approvals":{"type":"boolean"},"setup_status":{"description":"Whether the Queue's route can take new cases right now, and why not. Null only when it could not be computed. Absent while the feature is not enabled for the team.","nullable":true,"type":"object","properties":{"status":{"type":"string","description":"`active` when the route can take new cases; `inactive` when nothing starts them, by choice, plan or demo; `deactivated` when the team reached its usage limit; `needs_setup` when something on the route must be added or fixed.","x-extensible-enum":["active","inactive","deactivated","needs_setup"]},"reasons":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","description":"Why the Queue is not active. `no_agent`, `routing_off`, `no_entitlement` and `demo` make it inactive; `usage_limit` deactivates it; `no_live_version`, `trigger_conflict`, `connection_missing` and `connection_broken` mean it needs setup.","x-extensible-enum":["no_live_version","trigger_conflict","connection_missing","connection_broken","usage_limit","no_agent","routing_off","no_entitlement","demo"]},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"description":"The Agents the reason concerns: the routed Agent, every Agent in a trigger conflict, or none."},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."}},"required":["reason","agents","connections"],"additionalProperties":false},"description":"Every reason the Queue is not active, needs-setup reasons first, then deactivated, then inactive. Empty when the Queue is active."},"unchecked":{"type":"array","items":{"type":"string","x-extensible-enum":["entitlement","usage"]},"description":"Inputs that could not be read just now, so cases may be waiting for a reason not listed. Empty in normal operation."}},"required":["status","reasons","unchecked"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Queue","deprecated":true},"patch":{"operationId":"updateQueue","tags":["Queues"],"description":"Update a queue.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New queue name. A standalone queue's name must be unique within the team, and a queue inside an automation's name must be unique within that automation. Queue names are not versioned, so this is the canonical name on any Automations workspace team, with or without revisions. A revision carrying a per-revision name override applies it over this one when that revision is activated.","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"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string"},"created_at":{"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},"paused_at":{"description":"When the queue was paused, or null while it runs. A paused queue starts no new case: runs already in progress finish, and its pending cases stay pending until it is resumed.","nullable":true,"type":"string"},"paused_by":{"description":"The user who paused the queue, or null while it runs or when that user's profile is gone.","nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"has_approvals":{"type":"boolean"},"setup_status":{"description":"Whether the Queue's route can take new cases right now, and why not. Null only when it could not be computed. Absent while the feature is not enabled for the team.","nullable":true,"type":"object","properties":{"status":{"type":"string","description":"`active` when the route can take new cases; `inactive` when nothing starts them, by choice, plan or demo; `deactivated` when the team reached its usage limit; `needs_setup` when something on the route must be added or fixed.","x-extensible-enum":["active","inactive","deactivated","needs_setup"]},"reasons":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","description":"Why the Queue is not active. `no_agent`, `routing_off`, `no_entitlement` and `demo` make it inactive; `usage_limit` deactivates it; `no_live_version`, `trigger_conflict`, `connection_missing` and `connection_broken` mean it needs setup.","x-extensible-enum":["no_live_version","trigger_conflict","connection_missing","connection_broken","usage_limit","no_agent","routing_off","no_entitlement","demo"]},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"description":"The Agents the reason concerns: the routed Agent, every Agent in a trigger conflict, or none."},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."}},"required":["reason","agents","connections"],"additionalProperties":false},"description":"Every reason the Queue is not active, needs-setup reasons first, then deactivated, then inactive. Empty when the Queue is active."},"unchecked":{"type":"array","items":{"type":"string","x-extensible-enum":["entitlement","usage"]},"description":"Inputs that could not be read just now, so cases may be waiting for a reason not listed. Empty in normal operation."}},"required":["status","reasons","unchecked"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Queue","deprecated":true},"delete":{"operationId":"deleteQueue","tags":["Queues"],"description":"Delete a queue. Interrupts all associated active runs 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Queue","deprecated":true}},"/v1/queues/{queue_id}/aggregations":{"get":{"operationId":"listQueueAggregations","tags":["Queues"],"description":"List a queue's aggregation definitions.","parameters":[{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"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":"queue_id","required":true,"description":"The queue's unique identifier"}],"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"},"queue_id":{"type":"string","format":"uuid"},"schema_family_id":{"type":"string","format":"uuid"},"schema_id":{"type":"string","format":"uuid"},"schema_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"definition":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"measures":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"operation":{"type":"string","enum":["count","sum","avg","min","max","count_distinct","p50","p90","p95","p99"]},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"}},"required":["name","operation"],"additionalProperties":false}},"dimensions":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"}},"required":["name","path"],"additionalProperties":false}},"timeDimension":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"granularity":{"type":"string","enum":["hour","day","week","month","quarter","year"]}},"required":["name","path","granularity"],"additionalProperties":false},"filters":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"operator":{"type":"string","enum":["equals","notEquals","in","notIn","gt","gte","lt","lte","contains","isSet","isNotSet"]},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]}},"required":["path","operator"],"additionalProperties":false}},"order":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"direction":{"type":"string","enum":["asc","desc"]}},"required":["field","direction"],"additionalProperties":false}},"caseFilters":{"type":"object","properties":{"createdAtFrom":{"type":"string","format":"date-time"},"createdAtTo":{"type":"string","format":"date-time"},"statuses":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["pending","in_progress","needs_input","postponed","evaluating","success","issues","completed","failed","canceled"]}},"priorities":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["none","medium","high"]}},"labelIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}}},"additionalProperties":false},"limit":{"type":"integer","minimum":1,"maximum":500}},"required":["name","measures"],"additionalProperties":false},"definition_hash":{"type":"string"},"maximum_stale_age_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","queue_id","schema_family_id","schema_id","schema_version","definition","definition_hash","maximum_stale_age_seconds","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","total","limit","offset"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Queue Aggregations","deprecated":true},"post":{"operationId":"createQueueAggregation","tags":["Queues"],"description":"Create an immutable aggregation definition on a queue.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definition":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"measures":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"operation":{"type":"string","enum":["count","sum","avg","min","max","count_distinct","p50","p90","p95","p99"]},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"}},"required":["name","operation"],"additionalProperties":false}},"dimensions":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"}},"required":["name","path"],"additionalProperties":false}},"timeDimension":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"granularity":{"type":"string","enum":["hour","day","week","month","quarter","year"]}},"required":["name","path","granularity"],"additionalProperties":false},"filters":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"operator":{"type":"string","enum":["equals","notEquals","in","notIn","gt","gte","lt","lte","contains","isSet","isNotSet"]},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]}},"required":["path","operator"],"additionalProperties":false}},"order":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"direction":{"type":"string","enum":["asc","desc"]}},"required":["field","direction"],"additionalProperties":false}},"caseFilters":{"type":"object","properties":{"createdAtFrom":{"type":"string","format":"date-time"},"createdAtTo":{"type":"string","format":"date-time"},"statuses":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["pending","in_progress","needs_input","postponed","evaluating","success","issues","completed","failed","canceled"]}},"priorities":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["none","medium","high"]}},"labelIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}}},"additionalProperties":false},"limit":{"type":"integer","minimum":1,"maximum":500}},"required":["name","measures"],"additionalProperties":false},"maximum_stale_age_seconds":{"type":"integer","minimum":1,"maximum":604800}},"required":["definition"]}}}},"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":{"id":{"type":"string","format":"uuid"},"queue_id":{"type":"string","format":"uuid"},"schema_family_id":{"type":"string","format":"uuid"},"schema_id":{"type":"string","format":"uuid"},"schema_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"definition":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"measures":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"operation":{"type":"string","enum":["count","sum","avg","min","max","count_distinct","p50","p90","p95","p99"]},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"}},"required":["name","operation"],"additionalProperties":false}},"dimensions":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"}},"required":["name","path"],"additionalProperties":false}},"timeDimension":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"granularity":{"type":"string","enum":["hour","day","week","month","quarter","year"]}},"required":["name","path","granularity"],"additionalProperties":false},"filters":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"operator":{"type":"string","enum":["equals","notEquals","in","notIn","gt","gte","lt","lte","contains","isSet","isNotSet"]},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]}},"required":["path","operator"],"additionalProperties":false}},"order":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"direction":{"type":"string","enum":["asc","desc"]}},"required":["field","direction"],"additionalProperties":false}},"caseFilters":{"type":"object","properties":{"createdAtFrom":{"type":"string","format":"date-time"},"createdAtTo":{"type":"string","format":"date-time"},"statuses":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["pending","in_progress","needs_input","postponed","evaluating","success","issues","completed","failed","canceled"]}},"priorities":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["none","medium","high"]}},"labelIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}}},"additionalProperties":false},"limit":{"type":"integer","minimum":1,"maximum":500}},"required":["name","measures"],"additionalProperties":false},"definition_hash":{"type":"string"},"maximum_stale_age_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","queue_id","schema_family_id","schema_id","schema_version","definition","definition_hash","maximum_stale_age_seconds","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Queue Aggregation","deprecated":true}},"/v1/queues/{queue_id}/aggregations/evaluate":{"post":{"operationId":"evaluateQueueAggregation","tags":["Queues"],"description":"Evaluate an aggregation definition against the current data without persisting it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definition":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"measures":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"operation":{"type":"string","enum":["count","sum","avg","min","max","count_distinct","p50","p90","p95","p99"]},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"}},"required":["name","operation"],"additionalProperties":false}},"dimensions":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"}},"required":["name","path"],"additionalProperties":false}},"timeDimension":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"granularity":{"type":"string","enum":["hour","day","week","month","quarter","year"]}},"required":["name","path","granularity"],"additionalProperties":false},"filters":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"operator":{"type":"string","enum":["equals","notEquals","in","notIn","gt","gte","lt","lte","contains","isSet","isNotSet"]},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]}},"required":["path","operator"],"additionalProperties":false}},"order":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"direction":{"type":"string","enum":["asc","desc"]}},"required":["field","direction"],"additionalProperties":false}},"caseFilters":{"type":"object","properties":{"createdAtFrom":{"type":"string","format":"date-time"},"createdAtTo":{"type":"string","format":"date-time"},"statuses":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["pending","in_progress","needs_input","postponed","evaluating","success","issues","completed","failed","canceled"]}},"priorities":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["none","medium","high"]}},"labelIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}}},"additionalProperties":false},"limit":{"type":"integer","minimum":1,"maximum":500}},"required":["name","measures"],"additionalProperties":false}},"required":["definition"]}}}},"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":{"definition_id":{"nullable":true,"type":"string","format":"uuid"},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true,"type":"string"}}},"freshness_outcome":{"type":"string","enum":["exact","folded_forward","recomputed"]},"schema_id":{"type":"string","format":"uuid"},"schema_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"current_schema_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source_revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"current_revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"is_stale":{"type":"boolean"},"computed_at":{"type":"string"},"total_rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"excluded_rows":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["legacy","incompatible_schema","both"]}},"required":["count","reason"],"additionalProperties":false}},"required":["definition_id","columns","rows","freshness_outcome","schema_id","schema_version","current_schema_version","source_revision","current_revision","is_stale","computed_at","total_rows"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Evaluate Queue Aggregation","deprecated":true}},"/v1/queues/{queue_id}/aggregations/{definition_id}/result":{"get":{"operationId":"getQueueAggregationResult","tags":["Queues"],"description":"Read an aggregation definition's cached result.","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":"definition_id","required":true,"description":"The aggregation definition's identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"definition_id":{"nullable":true,"type":"string","format":"uuid"},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true,"type":"string"}}},"freshness_outcome":{"type":"string","enum":["exact","folded_forward","recomputed"]},"schema_id":{"type":"string","format":"uuid"},"schema_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"current_schema_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source_revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"current_revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"is_stale":{"type":"boolean"},"computed_at":{"type":"string"},"total_rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"excluded_rows":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["legacy","incompatible_schema","both"]}},"required":["count","reason"],"additionalProperties":false}},"required":["definition_id","columns","rows","freshness_outcome","schema_id","schema_version","current_schema_version","source_revision","current_revision","is_stale","computed_at","total_rows"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Queue Aggregation Result","deprecated":true}},"/v1/queues/{queue_id}/aggregations/{definition_id}/refresh":{"post":{"operationId":"refreshQueueAggregation","tags":["Queues"],"description":"Force a fresh recompute of an aggregation definition.","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":"definition_id","required":true,"description":"The aggregation definition's identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"definition_id":{"nullable":true,"type":"string","format":"uuid"},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true,"type":"string"}}},"freshness_outcome":{"type":"string","enum":["exact","folded_forward","recomputed"]},"schema_id":{"type":"string","format":"uuid"},"schema_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"current_schema_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source_revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"current_revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"is_stale":{"type":"boolean"},"computed_at":{"type":"string"},"total_rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"excluded_rows":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","enum":["legacy","incompatible_schema","both"]}},"required":["count","reason"],"additionalProperties":false}},"required":["definition_id","columns","rows","freshness_outcome","schema_id","schema_version","current_schema_version","source_revision","current_revision","is_stale","computed_at","total_rows"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Refresh Queue Aggregation","deprecated":true}},"/v1/queues/{queue_id}/aggregations/{definition_id}":{"delete":{"operationId":"deleteQueueAggregation","tags":["Queues"],"description":"Soft-delete an aggregation definition.","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":"definition_id","required":true,"description":"The aggregation definition's identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Queue Aggregation","deprecated":true}},"/v1/queues/{queue_id}/json-schema":{"get":{"operationId":"getQueueJsonSchema","tags":["Queues"],"description":"Get a queue's Case schema settings: whether it requires typed cases, and the schema it validates them against.","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":{"guarded":{"type":"boolean"},"schema":{"nullable":true,"type":"object","properties":{"family_id":{"type":"string"},"family_name":{"type":"string"},"schema_id":{"type":"string"},"version":{"type":"number"},"schema":{"type":"object","additionalProperties":{}},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"required":{"type":"boolean"}},"required":["path","types","required"],"additionalProperties":false}},"change_summary":{"type":"string"},"created_at":{"type":"string"},"frozen":{"type":"boolean"}},"required":["family_id","family_name","schema_id","version","schema","fields","change_summary","created_at","frozen"],"additionalProperties":false}},"required":["guarded","schema"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Queue Json Schema","deprecated":true},"post":{"operationId":"createQueueJsonSchema","tags":["Queues"],"description":"Declare a queue's first Case schema by hand, so a person can type a queue up front instead of waiting for its producing agent to declare the shape. Fails if the queue already has a schema — replace an existing one with PUT. Every object schema, including nested objects, must set additionalProperties to false or the request fails with 400 \"Object schemas must set additionalProperties to false\".","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"A human-readable name for the Case schema (1–100 characters)."},"schema":{"type":"object","additionalProperties":{},"description":"A JSON Schema 2020-12 subset. The root must have type \"object\"; every object schema, including nested objects, must set additionalProperties to false or the request fails with 400 \"Object schemas must set additionalProperties to false\". Allowed types: object, array, string, number, integer, boolean, null. Allowed keywords: $schema, $defs, $ref, type, properties, required, additionalProperties, items, enum, const, description, format, minimum, maximum, minLength, maxLength, minItems, maxItems. Allowed formats: date, date-time, email, uuid. Property names must match /^[A-Za-z_][A-Za-z0-9_]{0,63}$/, and every array needs items. Schemas are limited to 65,536 bytes, 16 nested levels, and 256 declared or expanded fields; case JSON payloads are limited to 8 MiB and 10,000 items per array. Minimal valid example: {\"type\":\"object\",\"additionalProperties\":false,\"properties\":{}}."}},"required":["name","schema"]}}}},"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":{"guarded":{"type":"boolean"},"schema":{"nullable":true,"type":"object","properties":{"family_id":{"type":"string"},"family_name":{"type":"string"},"schema_id":{"type":"string"},"version":{"type":"number"},"schema":{"type":"object","additionalProperties":{}},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"required":{"type":"boolean"}},"required":["path","types","required"],"additionalProperties":false}},"change_summary":{"type":"string"},"created_at":{"type":"string"},"frozen":{"type":"boolean"}},"required":["family_id","family_name","schema_id","version","schema","fields","change_summary","created_at","frozen"],"additionalProperties":false}},"required":["guarded","schema"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Queue Json Schema","deprecated":true},"put":{"operationId":"replaceQueueJsonSchema","tags":["Queues"],"description":"Replace a queue's Case schema with a new version. Every declared field is frozen against automated change, so this is the only way one can be edited. Every object schema, including nested objects, must set additionalProperties to false or the request fails with 400 \"Object schemas must set additionalProperties to false\".","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"object","additionalProperties":{},"description":"A JSON Schema 2020-12 subset. The root must have type \"object\"; every object schema, including nested objects, must set additionalProperties to false or the request fails with 400 \"Object schemas must set additionalProperties to false\". Allowed types: object, array, string, number, integer, boolean, null. Allowed keywords: $schema, $defs, $ref, type, properties, required, additionalProperties, items, enum, const, description, format, minimum, maximum, minLength, maxLength, minItems, maxItems. Allowed formats: date, date-time, email, uuid. Property names must match /^[A-Za-z_][A-Za-z0-9_]{0,63}$/, and every array needs items. Schemas are limited to 65,536 bytes, 16 nested levels, and 256 declared or expanded fields; case JSON payloads are limited to 8 MiB and 10,000 items per array. Minimal valid example: {\"type\":\"object\",\"additionalProperties\":false,\"properties\":{}}."},"change_summary":{"type":"string","minLength":1,"maxLength":500,"description":"A short note about what changed and why (1–500 characters)."},"expected_schema_id":{"description":"Only replace the schema if its current ID matches this value.","type":"string","format":"uuid"}},"required":["schema","change_summary"]}}}},"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":{"guarded":{"type":"boolean"},"schema":{"nullable":true,"type":"object","properties":{"family_id":{"type":"string"},"family_name":{"type":"string"},"schema_id":{"type":"string"},"version":{"type":"number"},"schema":{"type":"object","additionalProperties":{}},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"required":{"type":"boolean"}},"required":["path","types","required"],"additionalProperties":false}},"change_summary":{"type":"string"},"created_at":{"type":"string"},"frozen":{"type":"boolean"}},"required":["family_id","family_name","schema_id","version","schema","fields","change_summary","created_at","frozen"],"additionalProperties":false}},"required":["guarded","schema"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Replace Queue Json Schema","deprecated":true},"patch":{"operationId":"updateQueueJsonSchemaSettings","tags":["Queues"],"description":"Turn a queue's schema guard on or off, and freeze or unfreeze the schema document. A guarded queue with no schema yet asks its producing agent to declare one; a frozen schema refuses every change until it is unfrozen.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"guarded":{"description":"Require every new case on this queue to be typed. When on and the queue has no schema yet, the producing agent must declare one before it can add cases.","type":"boolean"},"frozen":{"description":"Close the schema document to change. The queue must already have a schema.","type":"boolean"}}}}}},"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":{"guarded":{"type":"boolean"},"schema":{"nullable":true,"type":"object","properties":{"family_id":{"type":"string"},"family_name":{"type":"string"},"schema_id":{"type":"string"},"version":{"type":"number"},"schema":{"type":"object","additionalProperties":{}},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"required":{"type":"boolean"}},"required":["path","types","required"],"additionalProperties":false}},"change_summary":{"type":"string"},"created_at":{"type":"string"},"frozen":{"type":"boolean"}},"required":["family_id","family_name","schema_id","version","schema","fields","change_summary","created_at","frozen"],"additionalProperties":false}},"required":["guarded","schema"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Queue Json Schema Settings","deprecated":true},"delete":{"operationId":"detachQueueJsonSchema","tags":["Queues"],"description":"Stop validating new cases on a queue. Typed cases already written keep their payload and their pinned schema version.","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":{"detached":{"type":"boolean"}},"required":["detached"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Detach Queue Json Schema","deprecated":true}},"/v1/queues/{queue_id}/json-schema/attach":{"post":{"operationId":"attachQueueJsonSchema","tags":["Queues"],"description":"Put a queue on an existing Case schema, so both queues share one document and a later change moves them together. The queue must not already have a schema.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"family_id":{"type":"string","format":"uuid"}},"required":["family_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":{"guarded":{"type":"boolean"},"schema":{"nullable":true,"type":"object","properties":{"family_id":{"type":"string"},"family_name":{"type":"string"},"schema_id":{"type":"string"},"version":{"type":"number"},"schema":{"type":"object","additionalProperties":{}},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"required":{"type":"boolean"}},"required":["path","types","required"],"additionalProperties":false}},"change_summary":{"type":"string"},"created_at":{"type":"string"},"frozen":{"type":"boolean"}},"required":["family_id","family_name","schema_id","version","schema","fields","change_summary","created_at","frozen"],"additionalProperties":false}},"required":["guarded","schema"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Attach Queue Json Schema","deprecated":true}},"/v1/queues/{queue_id}/pause":{"post":{"operationId":"pauseQueue","tags":["Queues"],"description":"Pause a queue. A paused queue starts no new case: runs already in progress finish, and its pending cases stay pending until the queue is resumed. The pause applies immediately, whether or not the team uses automation revisions, and activating or rolling back a revision does not change it. Pausing a paused queue changes nothing. Only a builder or team admin, or someone whose case trigger on the queue is on, can pause it. Pausing is rolling out and may not be available to every team yet; where it is not, the request answers 403. Resuming is always available.","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"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string"},"created_at":{"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},"paused_at":{"description":"When the queue was paused, or null while it runs. A paused queue starts no new case: runs already in progress finish, and its pending cases stay pending until it is resumed.","nullable":true,"type":"string"},"paused_by":{"description":"The user who paused the queue, or null while it runs or when that user's profile is gone.","nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"has_approvals":{"type":"boolean"},"setup_status":{"description":"Whether the Queue's route can take new cases right now, and why not. Null only when it could not be computed. Absent while the feature is not enabled for the team.","nullable":true,"type":"object","properties":{"status":{"type":"string","description":"`active` when the route can take new cases; `inactive` when nothing starts them, by choice, plan or demo; `deactivated` when the team reached its usage limit; `needs_setup` when something on the route must be added or fixed.","x-extensible-enum":["active","inactive","deactivated","needs_setup"]},"reasons":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","description":"Why the Queue is not active. `no_agent`, `routing_off`, `no_entitlement` and `demo` make it inactive; `usage_limit` deactivates it; `no_live_version`, `trigger_conflict`, `connection_missing` and `connection_broken` mean it needs setup.","x-extensible-enum":["no_live_version","trigger_conflict","connection_missing","connection_broken","usage_limit","no_agent","routing_off","no_entitlement","demo"]},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"description":"The Agents the reason concerns: the routed Agent, every Agent in a trigger conflict, or none."},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."}},"required":["reason","agents","connections"],"additionalProperties":false},"description":"Every reason the Queue is not active, needs-setup reasons first, then deactivated, then inactive. Empty when the Queue is active."},"unchecked":{"type":"array","items":{"type":"string","x-extensible-enum":["entitlement","usage"]},"description":"Inputs that could not be read just now, so cases may be waiting for a reason not listed. Empty in normal operation."}},"required":["status","reasons","unchecked"],"additionalProperties":false}},"required":["id","name","description","folder_id","created_at","has_approvals"],"additionalProperties":false}},"required":["queue"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Pause Queue","deprecated":true}},"/v1/queues/{queue_id}/resume":{"post":{"operationId":"resumeQueue","tags":["Queues"],"description":"Resume a paused queue. Its pending cases start on the next dispatch, within the queue's concurrency limit. Resuming a queue that is not paused changes nothing. Only a builder or team admin, or someone whose case trigger on the queue is on, can resume it.","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"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string"},"created_at":{"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},"paused_at":{"description":"When the queue was paused, or null while it runs. A paused queue starts no new case: runs already in progress finish, and its pending cases stay pending until it is resumed.","nullable":true,"type":"string"},"paused_by":{"description":"The user who paused the queue, or null while it runs or when that user's profile is gone.","nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"has_approvals":{"type":"boolean"},"setup_status":{"description":"Whether the Queue's route can take new cases right now, and why not. Null only when it could not be computed. Absent while the feature is not enabled for the team.","nullable":true,"type":"object","properties":{"status":{"type":"string","description":"`active` when the route can take new cases; `inactive` when nothing starts them, by choice, plan or demo; `deactivated` when the team reached its usage limit; `needs_setup` when something on the route must be added or fixed.","x-extensible-enum":["active","inactive","deactivated","needs_setup"]},"reasons":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","description":"Why the Queue is not active. `no_agent`, `routing_off`, `no_entitlement` and `demo` make it inactive; `usage_limit` deactivates it; `no_live_version`, `trigger_conflict`, `connection_missing` and `connection_broken` mean it needs setup.","x-extensible-enum":["no_live_version","trigger_conflict","connection_missing","connection_broken","usage_limit","no_agent","routing_off","no_entitlement","demo"]},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"description":"The Agents the reason concerns: the routed Agent, every Agent in a trigger conflict, or none."},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."}},"required":["reason","agents","connections"],"additionalProperties":false},"description":"Every reason the Queue is not active, needs-setup reasons first, then deactivated, then inactive. Empty when the Queue is active."},"unchecked":{"type":"array","items":{"type":"string","x-extensible-enum":["entitlement","usage"]},"description":"Inputs that could not be read just now, so cases may be waiting for a reason not listed. Empty in normal operation."}},"required":["status","reasons","unchecked"],"additionalProperties":false}},"required":["id","name","description","folder_id","created_at","has_approvals"],"additionalProperties":false}},"required":["queue"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Resume Queue","deprecated":true}},"/v1/queues/{queue_id}/cases":{"delete":{"operationId":"clearQueueCases","tags":["Cases"],"description":"Delete every case in a queue. Interrupts any associated active runs 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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, free-text, and json_data field filters via query params. Set count_only=true to skip Case row selection and transformation. The normal response shape is returned with cases: [] and the matching total. For label filters, use POST /v2/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 status buckets (comma-separated). Values: all, pending, processing, needs_input, postponed, needs_review, resolved, canceled. `processing` covers both a case actively being worked and one waiting on its evaluation."},{"schema":{"type":"string"},"in":"query","name":"issue_severity","required":false,"description":"Filter by highest failing rubric severity (comma-separated). Values: critical, medium. Severity is a facet within the issues outcome, so it returns nothing when combined with a status bucket that excludes issues. `low` is not selectable: an all-low verdict is stored as success, so no case carries it."},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"awaiting_my_approval","required":false,"description":"Return only cases holding an unanswered approval row assigned to you, on the case's own run. Resolved from the authenticated caller, so it names no user: an API key filters as the user who owns it, and a credential with no user behind it is rejected rather than served an empty list. Narrows within needs_input, so it returns nothing alongside a terminal status bucket."},{"schema":{"type":"string"},"in":"query","name":"priority","required":false,"description":"Filter by one or more priority levels (comma-separated). Values: none, medium, high."},{"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 at or after an ISO-8601 timestamp or a lookback such as 24h or 7d."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"created_at_to","required":false,"description":"Return only cases created before this ISO-8601 timestamp. The upper bound is exclusive."},{"schema":{"type":"string"},"in":"query","name":"updated_at_from","required":false,"description":"Return only cases updated at or after an ISO-8601 timestamp or a lookback such as 24h or 7d."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"updated_at_to","required":false,"description":"Return only cases updated before this ISO-8601 timestamp. The upper bound is exclusive."},{"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","enum":["true","false"]},"in":"query","name":"include_blockers","required":false,"description":"Also return `blocker` on each case: for a case waiting to start, why the dispatcher cannot start it now, or null when nothing blocks it. Off by default, because it adds database reads; when off, `blocker` is left out."},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"field","required":false,"description":"Filter on a field of a typed queue's json_data, as <path>:<operator>[:<value>] (e.g. $.invoice.amount:gte:5000). Repeat the param to require several; all must match, so two comparisons on one path express a range. Operators: equals, notEquals, in, notIn, gt, gte, lt, lte, contains, isSet, isNotSet. in/notIn take a comma-separated list; isSet/isNotSet take no value. A value is typed by shape (5000 is a number, true a boolean, 00123 a string so a leading zero survives). A path the queue's Case schema does not declare is rejected rather than ignored."},{"schema":{"default":"false","type":"string","enum":["true","false"]},"in":"query","name":"count_only","required":false,"description":"Skip row selection and enrichment. The normal list response shape is returned with an empty row array and the matching total."},{"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"},"json_data":{"nullable":true,"type":"object","additionalProperties":{}},"json_schema_id":{"nullable":true,"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","completed","failed"]},"priority":{"type":"string","enum":["none","medium","high"]},"display_status":{"type":"string","enum":["pending","in_progress","needs_input","postponed","evaluating","success","issues","completed","failed","canceled"]},"outcome_source":{"nullable":true,"type":"string","enum":["system","eval","manual"]},"outcome_severity":{"nullable":true,"type":"string","enum":["critical","medium","low"]},"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_human_request_type":{"description":"Type of the pending human request: 'approval' for a decision, 'question' for an answer, 'credentials' for a login, or 'input' on a module's sample cases. Null when nothing is waiting.","nullable":true,"type":"string"},"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},"eval_summary":{"nullable":true,"type":"object","properties":{"evaluationId":{"type":"string","format":"uuid"},"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},"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}},"source_automation_revision_id":{"description":"The automation revision that produced the case. It never changes. Null when no Run created the case (added through the API or an import, or created before automation revisions), and on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision_id":{"description":"The automation revision that handles the case. It is set when a Run creates the case, set again to the revision that runs the case when a Run claims it, and otherwise changes only when an activation moves waiting cases. For a case that no Run created, null until a Run claims it or an activation moves it. Null on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision":{"description":"The handling revision, resolved. Null when the case has no handling revision.","nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The handling revision's ID."},"status":{"type":"string","enum":["draft","live","historic"],"description":"The revision's lifecycle status. A discarded draft, or a revision that no longer exists, reads as `draft`."},"revision_number":{"nullable":true,"description":"The revision's number. Null for a draft, which is numbered only when it is activated.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"nullable":true,"description":"The revision's name, if it has one.","type":"string"},"is_live":{"type":"boolean","description":"Whether this is the automation's live revision right now."},"hold_reason":{"description":"Why the waiting case is held, or null when it is not. A case pinned to an older revision, or to one of another automation, waits rather than running on the live revision when that revision cannot run it. Running it on the live revision, failing it, or fixing the cause releases it.","nullable":true,"type":"string","enum":["queue_left_automation","queue_not_in_revision","queue_unrouted","agent_deleted","agent_moved","agent_not_bound","build_deleted","route_switched_off","draft_discarded"]}},"required":["id","status","revision_number","name","is_live"],"additionalProperties":false},"blocker":{"description":"Why the waiting case cannot start right now, when its Queue's setup_status does not already say so. Null when the case is not waiting or nothing blocks it. Present only when the read set include_blockers and the feature is enabled for the team.","nullable":true,"type":"object","properties":{"reason":{"type":"string","description":"`connection_missing` or `connection_broken` when a Connection the case's Agent needs cannot be used for the person the case runs as; `pinned_draft` when the case is pinned to a draft that cannot run it; `assigned_agent_not_ready` when the Agent the case is assigned to has no Build to run.","x-extensible-enum":["connection_missing","connection_broken","pinned_draft","assigned_agent_not_ready"]},"agent":{"nullable":true,"description":"The Agent the case would run on. Null when a draft routes the case to no Agent.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."},"runner":{"nullable":true,"description":"The person whose Connections the case's run uses. Null when the reason does not depend on Connections.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The person's user ID."},"name":{"type":"string","description":"The person's name."}},"required":["id","name"],"additionalProperties":false}},"required":["reason","agent","connections","runner"],"additionalProperties":false}},"required":["id","queue_id","title","data","status","priority","display_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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 takes a title (max 500 chars), optional labels that will be assigned to the case on creation (missing labels are created on the queue), and an optional priority (`none`, `medium`, or `high`; `medium`/`high` raise it above the default in the queue, `none` is the default; priority only affects the order pending cases are picked up in: due postponed cases are handled first, then higher priority). For the case payload, send free-form `data` OR a structured `json_data` object, never both, and a single request must be all free-text or all structured. `json_data` is validated against the queue's Case schema and requires the queue to have one; a schema-guarded queue accepts only `json_data`, while a queue without the guard also accepts free-text `data`. A guarded queue that has no schema yet accepts free-text `data` only when typed Case schemas are off for that queue — the team has them turned off AND the queue is not inside an automation (there is then no way to declare a schema, so the guard cannot apply). A queue inside an automation always has them on, so a guarded one refuses free-text `data` until its schema is declared.","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; Agents receive this on claim.","type":"string"},"json_data":{"description":"Structured payload for a queue that has a Case schema. Validated against that schema and mutually exclusive with `data` — send this instead of free-text `data` on a schema-guarded queue. Within one request, either every case is structured or every case is free-text.","type":"object","additionalProperties":{}},"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"]}},"priority":{"description":"Case priority. `medium` or `high` raise the case above the default in the queue; omit (or `none`) for normal priority. Only set this when the AOP or the user explicitly instructs prioritization — do not infer it on your own.","type":"string","enum":["none","medium","high"]}},"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; Agents receive this on claim.","type":"string"},"json_data":{"description":"Structured payload for a queue that has a Case schema. Validated against that schema and mutually exclusive with `data` — send this instead of free-text `data` on a schema-guarded queue. Within one request, either every case is structured or every case is free-text.","type":"object","additionalProperties":{}},"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"]}},"priority":{"description":"Case priority. `medium` or `high` raise the case above the default in the queue; omit (or `none`) for normal priority. Only set this when the AOP or the user explicitly instructs prioritization — do not infer it on your own.","type":"string","enum":["none","medium","high"]}},"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"},"json_data":{"nullable":true,"type":"object","additionalProperties":{}},"json_schema_id":{"nullable":true,"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","completed","failed"]},"priority":{"type":"string","enum":["none","medium","high"]},"display_status":{"type":"string","enum":["pending","in_progress","needs_input","postponed","evaluating","success","issues","completed","failed","canceled"]},"outcome_source":{"nullable":true,"type":"string","enum":["system","eval","manual"]},"outcome_severity":{"nullable":true,"type":"string","enum":["critical","medium","low"]},"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_human_request_type":{"description":"Type of the pending human request: 'approval' for a decision, 'question' for an answer, 'credentials' for a login, or 'input' on a module's sample cases. Null when nothing is waiting.","nullable":true,"type":"string"},"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},"eval_summary":{"nullable":true,"type":"object","properties":{"evaluationId":{"type":"string","format":"uuid"},"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},"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}},"source_automation_revision_id":{"description":"The automation revision that produced the case. It never changes. Null when no Run created the case (added through the API or an import, or created before automation revisions), and on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision_id":{"description":"The automation revision that handles the case. It is set when a Run creates the case, set again to the revision that runs the case when a Run claims it, and otherwise changes only when an activation moves waiting cases. For a case that no Run created, null until a Run claims it or an activation moves it. Null on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision":{"description":"The handling revision, resolved. Null when the case has no handling revision.","nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The handling revision's ID."},"status":{"type":"string","enum":["draft","live","historic"],"description":"The revision's lifecycle status. A discarded draft, or a revision that no longer exists, reads as `draft`."},"revision_number":{"nullable":true,"description":"The revision's number. Null for a draft, which is numbered only when it is activated.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"nullable":true,"description":"The revision's name, if it has one.","type":"string"},"is_live":{"type":"boolean","description":"Whether this is the automation's live revision right now."},"hold_reason":{"description":"Why the waiting case is held, or null when it is not. A case pinned to an older revision, or to one of another automation, waits rather than running on the live revision when that revision cannot run it. Running it on the live revision, failing it, or fixing the cause releases it.","nullable":true,"type":"string","enum":["queue_left_automation","queue_not_in_revision","queue_unrouted","agent_deleted","agent_moved","agent_not_bound","build_deleted","route_switched_off","draft_discarded"]}},"required":["id","status","revision_number","name","is_live"],"additionalProperties":false},"blocker":{"description":"Why the waiting case cannot start right now, when its Queue's setup_status does not already say so. Null when the case is not waiting or nothing blocks it. Present only when the read set include_blockers and the feature is enabled for the team.","nullable":true,"type":"object","properties":{"reason":{"type":"string","description":"`connection_missing` or `connection_broken` when a Connection the case's Agent needs cannot be used for the person the case runs as; `pinned_draft` when the case is pinned to a draft that cannot run it; `assigned_agent_not_ready` when the Agent the case is assigned to has no Build to run.","x-extensible-enum":["connection_missing","connection_broken","pinned_draft","assigned_agent_not_ready"]},"agent":{"nullable":true,"description":"The Agent the case would run on. Null when a draft routes the case to no Agent.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."},"runner":{"nullable":true,"description":"The person whose Connections the case's run uses. Null when the reason does not depend on Connections.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The person's user ID."},"name":{"type":"string","description":"The person's name."}},"required":["id","name"],"additionalProperties":false}},"required":["reason","agent","connections","runner"],"additionalProperties":false}},"required":["id","queue_id","title","data","status","priority","display_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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The queue dispatches to an agent, and adding the request's cases would put it past the most pending cases it may hold; none of them were added. Retry once its agent has worked through the backlog, or send fewer cases.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false,"description":"The queue dispatches to an agent, and adding the request's cases would put it past the most pending cases it may hold; none of them were added. Retry once its agent has worked through the backlog, or send fewer cases."}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Cases","deprecated":true}},"/v1/queues/{queue_id}/cases/export":{"post":{"operationId":"exportCases","tags":["Cases UI"],"description":"Export a queue's cases, respecting the same status, severity, failure source, approval, priority, label, date-range, json_data field, and free-text filters as the list view. Set awaiting_my_approval to export only the cases holding an unanswered approval row assigned to you; like the list view it resolves to the authenticated caller, so a credential with no user behind it is rejected rather than exporting an empty file. `format: \"json\"` (default) returns a re-importable JSON payload; `format: \"csv\"` returns a text/csv file with the columns id, title, status, priority, labels, created_at, updated_at, completed_at, postponed_to, data.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"default":"json","type":"string","enum":["json","csv"]},"filters":{"default":{},"type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["all","pending","processing","needs_input","postponed","needs_review","resolved","canceled","claimed","completed","failed"]}},"issue_severity":{"type":"array","items":{"type":"string","enum":["critical","medium"]}},"failure_source":{"description":"Keep only failed Cases, by who failed them: `system` when Duvo could not finish the Case, `manual` when a person marked it failed.","type":"array","items":{"type":"string","enum":["system","manual"]}},"awaiting_my_approval":{"type":"boolean"},"priority":{"type":"array","items":{"type":"string","enum":["none","medium","high"]}},"created_at_from":{"type":"string"},"created_at_to":{"type":"string"},"updated_at_from":{"type":"string"},"updated_at_to":{"type":"string"},"completed_at_from":{"description":"Keep Cases that reached an outcome at or after this time (inclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"completed_at_to":{"description":"Keep Cases that reached an outcome before this time (exclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"labels":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"json_data":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"operator":{"type":"string","enum":["equals","notEquals","in","notIn","gt","gte","lt","lte","contains","isSet","isNotSet"]},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]}},"required":["path","operator"],"additionalProperties":false}}}},"search":{"type":"string"},"sort_by":{"default":"created_at","type":"string","enum":["created_at","updated_at","postponed_to"]},"sort_order":{"default":"asc","type":"string","enum":["asc","desc"]}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"version":{"type":"number"},"queue_name":{"type":"string"},"exported_at":{"type":"string"},"cases":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"data":{"type":"string"},"priority":{"type":"string","enum":["none","medium","high"]}},"required":["title"],"additionalProperties":false}}},"required":["version","queue_name","exported_at","cases"],"additionalProperties":false},{"type":"string"}]}}}},"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}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Export 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","enum":["true","false"]},"in":"query","name":"include_blockers","required":false,"description":"Also return `blocker` on each case: for a case waiting to start, why the dispatcher cannot start it now, or null when nothing blocks it. Off by default, because it adds database reads; when off, `blocker` is left out."},{"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"},"json_data":{"nullable":true,"type":"object","additionalProperties":{}},"json_schema_id":{"nullable":true,"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","completed","failed"]},"priority":{"type":"string","enum":["none","medium","high"]},"display_status":{"type":"string","enum":["pending","in_progress","needs_input","postponed","evaluating","success","issues","completed","failed","canceled"]},"outcome_source":{"nullable":true,"type":"string","enum":["system","eval","manual"]},"outcome_severity":{"nullable":true,"type":"string","enum":["critical","medium","low"]},"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_human_request_type":{"description":"Type of the pending human request: 'approval' for a decision, 'question' for an answer, 'credentials' for a login, or 'input' on a module's sample cases. Null when nothing is waiting.","nullable":true,"type":"string"},"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},"eval_summary":{"nullable":true,"type":"object","properties":{"evaluationId":{"type":"string","format":"uuid"},"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},"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}},"source_automation_revision_id":{"description":"The automation revision that produced the case. It never changes. Null when no Run created the case (added through the API or an import, or created before automation revisions), and on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision_id":{"description":"The automation revision that handles the case. It is set when a Run creates the case, set again to the revision that runs the case when a Run claims it, and otherwise changes only when an activation moves waiting cases. For a case that no Run created, null until a Run claims it or an activation moves it. Null on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision":{"description":"The handling revision, resolved. Null when the case has no handling revision.","nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The handling revision's ID."},"status":{"type":"string","enum":["draft","live","historic"],"description":"The revision's lifecycle status. A discarded draft, or a revision that no longer exists, reads as `draft`."},"revision_number":{"nullable":true,"description":"The revision's number. Null for a draft, which is numbered only when it is activated.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"nullable":true,"description":"The revision's name, if it has one.","type":"string"},"is_live":{"type":"boolean","description":"Whether this is the automation's live revision right now."},"hold_reason":{"description":"Why the waiting case is held, or null when it is not. A case pinned to an older revision, or to one of another automation, waits rather than running on the live revision when that revision cannot run it. Running it on the live revision, failing it, or fixing the cause releases it.","nullable":true,"type":"string","enum":["queue_left_automation","queue_not_in_revision","queue_unrouted","agent_deleted","agent_moved","agent_not_bound","build_deleted","route_switched_off","draft_discarded"]}},"required":["id","status","revision_number","name","is_live"],"additionalProperties":false},"blocker":{"description":"Why the waiting case cannot start right now, when its Queue's setup_status does not already say so. Null when the case is not waiting or nothing blocks it. Present only when the read set include_blockers and the feature is enabled for the team.","nullable":true,"type":"object","properties":{"reason":{"type":"string","description":"`connection_missing` or `connection_broken` when a Connection the case's Agent needs cannot be used for the person the case runs as; `pinned_draft` when the case is pinned to a draft that cannot run it; `assigned_agent_not_ready` when the Agent the case is assigned to has no Build to run.","x-extensible-enum":["connection_missing","connection_broken","pinned_draft","assigned_agent_not_ready"]},"agent":{"nullable":true,"description":"The Agent the case would run on. Null when a draft routes the case to no Agent.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."},"runner":{"nullable":true,"description":"The person whose Connections the case's run uses. Null when the reason does not depend on Connections.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The person's user ID."},"name":{"type":"string","description":"The person's name."}},"required":["id","name"],"additionalProperties":false}},"required":["reason","agent","connections","runner"],"additionalProperties":false}},"required":["id","queue_id","title","data","status","priority","display_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"},"actor_user_id":{"default":null,"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"},"agent_type":{"default":null,"nullable":true,"type":"string","enum":["agent","code"],"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation — a step's builds all belong to the matching config family."},"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","actor_user_id","type","reason","created_at","agent_id","agent_name","agent_type","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"},"can_respond":{"description":"Whether the authenticated viewer can answer this pending case approval. Submission rechecks authorization.","type":"boolean"},"assignee_name":{"nullable":true,"type":"string"},"assignee_email":{"nullable":true,"type":"string"},"prompt":{"type":"string"},"resolution":{"description":"Written resolution submitted with this decision.","nullable":true,"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}},"scopedApprovalBatches":{"description":"Approval batches with Run references redacted for Process-scoped access. When present, use this field instead of approvalBatches, which is empty for these callers.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"case_queue_item_id":{"type":"string","format":"uuid"},"agent_run_id":{"type":"string","nullable":true,"enum":[null]},"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"},"can_respond":{"description":"Whether the authenticated viewer can answer this pending case approval. Submission rechecks authorization.","type":"boolean"},"assignee_name":{"nullable":true,"type":"string"},"assignee_email":{"nullable":true,"type":"string"},"prompt":{"type":"string"},"resolution":{"description":"Written resolution submitted with this decision.","nullable":true,"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}},"attachments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"case_id":{"type":"string","format":"uuid"},"filename":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","ready","failed"]},"failure_reason":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["user","agent"]},"uploaded_by_user_id":{"type":"string","format":"uuid"},"agent_run_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"}},"required":["id","case_id","filename","mime_type","size_bytes","status","failure_reason","source","uploaded_by_user_id","agent_run_id","created_at"],"additionalProperties":false}}},"required":["case","events","approvalBatches","attachments"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Case","deprecated":true},"patch":{"operationId":"updateCase","tags":["Cases"],"description":"Edit a case's title and/or its data payload. Provide at least one field. For the payload, send free-form `data` OR a structured `json_data` object, never both. `json_data` is validated against the queue's Case schema and requires the queue to have one; a case that is already typed against a schema keeps its structured payload and rejects a free-text `data` write. Works on pending, in-progress, and settled cases. Other attributes (status, priority, labels) have their own dedicated endpoints. Returns the updated case with its event history and approval batches.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"New case title (1–500 characters).","type":"string","minLength":1,"maxLength":500},"data":{"description":"New free-form data payload handed to the agent when the case is claimed. Mutually exclusive with `json_data`.","type":"string"},"json_data":{"description":"New structured payload for a case on a queue that has a Case schema. Validated against that schema and mutually exclusive with `data`.","type":"object","additionalProperties":{}}}}}}},"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"},"json_data":{"nullable":true,"type":"object","additionalProperties":{}},"json_schema_id":{"nullable":true,"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","completed","failed"]},"priority":{"type":"string","enum":["none","medium","high"]},"display_status":{"type":"string","enum":["pending","in_progress","needs_input","postponed","evaluating","success","issues","completed","failed","canceled"]},"outcome_source":{"nullable":true,"type":"string","enum":["system","eval","manual"]},"outcome_severity":{"nullable":true,"type":"string","enum":["critical","medium","low"]},"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_human_request_type":{"description":"Type of the pending human request: 'approval' for a decision, 'question' for an answer, 'credentials' for a login, or 'input' on a module's sample cases. Null when nothing is waiting.","nullable":true,"type":"string"},"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},"eval_summary":{"nullable":true,"type":"object","properties":{"evaluationId":{"type":"string","format":"uuid"},"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},"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}},"source_automation_revision_id":{"description":"The automation revision that produced the case. It never changes. Null when no Run created the case (added through the API or an import, or created before automation revisions), and on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision_id":{"description":"The automation revision that handles the case. It is set when a Run creates the case, set again to the revision that runs the case when a Run claims it, and otherwise changes only when an activation moves waiting cases. For a case that no Run created, null until a Run claims it or an activation moves it. Null on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision":{"description":"The handling revision, resolved. Null when the case has no handling revision.","nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The handling revision's ID."},"status":{"type":"string","enum":["draft","live","historic"],"description":"The revision's lifecycle status. A discarded draft, or a revision that no longer exists, reads as `draft`."},"revision_number":{"nullable":true,"description":"The revision's number. Null for a draft, which is numbered only when it is activated.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"nullable":true,"description":"The revision's name, if it has one.","type":"string"},"is_live":{"type":"boolean","description":"Whether this is the automation's live revision right now."},"hold_reason":{"description":"Why the waiting case is held, or null when it is not. A case pinned to an older revision, or to one of another automation, waits rather than running on the live revision when that revision cannot run it. Running it on the live revision, failing it, or fixing the cause releases it.","nullable":true,"type":"string","enum":["queue_left_automation","queue_not_in_revision","queue_unrouted","agent_deleted","agent_moved","agent_not_bound","build_deleted","route_switched_off","draft_discarded"]}},"required":["id","status","revision_number","name","is_live"],"additionalProperties":false},"blocker":{"description":"Why the waiting case cannot start right now, when its Queue's setup_status does not already say so. Null when the case is not waiting or nothing blocks it. Present only when the read set include_blockers and the feature is enabled for the team.","nullable":true,"type":"object","properties":{"reason":{"type":"string","description":"`connection_missing` or `connection_broken` when a Connection the case's Agent needs cannot be used for the person the case runs as; `pinned_draft` when the case is pinned to a draft that cannot run it; `assigned_agent_not_ready` when the Agent the case is assigned to has no Build to run.","x-extensible-enum":["connection_missing","connection_broken","pinned_draft","assigned_agent_not_ready"]},"agent":{"nullable":true,"description":"The Agent the case would run on. Null when a draft routes the case to no Agent.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."},"runner":{"nullable":true,"description":"The person whose Connections the case's run uses. Null when the reason does not depend on Connections.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The person's user ID."},"name":{"type":"string","description":"The person's name."}},"required":["id","name"],"additionalProperties":false}},"required":["reason","agent","connections","runner"],"additionalProperties":false}},"required":["id","queue_id","title","data","status","priority","display_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"},"actor_user_id":{"default":null,"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"},"agent_type":{"default":null,"nullable":true,"type":"string","enum":["agent","code"],"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation — a step's builds all belong to the matching config family."},"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","actor_user_id","type","reason","created_at","agent_id","agent_name","agent_type","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"},"can_respond":{"description":"Whether the authenticated viewer can answer this pending case approval. Submission rechecks authorization.","type":"boolean"},"assignee_name":{"nullable":true,"type":"string"},"assignee_email":{"nullable":true,"type":"string"},"prompt":{"type":"string"},"resolution":{"description":"Written resolution submitted with this decision.","nullable":true,"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}},"scopedApprovalBatches":{"description":"Approval batches with Run references redacted for Process-scoped access. When present, use this field instead of approvalBatches, which is empty for these callers.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"case_queue_item_id":{"type":"string","format":"uuid"},"agent_run_id":{"type":"string","nullable":true,"enum":[null]},"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"},"can_respond":{"description":"Whether the authenticated viewer can answer this pending case approval. Submission rechecks authorization.","type":"boolean"},"assignee_name":{"nullable":true,"type":"string"},"assignee_email":{"nullable":true,"type":"string"},"prompt":{"type":"string"},"resolution":{"description":"Written resolution submitted with this decision.","nullable":true,"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}},"attachments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"case_id":{"type":"string","format":"uuid"},"filename":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","ready","failed"]},"failure_reason":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["user","agent"]},"uploaded_by_user_id":{"type":"string","format":"uuid"},"agent_run_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"}},"required":["id","case_id","filename","mime_type","size_bytes","status","failure_reason","source","uploaded_by_user_id","agent_run_id","created_at"],"additionalProperties":false}}},"required":["case","events","approvalBatches","attachments"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Case","deprecated":true},"delete":{"operationId":"deleteCase","tags":["Cases"],"description":"Delete a case. Interrupts any associated active runs 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Case","deprecated":true}},"/v1/cases/{case_id}/json-data":{"patch":{"operationId":"setCaseJsonDataFields","tags":["Cases"],"description":"Set one or more fields of a typed case's structured `json_data` payload in one atomic write, leaving every other field as stored. Prefer this over `PATCH /cases/{case_id}` with a full `json_data` object when changing some fields: the write reads and locks the latest payload in the database, so a concurrent edit to another field, or to another item of the same array, is preserved. Each `set` entry names a `path`, a JSONPath declared in the queue's current Case schema, and the `value` to store there. A path is dotted object fields (`$.invoice.amount`) with optional array indices in brackets (`$.lines[0]` for a whole item, `$.lines[0].amount` for one field of it). An index must name an item that already exists; an out-of-range index or a non-array parent is refused, and a write never adds or removes items. A `value` can be any JSON value, including an object for an object field. Paths must be distinct, and no path may sit inside another in the same request (`$.lines` beside `$.lines[0]`, or `$.lines[0]` beside `$.lines[0].amount`). An index names a position, so when the array can change between your read and your write, add `expect` entries that pin the item, such as its id field (`$.lines[0].id`): if any stored value differs, nothing is written and the response is a 409. The resulting payload is validated against the queue's current Case schema and the case is re-pinned to that schema version; if any entry is refused, nothing is written. A case without a structured payload yet must be given one with `PATCH /cases/{case_id}` first. Returns the updated case with its event history and approval batches.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"set":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSONPath of the field to set, starting at `$`: dotted fields with optional array indices (e.g. `$.invoice.amount` or `$.lines[0].amount`). Must be declared in the queue's current Case schema, and an index must name an existing item."},"value":{"$ref":"#/components/schemas/CaseJsonDataValueInput"}},"required":["path","value"],"additionalProperties":false},"description":"The fields to set, applied together (1 to 100)."},"expect":{"description":"Preconditions checked against the latest stored payload before any field is set (up to 100). If one does not match, nothing is written and the response is a 409. Use them to make sure an array index still names the item you read.","maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSONPath of a stored value to check, in the same form as a `set` path (e.g. `$.lines[0].id`). Must be declared in the queue's current Case schema."},"value":{"$ref":"#/components/schemas/CaseJsonDataValueInput"}},"required":["path","value"],"additionalProperties":false}}},"required":["set"],"additionalProperties":false}}}},"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"},"json_data":{"nullable":true,"type":"object","additionalProperties":{}},"json_schema_id":{"nullable":true,"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","completed","failed"]},"priority":{"type":"string","enum":["none","medium","high"]},"display_status":{"type":"string","enum":["pending","in_progress","needs_input","postponed","evaluating","success","issues","completed","failed","canceled"]},"outcome_source":{"nullable":true,"type":"string","enum":["system","eval","manual"]},"outcome_severity":{"nullable":true,"type":"string","enum":["critical","medium","low"]},"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_human_request_type":{"description":"Type of the pending human request: 'approval' for a decision, 'question' for an answer, 'credentials' for a login, or 'input' on a module's sample cases. Null when nothing is waiting.","nullable":true,"type":"string"},"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},"eval_summary":{"nullable":true,"type":"object","properties":{"evaluationId":{"type":"string","format":"uuid"},"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},"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}},"source_automation_revision_id":{"description":"The automation revision that produced the case. It never changes. Null when no Run created the case (added through the API or an import, or created before automation revisions), and on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision_id":{"description":"The automation revision that handles the case. It is set when a Run creates the case, set again to the revision that runs the case when a Run claims it, and otherwise changes only when an activation moves waiting cases. For a case that no Run created, null until a Run claims it or an activation moves it. Null on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision":{"description":"The handling revision, resolved. Null when the case has no handling revision.","nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The handling revision's ID."},"status":{"type":"string","enum":["draft","live","historic"],"description":"The revision's lifecycle status. A discarded draft, or a revision that no longer exists, reads as `draft`."},"revision_number":{"nullable":true,"description":"The revision's number. Null for a draft, which is numbered only when it is activated.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"nullable":true,"description":"The revision's name, if it has one.","type":"string"},"is_live":{"type":"boolean","description":"Whether this is the automation's live revision right now."},"hold_reason":{"description":"Why the waiting case is held, or null when it is not. A case pinned to an older revision, or to one of another automation, waits rather than running on the live revision when that revision cannot run it. Running it on the live revision, failing it, or fixing the cause releases it.","nullable":true,"type":"string","enum":["queue_left_automation","queue_not_in_revision","queue_unrouted","agent_deleted","agent_moved","agent_not_bound","build_deleted","route_switched_off","draft_discarded"]}},"required":["id","status","revision_number","name","is_live"],"additionalProperties":false},"blocker":{"description":"Why the waiting case cannot start right now, when its Queue's setup_status does not already say so. Null when the case is not waiting or nothing blocks it. Present only when the read set include_blockers and the feature is enabled for the team.","nullable":true,"type":"object","properties":{"reason":{"type":"string","description":"`connection_missing` or `connection_broken` when a Connection the case's Agent needs cannot be used for the person the case runs as; `pinned_draft` when the case is pinned to a draft that cannot run it; `assigned_agent_not_ready` when the Agent the case is assigned to has no Build to run.","x-extensible-enum":["connection_missing","connection_broken","pinned_draft","assigned_agent_not_ready"]},"agent":{"nullable":true,"description":"The Agent the case would run on. Null when a draft routes the case to no Agent.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."},"runner":{"nullable":true,"description":"The person whose Connections the case's run uses. Null when the reason does not depend on Connections.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The person's user ID."},"name":{"type":"string","description":"The person's name."}},"required":["id","name"],"additionalProperties":false}},"required":["reason","agent","connections","runner"],"additionalProperties":false}},"required":["id","queue_id","title","data","status","priority","display_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"},"actor_user_id":{"default":null,"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"},"agent_type":{"default":null,"nullable":true,"type":"string","enum":["agent","code"],"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation — a step's builds all belong to the matching config family."},"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","actor_user_id","type","reason","created_at","agent_id","agent_name","agent_type","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"},"can_respond":{"description":"Whether the authenticated viewer can answer this pending case approval. Submission rechecks authorization.","type":"boolean"},"assignee_name":{"nullable":true,"type":"string"},"assignee_email":{"nullable":true,"type":"string"},"prompt":{"type":"string"},"resolution":{"description":"Written resolution submitted with this decision.","nullable":true,"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}},"scopedApprovalBatches":{"description":"Approval batches with Run references redacted for Process-scoped access. When present, use this field instead of approvalBatches, which is empty for these callers.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"case_queue_item_id":{"type":"string","format":"uuid"},"agent_run_id":{"type":"string","nullable":true,"enum":[null]},"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"},"can_respond":{"description":"Whether the authenticated viewer can answer this pending case approval. Submission rechecks authorization.","type":"boolean"},"assignee_name":{"nullable":true,"type":"string"},"assignee_email":{"nullable":true,"type":"string"},"prompt":{"type":"string"},"resolution":{"description":"Written resolution submitted with this decision.","nullable":true,"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}},"attachments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"case_id":{"type":"string","format":"uuid"},"filename":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","ready","failed"]},"failure_reason":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["user","agent"]},"uploaded_by_user_id":{"type":"string","format":"uuid"},"agent_run_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"}},"required":["id","case_id","filename","mime_type","size_bytes","status","failure_reason","source","uploaded_by_user_id","agent_run_id","created_at"],"additionalProperties":false}}},"required":["case","events","approvalBatches","attachments"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Set Case Json Data Fields","deprecated":true}},"/v1/cases/{case_id}/runs":{"get":{"operationId":"listCaseRuns","tags":["Cases"],"description":"List Runs (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"},"agent_type":{"type":"string","enum":["agent","code"],"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation — a step's builds all belong to the matching config family."},"status":{"type":"string","enum":["not_started","pending","starting","running","waiting","completed","failed","interrupted","expired"]},"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":{"evaluationId":{"type":"string","format":"uuid"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 Run on a case, newest last. Used to populate the live body of an active Run 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":{"allOf":[{"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"},"ui_resource":{"type":"object","properties":{"snapshot_id":{"type":"string","format":"uuid"},"resource_uri":{"type":"string"},"mime_type":{"type":"string"},"server_identity":{"type":"string"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["snapshot_id","resource_uri","mime_type","server_identity","size_bytes"],"additionalProperties":false}},"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_recovered"]},{"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_recovered"]},{"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_recovered"]},"attempt":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxAttempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"cause":{"type":"string"}},"required":["type","attempt","maxAttempts","cause"],"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_recovered"]},{"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"]},"phases":{"type":"object","properties":{"setupMs":{"type":"number"},"preflightMs":{"type":"number"},"warmupMs":{"nullable":true,"type":"number"},"warmupOutcome":{"type":"string","enum":["warmed","skipped","failed"]},"modelTtftMs":{"type":"number"},"firstTokenMs":{"type":"number"},"initMs":{"type":"number"},"firstMessageTimeouts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false},"runMetrics":{"type":"object","properties":{"toolCallCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"toolCallDurationMsSum":{"type":"number","minimum":0},"retryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"stepCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"type":"number","minimum":0},"totalCostUsd":{"type":"number","minimum":0},"model":{"type":"string"},"modelRequestCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"peakContextTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"toolSearchCallCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"searchOnlyRequestCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"toolCallsByServer":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"toolSearches":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"servers":{"type":"array","items":{"type":"string"}},"queryKind":{"type":"string","enum":["select","keyword"]},"durationMs":{"type":"number","minimum":0},"results":{"type":"integer","minimum":0,"maximum":9007199254740991},"repeat":{"type":"boolean"}},"required":["queryKind","repeat"],"additionalProperties":false}},"deferredToolSchemaErrors":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"compactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokenUsageByModel":{"type":"object","additionalProperties":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheReadTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheWriteTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["inputTokens","outputTokens","cacheReadTokens","cacheWriteTokens"],"additionalProperties":false}},"tokenUsage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheReadTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheWriteTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"additionalProperties":false},"sessionEnd":{"type":"object","properties":{"endReason":{"type":"string"},"resultSubtype":{"type":"string"},"stopReason":{"nullable":true,"type":"string"},"terminalReason":{"nullable":true,"type":"string"},"isError":{"type":"boolean"},"numTurns":{"type":"number"},"apiDurationMs":{"type":"number"},"messageCount":{"type":"number"},"lastMessageType":{"type":"string"},"pendingToolUseCount":{"type":"number"},"suspectedTruncation":{"type":"boolean"},"streamRecoveryAttempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"severedTerminalTurn":{"type":"boolean"}},"additionalProperties":false}},"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_recovered"]},{"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_recovered"]},{"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_recovered"]},{"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_recovered"]},{"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"},"phases":{"type":"object","properties":{"setupMs":{"type":"number"},"preflightMs":{"type":"number"},"warmupMs":{"nullable":true,"type":"number"},"warmupOutcome":{"type":"string","enum":["warmed","skipped","failed"]},"modelTtftMs":{"type":"number"},"firstTokenMs":{"type":"number"},"initMs":{"type":"number"},"firstMessageTimeouts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false},"runMetrics":{"type":"object","properties":{"toolCallCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"toolCallDurationMsSum":{"type":"number","minimum":0},"retryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"stepCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"durationMs":{"type":"number","minimum":0},"totalCostUsd":{"type":"number","minimum":0},"model":{"type":"string"},"modelRequestCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"peakContextTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"toolSearchCallCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"searchOnlyRequestCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"toolCallsByServer":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"toolSearches":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"servers":{"type":"array","items":{"type":"string"}},"queryKind":{"type":"string","enum":["select","keyword"]},"durationMs":{"type":"number","minimum":0},"results":{"type":"integer","minimum":0,"maximum":9007199254740991},"repeat":{"type":"boolean"}},"required":["queryKind","repeat"],"additionalProperties":false}},"deferredToolSchemaErrors":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"compactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"tokenUsageByModel":{"type":"object","additionalProperties":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheReadTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheWriteTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["inputTokens","outputTokens","cacheReadTokens","cacheWriteTokens"],"additionalProperties":false}},"tokenUsage":{"type":"object","properties":{"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheReadTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheWriteTokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"additionalProperties":false},"sessionEnd":{"type":"object","properties":{"endReason":{"type":"string"},"resultSubtype":{"type":"string"},"stopReason":{"nullable":true,"type":"string"},"terminalReason":{"nullable":true,"type":"string"},"isError":{"type":"boolean"},"numTurns":{"type":"number"},"apiDurationMs":{"type":"number"},"messageCount":{"type":"number"},"lastMessageType":{"type":"string"},"pendingToolUseCount":{"type":"number"},"suspectedTruncation":{"type":"boolean"},"streamRecoveryAttempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"severedTerminalTurn":{"type":"boolean"}},"additionalProperties":false}},"required":["type","error"],"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":{"type":"string","enum":["artifact_applied"]}},"required":["id","runtime","timestamp","role","type"],"additionalProperties":false},{"type":"object","properties":{"artifact":{"type":"object","properties":{"kind":{"type":"string","enum":["pulse_html","clarity_process_patch","agent_aop_markdown"]},"owner_entity_id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"applied_version_ref":{"type":"string","minLength":1},"summary":{"nullable":true,"type":"string"},"ui_resource":{"type":"object","properties":{"snapshot_id":{"type":"string","format":"uuid"},"resource_uri":{"type":"string"},"mime_type":{"type":"string"},"server_identity":{"type":"string"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["snapshot_id","resource_uri","mime_type","server_identity","size_bytes"],"additionalProperties":false}},"required":["kind","owner_entity_id","team_id","applied_version_ref","summary"],"additionalProperties":false}},"required":["artifact"],"additionalProperties":false}]},{"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":{"type":"string","enum":["classifier_decision"]},"tool_call_id":{"type":"string"},"tool_name":{"type":"string"},"decision":{"anyOf":[{"type":"string","enum":["allowed"]},{"type":"string","enum":["denied"]},{"type":"string","enum":["ask"]}]},"decided_by":{"anyOf":[{"type":"string","enum":["classifier"]},{"type":"string","enum":["user"]}]},"reason":{"type":"string"},"human_request_id":{"type":"string"}},"required":["id","runtime","timestamp","role","type","tool_call_id","tool_name","decision","decided_by"],"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":["system"]},"role":{"type":"string","enum":["system"]},"system_event":{"type":"string","enum":["context_compacted"]},"compaction":{"type":"object","properties":{"trigger":{"anyOf":[{"type":"string","enum":["auto"]},{"type":"string","enum":["manual"]}]},"pre_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"post_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["trigger","pre_tokens"],"additionalProperties":false}},"required":["type","role","system_event","compaction"],"additionalProperties":false}]},{"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":{"type":"string","enum":["code_step_output"]},"stream":{"anyOf":[{"type":"string","enum":["stdout"]},{"type":"string","enum":["stderr"]}]},"text_content":{"type":"string"},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","runtime","timestamp","role","type","stream","text_content","offset"],"additionalProperties":false},{"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":{"type":"string","enum":["computer_waiting"]},"text_content":{"type":"string"}},"required":["id","runtime","timestamp","role","type","text_content"],"additionalProperties":false},{"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":{"type":"string","enum":["computer_waiting_ended"]}},"required":["id","runtime","timestamp","role","type"],"additionalProperties":false}]},{"type":"object","properties":{"created_at":{"type":"string"}},"additionalProperties":false}]}}},"required":["messages"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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":{"description":"Explicit case IDs to act on (1-100). Provide this or set all_matching.","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}},"all_matching":{"description":"When true, act on every case matching the provided filters/search instead of an explicit id list.","type":"boolean"},"filters":{"description":"Filters selecting the cases when all_matching is true.","type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["all","pending","processing","needs_input","postponed","needs_review","resolved","canceled","claimed","completed","failed"]}},"issue_severity":{"type":"array","items":{"type":"string","enum":["critical","medium"]}},"failure_source":{"description":"Keep only failed Cases, by who failed them: `system` when Duvo could not finish the Case, `manual` when a person marked it failed.","type":"array","items":{"type":"string","enum":["system","manual"]}},"awaiting_my_approval":{"type":"boolean"},"priority":{"type":"array","items":{"type":"string","enum":["none","medium","high"]}},"created_at_from":{"type":"string"},"created_at_to":{"type":"string"},"updated_at_from":{"type":"string"},"updated_at_to":{"type":"string"},"completed_at_from":{"description":"Keep Cases that reached an outcome at or after this time (inclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"completed_at_to":{"description":"Keep Cases that reached an outcome before this time (exclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"labels":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"json_data":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"operator":{"type":"string","enum":["equals","notEquals","in","notIn","gt","gte","lt","lte","contains","isSet","isNotSet"]},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]}},"required":["path","operator"],"additionalProperties":false}}}},"search":{"description":"Free-text search selecting the cases when all_matching is true.","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":{"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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) and not belong to a different automation than the queue. A paused queue refuses with 409; resume it first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"case_ids":{"description":"Explicit case IDs to act on (1-100). Provide this or set all_matching.","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}},"all_matching":{"description":"When true, act on every case matching the provided filters/search instead of an explicit id list.","type":"boolean"},"filters":{"description":"Filters selecting the cases when all_matching is true.","type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["all","pending","processing","needs_input","postponed","needs_review","resolved","canceled","claimed","completed","failed"]}},"issue_severity":{"type":"array","items":{"type":"string","enum":["critical","medium"]}},"failure_source":{"description":"Keep only failed Cases, by who failed them: `system` when Duvo could not finish the Case, `manual` when a person marked it failed.","type":"array","items":{"type":"string","enum":["system","manual"]}},"awaiting_my_approval":{"type":"boolean"},"priority":{"type":"array","items":{"type":"string","enum":["none","medium","high"]}},"created_at_from":{"type":"string"},"created_at_to":{"type":"string"},"updated_at_from":{"type":"string"},"updated_at_to":{"type":"string"},"completed_at_from":{"description":"Keep Cases that reached an outcome at or after this time (inclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"completed_at_to":{"description":"Keep Cases that reached an outcome before this time (exclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"labels":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"json_data":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"operator":{"type":"string","enum":["equals","notEquals","in","notIn","gt","gte","lt","lte","contains","isSet","isNotSet"]},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]}},"required":["path","operator"],"additionalProperties":false}}}},"search":{"description":"Free-text search selecting the cases when all_matching is true.","type":"string"},"agent_id":{"type":"string","format":"uuid","description":"The agent that should run on the selected cases. Must be a consumer of this queue and not belong to a different automation."}}}}}},"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. Read reprocessedCount instead; this field will be removed in a future release."},"retriedCount":{"type":"number","deprecated":true,"description":"Deprecated alias of reprocessedCount. Read reprocessedCount instead; this field will be removed in a future release."}},"required":["reprocessedCount","skippedCount"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Reprocessing the cases would put the queue, which dispatches to an agent, past the most pending cases it may hold; nothing was changed. Retry once its agent has worked through the backlog, or select fewer cases.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false,"description":"Reprocessing the cases would put the queue, which dispatches to an agent, past the most pending cases it may hold; nothing was changed. Retry once its agent has worked through the backlog, or select fewer cases."}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Bulk Reprocess Cases","deprecated":true}},"/v1/queues/{queue_id}/cases/bulk-update-status":{"post":{"operationId":"bulkUpdateCaseStatus","tags":["Cases"],"description":"Update the status of multiple cases to pending, completed, failed, or canceled. Interrupts any active runs and releases their case ownership, but never cancels their human-in-the-loop state — pending requests and open approval batches stay answerable/resolvable from the run view. Settling a case archives the pending requests on every run attached to it, both the runs this call interrupted and any that were already terminal, so they leave the activity inbox instead of outliving the case there. Resetting to pending archives nothing and re-dispatches cases to the queue's trigger consumer. Resetting cases on a paused queue answers 409, because it would interrupt runs the pause lets finish; resume the queue first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"case_ids":{"description":"Explicit case IDs to act on (1-100). Provide this or set all_matching.","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}},"all_matching":{"description":"When true, act on every case matching the provided filters/search instead of an explicit id list.","type":"boolean"},"filters":{"description":"Filters selecting the cases when all_matching is true.","type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["all","pending","processing","needs_input","postponed","needs_review","resolved","canceled","claimed","completed","failed"]}},"issue_severity":{"type":"array","items":{"type":"string","enum":["critical","medium"]}},"failure_source":{"description":"Keep only failed Cases, by who failed them: `system` when Duvo could not finish the Case, `manual` when a person marked it failed.","type":"array","items":{"type":"string","enum":["system","manual"]}},"awaiting_my_approval":{"type":"boolean"},"priority":{"type":"array","items":{"type":"string","enum":["none","medium","high"]}},"created_at_from":{"type":"string"},"created_at_to":{"type":"string"},"updated_at_from":{"type":"string"},"updated_at_to":{"type":"string"},"completed_at_from":{"description":"Keep Cases that reached an outcome at or after this time (inclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"completed_at_to":{"description":"Keep Cases that reached an outcome before this time (exclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"labels":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"json_data":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"operator":{"type":"string","enum":["equals","notEquals","in","notIn","gt","gte","lt","lte","contains","isSet","isNotSet"]},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]}},"required":["path","operator"],"additionalProperties":false}}}},"search":{"description":"Free-text search selecting the cases when all_matching is true.","type":"string"},"status":{"type":"string","enum":["pending","completed","failed","canceled"],"description":"Target status for each case. `completed`, `failed`, and `canceled` are terminal — `canceled` records a deliberate human stop, distinct from a system `failed`. `pending` resets the case (the queue's trigger consumer, if any, will re-claim it). `success` is not settable: it means an evaluation passed."}},"required":["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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Resetting the cases to pending would put the queue, which dispatches to an agent, past the most pending cases it may hold; nothing was changed. Retry once its agent has worked through the backlog, or select fewer cases.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false,"description":"Resetting the cases to pending would put the queue, which dispatches to an agent, past the most pending cases it may hold; nothing was changed. Retry once its agent has worked through the backlog, or select fewer cases."}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Bulk Update Case Status","deprecated":true}},"/v1/queues/{queue_id}/cases/bulk-update-priority":{"post":{"operationId":"bulkUpdateCasePriority","tags":["Cases"],"description":"Set the priority of multiple cases. Priority only affects the order pending cases are picked up in: due postponed cases are handled first, then higher priority. It never interrupts runs or changes case status. Set `none` to clear priority back to the default.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"case_ids":{"description":"Explicit case IDs to act on (1-100). Provide this or set all_matching.","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}},"all_matching":{"description":"When true, act on every case matching the provided filters/search instead of an explicit id list.","type":"boolean"},"filters":{"description":"Filters selecting the cases when all_matching is true.","type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["all","pending","processing","needs_input","postponed","needs_review","resolved","canceled","claimed","completed","failed"]}},"issue_severity":{"type":"array","items":{"type":"string","enum":["critical","medium"]}},"failure_source":{"description":"Keep only failed Cases, by who failed them: `system` when Duvo could not finish the Case, `manual` when a person marked it failed.","type":"array","items":{"type":"string","enum":["system","manual"]}},"awaiting_my_approval":{"type":"boolean"},"priority":{"type":"array","items":{"type":"string","enum":["none","medium","high"]}},"created_at_from":{"type":"string"},"created_at_to":{"type":"string"},"updated_at_from":{"type":"string"},"updated_at_to":{"type":"string"},"completed_at_from":{"description":"Keep Cases that reached an outcome at or after this time (inclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"completed_at_to":{"description":"Keep Cases that reached an outcome before this time (exclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"labels":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"json_data":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"operator":{"type":"string","enum":["equals","notEquals","in","notIn","gt","gte","lt","lte","contains","isSet","isNotSet"]},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]}},"required":["path","operator"],"additionalProperties":false}}}},"search":{"description":"Free-text search selecting the cases when all_matching is true.","type":"string"},"priority":{"type":"string","enum":["none","medium","high"],"description":"Target priority for each case. `medium`/`high` raise it above the default; `none` clears it."}},"required":["priority"]}}}},"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"}},"required":["updatedCount","skippedCount"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Bulk Update Case Priority","deprecated":true}},"/v1/queues/{queue_id}/cases/{case_id}/attachments":{"get":{"operationId":"listCaseAttachments","tags":["Case Attachments"],"description":"List the files attached to a case, oldest first. Includes attachments whose upload failed, so a missing source document is visible rather than silent.","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":{"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"case_id":{"type":"string","format":"uuid"},"filename":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","ready","failed"]},"failure_reason":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["user","agent"]},"uploaded_by_user_id":{"type":"string","format":"uuid"},"agent_run_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"}},"required":["id","case_id","filename","mime_type","size_bytes","status","failure_reason","source","uploaded_by_user_id","agent_run_id","created_at"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Case Attachments","deprecated":true}},"/v1/queues/{queue_id}/cases/{case_id}/attachments/{attachment_id}/content":{"put":{"operationId":"uploadCaseAttachmentContent","tags":["Case Attachments"],"description":"Upload raw File bytes as application/octet-stream to a pending attachment reserved on this case. Maximum 20 MiB; bytes must match the reserved length. Call finalize after success. Never send JSON, base64, or an arbitrary destination URL.","requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"case_id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attachment_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"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"},"code":{"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}}}}},"summary":"Upload Case Attachment Content","deprecated":true}},"/v1/queues/{queue_id}/cases/{case_id}/attachments/upload-urls":{"post":{"operationId":"createCaseAttachmentUploadUrl","tags":["Case Attachments"],"description":"Issue a signed URL for uploading a file to a case. The client must PUT the bytes to the returned URL with the returned Content-Type, then call the finalize endpoint so the attachment becomes visible on the case.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mime_type":{"type":"string","minLength":1,"maxLength":127},"size_bytes":{"type":"integer","exclusiveMinimum":true,"maximum":52428800}},"required":["filename","mime_type","size_bytes"]}}}},"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":{"attachment_id":{"type":"string","format":"uuid"},"upload_url":{"type":"string","format":"uri"},"upload_content_type":{"type":"string"},"expires_at":{"type":"string"}},"required":["attachment_id","upload_url","upload_content_type","expires_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Case Attachment Upload URL","deprecated":true}},"/v1/queues/{queue_id}/cases/{case_id}/attachments/{attachment_id}/finalize":{"post":{"operationId":"finalizeCaseAttachment","tags":["Case Attachments"],"description":"Confirm an uploaded case attachment against storage. Answers with the attachment in its settled state — `ready` when the bytes are present, `failed` (with a reason) when the upload never completed.","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"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attachment_id","required":true,"description":"The attachment's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"attachment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"case_id":{"type":"string","format":"uuid"},"filename":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","ready","failed"]},"failure_reason":{"nullable":true,"type":"string"},"source":{"type":"string","enum":["user","agent"]},"uploaded_by_user_id":{"type":"string","format":"uuid"},"agent_run_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"}},"required":["id","case_id","filename","mime_type","size_bytes","status","failure_reason","source","uploaded_by_user_id","agent_run_id","created_at"],"additionalProperties":false}},"required":["attachment"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Finalize Case Attachment","deprecated":true}},"/v1/queues/{queue_id}/cases/{case_id}/attachments/{attachment_id}/download-url":{"get":{"operationId":"getCaseAttachmentDownloadUrl","tags":["Case Attachments"],"description":"Mint a short-lived signed URL for one case attachment. `disposition=inline` serves the file for the in-app viewer; `attachment` forces a download.","parameters":[{"schema":{"default":"attachment","type":"string","enum":["inline","attachment"]},"in":"query","name":"disposition","required":false},{"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"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attachment_id","required":true,"description":"The attachment's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expires_at":{"type":"string"}},"required":["url","expires_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Case Attachment Download URL","deprecated":true}},"/v1/queues/{queue_id}/cases/{case_id}/attachments/{attachment_id}/pages/{page}":{"get":{"operationId":"getCaseAttachmentPageImage","tags":["Case Attachments"],"description":"Render one page of a ready PDF case attachment to a PNG data URL for the in-app viewer. Only the first 50 pages are rendered; download the file for the rest.","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"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attachment_id","required":true,"description":"The attachment's unique identifier"},{"schema":{"type":"integer","minimum":1,"maximum":9999},"in":"path","name":"page","required":true,"description":"1-based page number"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"page_count":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"rendered_page_limit":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"width":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"image":{"type":"string","pattern":"^data:image\\/png;base64,.*"}},"required":["page","page_count","rendered_page_limit","width","height","image"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"415":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Case Attachment Page Image","deprecated":true}},"/v1/queues/{queue_id}/cases/{case_id}/attachments/{attachment_id}":{"delete":{"operationId":"deleteCaseAttachment","tags":["Case Attachments"],"description":"Remove a file from a case. The row is soft-deleted; deletion of the stored object is attempted best-effort.","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"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attachment_id","required":true,"description":"The attachment'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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Case Attachment","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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":"Number of labels per page (1-1000, default 1000)."},{"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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":"Number of labels per page (1-1000, default 1000)."},{"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Queue Label","deprecated":true}},"/v1/queues/{queue_id}/agents":{"get":{"operationId":"listQueueAgents","tags":["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"},"agent_type":{"type":"string","enum":["agent","code"],"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation — a step's builds all belong to the matching config family."},"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"},"agent_type":{"type":"string","enum":["agent","code"],"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation — a step's builds all belong to the matching config family."},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Queue Agents","deprecated":true}},"/v1/case-queues/{queue_id}/eval-rubrics":{"get":{"operationId":"getCaseQueueEvalRubrics","tags":["Queues"],"description":"List a queue's active case-level evaluation rubrics — the Pass/Fail questions a whole case is judged against at settlement. Shows the queue's current version's set (auto-generated from the connected Assignments' AOPs, plus any manually-authored rubrics).","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":{"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}}},"required":["rubrics"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Case Queue Eval Rubrics","deprecated":true},"post":{"operationId":"createCaseQueueEvalRubric","tags":["Queues"],"description":"Add one case-level evaluation rubric to a queue's current rubric set. Case-level rubrics judge the whole case (across every Run that touched it) as a Pass/Fail question at settlement. The rubric is added to the queue's current version (build-set) — the set new cases are judged against; a queue only gets one after its first Agent-processed case settles, so this fails with 409 before then, and once the version holds 12 rubrics by default (25 on teams with the newer rubric generator enabled); the error message states the ceiling.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short, human-readable Pass/Fail rubric title."},"description":{"type":"string","minLength":20,"maxLength":400,"description":"A 1-2 sentence Pass condition phrased as a question."}},"required":["title","description"],"additionalProperties":false}}}},"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":{"rubric":{"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}},"required":["rubric"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Case Queue Eval Rubric","deprecated":true},"put":{"operationId":"replaceCaseQueueEvalRubrics","tags":["Queues"],"description":"Replace the entire case-level evaluation rubric set on a queue's current version (1 to N rubrics, N being 12 by default and 25 on teams with the newer rubric generator enabled). Existing rubrics are removed and the supplied list becomes the new set. An empty list is refused — whole-case evaluation regenerates rubrics for an empty set at the next settlement, so a cleared set would not stay cleared; remove individual rubrics instead. Targets the queue's current version (build-set), which exists once its first Agent-processed case settles — this fails with 409 before then. Cases already judged keep their original verdicts.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rubrics":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short, human-readable Pass/Fail rubric title."},"description":{"type":"string","minLength":20,"maxLength":400,"description":"A 1-2 sentence Pass condition phrased as a question."}},"required":["title","description"],"additionalProperties":false},"description":"The complete case-level rubric set for the queue's current version (at least 1 rubric). Replaces every existing rubric."}},"required":["rubrics"]}}}},"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":{"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}}},"required":["rubrics"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Replace Case Queue Eval Rubrics","deprecated":true}},"/v1/case-queues/{queue_id}/eval-rubrics/{rubric_id}":{"patch":{"operationId":"updateCaseQueueEvalRubric","tags":["Queues"],"description":"Edit a single case-level evaluation rubric's title and/or description. The edit produces a NEW rubric (with a new id and slug) so previously judged cases stay attributed to the original criterion; the response contains the new rubric.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short, human-readable Pass/Fail rubric title."},"description":{"type":"string","minLength":20,"maxLength":400,"description":"A 1-2 sentence Pass condition phrased as a question."}},"additionalProperties":false}}}},"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":"rubric_id","required":true,"description":"The case-level rubric's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"rubric":{"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}},"required":["rubric"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Case Queue Eval Rubric","deprecated":true},"delete":{"operationId":"deleteCaseQueueEvalRubric","tags":["Queues"],"description":"Remove a single case-level evaluation rubric. Cases settled after this are no longer judged against it; already-judged cases keep their original verdicts. Removing the queue's last remaining rubric is refused with 409 — whole-case evaluation regenerates rubrics for an empty set at the next settlement, so the removal would not stay removed.","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":"rubric_id","required":true,"description":"The case-level rubric'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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Case Queue Eval Rubric","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, and field-value filters over a typed queue's json_data). Use this when the simple query-string filters on GET /v2/queues/:queue_id/cases aren't enough. Each json_data entry is {path, operator, value} where path is a declared scalar in JSONPath dotted form ($.invoice.amount); entries are ANDed, so two comparisons on one path express a range. A path the queue's Case schema does not declare is rejected rather than ignored, as is a value that does not match the field's declared type. The contains operator is case-sensitive (unlike the free-text search parameter). Set count_only=true to skip Case row selection, enrichment, and transformation. The normal response shape is returned with cases: [] and the matching total.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filters":{"default":{},"type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["all","pending","processing","needs_input","postponed","needs_review","resolved","canceled","claimed","completed","failed"]}},"issue_severity":{"type":"array","items":{"type":"string","enum":["critical","medium"]}},"failure_source":{"description":"Keep only failed Cases, by who failed them: `system` when Duvo could not finish the Case, `manual` when a person marked it failed.","type":"array","items":{"type":"string","enum":["system","manual"]}},"awaiting_my_approval":{"type":"boolean"},"priority":{"type":"array","items":{"type":"string","enum":["none","medium","high"]}},"created_at_from":{"type":"string"},"created_at_to":{"type":"string"},"updated_at_from":{"type":"string"},"updated_at_to":{"type":"string"},"completed_at_from":{"description":"Keep Cases that reached an outcome at or after this time (inclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"completed_at_to":{"description":"Keep Cases that reached an outcome before this time (exclusive). An ISO timestamp or a lookback such as `7d` or `12h`.","type":"string"},"labels":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"json_data":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\$(\\.[A-Za-z_][A-Za-z0-9_]{0,63})+$"},"operator":{"type":"string","enum":["equals","notEquals","in","notIn","gt","gte","lt","lte","contains","isSet","isNotSet"]},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]}},"required":["path","operator"],"additionalProperties":false}}}},"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"},"count_only":{"description":"Skip Case row selection, enrichment, and transformation. The normal response shape contains an empty cases array and the matching total.","type":"boolean"},"include_blockers":{"description":"Also return `blocker` on each case: for a case waiting to start, why the dispatcher cannot start it now, or null when nothing blocks it. Off by default, because it adds database reads; when off, `blocker` is left out.","type":"boolean"}}}}}},"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"},"json_data":{"nullable":true,"type":"object","additionalProperties":{}},"json_schema_id":{"nullable":true,"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","completed","failed"]},"priority":{"type":"string","enum":["none","medium","high"]},"display_status":{"type":"string","enum":["pending","in_progress","needs_input","postponed","evaluating","success","issues","completed","failed","canceled"]},"outcome_source":{"nullable":true,"type":"string","enum":["system","eval","manual"]},"outcome_severity":{"nullable":true,"type":"string","enum":["critical","medium","low"]},"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_human_request_type":{"description":"Type of the pending human request: 'approval' for a decision, 'question' for an answer, 'credentials' for a login, or 'input' on a module's sample cases. Null when nothing is waiting.","nullable":true,"type":"string"},"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},"eval_summary":{"nullable":true,"type":"object","properties":{"evaluationId":{"type":"string","format":"uuid"},"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},"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}},"source_automation_revision_id":{"description":"The automation revision that produced the case. It never changes. Null when no Run created the case (added through the API or an import, or created before automation revisions), and on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision_id":{"description":"The automation revision that handles the case. It is set when a Run creates the case, set again to the revision that runs the case when a Run claims it, and otherwise changes only when an activation moves waiting cases. For a case that no Run created, null until a Run claims it or an activation moves it. Null on a team without automation revisions.","nullable":true,"type":"string","format":"uuid"},"automation_revision":{"description":"The handling revision, resolved. Null when the case has no handling revision.","nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The handling revision's ID."},"status":{"type":"string","enum":["draft","live","historic"],"description":"The revision's lifecycle status. A discarded draft, or a revision that no longer exists, reads as `draft`."},"revision_number":{"nullable":true,"description":"The revision's number. Null for a draft, which is numbered only when it is activated.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"nullable":true,"description":"The revision's name, if it has one.","type":"string"},"is_live":{"type":"boolean","description":"Whether this is the automation's live revision right now."},"hold_reason":{"description":"Why the waiting case is held, or null when it is not. A case pinned to an older revision, or to one of another automation, waits rather than running on the live revision when that revision cannot run it. Running it on the live revision, failing it, or fixing the cause releases it.","nullable":true,"type":"string","enum":["queue_left_automation","queue_not_in_revision","queue_unrouted","agent_deleted","agent_moved","agent_not_bound","build_deleted","route_switched_off","draft_discarded"]}},"required":["id","status","revision_number","name","is_live"],"additionalProperties":false},"blocker":{"description":"Why the waiting case cannot start right now, when its Queue's setup_status does not already say so. Null when the case is not waiting or nothing blocks it. Present only when the read set include_blockers and the feature is enabled for the team.","nullable":true,"type":"object","properties":{"reason":{"type":"string","description":"`connection_missing` or `connection_broken` when a Connection the case's Agent needs cannot be used for the person the case runs as; `pinned_draft` when the case is pinned to a draft that cannot run it; `assigned_agent_not_ready` when the Agent the case is assigned to has no Build to run.","x-extensible-enum":["connection_missing","connection_broken","pinned_draft","assigned_agent_not_ready"]},"agent":{"nullable":true,"description":"The Agent the case would run on. Null when a draft routes the case to no Agent.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."},"runner":{"nullable":true,"description":"The person whose Connections the case's run uses. Null when the reason does not depend on Connections.","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The person's user ID."},"name":{"type":"string","description":"The person's name."}},"required":["id","name"],"additionalProperties":false}},"required":["reason","agent","connections","runner"],"additionalProperties":false}},"required":["id","queue_id","title","data","status","priority","display_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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"scope":{"description":"Who the run executes as: `personal` (the member it belongs to) or `team` (the team, for a run of a Team automation). Visible to every Member+ of the team when `team`. Absent from older servers; read a missing value as `personal`.","type":"string","enum":["personal","team"]},"created_by":{"description":"ID of the user who started the run, or null when no person did (a schedule, a trigger, a case).","nullable":true,"type":"string","format":"uuid"}},"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}},"route_reason":{"description":"Why the request is routed to the people in routed_to, for a request raised by a Team automation's run: 'actor' (the member who started an interactive or test run) or 'owners_and_admins' (the team's Owners and Administrators, also when the member it was routed to has left the team or was deleted). The other values are reserved for later routing. null when the request is routed to the run's user, or to a case approval's named approver.","nullable":true,"type":"string","enum":["actor","case_assignee","agent_responsible","automation_responsible","owners_and_admins","taken"]},"routed_to":{"description":"User IDs of the members the request is routed to, resolved when the response is built. For an answered request, these are the members it was routed to. Empty when it is routed to nobody.","type":"array","items":{"type":"string","format":"uuid"}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 completed or interrupted and has no pending human request. A run whose workspace data retention deleted answers 410 with code `sandbox_expired`.","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"410":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"error":{"description":"Why the execution failed, on session_error messages","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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. Each answer is at most 10240 UTF-8 bytes.","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"},"route_reason":{"description":"Why the request is routed to the people in routed_to, for a request raised by a Team automation's run: 'actor' (the member who started an interactive or test run) or 'owners_and_admins' (the team's Owners and Administrators, also when the member it was routed to has left the team or was deleted). The other values are reserved for later routing. null when the request is routed to the run's user, or to a case approval's named approver.","nullable":true,"type":"string","enum":["actor","case_assignee","agent_responsible","automation_responsible","owners_and_admins","taken"]},"routed_to":{"description":"User IDs of the members the request is routed to, resolved when the response is built. For an answered request, these are the members it was routed to. Empty when it is routed to nobody.","type":"array","items":{"type":"string","format":"uuid"}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"410":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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. Team-scoped API keys see only the key's team; managed Ask Duvo keys stay within their origin boundary; human user-scoped API keys and 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"automation_count":{"description":"Number of automations that would be moved to the root level if force=true were passed. Counted over this folder and every folder beneath it, like agent_count — a converted team files automations in this same tree, and deleting the folder lifts them to the root rather than deleting them.","type":"number"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"description":"Native OAuth provider key used in the native OAuth start endpoint's provider path parameter. Read this value from listIntegrations; null when the integration type has no native OAuth provider.","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"},"broken_at":{"nullable":true,"type":"string","format":"date-time"},"broken_reason":{"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","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"}}}},"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"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"description":"Native OAuth provider key used in the native OAuth start endpoint's provider path parameter. Read this value from listIntegrations; null when the integration type has no native OAuth provider.","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"},"broken_at":{"nullable":true,"type":"string","format":"date-time"},"broken_reason":{"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","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"usage":{"type":"object","properties":{"agents":{"type":"number"},"code_steps":{"type":"number"}},"required":["agents","code_steps"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 lead builder 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"},"usage":{"type":"object","properties":{"agents":{"type":"number"},"code_steps":{"type":"number"}},"required":["agents","code_steps"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 lead builder 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"usage":{"type":"object","properties":{"agents":{"type":"number"},"code_steps":{"type":"number"}},"required":["agents","code_steps"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 Runs 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Detach Revision Secret","deprecated":true}},"/v1/agents/{agentId}/revisions/{buildId}/logins":{"get":{"operationId":"listRevisionLogins","tags":["Credentials"],"description":"List 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Revision Logins","deprecated":true},"post":{"operationId":"attachRevisionLogin","tags":["Credentials"],"description":"Attach a login to a revision so the agent can use it during Runs 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Detach Revision Login","deprecated":true}},"/v1/notifications/{id}":{"get":{"operationId":"getNotification","tags":["Notifications"],"description":"Get a single notification by id for the authenticated user. Requires the Notification Center feature; returns 404 when it is not enabled for the team, or when automation_id is set and the notification is not about that automation.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"automation_id","required":false,"description":"Only include notifications about this automation: notifications from runs in this automation (or, with no run, for its agents), notifications for its queues, connection_broken notifications for connections its agents use, and login_broken notifications for logins its agents sign in with."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The notification's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["job_issue"]},"agentRunId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"evaluationId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"source":{"type":"string","enum":["run_failed","run_stuck","eval_flagged","eval_failed"]},"agentId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","agentRunId","evaluationId","source","agentId","agentName"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["job_done"]},"agentRunId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","agentRunId","agentId","agentName"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["background_job"]},"jobType":{"type":"string","enum":["clarity_signavio_export"]},"outcome":{"type":"string","enum":["succeeded","failed"]},"sourceId":{"type":"string","format":"uuid"},"processId":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"resultUrl":{"description":"Where the job's result opens outside Duvo, if anywhere.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","jobType","outcome","sourceId","processId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"type":"string"},"integrationSlug":{"type":"string"},"instanceName":{"type":"string"},"brokenReason":{"type":"string","description":"Why the connection stopped working.","x-extensible-enum":["oauth_client_invalid","oauth_grant_revoked","refresh_token_missing","insufficient_scopes"]},"ownerUserId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"ownerName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdByName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["connection_broken"]},"integrationInstanceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"requiresAction":{"default":true,"type":"boolean"}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","provider","integrationSlug","instanceName","brokenReason","ownerUserId","ownerName","createdByUserId","createdByName","type","integrationInstanceId","requiresAction"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["schedule_issue"]},"scheduleId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reason":{"type":"string","enum":["missing_connections"]},"missingConnections":{"type":"array","items":{"type":"object","properties":{"integrationType":{"type":"string"},"customIntegrationId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["integrationType","customIntegrationId"],"additionalProperties":false}}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","scheduleId","agentId","reason"],"additionalProperties":false}]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"nullable":true,"type":"string","format":"uuid"},"batchId":{"default":null,"nullable":true,"type":"string","format":"uuid"},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"seenAt":{"nullable":true,"type":"string"},"readAt":{"nullable":true,"type":"string"},"resolvedAt":{"nullable":true,"type":"string"},"dismissedAt":{"default":null,"nullable":true,"type":"string"},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"nullable":true,"type":"string"},"type":{"type":"string"},"fallback":{"type":"boolean","enum":[true]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","fallback"],"additionalProperties":false}]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Notification","deprecated":true}},"/v1/notifications/{id}/read":{"patch":{"operationId":"markNotificationRead","tags":["Notifications"],"description":"Mark a notification as read for the authenticated user. Idempotent — calling it again on an already-read notification still returns success. Pass `openedFrom` to record which channel the reader came through (`in_app` when they were already in Duvo, or `email`/`slack`/`teams` from the `notificationSource` param on an external link); omit it when the read is not somebody opening the notification. Requires the Notification Center feature; returns 404 when it is not enabled for the team.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"openedFrom":{"type":"string","enum":["in_app","email","slack","teams"]}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The notification'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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Mark Notification Read","deprecated":true}},"/v1/notifications/{id}/dismiss":{"patch":{"operationId":"dismissNotification","tags":["Notifications"],"description":"Dismiss an important notification for the authenticated user. A row pinned to their Important section is unpinned and the card stays, because the connection is still broken; a row that is not pinned for them — one they cannot reconnect themselves — is removed from their feed instead, matching what the card's Dismiss button does. Only important notifications (currently: connection_broken) can be dismissed. Idempotent. Requires the Notification Center feature; returns 404 when it is not enabled for the team.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The notification'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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Dismiss Notification","deprecated":true}},"/v1/organizations/{orgId}/clarity/process-labels":{"get":{"operationId":"listClarityProcessLabels","tags":["Clarity"],"description":"List process tags available in an organization.","parameters":[{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"type":"string","minLength":1,"maxLength":100},"in":"query","name":"search","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"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"},"value":{"type":"string"},"colorHue":{"type":"integer","minimum":0,"maximum":360},"processCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","value","colorHue","processCount"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Process Labels","deprecated":true},"post":{"operationId":"createClarityProcessLabel","tags":["Clarity"],"description":"Create process tags for an organization.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"colorHue":{"default":215,"type":"integer","minimum":0,"maximum":360}},"required":["value"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"colorHue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","value","colorHue"],"additionalProperties":false}},"required":["label"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Process Label","deprecated":true}},"/v1/organizations/{orgId}/clarity/process-labels/{labelId}":{"patch":{"operationId":"updateClarityProcessLabel","tags":["Clarity"],"description":"Update process tags for an organization.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"colorHue":{"type":"integer","minimum":0,"maximum":360}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"labelId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"colorHue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","value","colorHue"],"additionalProperties":false}},"required":["label"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Clarity Process Label","deprecated":true},"delete":{"operationId":"deleteClarityProcessLabel","tags":["Clarity"],"description":"Delete process tags from an organization.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"orgId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"labelId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Clarity Process Label","deprecated":true}},"/v1/clarity/processes/{id}/labels":{"get":{"operationId":"listClarityProcessAssignedLabels","tags":["Clarity"],"description":"List process tags on a process.","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":{"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"colorHue":{"type":"integer","minimum":0,"maximum":360},"source":{"type":"string","enum":["human","agent"]}},"required":["id","value","colorHue","source"],"additionalProperties":false}}},"required":["labels"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Process Assigned Labels","deprecated":true}},"/v1/clarity/processes/{id}/labels/assign":{"post":{"operationId":"assignClarityProcessLabels","tags":["Clarity"],"description":"Assign process tags to a process.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"labelIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"}},"labels":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"colorHue":{"default":215,"type":"integer","minimum":0,"maximum":360}},"required":["value"]}}}}}}},"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":{"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"colorHue":{"type":"integer","minimum":0,"maximum":360},"source":{"type":"string","enum":["human","agent"]}},"required":["id","value","colorHue","source"],"additionalProperties":false}}},"required":["labels"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Assign Clarity Process Labels","deprecated":true}},"/v1/clarity/processes/{id}/labels/unlink":{"post":{"operationId":"unlinkClarityProcessLabels","tags":["Clarity"],"description":"Remove process tags from a process.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"labelIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["labelIds"]}}}},"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":{"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"colorHue":{"type":"integer","minimum":0,"maximum":360},"source":{"type":"string","enum":["human","agent"]}},"required":["id","value","colorHue","source"],"additionalProperties":false}}},"required":["labels"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Unlink Clarity Process Labels","deprecated":true}},"/v1/clarity/processes/{id}/available-labels":{"get":{"operationId":"listAvailableClarityProcessLabels","tags":["Clarity"],"description":"List process tags available for a process.","parameters":[{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"type":"string","minLength":1,"maxLength":100},"in":"query","name":"search","required":false},{"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":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"colorHue":{"type":"integer","minimum":0,"maximum":360},"processCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","value","colorHue","processCount"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Available Clarity Process Labels","deprecated":true}},"/v1/agents":{"get":{"operationId":"listAgents","tags":["Agents"],"description":"List agents for your team. Pass `config=light` to leave each agent's revision config out of the page and get its sizes instead; read the AOP with getRevisionBody.","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"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"automation_id","required":false,"description":"Only return agents belonging to this automation."},{"schema":{"type":"string","enum":["light","full"]},"in":"query","name":"config","required":false,"description":"`full` (default) embeds each agent's live revision config in `latest_build.config`. `light` sets that to null and reports its sizes, hash and models in `latest_build_config_summary`; read the AOP or program text with getRevisionBody. Use `light` unless you need the instructions themselves: a full page can run to hundreds of thousands of characters."}],"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"},"type":{"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation.","type":"string","enum":["agent","code"]},"slack_enabled":{"nullable":true,"type":"boolean"},"microsoft_teams_enabled":{"nullable":true,"type":"boolean"},"agentic_memory_enabled":{"nullable":true,"type":"boolean"},"computer_use_sandbox_template_id":{"nullable":true,"type":"string","description":"\"standard\" when durably pinned to the standard Duvo desktop, a template UUID when pinned to a specific desktop, or null when following the team default."},"computer_use_vpn_config_id":{"nullable":true,"type":"string","description":"\"direct\" when durably pinned to direct internet, a VPN config UUID when pinned to a specific network, or null when following the team default."},"team_id":{"nullable":true,"type":"string"},"thread_id":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"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},"pinned_at":{"nullable":true,"type":"string"},"last_run_at":{"nullable":true,"type":"string","description":"When you last ran this agent. Scoped to the authenticated user, so it ignores runs started by teammates, schedules and case queues — read `team_last_run_at` for those."},"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"],"description":"Schema version discriminator — must be \"v1\" for the current code-step schema"},"data":{"type":"object","properties":{"language":{"type":"string","enum":["python"],"description":"Language the step's program is written in"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"code":{"type":"string","minLength":1,"description":"Program held in the build config. Written to `main.py` and run with `python main.py`."}},"required":["kind","code"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["files"]},"startCommand":{"type":"string","minLength":1,"maxLength":2000,"description":"Command run from the root of the step's file system, e.g. \"python main.py\"."},"bundle":{"description":"The program's files, as a content-addressed manifest","type":"object","properties":{"bucket":{"type":"string","minLength":1,"description":"GCS bucket the bundle's blobs are stored in"},"files":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path the file is materialised at, relative to the work dir"},"sha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$","description":"Digest of the file's bytes, and the key its blob is stored at"},"sizeBytes":{"type":"integer","minimum":0,"maximum":131072,"description":"UTF-8 byte length of the file's contents"}},"required":["path","sha256","sizeBytes"],"additionalProperties":false},"description":"The program's files, one manifest entry each"}},"required":["bucket","files"],"additionalProperties":false}},"required":["kind","startCommand"],"additionalProperties":false}],"description":"Where the step's program comes from"},"files":{"default":[],"description":"Team file paths this step can read at run time","nullable":true,"type":"array","items":{"type":"string"}},"timeoutMs":{"default":600000,"description":"Wall-clock budget for one execution of the step","type":"integer","exclusiveMinimum":true,"maximum":3600000},"handoverRequired":{"default":false,"description":"When the step declares handover options, whether a run that exits cleanly without requesting one fails. Ignored when the step declares no options.","type":"boolean"},"maxConcurrency":{"description":"Most runs of this step that may be in flight at once on one queue, on top of the queue's own concurrency. Absent means only the queue's limit applies. Every claim enforces it; only cases handed to the step (handover, postpone, reprocess) are also kept out of the queue's free slots while the step is full. Cases a trigger or a revision route sends straight to a capped step can still take queue slots and wait there, delaying other steps on the same queue.","type":"integer","exclusiveMinimum":true,"maximum":1000}},"required":["language","source","files","timeoutMs","handoverRequired"],"additionalProperties":false,"description":"Code step configuration payload"}},"required":["version","data"],"additionalProperties":false},{"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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"},"pending_change":{"nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string"},"enabled":{"nullable":true,"type":"boolean"},"cron":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"task":{"nullable":true,"type":"string"}},"required":["automation_revision_id","enabled","cron","frequency","time","timezone","day","day_of_month","task"],"additionalProperties":false}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at"],"additionalProperties":false}},"handover_to":{"nullable":true,"type":"string","format":"uuid"},"handover_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","copilot_id","agent_id","name","config","status","revision_number","parent_build_id","created_by","created_at","updated_at"],"additionalProperties":false},"latest_build_config_summary":{"description":"Only with `config=light`: a summary of the live revision's config, whose `latest_build.config` is then null. Null when the agent has no live revision.","nullable":true,"type":"object","properties":{"config_hash":{"type":"string","description":"SHA-256 of the stored config; changes with any field of it"},"input_chars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Length of the AOP text (`config.data.input`); 0 for a code step"},"source_chars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Length of the code-step program (`config.data.source`); 0 for an agent step"},"models":{"nullable":true,"description":"The agent step's model configuration; null when the config has none (a code step, or a v1 agent config)","type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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}},"required":["config_hash","input_chars","source_chars","models"],"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"},"is_broken":{"description":"True when a Connection bound to this slot has lost its grant, so Runs that need it fail until it is reconnected. A Connection that is only missing a permission is not counted: Runs still start, and its triggers stop until it is reconnected.","type":"boolean"},"linked_queue_names":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["id","integration_id","integration_type","integration_name","created_at"],"additionalProperties":false}},"logins":{"description":"The Logins on the agent's live build that you can see: the team's shared ones and your own. At most 100, ordered by domain. Logins that stopped signing in are kept ahead of the rest when the cap applies, so one is left out only when more than that many did.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Login's id."},"domain":{"type":"string","description":"The site the Login signs in to."},"is_broken":{"type":"boolean","description":"True when a Run reported the Login stopped signing in, until it is saved again."}},"required":["id","domain","is_broken"],"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"},"team_last_run_at":{"nullable":true,"type":"string","description":"When this agent last ran for anyone on the team, including runs started by schedules and case queues. Not scoped to the authenticated user."}},"required":["id","name","slack_enabled","microsoft_teams_enabled","agentic_memory_enabled","team_id","thread_id","created_at","updated_at","pinned_at","last_run_at","latest_build","integration_configs","user_triggers","case_trigger_enabled","case_trigger_has_conflict","case_trigger_conflicting_agents","case_queue_name","team_last_run_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":["agents","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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. On a team that versions its automations, an agent created inside an automation joins that automation's draft revision: its first build is a draft and goes live when the draft is made active.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Human-readable agent name"},"type":{"default":"agent","description":"Flavour of the step to create. Fixed at creation — it selects the config family every build of this step must use, and the two cannot be mixed.","type":"string","enum":["agent","code"]},"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. When `automation_id` is omitted, the new agent also joins the automation of the agent this build belongs to.","type":"string","format":"uuid"},"automation_id":{"nullable":true,"description":"Automation this agent belongs to. If omitted on a team using the automations model, a new automation named after the agent is created automatically.","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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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"]}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"additionalProperties":{}}},"required":["models","input"],"description":"Agent configuration payload"}},"required":["version","data"],"description":"Build configuration (latest schema version only; legacy v1 configs are not accepted). Agent steps only — a code step's first build is created via `POST /v2/agents/{agent_id}/revisions`, which accepts a code-step config."}},"required":["name","config"],"description":"Optional inline build. When present, a first build is created alongside the agent. Only valid for an agent step."}},"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"},"type":{"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation.","type":"string","enum":["agent","code"]},"slack_enabled":{"nullable":true,"type":"boolean"},"microsoft_teams_enabled":{"nullable":true,"type":"boolean"},"agentic_memory_enabled":{"nullable":true,"type":"boolean"},"computer_use_sandbox_template_id":{"nullable":true,"type":"string","description":"\"standard\" when durably pinned to the standard Duvo desktop, a template UUID when pinned to a specific desktop, or null when following the team default."},"computer_use_vpn_config_id":{"nullable":true,"type":"string","description":"\"direct\" when durably pinned to direct internet, a VPN config UUID when pinned to a specific network, or null when following the team default."},"team_id":{"nullable":true,"type":"string"},"thread_id":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"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"],"description":"Schema version discriminator — must be \"v1\" for the current code-step schema"},"data":{"type":"object","properties":{"language":{"type":"string","enum":["python"],"description":"Language the step's program is written in"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["inline"]},"code":{"type":"string","minLength":1,"description":"Program held in the build config. Written to `main.py` and run with `python main.py`."}},"required":["kind","code"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["files"]},"startCommand":{"type":"string","minLength":1,"maxLength":2000,"description":"Command run from the root of the step's file system, e.g. \"python main.py\"."},"bundle":{"description":"The program's files, as a content-addressed manifest","type":"object","properties":{"bucket":{"type":"string","minLength":1,"description":"GCS bucket the bundle's blobs are stored in"},"files":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path the file is materialised at, relative to the work dir"},"sha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-f]{64}$","description":"Digest of the file's bytes, and the key its blob is stored at"},"sizeBytes":{"type":"integer","minimum":0,"maximum":131072,"description":"UTF-8 byte length of the file's contents"}},"required":["path","sha256","sizeBytes"],"additionalProperties":false},"description":"The program's files, one manifest entry each"}},"required":["bucket","files"],"additionalProperties":false}},"required":["kind","startCommand"],"additionalProperties":false}],"description":"Where the step's program comes from"},"files":{"default":[],"description":"Team file paths this step can read at run time","nullable":true,"type":"array","items":{"type":"string"}},"timeoutMs":{"default":600000,"description":"Wall-clock budget for one execution of the step","type":"integer","exclusiveMinimum":true,"maximum":3600000},"handoverRequired":{"default":false,"description":"When the step declares handover options, whether a run that exits cleanly without requesting one fails. Ignored when the step declares no options.","type":"boolean"},"maxConcurrency":{"description":"Most runs of this step that may be in flight at once on one queue, on top of the queue's own concurrency. Absent means only the queue's limit applies. Every claim enforces it; only cases handed to the step (handover, postpone, reprocess) are also kept out of the queue's free slots while the step is full. Cases a trigger or a revision route sends straight to a capped step can still take queue slots and wait there, delaying other steps on the same queue.","type":"integer","exclusiveMinimum":true,"maximum":1000}},"required":["language","source","files","timeoutMs","handoverRequired"],"additionalProperties":false,"description":"Code step configuration payload"}},"required":["version","data"],"additionalProperties":false},{"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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"additionalProperties":false,"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"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"},"auto_disabled_at":{"nullable":true,"type":"string"},"auto_disabled_reason":{"nullable":true,"type":"string"},"consecutive_missing_connection_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"first_missing_connection_failure_at":{"nullable":true,"type":"string"},"last_missing_connection_failure_at":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"},"pending_change":{"nullable":true,"type":"object","properties":{"automation_revision_id":{"type":"string"},"enabled":{"nullable":true,"type":"boolean"},"cron":{"nullable":true,"type":"string"},"frequency":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"task":{"nullable":true,"type":"string"}},"required":["automation_revision_id","enabled","cron","frequency","time","timezone","day","day_of_month","task"],"additionalProperties":false}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","auto_disabled_at","auto_disabled_reason","consecutive_missing_connection_failures","first_missing_connection_failure_at","last_missing_connection_failure_at","created_at","updated_at"],"additionalProperties":false}},"handover_to":{"nullable":true,"type":"string","format":"uuid"},"handover_options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Agent","deprecated":true}},"/v1/automations":{"get":{"operationId":"listAutomations","tags":["Automations"],"description":"List the team's automations, each with its live agent and queue counts. An automation is the workspace container an agent or queue belongs to on a team that has moved to Automations — its id is what `POST /queues` and `POST /agents` need as `automation_id`. Its `process_node_id` is the process whose attributes (Severity, Cost and the like) listProcessAttributeValues reads, and while process attributes are enabled `process_attributes` carries the values it holds that the caller may see.","parameters":[{"schema":{"default":250,"type":"integer","minimum":1,"maximum":250},"in":"query","name":"limit","required":false,"description":"Number of automations per page (1-250, default 250)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of automations to skip"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"automations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"agent_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code_step_count":{"default":0,"description":"How many of the agent_count members are code steps rather than agents. Defaulted rather than required for the same reason is_setting_up is.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queue_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"},"folder_id":{"default":null,"description":"The agent folder this automation sits in, or null when it sits at the root. Automations reuse the team's existing agent_folder tree rather than a parallel one, so a converted team keeps the grouping it already had. Defaulted rather than required for the same reason is_setting_up is: the client parses this response, and a backend that predates the column must not throw and take the automation's name down with it.","nullable":true,"type":"string"},"process_node_id":{"description":"The process identity this automation pins: the process whose attributes listProcessAttributeValues reads and whose People roles hang off it. Null when it has none. Set on the list response; optional so the create and patch responses, which share this shape, need not carry it.","nullable":true,"type":"string","format":"uuid"},"pinned_at":{"default":null,"description":"When the calling user pinned this automation to the top of their Automations list, or null when they have not. A pin is per user, like an Agent pin: teammates each keep their own. Defaulted rather than required for the same reason folder_id is.","nullable":true,"type":"string"},"is_setting_up":{"default":false,"description":"True while this Module automation's setup is under way. setup_started_at is stamped when the team starts setting up (and again by reopen-setup) and cleared when setup finishes, so this reads as currently in setup, not as a record of a past one. Read together with is_demo, which lives on the detail response: both true is a demo with a build under way; is_demo alone is a demo nobody has begun. On the summary rather than the detail so that a client holding only a list, create or patch response knows the state too, and so every write onto the shared automation collection carries it. Defaulted rather than required: the client parses this response, so a backend that predates the column must not throw and take the automation's name down with it, and nothing on the wire has always meant an automation nobody has set up.","type":"boolean"},"setup_step":{"default":null,"description":"The key of the latest confirmed setup step, null until Start Setup is pressed. The server only ever advances it forward, so reopening a setup can resume where the team got to. Cleared with the rest of the setup state when setup finishes.","nullable":true,"type":"string"},"setup_build_chat_id":{"default":null,"description":"The Ask Duvo chat building the automation from the approved proposal, or null while setup has not reached the build. Not a hard reference: the chat can be deleted while this still names it, which the client reads as no build yet.","nullable":true,"type":"string","format":"uuid"},"setup_progress":{"default":null,"description":"The setup facts behind the tile's Setup badge — captures uploaded, the team's own process map generated, a proposal written — or null while the automation is not being set up (and whenever it has no module process for the facts to hang off).","nullable":true,"type":"object","properties":{"has_captures":{"type":"boolean"},"has_process_map":{"type":"boolean"},"has_proposal":{"type":"boolean"}},"required":["has_captures","has_process_map","has_proposal"],"additionalProperties":false},"run_scope":{"description":"Who the automation's runs execute as: its members, each with their own Connections (`personal`), or the team, with shared Connections only (`team`). An automation becomes `team` once, through convert-to-team, and never goes back. Optional because a backend that predates Team automations does not send it; a client treats absence as `personal` and offers no conversion.","type":"string","enum":["personal","team"]},"viewer_can_edit":{"description":"Whether the caller may change this automation. An automation takes its agents' ownership rule: a Builder may edit one whose every agent they created, and Lead Builder or above may edit any. Sent by the list and detail endpoints; absent from create and update responses, where the client falls back to the caller's role.","type":"boolean"},"process_attributes":{"description":"The attribute values this automation holds through the process it runs (`process_node_id`), ordered by attribute name; join them to listProcessAttributes for names and labels. A value on a process the caller may not see is left out. Sent by the list endpoint while process attributes are enabled for the team; absent otherwise and from create and update responses.","type":"array","items":{"oneOf":[{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["select"]},"value_id":{"type":"string","format":"uuid"}},"required":["attribute_id","type","value_id"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["number"]},"number":{"type":"number"}},"required":["attribute_id","type","number"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["attribute_id","type","text"],"additionalProperties":false}]}}},"required":["id","name","agent_count","code_step_count","queue_count","created_at","updated_at","folder_id","pinned_at","is_setting_up","setup_step","setup_build_chat_id","setup_progress"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["automations","total","limit","offset"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Automations","deprecated":true},"post":{"operationId":"createAutomation","tags":["Automations"],"description":"Create a new automation. Its first agent is created alongside it so the caller lands on something editable; `first_agent` seeds that agent's name, configuration, and connections instead of the defaults. On a team on revision semantics the automation holds a single draft revision and no live revision, with the agent's first build bound into that draft, and the first activation makes the draft revision 1; on any other team the automation is a bare container and the build stands on its own.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Human-readable automation name."},"first_agent":{"description":"Seeds the automation's first agent, for example from an agent template. Anything left out takes the platform default.","type":"object","properties":{"name":{"description":"Name of the first agent. Defaults to the platform's default agent name.","type":"string","minLength":1},"config":{"description":"Configuration of the first agent's build (latest schema version only). Defaults to the platform's default agent configuration.","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","x-extensible-enum":["claude-haiku-5-5","claude-haiku-5-5[1m]","claude-sonnet-5-5","claude-sonnet-5-5[1m]","claude-opus-5-5","claude-opus-5-5[1m]","kimi-k3.1-pro","kimi-k3.1-pro-duvo","glm-5.3-flash","deepseek-v4.1-flash","deepseek-v4.1-flash-1017","minimax-m3","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-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","claude-opus-4-8","claude-opus-4-8[1m]","claude-haiku-4-5-20251001","claude-sonnet-5","claude-sonnet-5[1m]","claude-opus-5","claude-opus-5[1m]","glm-5.2","qwen3.6-27b","qwen3.8-max","deepseek-v4-flash","kimi-k3","kimi-k3-duvo"],"description":"Model identifier used for the primary agent loop (Claude, or an OSS model when the team's oss_models flag — or oss_models_public for the public subset — is enabled)"}},"required":["model"],"description":"Primary 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":"Team files that should be available to the agent, each given as the relative file path returned in the `path` field of `GET /v2/teams/{teamId}/files` (for example `report.md` or `folder/doc.md`) — not the `id` field, which is a GCS object identifier.","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":"Retired — Sub-Assignments was removed. Accepted for backwards compatibility and ignored.","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"]}},"supervisedMode":{"description":"Run the agent under Duvo's permission classifier: every tool call is classified as allow/deny/ask, with 'ask' routed to human-in-the-loop approval. Mutually exclusive with browsing and computer-use connections.","type":"boolean"}},"additionalProperties":{}}},"required":["models","input"],"description":"Agent configuration payload"}},"required":["version","data"]},"integration_slugs":{"description":"Connection types to attach to the first agent's build, in place of the platform's default connections. A type the team has no connection for is skipped.","type":"array","items":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder","system","email-attachments-reader"]}}}}},"required":["name"]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"agent_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code_step_count":{"default":0,"description":"How many of the agent_count members are code steps rather than agents. Defaulted rather than required for the same reason is_setting_up is.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queue_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"},"folder_id":{"default":null,"description":"The agent folder this automation sits in, or null when it sits at the root. Automations reuse the team's existing agent_folder tree rather than a parallel one, so a converted team keeps the grouping it already had. Defaulted rather than required for the same reason is_setting_up is: the client parses this response, and a backend that predates the column must not throw and take the automation's name down with it.","nullable":true,"type":"string"},"process_node_id":{"description":"The process identity this automation pins: the process whose attributes listProcessAttributeValues reads and whose People roles hang off it. Null when it has none. Set on the list response; optional so the create and patch responses, which share this shape, need not carry it.","nullable":true,"type":"string","format":"uuid"},"pinned_at":{"default":null,"description":"When the calling user pinned this automation to the top of their Automations list, or null when they have not. A pin is per user, like an Agent pin: teammates each keep their own. Defaulted rather than required for the same reason folder_id is.","nullable":true,"type":"string"},"is_setting_up":{"default":false,"description":"True while this Module automation's setup is under way. setup_started_at is stamped when the team starts setting up (and again by reopen-setup) and cleared when setup finishes, so this reads as currently in setup, not as a record of a past one. Read together with is_demo, which lives on the detail response: both true is a demo with a build under way; is_demo alone is a demo nobody has begun. On the summary rather than the detail so that a client holding only a list, create or patch response knows the state too, and so every write onto the shared automation collection carries it. Defaulted rather than required: the client parses this response, so a backend that predates the column must not throw and take the automation's name down with it, and nothing on the wire has always meant an automation nobody has set up.","type":"boolean"},"setup_step":{"default":null,"description":"The key of the latest confirmed setup step, null until Start Setup is pressed. The server only ever advances it forward, so reopening a setup can resume where the team got to. Cleared with the rest of the setup state when setup finishes.","nullable":true,"type":"string"},"setup_build_chat_id":{"default":null,"description":"The Ask Duvo chat building the automation from the approved proposal, or null while setup has not reached the build. Not a hard reference: the chat can be deleted while this still names it, which the client reads as no build yet.","nullable":true,"type":"string","format":"uuid"},"setup_progress":{"default":null,"description":"The setup facts behind the tile's Setup badge — captures uploaded, the team's own process map generated, a proposal written — or null while the automation is not being set up (and whenever it has no module process for the facts to hang off).","nullable":true,"type":"object","properties":{"has_captures":{"type":"boolean"},"has_process_map":{"type":"boolean"},"has_proposal":{"type":"boolean"}},"required":["has_captures","has_process_map","has_proposal"],"additionalProperties":false},"run_scope":{"description":"Who the automation's runs execute as: its members, each with their own Connections (`personal`), or the team, with shared Connections only (`team`). An automation becomes `team` once, through convert-to-team, and never goes back. Optional because a backend that predates Team automations does not send it; a client treats absence as `personal` and offers no conversion.","type":"string","enum":["personal","team"]},"viewer_can_edit":{"description":"Whether the caller may change this automation. An automation takes its agents' ownership rule: a Builder may edit one whose every agent they created, and Lead Builder or above may edit any. Sent by the list and detail endpoints; absent from create and update responses, where the client falls back to the caller's role.","type":"boolean"},"process_attributes":{"description":"The attribute values this automation holds through the process it runs (`process_node_id`), ordered by attribute name; join them to listProcessAttributes for names and labels. A value on a process the caller may not see is left out. Sent by the list endpoint while process attributes are enabled for the team; absent otherwise and from create and update responses.","type":"array","items":{"oneOf":[{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["select"]},"value_id":{"type":"string","format":"uuid"}},"required":["attribute_id","type","value_id"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["number"]},"number":{"type":"number"}},"required":["attribute_id","type","number"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["attribute_id","type","text"],"additionalProperties":false}]}}},"required":["id","name","agent_count","code_step_count","queue_count","created_at","updated_at","folder_id","pinned_at","is_setting_up","setup_step","setup_build_chat_id","setup_progress"],"additionalProperties":false},"draft_revision_id":{"nullable":true,"description":"The draft revision the new automation was created with, or null when the team isn't on revision semantics and the automation is a bare container. A manually created automation has no live revision until it is first activated, so this is where its first agent build belongs.","type":"string","format":"uuid"},"first_agent_id":{"type":"string","format":"uuid","description":"The automation's first agent, created alongside it with its first build bound into the draft revision, so the caller can open it directly."}},"required":["automation","draft_revision_id","first_agent_id"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Automation","deprecated":true}},"/v1/process-attributes":{"get":{"operationId":"listProcessAttributes","tags":["Automations"],"description":"List the team's attributes: the fields, like Severity, Cost or Status, that the app shows as \"Attributes\" on every automation. Each has its `id`, `name`, `type` (`select` with its `values` in order, each with an `id`, `value` label and `color_hue`; `number` with its `unit`; or `text`) and `process_count`, how many processes hold a value of it. Read an automation's own values with listProcessAttributeValues, joining them to these by `attribute_id` (and a select value by `value_id`) for names and labels.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"attributes":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"process_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"show_in_list":{"default":false,"type":"boolean"},"revision":{"type":"string"},"type":{"type":"string","enum":["select"]},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","value","color_hue"],"additionalProperties":false}}},"required":["id","name","process_count","show_in_list","revision","type","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"process_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"show_in_list":{"default":false,"type":"boolean"},"revision":{"type":"string"},"type":{"type":"string","enum":["number"]},"unit":{"nullable":true,"type":"string"},"is_unit_prefix":{"type":"boolean"}},"required":["id","name","process_count","show_in_list","revision","type","unit","is_unit_prefix"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"process_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"show_in_list":{"default":false,"type":"boolean"},"revision":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["id","name","process_count","show_in_list","revision","type"],"additionalProperties":false}]}}},"required":["attributes"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Process Attributes","deprecated":true},"post":{"operationId":"createProcessAttribute","tags":["Automations"],"description":"Create an attribute on the team, which every automation can then hold a value of: a select attribute with its values in the order given, a number attribute with an optional unit before or after the number, or a text attribute. Names are unique on the team, ignoring case. Requires the team's Manager role or above.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["select"]},"name":{"type":"string","minLength":1,"maxLength":80},"expected_revision":{"type":"string","minLength":1},"values":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string","minLength":1,"maxLength":80},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["value","color_hue"]}}},"required":["type","name","values"]},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"name":{"type":"string","minLength":1,"maxLength":80},"expected_revision":{"type":"string","minLength":1},"unit":{"nullable":true,"type":"string","maxLength":16},"is_unit_prefix":{"default":true,"type":"boolean"}},"required":["type","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"name":{"type":"string","minLength":1,"maxLength":80},"expected_revision":{"type":"string","minLength":1}},"required":["type","name"]}]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"attribute":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"process_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"show_in_list":{"default":false,"type":"boolean"},"revision":{"type":"string"},"type":{"type":"string","enum":["select"]},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","value","color_hue"],"additionalProperties":false}}},"required":["id","name","process_count","show_in_list","revision","type","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"process_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"show_in_list":{"default":false,"type":"boolean"},"revision":{"type":"string"},"type":{"type":"string","enum":["number"]},"unit":{"nullable":true,"type":"string"},"is_unit_prefix":{"type":"boolean"}},"required":["id","name","process_count","show_in_list","revision","type","unit","is_unit_prefix"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"process_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"show_in_list":{"default":false,"type":"boolean"},"revision":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["id","name","process_count","show_in_list","revision","type"],"additionalProperties":false}]}},"required":["attribute"],"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}}}},"409":{"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":"Create Process Attribute","deprecated":true}},"/v1/process-attributes/automations":{"get":{"operationId":"listAutomationAttributeValues","tags":["Automations"],"description":"List the team's automations by name, each with the attribute values it holds (Severity: High, Cost: USD 1,200), in one read. Answer \"which automations have Severity High\" or \"list automations with their Severity\" from this, not one automation at a time: pass `attribute_id` for only the automations holding that attribute, and `value_id` too for only those holding that select value. Each automation lists its `assignments` with `attribute_id`, `type` and a select `value_id`, a `number` or a `text`; join them to listProcessAttributes for names and labels. An attribute an automation does not hold is not listed: it is not set. `total` counts every match: page with `offset` until you have them all. An automation whose process you may not see is left out.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"attribute_id","required":false,"description":"Only automations holding this attribute, from listProcessAttributes"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"value_id","required":false,"description":"With attribute_id, only automations holding this select value of it, by the value's `id`, never its label"},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Automations per page (1-100, default 50)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of automations to skip"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"automations":{"type":"array","items":{"type":"object","properties":{"automation_id":{"type":"string","format":"uuid"},"automation_name":{"type":"string"},"process_node_id":{"nullable":true,"description":"The automation's process, or null when it has none and so holds no attributes","type":"string","format":"uuid"},"assignments":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["select"]},"value_id":{"type":"string","format":"uuid"}},"required":["attribute_id","type","value_id"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["number"]},"number":{"type":"number"}},"required":["attribute_id","type","number"],"additionalProperties":false},{"type":"object","properties":{"attribute_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["attribute_id","type","text"],"additionalProperties":false}]},"description":"The values it holds, one per attribute, ordered by attribute name. An attribute it does not hold is not listed: it is not set"}},"required":["automation_id","automation_name","process_node_id","assignments"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many automations match, across every page"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["automations","total","limit","offset"],"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}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Automation Attribute Values","deprecated":true}},"/v1/modules/{slug}/automations":{"post":{"operationId":"setUpModule","tags":["Modules"],"description":"Set up a Duvo Module (a ready-made solution such as AP Invoice Intake & Routing or Freight Audit) as a new Automation on the team, the same as pressing Set up on the Module in the web app. Creates the Module's Agents, code steps, Queues, Policy and dashboards in one call. If the team already has a demo of this Module open, the call is refused with 409 unless `convert_existing_demo` is true; then that demo becomes the Automation and its sample cases and Runs are deleted, so ask the user first. The Automation starts in setup and does not run yet: call `getAutomationReadiness` next to see what is left of the setup, the Policy questions, the current process and the automation proposal, whose approval builds the automation. Connections and routing come once the approved proposal is being built, so don't raise them before. Give the user the `url`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{"convert_existing_demo":false},"type":"object","properties":{"convert_existing_demo":{"default":false,"description":"Set true only after the user agreed to it: when the team already has a demo of this Module open, that demo becomes the Automation and its sample cases and Runs are deleted, with no undo. Left false, such a call is refused with 409 and nothing changes.","type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","enum":["chargebacks","freight-audit","inbound-to-store","mode-mix","ap-invoice-intake-routing","payables-audit","demand-supply-balancing","po-management"]},"in":"path","name":"slug","required":true,"description":"Module template to set up, for example `ap-invoice-intake-routing` for AP Invoice Intake & Routing or `freight-audit` for Freight Audit."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"automation_id":{"type":"string","format":"uuid","description":"The team's new Automation, built from the Module template."},"name":{"nullable":true,"description":"The new Automation's name, or null when it could not be read back after setup; the Automation exists either way.","type":"string"},"is_setting_up":{"type":"boolean","enum":[true],"description":"Always true: the Automation starts in setup, with its Policy, current process and automation proposal still to do."},"link":{"nullable":true,"description":"Root-relative web-app path to the Automation's setup screen, or null when this viewer has no such tab.","type":"string"},"url":{"nullable":true,"description":"The full web-app URL of `link`.","type":"string"}},"required":["automation_id","name","is_setting_up","link","url"],"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}}}},"409":{"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":"Set Up Module","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"},"automation_count":{"type":"number","description":"Number of automations filed directly inside this folder"},"descendant_automation_count":{"type":"number","description":"Number of automations inside this folder and every folder beneath it — what deleting this folder would lift to the root"}},"required":["id","name","team_id","parent_folder_id","created_at","updated_at","agent_count","subfolder_count","automation_count","descendant_automation_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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Move Agents To Folder","deprecated":true}},"/v1/agent-folders/move-automations":{"post":{"operationId":"moveAutomationsToFolder","tags":["Agent Folders"],"description":"Move one or more automations into an agent folder, or to the root level.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"automation_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid"},"description":"IDs of the automations to move. Must be unique."},"folder_id":{"nullable":true,"description":"Destination folder ID. Pass null to move the automations to the root level.","type":"string","format":"uuid"}},"required":["automation_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 automations 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Move Automations To Folder","deprecated":true}},"/v1/queues":{"get":{"operationId":"listQueues","tags":["Queues"],"description":"List 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"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"automation_id","required":false,"description":"Only return queues belonging to this automation."}],"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"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string"},"created_at":{"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},"paused_at":{"description":"When the queue was paused, or null while it runs. A paused queue starts no new case: runs already in progress finish, and its pending cases stay pending until it is resumed.","nullable":true,"type":"string"},"paused_by":{"description":"The user who paused the queue, or null while it runs or when that user's profile is gone.","nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"has_approvals":{"type":"boolean"},"setup_status":{"description":"Whether the Queue's route can take new cases right now, and why not. Null only when it could not be computed. Absent while the feature is not enabled for the team.","nullable":true,"type":"object","properties":{"status":{"type":"string","description":"`active` when the route can take new cases; `inactive` when nothing starts them, by choice, plan or demo; `deactivated` when the team reached its usage limit; `needs_setup` when something on the route must be added or fixed.","x-extensible-enum":["active","inactive","deactivated","needs_setup"]},"reasons":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","description":"Why the Queue is not active. `no_agent`, `routing_off`, `no_entitlement` and `demo` make it inactive; `usage_limit` deactivates it; `no_live_version`, `trigger_conflict`, `connection_missing` and `connection_broken` mean it needs setup.","x-extensible-enum":["no_live_version","trigger_conflict","connection_missing","connection_broken","usage_limit","no_agent","routing_off","no_entitlement","demo"]},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"description":"The Agents the reason concerns: the routed Agent, every Agent in a trigger conflict, or none."},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."}},"required":["reason","agents","connections"],"additionalProperties":false},"description":"Every reason the Queue is not active, needs-setup reasons first, then deactivated, then inactive. Empty when the Queue is active."},"unchecked":{"type":"array","items":{"type":"string","x-extensible-enum":["entitlement","usage"]},"description":"Inputs that could not be read just now, so cases may be waiting for a reason not listed. Empty in normal operation."}},"required":["status","reasons","unchecked"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Queues","deprecated":true},"post":{"operationId":"createQueue","tags":["Queues"],"description":"Create a new queue.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Queue name. A standalone queue must be uniquely named within the team. A queue created inside an automation instead has to be uniquely named within a revision, which is checked when that revision is activated."},"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"},"automation_id":{"description":"Automation this queue belongs to. Optional for teams not yet migrated to Automations; required once a team has migrated.","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"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string"},"created_at":{"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},"paused_at":{"description":"When the queue was paused, or null while it runs. A paused queue starts no new case: runs already in progress finish, and its pending cases stay pending until it is resumed.","nullable":true,"type":"string"},"paused_by":{"description":"The user who paused the queue, or null while it runs or when that user's profile is gone.","nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"has_approvals":{"type":"boolean"},"setup_status":{"description":"Whether the Queue's route can take new cases right now, and why not. Null only when it could not be computed. Absent while the feature is not enabled for the team.","nullable":true,"type":"object","properties":{"status":{"type":"string","description":"`active` when the route can take new cases; `inactive` when nothing starts them, by choice, plan or demo; `deactivated` when the team reached its usage limit; `needs_setup` when something on the route must be added or fixed.","x-extensible-enum":["active","inactive","deactivated","needs_setup"]},"reasons":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","description":"Why the Queue is not active. `no_agent`, `routing_off`, `no_entitlement` and `demo` make it inactive; `usage_limit` deactivates it; `no_live_version`, `trigger_conflict`, `connection_missing` and `connection_broken` mean it needs setup.","x-extensible-enum":["no_live_version","trigger_conflict","connection_missing","connection_broken","usage_limit","no_agent","routing_off","no_entitlement","demo"]},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The Agent's ID."},"name":{"type":"string","description":"The Agent's current name."}},"required":["id","name"],"additionalProperties":false},"description":"The Agents the reason concerns: the routed Agent, every Agent in a trigger conflict, or none."},"connections":{"type":"array","items":{"type":"object","properties":{"integration_type":{"type":"string","description":"The Connection's catalog integration type, e.g. \"gmail\"."},"custom_integration_id":{"nullable":true,"description":"The custom Connection's ID, or null for a catalog Connection.","type":"string","format":"uuid"},"name":{"type":"string","description":"The Connection's name."},"personal":{"type":"boolean","description":"True when the account is the runner's own personal account, which only that person can reconnect. False for a shared account, or when no account is set up."}},"required":["integration_type","custom_integration_id","name","personal"],"additionalProperties":false},"description":"The Connections a `connection_missing` or `connection_broken` reason names. Empty for every other reason."}},"required":["reason","agents","connections"],"additionalProperties":false},"description":"Every reason the Queue is not active, needs-setup reasons first, then deactivated, then inactive. Empty when the Queue is active."},"unchecked":{"type":"array","items":{"type":"string","x-extensible-enum":["entitlement","usage"]},"description":"Inputs that could not be read just now, so cases may be waiting for a reason not listed. Empty in normal operation."}},"required":["status","reasons","unchecked"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Queue","deprecated":true}},"/v1/case-queues/stats":{"get":{"operationId":"getBatchQueueStats","tags":["Cases"],"description":"Get case status counts for many Queues in ONE call. Use this after listQueues whenever you need per-Queue counts — cases waiting on a human, needing review, pending, failed — instead of calling listCases or searchCases once per Queue. Results are keyed by Queue ID and include zero counts for Queues with no matching cases; Queue IDs from other teams are silently dropped. For a count on a single Queue with richer filters, listCases with count_only=true is the alternative.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"queue_ids","required":true,"description":"Comma-separated Queue IDs to aggregate. Include 1 to 100 IDs from the team in the URL."},{"schema":{"type":"string"},"in":"query","name":"created_at_from","required":false,"description":"Inclusive case creation lower bound. Use an ISO 8601 timestamp or a relative duration such as 7d or 12h. Omit it for no lower bound."},{"schema":{"type":"string"},"in":"query","name":"created_at_to","required":false,"description":"Exclusive case creation upper bound. Use an ISO 8601 timestamp or a relative duration such as 7d or 12h. Omit it for no upper bound."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"stats":{"type":"object","additionalProperties":{"type":"object","properties":{"total":{"type":"number"},"pending":{"type":"number"},"processing":{"type":"number"},"needs_input":{"type":"number"},"postponed":{"type":"number"},"evaluating":{"type":"number"},"resolved":{"type":"number"},"needs_review":{"type":"number"},"canceled":{"type":"number"},"critical":{"type":"number"},"medium":{"type":"number"},"low":{"type":"number"},"claimed":{"type":"number","deprecated":true,"description":"Deprecated alias of processing. Read processing instead."},"waiting":{"type":"number","deprecated":true,"description":"Deprecated alias of needs_input. Read needs_input instead."},"completed":{"type":"number","deprecated":true,"description":"Deprecated count of all settled-OK cases. Read resolved (finished cleanly), processing, and needs_review instead."},"failed":{"type":"number","deprecated":true,"description":"Deprecated count of all errored or stopped cases. Read needs_review and canceled instead."}},"required":["total","pending","processing","needs_input","postponed","evaluating","resolved","needs_review","canceled","critical","medium","low","claimed","waiting","completed","failed"],"additionalProperties":false}}},"required":["stats"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Batch Queue Stats","deprecated":true}},"/v1/runs":{"get":{"operationId":"listRuns","tags":["Runs"],"description":"List runs for the current team. Supports filtering by agent, user, queue, status, etc. Messages, evaluation data, and queue metadata are included where available. Set count_only=true to skip Run row selection and enrichment. The normal response shape is returned with data: [] and the matching total. To sweep a whole team, follow `next_cursor` rather than raising `offset`.","parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of runs per page (1-100, default 20)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of runs to skip. Every skipped run is still read by the database, so deep offsets get slower page by page; to walk a whole team's history, page with `cursor` instead."},{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false,"description":"Resume after the run a previous page ended on: pass the `next_cursor` that page returned, with the same filters and sort_order. Unlike offset, a cursor page does not re-read the runs before it, so a sweep does not slow down as it goes deeper; send `include_total=false` on the first page to skip the full count too. Runs created in between cannot shift a boundary already passed, so pages do not repeat or skip runs the way offset pages do. A run created or completed while a sweep is in progress can still be missed by that sweep, so to export runs continuously, poll with `since` and a short overlap and deduplicate on run id. Cannot be combined with `offset`. 400 when the value is not a valid runs cursor."},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"include_total","required":false,"description":"Whether to return `total`, the count of every matching run. Counting walks every match, so it costs far more than the page itself on a large team. Defaults to true on a first page and false on a `cursor` page, where `total` is null unless this is true. Implied by `count_only`."},{"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","expired","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":"automation_id","required":false,"description":"Filter to runs that ran under this automation. A run keeps the automation it was created under, even after its agent moves to another automation"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"user_id","required":false,"description":"Filter to runs owned by this user. Callers whose team role is team:owner, team:superadmin or team:lead-builder may filter by any user. Everyone else, team:admin included, sees their own runs, plus the team's Team runs from team:member up, and this filter, whatever its value, narrows them to their own runs, unless the request comes from a dashboard"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"case_queue_id","required":false,"description":"Filter to runs associated with this 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":"Filter on the run's latest successful evaluation: true returns only runs it flagged, false only runs it did not. Only the latest evaluation counts — an older flag does not match — and a run whose latest evaluation errored, or that has none, counts as unflagged. Omit to return both."},{"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,"description":"Return runs completed at or after this ISO-8601 timestamp. Runs that have not completed are excluded."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"until","required":false,"description":"Return runs completed before this ISO-8601 timestamp. The upper bound is exclusive. Runs that have not completed are excluded."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"digest_id","required":false},{"schema":{"default":"false","type":"string","enum":["true","false"]},"in":"query","name":"count_only","required":false,"description":"Skip row selection and enrichment. The normal list response shape is returned with an empty row array and the matching total."}],"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","expired"]},"source":{"nullable":true,"type":"string"},"title":{"type":"string"},"run_number":{"type":"number"},"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"agent_type":{"type":"string","enum":["agent","code"],"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation — a step's builds all belong to the matching config family."},"build_id":{"type":"string","format":"uuid"},"automation_id":{"nullable":true,"type":"string","format":"uuid"},"automation_name":{"nullable":true,"type":"string"},"user_id":{"nullable":true,"type":"string","format":"uuid"},"scope":{"type":"string","enum":["personal","team"]},"created_by":{"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":{"evaluationId":{"type":"string","format":"uuid"},"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},"sandbox_expired_at":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","created_at","updated_at","started_at","completed_at","status","source","title","run_number","agent_id","agent_name","build_id","automation_id","automation_name","user_id","case_queue_item_id","case_queue_id","case_queue_name","case_title","postponed_to","submitted_prompt_count"],"additionalProperties":false}},"total":{"nullable":true,"description":"Total runs matching the filters, ignoring pagination. Null when no count was requested (a `cursor` page without `include_total=true`, or `include_total=false`) — distinct from a count of 0.","type":"number"},"has_more":{"default":false,"description":"Whether another page exists past this one, determined by looking one row ahead. False on a count_only response.","type":"boolean"},"next_cursor":{"default":null,"description":"Pass as `cursor` (same filters, same sort_order) to fetch the next page. Null when `has_more` is false. Continues right after the last run on this page.","nullable":true,"type":"string"},"note":{"description":"Present when the caller's team role left other people's Runs out of the list, or replaced a user_id filter with the caller's own id: what to tell the person asking.","type":"string"}},"required":["data","total","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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, run_expired)","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"},"scope":{"description":"Who the run executes as: `personal` (the member it belongs to) or `team` (the team, for a run of a Team automation). Visible to every Member+ of the team when `team`. Absent from older servers; read a missing value as `personal`.","type":"string","enum":["personal","team"]},"created_by":{"description":"ID of the user who started the run, or null when no person did (a schedule, a trigger, a case).","nullable":true,"type":"string","format":"uuid"}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"source":{"nullable":true,"description":"How the skill was created: 'browser' or 'computer_use' if generated from a recording, otherwise null (created/uploaded)","type":"string","enum":["browser","computer_use"]},"computer_use_backend":{"nullable":true,"description":"For computer-use skills, the backend it was recorded on: 'rdp' (Remote Desktop) or 'sandbox' (Duvo sandbox); null for other skills. Used to warn about backend mismatches at build time.","type":"string","enum":["rdp","sandbox"]},"kind":{"type":"string","enum":["skill","workflow"],"description":"Whether this is an authored/uploaded 'skill' or a recorded 'workflow' (deterministic workflow execution). Surfaced under the Skills vs Workflows tabs."},"use_in_ask_duvo":{"type":"boolean","description":"Whether every new Ask Duvo chat in the team starts with this skill available to the agent. Always false for system skills and workflows."}},"required":["id","name","description","team_id","updated_at","updated_by_user_id","updated_by_user_name","source","computer_use_backend","kind","use_in_ask_duvo"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Processes","deprecated":true}},"/v1/clarity-v2/processes/summaries":{"get":{"operationId":"listClarityProcessSummaries","tags":["ClarityV2"],"description":"Cross-process portfolio digest for every completed Clarity process on the team: per-process summary, SWOT, projected impact, and a step skeleton (role, system, and flow edges) — without step prose or source excerpts. Paginated (default 5, max 10). Use this to answer portfolio-wide questions in one pass; fetch a single process's full detail via getClarityProcessSnapshot only for the few that matter.","parameters":[{"schema":{"default":5,"type":"integer","minimum":1,"maximum":10},"in":"query","name":"limit","required":false,"description":"Processes per page (1-10, default 5). Keeps the response under the MCP output cap."},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Processes to skip (default 0)."},{"schema":{"default":"skeleton","type":"string","enum":["skeleton","summary"]},"in":"query","name":"detail","required":false,"description":"skeleton = + per-step role/system/flow edges (default); summary = summary+SWOT+impact only (cheaper, for pure ranking)."},{"schema":{"default":"false","type":"string","enum":["true","false"]},"in":"query","name":"include_current_steps","required":false,"description":"Include the as-is (current) step skeleton too. Default false = proposed (to-be) steps only. Pass the literal string 'true' or 'false' (z.coerce.boolean treats any non-empty value, including 'false', as true)."}],"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"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"current":{"type":"object","properties":{"summary":{"nullable":true,"type":"string"},"swot":{"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}},"required":["summary","swot"],"additionalProperties":false},"proposal":{"nullable":true,"type":"object","properties":{"summary":{"nullable":true,"type":"string"},"projectedImpact":{"nullable":true,"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"role":{"nullable":true,"type":"string"},"system":{"nullable":true,"type":"string"},"nodeType":{"nullable":true,"type":"string"},"nodeSubtype":{"nullable":true,"type":"string"},"condition":{"nullable":true,"type":"string"},"readiness":{"nullable":true,"type":"string"},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string"},"label":{"nullable":true,"type":"string"},"isDefault":{"type":"boolean"}},"required":["stepId","label","isDefault"],"additionalProperties":false}}},"required":["id","title","role","system","nodeType","nodeSubtype","condition","readiness","targetSteps"],"additionalProperties":false}}},"required":["summary","projectedImpact","steps"],"additionalProperties":false},"roles":{"type":"array","items":{"type":"string"}},"systems":{"type":"array","items":{"type":"string"}}},"required":["id","name","status","created_at","updated_at","current","proposal","roles","systems"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Process Summaries","deprecated":true}},"/v1/clarity/processes":{"post":{"operationId":"createClarityProcess","tags":["Clarity"],"description":"Create a new Clarity v2 process for the current team (Builder+). Optional `name` defaults server-side when omitted. Response uses camelCase `createdAt` to match existing FE clients.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Optional process name; server default applies when omitted","type":"string","minLength":1,"maxLength":255}}}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Created Clarity process 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":"Process lifecycle status"},"version":{"type":"number","enum":[2],"description":"Always 2 for newly created processes"},"createdAt":{"type":"string","description":"ISO 8601 creation timestamp"}},"required":["id","name","status","version","createdAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Process","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 the custom connection types this team owns or has been granted by another team in its organization. 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"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"description":"Native OAuth provider key used in the native OAuth start endpoint's provider path parameter. Read this value from listIntegrations; null when the integration type has no native OAuth provider.","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"},"broken_at":{"nullable":true,"type":"string","format":"date-time"},"broken_reason":{"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","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"description":"Native OAuth provider key used in the native OAuth start endpoint's provider path parameter. Read this value from listIntegrations; null when the integration type has no native OAuth provider.","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"},"broken_at":{"nullable":true,"type":"string","format":"date-time"},"broken_reason":{"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","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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, and instances another team has granted to this one, when the org-level Connections sharing setting is on. The `type` query parameter filters by integration type, not native OAuth provider key.","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"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"description":"Native OAuth provider key used in the native OAuth start endpoint's provider path parameter. Read this value from listIntegrations; null when the integration type has no native OAuth provider.","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"},"broken_at":{"nullable":true,"type":"string","format":"date-time"},"broken_reason":{"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","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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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. A custom MCP server is registered first with `POST /v2/teams/:team_id/integrations/custom`, and its id is passed as `custom_integration_id`; a custom MCP connection without one is refused with 400. OAuth-based integrations (native) require an interactive browser flow — start them with the dedicated OAuth endpoints (`/v2/teams/:team_id/connections/oauth/native/:provider/start` or `/v2/teams/:team_id/connections/oauth/mcp/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"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"description":"Native OAuth provider key used in the native OAuth start endpoint's provider path parameter. Read this value from listIntegrations; null when the integration type has no native OAuth provider.","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"},"broken_at":{"nullable":true,"type":"string","format":"date-time"},"broken_reason":{"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","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Connection","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":{"description":"Raw MCP server URL to probe (for custom MCP servers)","type":"string","format":"uri"},"integration_slug":{"description":"Catalog integration slug. The backend resolves the MCP server URL and dummy auth headers server-side — no server_url or headers needed.","type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","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","sap-ecc","msteams","human-in-the-loop","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","jira","ssh","scheduling","github","linear-native","notion-native","granola","apify","bamboohr","edi","maersk","infor-nexus","dhl","fedex","ups","dsv","trinity-logistics","ontrac","dachser","hellmann","omni-logistics","ceva-logistics","dpd","canada-post","o9","manhattan","blue-yonder","system","email-attachments-reader"]},"headers":{"description":"Optional HTTP headers for authentication (raw server_url mode only)","type":"object","additionalProperties":{"type":"string"}}}}}}},"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":{}},"output_schema":{"type":"object","additionalProperties":{}}},"required":["name"],"additionalProperties":false}},"error":{"type":"string"},"code":{"type":"string","enum":["listing_unavailable","probe_failed"]}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true}},"/v1/credentials":{"get":{"operationId":"listSecrets","tags":["Secrets"],"description":"List env-var secrets the caller can reach in this team — team-shared (user_id IS NULL), the caller's own personal entries, and secrets another team in the organization has granted to this team. 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"},"usage":{"type":"object","properties":{"agents":{"type":"number"},"code_steps":{"type":"number"}},"required":["agents","code_steps"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 lead builder 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"},"usage":{"type":"object","properties":{"agents":{"type":"number"},"code_steps":{"type":"number"}},"required":["agents","code_steps"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Secret","deprecated":true}},"/v1/invites":{"post":{"operationId":"createTeamInvite","tags":["Invites"],"description":"Invite one person to a team. Pass `processId` to invite them to a specific Clarity process instead of the whole team (that requires the `team:clarity-member` role). Creating the invitation does NOT email anyone — call sendTeamInviteEmail with the returned id to deliver it, or use bulkCreateTeamInvites, which creates and emails in one step.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address of the person to invite."},"role":{"type":"string","description":"Team role to grant. One of: team:owner, team:superadmin, team:admin (deprecated), team:manager, team:builder, team:member, team:clarity-member. You cannot grant a role above your own. Process invitations must use team:clarity-member."},"processId":{"description":"Invite the person to this Clarity process rather than the whole team. Requires the team:clarity-member role.","type":"string","format":"uuid"},"process_role_id":{"description":"Configured Process role to assign alongside the Clarity invitation. Requires processId; the role must belong to that Process.","type":"string","format":"uuid"},"interviewRequested":{"description":"Whether to ask the person to record an interview about the process. Defaults to true. Pass false to give Clarity Member access to the process only; that requires processId and the clarity_invite_without_interview feature flag. Inviting someone already asked for an interview with false keeps the request.","type":"boolean"}},"required":["email","role"]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"team_id":{"type":"string"},"email":{"type":"string","format":"email"},"invited_by":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"name":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"process_id":{"nullable":true,"type":"string","format":"uuid"},"team":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"invitedBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["id","name","email"],"additionalProperties":false},"process":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"interview_requested":{"type":"boolean"}},"required":["id","team_id","email","invited_by","role","status","name","created_at","team","invitedBy"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Team Invite","deprecated":true}},"/v1/invites/{id}":{"delete":{"operationId":"deleteTeamInvite","tags":["Invites"],"description":"Revoke a pending invitation so its link and email can no longer be used. Accepts either a team invitation (requires Superadmin or above on the invitation's team) or a Clarity process invitation (requires the process creator or a team admin). Revoking one side also revokes its linked counterpart when a process invitation created both. An invitation already accepted or declined is refused with 409, including one accepted a moment before, and process access the invitee already holds through an earlier acceptance is kept, so revoking never undoes an acceptance.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"ID of the invitation to revoke. Accepts either a team invitation or a Clarity process invitation."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Team Invite","deprecated":true},"patch":{"operationId":"updateTeamInvite","tags":["Invites"],"description":"Change the role on a pending team invitation. Only pending invitations can be updated — one already accepted or declined is rejected. Requires the Manager role or above on the invitation's own team.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","description":"New team role for the invitation. One of: team:owner, team:superadmin, team:admin (deprecated), team:manager, team:builder, team:member, team:clarity-member. You cannot assign a role above your own."}},"required":["role"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"ID of the pending invitation to update."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"}},"required":["id","role"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Team Invite","deprecated":true}},"/v1/invites/{id}/send-email":{"post":{"operationId":"sendTeamInviteEmail","tags":["Invites"],"description":"Email an invitation to its recipient. Use this to deliver an invitation created by createTeamInvite (which never sends mail on its own), or to resend one the recipient never received. The accept link is always built from the server-configured app origin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"frontendUrl":{"description":"Deprecated. Accepted for backward compatibility and IGNORED: the accept link is always built from the server-configured app origin, so a caller cannot point invitation emails at another host.","type":"string","format":"uri"},"schedule":{"type":"object","properties":{"startAt":{"type":"string","format":"date-time","description":"When the interview starts, as an ISO 8601 date-time with an offset or Z, e.g. 2026-10-28T10:00:00+01:00. Must be in the future and at most 90 days ahead."},"durationMinutes":{"type":"integer","minimum":15,"maximum":240,"description":"How long the interview is booked for, 15 to 240 minutes."},"timeZone":{"type":"string","minLength":1,"maxLength":64,"description":"IANA time zone the time is shown in, e.g. Europe/Prague. The calendar shows it in each reader's own zone."}},"required":["startAt","durationMinutes","timeZone"],"description":"Optional time for the interview. The invitation email then carries a calendar invite for it, the interview link stays valid until a week after it, and a later send with a new time moves the same calendar event. At most 90 days ahead. Only available while calendar invites are on for the team."}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"ID of the invitation to email."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"calendarInvite":{"type":"boolean","description":"Whether the email carried a calendar invite for the scheduled interview. Without a schedule in the request, a Clarity process invitation that already has an upcoming scheduled interview is sent with its calendar invite again."}},"required":["success","calendarInvite"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Send Team Invite Email","deprecated":true}},"/v1/invites/bulk":{"post":{"operationId":"bulkCreateTeamInvites","tags":["Invites"],"description":"Invite several people to a team in one call, emailing each invitation immediately. Returns per-batch counts: `succeeded` were invited, `skipped` were already on the team, already had a pending invitation, or were a duplicate of an earlier entry in the same batch, `failed` could not be emailed (those invitations are rolled back). The accept link is always built from the server-configured app origin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"members":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address of the person to invite."},"role":{"type":"string","description":"Team role to grant. One of: team:owner, team:superadmin, team:admin (deprecated), team:manager, team:builder, team:member, team:clarity-member. You cannot grant a role above your own."}},"required":["email","role"]},"description":"People to invite, at most 50 per request. An email already on the team, or already holding a pending invitation, is skipped rather than failing the batch."},"frontendUrl":{"description":"Deprecated. Accepted for backward compatibility and IGNORED: the accept link is always built from the server-configured app origin, so a caller cannot point invitation emails at another host.","type":"string","format":"uri"}},"required":["members"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"succeeded":{"type":"number"},"skipped":{"type":"number"},"failed":{"type":"number"}},"required":["succeeded","skipped","failed"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Bulk Create Team Invites","deprecated":true}},"/v1/team-invite-link":{"get":{"operationId":"getTeamInviteLink","tags":["Invites"],"description":"Get the team's shareable invite link — the one URL anyone can use to join the team, as opposed to a per-person invitation. Returns `hasLink: false` when no link has been created. Requires the Manager role or above.","parameters":[{"schema":{"type":"string","format":"uri"},"in":"query","name":"frontendUrl","required":false,"description":"Deprecated and ignored. The link is built from the server's configured frontend URL so a caller can't choose the host in a Duvo-branded email."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"hasLink":{"type":"boolean"},"link":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string"},"createdBy":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["id","name","email"],"additionalProperties":false}},"required":["id","createdAt","createdBy"],"additionalProperties":false}},"required":["hasLink"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Team Invite Link","deprecated":true},"post":{"operationId":"createTeamInviteLink","tags":["Invites"],"description":"Create or regenerate the team's shareable invite link — the one URL anyone can use to join the team. Regenerating invalidates the previous link, so anyone still holding the old URL can no longer join. Requires the Manager role or above.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"frontendUrl":{"description":"Deprecated and ignored. The link is built from the server's configured frontend URL so a caller can't choose the host in a Duvo-branded email.","type":"string","format":"uri"}}}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string"},"createdBy":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"}},"required":["id","name","email"],"additionalProperties":false}},"required":["id","createdAt","createdBy"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Team Invite Link","deprecated":true},"delete":{"operationId":"deleteTeamInviteLink","tags":["Invites"],"description":"Delete the team's shareable invite link so the URL stops working. Per-person invitations are unaffected. Requires the Manager role or above.","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Team Invite Link","deprecated":true}},"/v1/notifications":{"get":{"operationId":"listNotifications","tags":["Notifications"],"description":"List notifications for the authenticated user's current team, most recent first. Filter with type, unread, severity or minSeverity (mutually exclusive), important, agentRunId, or processId; paginate with limit/cursor. Pass batchId to list only the live members of a notification batch, optionally ordered by sort=importance (only valid together with batchId). Requires the Notification Center feature; returns 404 when it is not enabled for the team.","parameters":[{"schema":{"type":"string","enum":["connection_broken","login_broken","case_failed","critical_case_issue","case_issue","critical_eval_issue","eval_issue","job_issue","job_done","background_job","schedule_issue","config_proposal","routine_candidate"]},"in":"query","name":"type","required":false,"description":"Only return notifications of this type. One of: connection_broken, login_broken, case_failed, critical_case_issue, case_issue, critical_eval_issue, eval_issue, job_issue, job_done, background_job, schedule_issue, config_proposal, routine_candidate."},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unread","required":false,"description":"If true, only return unread notifications."},{"schema":{"type":"string","enum":["info","warning","critical","success"]},"in":"query","name":"severity","required":false,"description":"Only return notifications with this severity. One of: info, warning, critical, success."},{"schema":{"type":"string","enum":["info","warning","critical","success"]},"in":"query","name":"minSeverity","required":false,"description":"Only return notifications at or above this urgency. Least to most urgent: success < info < warning < critical. Mutually exclusive with severity."},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"important","required":false,"description":"If true, only return important notifications: unresolved connection_broken rows pinned until reconnected, removed, or dismissed."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"agentRunId","required":false,"description":"Only return notifications about this agent run."},{"schema":{"type":"string","minLength":1},"in":"query","name":"processId","required":false,"description":"Only return notifications about this Clarity process."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"batchId","required":false,"description":"Only return live members of this notification batch."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"automation_id","required":false,"description":"Only include notifications about this automation: notifications from runs in this automation (or, with no run, for its agents), notifications for its queues, connection_broken notifications for connections its agents use, and login_broken notifications for logins its agents sign in with."},{"schema":{"default":"recency","type":"string","enum":["recency","importance"]},"in":"query","name":"sort","required":false,"description":"importance orders by type importance then severity (only valid together with batchId); default recency."},{"schema":{"default":30,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of notifications per page (1-100, default 30)."},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Opaque cursor from the previous page's nextCursor. Omit for the first page."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"notifications":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["job_issue"]},"agentRunId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"evaluationId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"source":{"type":"string","enum":["run_failed","run_stuck","eval_flagged","eval_failed"]},"agentId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","agentRunId","evaluationId","source","agentId","agentName"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["job_done"]},"agentRunId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","agentRunId","agentId","agentName"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["background_job"]},"jobType":{"type":"string","enum":["clarity_signavio_export"]},"outcome":{"type":"string","enum":["succeeded","failed"]},"sourceId":{"type":"string","format":"uuid"},"processId":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"resultUrl":{"description":"Where the job's result opens outside Duvo, if anywhere.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","jobType","outcome","sourceId","processId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"type":"string"},"integrationSlug":{"type":"string"},"instanceName":{"type":"string"},"brokenReason":{"type":"string","description":"Why the connection stopped working.","x-extensible-enum":["oauth_client_invalid","oauth_grant_revoked","refresh_token_missing","insufficient_scopes"]},"ownerUserId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"ownerName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdByName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["connection_broken"]},"integrationInstanceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"requiresAction":{"default":true,"type":"boolean"}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","provider","integrationSlug","instanceName","brokenReason","ownerUserId","ownerName","createdByUserId","createdByName","type","integrationInstanceId","requiresAction"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["schedule_issue"]},"scheduleId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reason":{"type":"string","enum":["missing_connections"]},"missingConnections":{"type":"array","items":{"type":"object","properties":{"integrationType":{"type":"string"},"customIntegrationId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["integrationType","customIntegrationId"],"additionalProperties":false}}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","scheduleId","agentId","reason"],"additionalProperties":false}]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"nullable":true,"type":"string","format":"uuid"},"batchId":{"default":null,"nullable":true,"type":"string","format":"uuid"},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"seenAt":{"nullable":true,"type":"string"},"readAt":{"nullable":true,"type":"string"},"resolvedAt":{"nullable":true,"type":"string"},"dismissedAt":{"default":null,"nullable":true,"type":"string"},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"nullable":true,"type":"string"},"type":{"type":"string"},"fallback":{"type":"boolean","enum":[true]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","fallback"],"additionalProperties":false}]}},"nextCursor":{"nullable":true,"type":"string"}},"required":["notifications","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Notifications","deprecated":true},"delete":{"operationId":"deleteAllNotifications","tags":["Notifications"],"description":"Soft-delete all notifications for the authenticated user's current team, read or unread. Returns the count of notifications that were deleted. Destructive — only call on explicit user request, never bulk-delete unprompted. Requires the Notification Center feature; returns 404 when it is not enabled for the team.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete All Notifications","deprecated":true}},"/v1/notifications/feed":{"get":{"operationId":"getNotificationFeed","tags":["Notifications"],"description":"List the notification feed for the authenticated user's current team, most recent activity first. Each item is either an individual notification or a notification batch (a per-agent group of job_issue/eval_issue/job_done/schedule_issue notifications). Filter with type, unread, and either severity (exact match) or minSeverity (threshold; the two are mutually exclusive); paginate with limit/cursor. Either severity filter also narrows a surfaced batch's counts to its qualifying members, and hides a batch with no qualifying live member. The feed is eventually consistent — a batch's counts can lag a concurrent write by one page fetch. Requires the Notification Center feature; returns 404 when it is not enabled for the team.","parameters":[{"schema":{"type":"string","enum":["connection_broken","login_broken","case_failed","critical_case_issue","case_issue","critical_eval_issue","eval_issue","job_issue","job_done","background_job","schedule_issue","config_proposal","routine_candidate"]},"in":"query","name":"type","required":false,"description":"Only return individual notifications of this type and batches with at least one live member of it."},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unread","required":false,"description":"If true, only return unread individual notifications and batches with at least one unread live member."},{"schema":{"type":"string","enum":["info","warning","critical","success"]},"in":"query","name":"severity","required":false,"description":"Only return individual notifications with exactly this severity, and batches with at least one live member of it. A batch's counts then describe only those members. Mutually exclusive with minSeverity. One of: info, warning, critical, success."},{"schema":{"type":"string","enum":["info","warning","critical","success"]},"in":"query","name":"minSeverity","required":false,"description":"Only return individual notifications at or above this urgency, and batches with at least one live member at or above it. A batch's counts and worst severity then describe only its members at or above the threshold. Least to most urgent: success < info < warning < critical. Mutually exclusive with severity."},{"schema":{"type":"string","enum":["mine"]},"in":"query","name":"agents","required":false,"description":"When 'mine', only return notifications for agents the authenticated user created. connection_broken notifications are always returned regardless, because they are not about an agent: a broken connection is only notified to the people who can act on it or escalate it, so filtering by agent authorship would hide it from the reader it was addressed to."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"automation_id","required":false,"description":"Only include notifications about this automation: notifications from runs in this automation (or, with no run, for its agents), notifications for its queues, connection_broken notifications for connections its agents use, and login_broken notifications for logins its agents sign in with."},{"schema":{"default":30,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["batch"]},"batch":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agentId":{"nullable":true,"type":"string","format":"uuid"},"agentName":{"nullable":true,"type":"string"},"agentType":{"default":null,"nullable":true,"type":"string","enum":["agent","code"],"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation — a step's builds all belong to the matching config family."},"queueId":{"default":null,"nullable":true,"type":"string","format":"uuid"},"queueName":{"default":null,"nullable":true,"type":"string"},"teamId":{"type":"string","format":"uuid"},"createdAt":{"type":"string"},"lastEventAt":{"type":"string"},"closedAt":{"nullable":true,"type":"string"},"typeCounts":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Notification kind. New kinds are added over time.","x-extensible-enum":["connection_broken","login_broken","case_failed","critical_case_issue","case_issue","critical_eval_issue","eval_issue","job_issue","job_done","background_job","schedule_issue","config_proposal","routine_candidate"]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"unread":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","total","unread"],"additionalProperties":false}},"severityCounts":{"default":[],"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["info","warning","critical","success"]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"unread":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["severity","total","unread"],"additionalProperties":false}},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"worstSeverity":{"type":"string","enum":["info","warning","critical","success"]}},"required":["id","agentId","agentName","agentType","queueId","queueName","teamId","createdAt","lastEventAt","closedAt","typeCounts","severityCounts","unreadCount","worstSeverity"],"additionalProperties":false}},"required":["kind","batch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["notification"]},"notification":{"anyOf":[{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["job_issue"]},"agentRunId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"evaluationId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"source":{"type":"string","enum":["run_failed","run_stuck","eval_flagged","eval_failed"]},"agentId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","agentRunId","evaluationId","source","agentId","agentName"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["job_done"]},"agentRunId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","agentRunId","agentId","agentName"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["background_job"]},"jobType":{"type":"string","enum":["clarity_signavio_export"]},"outcome":{"type":"string","enum":["succeeded","failed"]},"sourceId":{"type":"string","format":"uuid"},"processId":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"resultUrl":{"description":"Where the job's result opens outside Duvo, if anywhere.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","jobType","outcome","sourceId","processId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"type":"string"},"integrationSlug":{"type":"string"},"instanceName":{"type":"string"},"brokenReason":{"type":"string","description":"Why the connection stopped working.","x-extensible-enum":["oauth_client_invalid","oauth_grant_revoked","refresh_token_missing","insufficient_scopes"]},"ownerUserId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"ownerName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdByName":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["connection_broken"]},"integrationInstanceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"requiresAction":{"default":true,"type":"boolean"}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","provider","integrationSlug","instanceName","brokenReason","ownerUserId","ownerName","createdByUserId","createdByName","type","integrationInstanceId","requiresAction"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batchId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"seenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["schedule_issue"]},"scheduleId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reason":{"type":"string","enum":["missing_connections"]},"missingConnections":{"type":"array","items":{"type":"object","properties":{"integrationType":{"type":"string"},"customIntegrationId":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["integrationType","customIntegrationId"],"additionalProperties":false}}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","scheduleId","agentId","reason"],"additionalProperties":false}]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipientUserId":{"type":"string","format":"uuid"},"teamId":{"nullable":true,"type":"string","format":"uuid"},"batchId":{"default":null,"nullable":true,"type":"string","format":"uuid"},"severity":{"type":"string","enum":["info","warning","critical","success"]},"title":{"type":"string"},"summary":{"nullable":true,"type":"string"},"createdAt":{"type":"string"},"seenAt":{"nullable":true,"type":"string"},"readAt":{"nullable":true,"type":"string"},"resolvedAt":{"nullable":true,"type":"string"},"dismissedAt":{"default":null,"nullable":true,"type":"string"},"occurrenceCount":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"lastSeenAt":{"default":null,"nullable":true,"type":"string"},"type":{"type":"string"},"fallback":{"type":"boolean","enum":[true]}},"required":["id","recipientUserId","teamId","batchId","severity","title","summary","createdAt","seenAt","readAt","resolvedAt","dismissedAt","occurrenceCount","lastSeenAt","type","fallback"],"additionalProperties":false}]}},"required":["kind","notification"],"additionalProperties":false}]}},"nextCursor":{"nullable":true,"type":"string"}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Notification Feed","deprecated":true}},"/v1/notifications/batches/{id}":{"get":{"operationId":"getNotificationBatch","tags":["Notifications"],"description":"Get a single notification batch by id for the authenticated user, with per-type live-member counts, unread count, and worst severity. Serves cold deep links and sidebar retention for batches the caller can no longer see in the feed. Counts every live member by default; the optional type/severity/minSeverity filters narrow them to matching members only, exactly as the feed narrows a batch row it returns under the same filters. Requires the Notification Center feature; returns 404 when it is not enabled for the team, the batch does not exist, it belongs to another recipient/team, it is not about the automation named by automation_id, or no live member matches the given filters.","parameters":[{"schema":{"type":"string","enum":["connection_broken","login_broken","case_failed","critical_case_issue","case_issue","critical_eval_issue","eval_issue","job_issue","job_done","background_job","schedule_issue","config_proposal","routine_candidate"]},"in":"query","name":"type","required":false,"description":"Count only live members of this type. Omit to count every live member."},{"schema":{"type":"string","enum":["info","warning","critical","success"]},"in":"query","name":"severity","required":false,"description":"Count only live members with exactly this severity. Mutually exclusive with minSeverity. One of: info, warning, critical, success."},{"schema":{"type":"string","enum":["info","warning","critical","success"]},"in":"query","name":"minSeverity","required":false,"description":"Count only live members at or above this urgency. Least to most urgent: success < info < warning < critical. Mutually exclusive with severity."},{"schema":{"type":"string","enum":["mine"]},"in":"query","name":"agents","required":false,"description":"When 'mine', 404 unless the batch's agent is one the authenticated user created. Pass it alongside the feed's My agents filter so a retained batch cannot come back narrowed on type and severity but not on ownership."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"automation_id","required":false,"description":"Only include notifications about this automation: notifications from runs in this automation (or, with no run, for its agents), notifications for its queues, connection_broken notifications for connections its agents use, and login_broken notifications for logins its agents sign in with."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The notification batch's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agentId":{"nullable":true,"type":"string","format":"uuid"},"agentName":{"nullable":true,"type":"string"},"agentType":{"default":null,"nullable":true,"type":"string","enum":["agent","code"],"description":"Flavour of the step: \"agent\" for an agentic step, \"code\" for a deterministic code step. Fixed at creation — a step's builds all belong to the matching config family."},"queueId":{"default":null,"nullable":true,"type":"string","format":"uuid"},"queueName":{"default":null,"nullable":true,"type":"string"},"teamId":{"type":"string","format":"uuid"},"createdAt":{"type":"string"},"lastEventAt":{"type":"string"},"closedAt":{"nullable":true,"type":"string"},"typeCounts":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Notification kind. New kinds are added over time.","x-extensible-enum":["connection_broken","login_broken","case_failed","critical_case_issue","case_issue","critical_eval_issue","eval_issue","job_issue","job_done","background_job","schedule_issue","config_proposal","routine_candidate"]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"unread":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","total","unread"],"additionalProperties":false}},"severityCounts":{"default":[],"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["info","warning","critical","success"]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"unread":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["severity","total","unread"],"additionalProperties":false}},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"worstSeverity":{"type":"string","enum":["info","warning","critical","success"]}},"required":["id","agentId","agentName","agentType","queueId","queueName","teamId","createdAt","lastEventAt","closedAt","typeCounts","severityCounts","unreadCount","worstSeverity"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Notification Batch","deprecated":true}},"/v1/notifications/batches/{id}/read":{"post":{"operationId":"markNotificationBatchRead","tags":["Notifications"],"description":"Mark every unread live member of a notification batch as read for the authenticated user. Pass `types` to narrow the mark-read to those member types, and `severity` (exact) or `minSeverity` (threshold, mutually exclusive with `severity`) to narrow it by urgency — e.g. the page's active filters; omit them to mark every live member. Narrowing matters when the batch card was rendered under a filter: the rows marked read should be the rows the card counted. Pass `openedFrom` to record which channel the reader came through, on every member this call marks read. Pass `automation_id` to mark only the members about that automation, the ones its Notifications tab lists; a batch with none of them returns 404. Returns the count of members that were updated. Requires the Notification Center feature; returns 404 when it is not enabled for the team or the batch does not exist or belongs to another recipient/team.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"types":{"minItems":1,"maxItems":13,"type":"array","items":{"type":"string","enum":["connection_broken","login_broken","case_failed","critical_case_issue","case_issue","critical_eval_issue","eval_issue","job_issue","job_done","background_job","schedule_issue","config_proposal","routine_candidate"]}},"severity":{"type":"string","enum":["info","warning","critical","success"]},"minSeverity":{"type":"string","enum":["info","warning","critical","success"]},"openedFrom":{"type":"string","enum":["in_app","email","slack","teams"]}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"automation_id","required":false,"description":"Only include notifications about this automation: notifications from runs in this automation (or, with no run, for its agents), notifications for its queues, connection_broken notifications for connections its agents use, and login_broken notifications for logins its agents sign in with."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The notification batch's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Mark Notification Batch Read","deprecated":true}},"/v1/notifications/unread-count":{"get":{"operationId":"getUnreadNotificationCount","tags":["Notifications"],"description":"Get the unread notification count for the authenticated user's current team, or only for one automation's notifications when automation_id is set. Each notification batch with unread members counts as 1, regardless of its member count. Requires the Notification Center feature; returns 404 when it is not enabled for the team.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"automation_id","required":false,"description":"Only include notifications about this automation: notifications from runs in this automation (or, with no run, for its agents), notifications for its queues, connection_broken notifications for connections its agents use, and login_broken notifications for logins its agents sign in with."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Unread Notification Count","deprecated":true}},"/v1/notifications/counts":{"get":{"operationId":"getNotificationCounts","tags":["Notifications"],"description":"Per-type notification counts for the authenticated user's current team. Narrow with `unread`, `important`, and with either `severity` (counts only that exact severity) or `minSeverity` (counts that urgency and above) — the two are mutually exclusive and a request carrying both is rejected with 400. Pass the same filters the feed is showing, so the counts describe the list the reader would land on. Requires the Notification Center feature; returns 404 when it is not enabled for the team.","parameters":[{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unread","required":false,"description":"If true, only count unread notifications."},{"schema":{"type":"string","enum":["info","warning","critical","success"]},"in":"query","name":"severity","required":false,"description":"Only count notifications with exactly this severity, so the counts match a feed filtered the same way. Mutually exclusive with minSeverity."},{"schema":{"type":"string","enum":["info","warning","critical","success"]},"in":"query","name":"minSeverity","required":false,"description":"Only count notifications at or above this urgency, so the counts match a feed filtered the same way. Least to most urgent: success < info < warning < critical. Mutually exclusive with severity."},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"important","required":false,"description":"If true, only count notifications pinned to Important for you: unresolved, undismissed connection_broken rows you can reconnect yourself. Use it to size the sidebar alert without paging the list."},{"schema":{"type":"string","enum":["mine"]},"in":"query","name":"agents","required":false,"description":"When 'mine', only count notifications for agents the authenticated user created (plus connection_broken, which is always counted), so the counts match a feed filtered the same way."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"automation_id","required":false,"description":"Only include notifications about this automation: notifications from runs in this automation (or, with no run, for its agents), notifications for its queues, connection_broken notifications for connections its agents use, and login_broken notifications for logins its agents sign in with."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["connection_broken","login_broken","case_failed","critical_case_issue","case_issue","critical_eval_issue","eval_issue","job_issue","job_done","background_job","schedule_issue","config_proposal","routine_candidate"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Notification Counts","deprecated":true}},"/v1/notifications/mark-all-read":{"post":{"operationId":"markAllNotificationsRead","tags":["Notifications"],"description":"Mark all notifications as read for the authenticated user's current team. Returns the count of notifications that were updated. Requires the Notification Center feature; returns 404 when it is not enabled for the team.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Mark All Notifications Read","deprecated":true}},"/v1/notifications/read":{"delete":{"operationId":"deleteReadNotifications","tags":["Notifications"],"description":"Soft-delete all read notifications for the authenticated user's current team. Returns the count of notifications that were deleted. Destructive — only call on explicit user request. Requires the Notification Center feature; returns 404 when it is not enabled for the team.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Read Notifications","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"},"orgRole":{"default":null,"description":"The member's role in the team's organization, or null when the team has no organization or the member holds no organization role","nullable":true,"type":"string"}},"required":["id","name","email","role","inheritedFromOrg","orgRole"],"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Team Members","deprecated":true}},"/v1/teams/{teamId}/members/{memberId}":{"patch":{"operationId":"updateTeamMemberRole","tags":["Team"],"description":"Update an existing team member's role. Requires the Manager role or above; only an Owner may grant or remove the Owner role, and the last remaining Owner cannot be demoted. A member whose Owner role is inherited from the organization cannot be changed here.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string"}},"required":["role"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"teamId","required":true,"description":"Team ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"memberId","required":true,"description":"Member (user) ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"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"},"orgRole":{"default":null,"description":"The member's role in the team's organization, or null when the team has no organization or the member holds no organization role","nullable":true,"type":"string"}},"required":["id","name","email","role","inheritedFromOrg","orgRole"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Team Member Role","deprecated":true},"delete":{"operationId":"removeTeamMember","tags":["Team"],"description":"Remove a member from a team. Removing another member requires the Superadmin role or above; any member may remove themselves (leaving the team). The last remaining Owner cannot be removed, and a member whose Owner role is inherited from the organization can only leave voluntarily.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"teamId","required":true,"description":"Team ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"memberId","required":true,"description":"Member (user) ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"nextTeamId":{"nullable":true,"type":"string","format":"uuid"},"planType":{"nullable":true,"type":"string","x-extensible-enum":["pro","business","enterprise"]}},"required":["success","nextTeamId","planType"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Remove Team Member","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"},"usage":{"type":"object","properties":{"agents":{"type":"number"},"code_steps":{"type":"number"}},"required":["agents","code_steps"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true},"post":{"operationId":"createCredential","summary":"Create credential","tags":["Credentials"],"description":"Create a 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 lead builder 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"},"usage":{"type":"object","properties":{"agents":{"type":"number"},"code_steps":{"type":"number"}},"required":["agents","code_steps"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 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"},"usage":{"type":"object","properties":{"agents":{"type":"number"},"code_steps":{"type":"number"}},"required":["agents","code_steps"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true},"patch":{"operationId":"updateCredential","summary":"Update credential by id","tags":["Credentials"],"description":"Update a 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 lead builder 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"},"usage":{"type":"object","properties":{"agents":{"type":"number"},"code_steps":{"type":"number"}},"required":["agents","code_steps"],"additionalProperties":false}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true},"delete":{"operationId":"deleteCredential","summary":"Delete credential by id","tags":["Credentials"],"description":"Delete a login by id. Deleting a team-shared login requires lead builder 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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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.). The provider path parameter is the native OAuth provider key from listIntegrations, not the integration type. 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"},"reconnect_instance_id":{"description":"When set, the OAuth flow will update the existing connection in place rather than creating a new one.","type":"string","format":"uuid"}},"additionalProperties":{"type":"string"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"provider","required":true,"description":"Native OAuth provider key, not the integration type. Use oauth_provider_key from listIntegrations (for example, google_gmail for integration type gmail, google_sheets for googlesheets, or microsoft_outlook for outlook); passing an integration type returns 404 \"Unknown 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}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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. 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 `return_url`. A new connection to a custom MCP server needs `custom_integration_id` (register the server first with `POST /v2/teams/:team_id/integrations/custom`) and is refused with 400 without it; a catalog integration such as NetSuite or Asana takes `integration_type` instead.","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":"ID of the custom integration this connection is for. Required for a new connection to a custom MCP server; omit it for a catalog integration such as NetSuite. On reconnect, pass the connection's own custom integration ID, or omit it only for a connection that has none.","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 catalog integration type (e.g. `netsuite`, `asana`). When it names a known MCP OAuth catalog integration and `mcp_server_url` matches that integration's registered server, the connection is treated as a catalog connection; otherwise it requires the custom MCP servers capability.","type":"string"},"reconnect_instance_id":{"description":"When set, the OAuth flow will update the existing connection in place rather than creating a new one.","type":"string","format":"uuid"},"oauth_client_id":{"description":"OAuth client ID of a client the user registered on the authorization server themselves (e.g. a NetSuite Integration record). Takes precedence over preregistered credentials and Dynamic Client Registration. Cannot be combined with custom_integration_id: for a custom MCP server, put the client credentials on the custom integration instead (oauth_client_id and oauth_client_secret on POST /teams/{teamId}/integrations/custom). For a new connection this applies to catalog integrations such as NetSuite. On reconnect, omit to reuse the connection's stored credentials, or provide to replace (rotate) them.","type":"string","minLength":1},"oauth_client_secret":{"description":"Client secret for `oauth_client_id`. Omit for public clients (PKCE-only).","type":"string","minLength":1}},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"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"},"code":{"type":"string"},"answer_persisted":{"type":"boolean"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"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 (Runs in the Duvo UI)"},{"name":"Sandboxes","description":"Create sandboxes and upload files for agent runs"},{"name":"Queues","description":"Manage 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":"Case Attachments","description":"Upload, list, download, and remove the files attached to a case"},{"name":"Automations","description":"List and manage automations — the workspace container that groups the agents and queues making up one end-to-end process"},{"name":"Agents","description":"Create and manage agents for automation workloads"},{"name":"Revisions","description":"Create and manage agent revisions — the underlying Setup for an Agent"},{"name":"Agent Folders","description":"Organize agents 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":"Notifications","description":"List, read, dismiss, and clear the authenticated user's team notifications (the Notification Center in the Duvo UI)"},{"name":"Schedules","description":"List schedules configured for an agent"},{"name":"Duvo Pulse","description":"Create, list, iterate on, and delete Duvo Pulse dashboards — live, agent-generated visualizations of your Duvo data"},{"name":"Case Triggers","description":"Configure case triggers that automatically dispatch agent runs (Runs in the Duvo UI) for cases added to a queue"},{"name":"Triggers","description":"Configure event triggers that start a Run 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":"Organizations","description":"Inspect organizations you belong to and the teams within them"},{"name":"Team","description":"Inspect the team and members associated with the API key"},{"name":"Invites","description":"Invite people to a team — one at a time or in bulk, scoped to a Clarity process or the whole team — and manage the team's shareable invite link"},{"name":"Integrations","description":"Browse the team's catalog of available integration types"},{"name":"Connections","description":"Manage your connected integrations"},{"name":"Credentials","description":"Manage logins (domain + username + password + TOTP) used by agents to sign in to websites and desktop applications, and attach them to assignment revisions"},{"name":"Secrets","description":"Manage env-var secrets injected into runs, 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 queues"},{"name":"ClarityV2","description":"Manage Clarity v2 process snapshots, automation proposals, and the extra-capture-request follow-up loop"}]}