{"openapi":"3.1.0","info":{"title":"Delega API","version":"1.0.0","description":"Task infrastructure for AI agents. Authenticate protected operations with an X-Agent-Key header.","contact":{"email":"hello@delega.dev"},"license":{"name":"Proprietary","url":"https://delega.dev/terms"}},"servers":[{"url":"https://api.delega.dev","description":"Production"}],"externalDocs":{"description":"Delega documentation and request examples","url":"https://delega.dev/docs"},"tags":[{"name":"System","description":"Service metadata, health, and machine-readable API discovery."},{"name":"Onboarding","description":"Account and agent signup, verification, recovery, and claim flows."},{"name":"Agents","description":"Agent identity, roles, API keys, and account lifecycle."},{"name":"Projects","description":"Project organization for tasks and agents."},{"name":"Tasks","description":"Task creation, retrieval, updates, delegation, links, comments, and subtasks."},{"name":"Claims","description":"Exclusive task-claim leases and session state."},{"name":"Context","description":"Persistent, versioned task context for agent handoffs."},{"name":"Account","description":"Account usage and task statistics."},{"name":"Webhooks","description":"Lifecycle webhook configuration and delivery history."},{"name":"Automations","description":"In-process when->then rules on the task event stream."},{"name":"Ingress","description":"Signed inbound connectors that turn external events into tasks."},{"name":"Billing","description":"Plan status, checkout, portal, and Stripe event handling."},{"name":"Recurrences","description":"Recurring task schedules and due-task spawning."},{"name":"GitHub","description":"GitHub installation, repository selection, and event integration."}],"paths":{"/":{"get":{"operationId":"get","summary":"Get API service metadata","tags":["System"],"security":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/health":{"get":{"operationId":"get_health","summary":"Get API health","tags":["System"],"security":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/openapi.json":{"get":{"operationId":"get_v1_openapi.json","summary":"Get the OpenAPI document","tags":["System"],"security":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/agent/signup":{"post":{"operationId":"post_v1_agent_signup","summary":"Create a self-onboarded agent account","tags":["Onboarding"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/agent/claim/magic/preview":{"post":{"operationId":"post_v1_agent_claim_magic_preview","summary":"Preview a magic claim token","tags":["Onboarding"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/agent/claim/magic/verify":{"post":{"operationId":"post_v1_agent_claim_magic_verify","summary":"Verify a magic claim token","tags":["Onboarding"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/signup":{"post":{"operationId":"post_v1_signup","summary":"Create an account","tags":["Onboarding"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/verify":{"post":{"operationId":"post_v1_verify","summary":"Verify an account email","tags":["Onboarding"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/resend-verification":{"post":{"operationId":"post_v1_resend_verification","summary":"Resend an account verification code","tags":["Onboarding"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/recover":{"post":{"operationId":"post_v1_recover","summary":"Recover account access","tags":["Onboarding"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/agent/me":{"get":{"operationId":"get_v1_agent_me","summary":"Get the current agent","tags":["Onboarding"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/agent/me/capabilities":{"get":{"operationId":"get_v1_agent_me_capabilities","summary":"Get current agent capabilities","tags":["Onboarding"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/agent/claim/request":{"post":{"operationId":"post_v1_agent_claim_request","summary":"Request an agent claim code","tags":["Onboarding"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/agent/claim/verify":{"post":{"operationId":"post_v1_agent_claim_verify","summary":"Verify an agent claim code","tags":["Onboarding"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/agents":{"get":{"operationId":"get_v1_agents","summary":"List agents","tags":["Agents"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_v1_agents","summary":"Create an agent","tags":["Agents"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/agents/{id}":{"get":{"operationId":"get_v1_agents_id_","summary":"Get an agent","tags":["Agents"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"put_v1_agents_id_","summary":"Update an agent","tags":["Agents"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_v1_agents_id_","summary":"Delete an agent","tags":["Agents"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/agents/{id}/rotate-key":{"post":{"operationId":"post_v1_agents_id_rotate_key","summary":"Rotate an agent key","tags":["Agents"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/agents/{id}/rotate":{"post":{"operationId":"post_v1_agents_id_rotate","summary":"Rotate an agent key using the legacy route","tags":["Agents"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/account/export":{"get":{"operationId":"get_v1_account_export","summary":"Export account data","tags":["Agents"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/account":{"delete":{"operationId":"delete_v1_account","summary":"Delete the account","tags":["Agents"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/projects":{"get":{"operationId":"get_v1_projects","summary":"List projects","tags":["Projects"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_v1_projects","summary":"Create a project","tags":["Projects"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/projects/{id}":{"get":{"operationId":"get_v1_projects_id_","summary":"Get a project","tags":["Projects"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"put_v1_projects_id_","summary":"Update a project","tags":["Projects"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_v1_projects_id_","summary":"Delete a project","tags":["Projects"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks":{"get":{"operationId":"get_v1_tasks","summary":"List tasks","tags":["Tasks"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_v1_tasks","summary":"Create a task","tags":["Tasks"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}":{"get":{"operationId":"get_v1_tasks_id_","summary":"Get a task","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"put_v1_tasks_id_","summary":"Update a task","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_v1_tasks_id_","summary":"Delete a task","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/complete":{"post":{"operationId":"post_v1_tasks_id_complete","summary":"Complete a task","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/uncomplete":{"post":{"operationId":"post_v1_tasks_id_uncomplete","summary":"Reopen a completed task","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/links":{"get":{"operationId":"get_v1_tasks_id_links","summary":"List task links","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_v1_tasks_id_links","summary":"Create a task link","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/links/{linkId}":{"delete":{"operationId":"delete_v1_tasks_id_links_linkId_","summary":"Delete a task link","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/comments":{"get":{"operationId":"get_v1_tasks_id_comments","summary":"List task comments","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_v1_tasks_id_comments","summary":"Create a task comment","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/comments/{commentId}":{"delete":{"operationId":"delete_v1_tasks_id_comments_commentId_","summary":"Delete a task comment","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/delegate":{"post":{"operationId":"post_v1_tasks_id_delegate","summary":"Delegate a task","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/chain":{"get":{"operationId":"get_v1_tasks_id_chain","summary":"Get a task delegation chain","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/children":{"get":{"operationId":"get_v1_tasks_id_children","summary":"List child tasks","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/claim":{"post":{"operationId":"post_v1_tasks_claim","summary":"Claim the next task","tags":["Claims"],"security":[{"AgentKey":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/claim":{"post":{"operationId":"post_v1_tasks_id_claim","summary":"Claim a specific task","tags":["Claims"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/release":{"post":{"operationId":"post_v1_tasks_id_release","summary":"Release a task claim","tags":["Claims"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/heartbeat":{"post":{"operationId":"post_v1_tasks_id_heartbeat","summary":"Extend a task claim lease","tags":["Claims"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/state":{"post":{"operationId":"post_v1_tasks_id_state","summary":"Set claimed task session state","tags":["Claims"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/context":{"patch":{"operationId":"patch_v1_tasks_id_context","summary":"Update task context","tags":["Context"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"get":{"operationId":"get_v1_tasks_id_context","summary":"Get task context","tags":["Context"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/context/history":{"get":{"operationId":"get_v1_tasks_id_context_history","summary":"Get task context history","tags":["Context"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/context/supersede":{"post":{"operationId":"post_v1_tasks_id_context_supersede","summary":"Supersede a task context value","tags":["Context"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/dedup":{"post":{"operationId":"post_v1_tasks_dedup","summary":"Find duplicate tasks","tags":["Tasks"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/subtasks":{"get":{"operationId":"get_v1_tasks_id_subtasks","summary":"List task subtasks","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_v1_tasks_id_subtasks","summary":"Create a task subtask","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/subtasks/{sid}":{"put":{"operationId":"put_v1_tasks_id_subtasks_sid_","summary":"Update a task subtask","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_v1_tasks_id_subtasks_sid_","summary":"Delete a task subtask","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/tasks/{id}/subtasks/{sid}/toggle":{"post":{"operationId":"post_v1_tasks_id_subtasks_sid_toggle","summary":"Toggle task subtask completion","tags":["Tasks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/usage":{"get":{"operationId":"get_v1_usage","summary":"Get account usage","tags":["Account"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/stats":{"get":{"operationId":"get_v1_stats","summary":"Get account task statistics","tags":["Account"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/fleet/attention":{"get":{"operationId":"get_v1_fleet_attention","summary":"Triage board of stalled, errored, abandoned, overdue, and looping tasks","tags":["Account"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/context/search":{"get":{"operationId":"get_v1_context_search","summary":"Search decision-memory (context entries) across all readable tasks","tags":["Tasks"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/webhooks":{"get":{"operationId":"get_v1_webhooks","summary":"List webhooks","tags":["Webhooks"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_v1_webhooks","summary":"Create a webhook","tags":["Webhooks"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/webhooks/{id}":{"put":{"operationId":"put_v1_webhooks_id_","summary":"Update a webhook","tags":["Webhooks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_v1_webhooks_id_","summary":"Delete a webhook","tags":["Webhooks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/webhooks/{id}/deliveries":{"get":{"operationId":"get_v1_webhooks_id_deliveries","summary":"List webhook deliveries","tags":["Webhooks"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/automations":{"get":{"operationId":"get_v1_automations","summary":"List automation rules","tags":["Automations"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_v1_automations","summary":"Create an automation rule","tags":["Automations"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/automations/{id}":{"get":{"operationId":"get_v1_automations_id_","summary":"Get an automation rule","tags":["Automations"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"put_v1_automations_id_","summary":"Update an automation rule","tags":["Automations"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_v1_automations_id_","summary":"Delete an automation rule","tags":["Automations"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/automations/{id}/runs":{"get":{"operationId":"get_v1_automations_id_runs","summary":"List automation rule runs","tags":["Automations"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/ingress/{sourceId}":{"post":{"operationId":"post_v1_ingress_sourceId_","summary":"Receive a signed inbound event and create a task","tags":["Ingress"],"security":[{"IngressSignature":[]}],"parameters":[{"name":"sourceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/ingress-sources":{"get":{"operationId":"get_v1_ingress_sources","summary":"List ingress sources","tags":["Ingress"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_v1_ingress_sources","summary":"Create an ingress source","tags":["Ingress"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/ingress-sources/{id}":{"get":{"operationId":"get_v1_ingress_sources_id_","summary":"Get an ingress source","tags":["Ingress"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"put_v1_ingress_sources_id_","summary":"Update an ingress source","tags":["Ingress"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_v1_ingress_sources_id_","summary":"Delete an ingress source","tags":["Ingress"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/ingress-sources/{id}/deliveries":{"get":{"operationId":"get_v1_ingress_sources_id_deliveries","summary":"List ingress source deliveries","tags":["Ingress"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/billing/checkout":{"post":{"operationId":"post_v1_billing_checkout","summary":"Create a billing checkout session","tags":["Billing"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/billing/portal":{"get":{"operationId":"get_v1_billing_portal","summary":"Create a billing portal session","tags":["Billing"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/billing/status":{"get":{"operationId":"get_v1_billing_status","summary":"Get billing status","tags":["Billing"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/billing/webhook":{"post":{"operationId":"post_v1_billing_webhook","summary":"Receive Stripe billing events","tags":["Billing"],"security":[{"StripeSignature":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/recurrences":{"get":{"operationId":"get_v1_recurrences","summary":"List recurrences","tags":["Recurrences"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_v1_recurrences","summary":"Create a recurrence","tags":["Recurrences"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/recurrences/spawn-due":{"post":{"operationId":"post_v1_recurrences_spawn_due","summary":"Spawn due recurrences","tags":["Recurrences"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/recurrences/{id}":{"get":{"operationId":"get_v1_recurrences_id_","summary":"Get a recurrence","tags":["Recurrences"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"put_v1_recurrences_id_","summary":"Update a recurrence","tags":["Recurrences"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_v1_recurrences_id_","summary":"Delete a recurrence","tags":["Recurrences"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/recurrences/{id}/tasks":{"get":{"operationId":"get_v1_recurrences_id_tasks","summary":"List task occurrences for a recurrence","tags":["Recurrences"],"security":[{"AgentKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/integrations/github/connect":{"post":{"operationId":"post_v1_integrations_github_connect","summary":"Connect a GitHub installation","tags":["GitHub"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/integrations/github/repos":{"get":{"operationId":"get_v1_integrations_github_repos","summary":"List connected GitHub repositories","tags":["GitHub"],"security":[{"AgentKey":[]}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_v1_integrations_github_repos","summary":"Update connected GitHub repositories","tags":["GitHub"],"security":[{"AgentKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/integrations/github/setup":{"get":{"operationId":"get_v1_integrations_github_setup","summary":"Start GitHub integration setup","tags":["GitHub"],"security":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/integrations/github/oauth/callback":{"get":{"operationId":"get_v1_integrations_github_oauth_callback","summary":"Complete GitHub OAuth setup","tags":["GitHub"],"security":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/integrations/github":{"post":{"operationId":"post_v1_integrations_github","summary":"Receive GitHub integration events","tags":["GitHub"],"security":[{"GitHubSignature":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful response. Creation endpoints may return 201.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"AgentKey":{"type":"apiKey","in":"header","name":"X-Agent-Key","description":"Agent API key issued during signup or agent creation."},"StripeSignature":{"type":"apiKey","in":"header","name":"Stripe-Signature","description":"Stripe webhook signature."},"GitHubSignature":{"type":"apiKey","in":"header","name":"X-Hub-Signature-256","description":"GitHub webhook HMAC signature."},"IngressSignature":{"type":"apiKey","in":"header","name":"X-Delega-Ingress-Signature","description":"Ingress delivery signature: t=<unix-seconds>,v1=<hex HMAC-SHA256 of \"t.body\">."}},"schemas":{"Error":{"type":"object","required":["error","status"],"properties":{"error":{"type":"string"},"status":{"type":"integer"}},"additionalProperties":true}},"responses":{"BadRequest":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid X-Agent-Key header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}