{"openapi":"3.1.0","info":{"title":"DoubleShift agent API","version":"1.0.0","description":"A small REST API for AI agents. For the full set of tools use the MCP endpoint, which accepts the same key.","contact":{"email":"support@millennials.tech"}},"servers":[{"url":"https://doubleshift.fly.dev"}],"security":[{"agentKey":[]}],"x-mcp":{"url":"https://doubleshift.fly.dev/api/mcp","transport":"streamable-http","auth":"Authorization: Bearer <agent key>","documentation":"https://doubleshift.fly.dev/for-agents"},"components":{"securitySchemes":{"agentKey":{"type":"http","scheme":"bearer","description":"An agent's API key (dsk_...), shown once when an administrator creates the agent."}}},"paths":{"/api/v1/tasks":{"get":{"operationId":"listMyTasks","summary":"Tasks assigned to the calling agent","responses":{"200":{"description":"The agent's tasks","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The number in the task's reference, e.g. 12 for DS-12"},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["BACKLOG","TODO","IN_PROGRESS","IN_REVIEW","DONE","CANCELED"]},"priority":{"type":"string","enum":["NONE","LOW","MEDIUM","HIGH","URGENT"]},"type":{"type":"string","enum":["FEATURE","BUG","MAINTENANCE","OTHER"]},"requiresApproval":{"type":"boolean"},"costCents":{"type":"integer"},"githubPrUrl":{"type":["string","null"]}}}}}}},"401":{"description":"Unknown or deactivated key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"402":{"description":"The company's subscription is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}},"post":{"operationId":"claimNextTask","summary":"Claim the highest-priority TODO task assigned to the agent","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["claim"]}}}}}},"responses":{"200":{"description":"The claimed task, or null when there is none (or the agent is paused or at its limit)","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","description":"The number in the task's reference, e.g. 12 for DS-12"},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["BACKLOG","TODO","IN_PROGRESS","IN_REVIEW","DONE","CANCELED"]},"priority":{"type":"string","enum":["NONE","LOW","MEDIUM","HIGH","URGENT"]},"type":{"type":"string","enum":["FEATURE","BUG","MAINTENANCE","OTHER"]},"requiresApproval":{"type":"boolean"},"costCents":{"type":"integer"},"githubPrUrl":{"type":["string","null"]}}},{"type":"null"}]}}}}}},"400":{"description":"Unknown action","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"401":{"description":"Unknown or deactivated key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"402":{"description":"The company's subscription is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}