{"openapi":"3.1.0","info":{"title":"Tasks agent API","version":"1.0.0","description":"Agents don't browse boards. They call POST /work/next and the server applies the policy — ready column, dependencies done, nobody else's claim, ranked overdue-first (oldest due first), then priority, then due date (nulls last), then age — claims the card atomically under a renewable 30-minute lease, and returns everything needed to start cold. Agents finish to in_review; only humans close cards. Three failed attempts park a card in needs_human. Rate limit: 60 requests per minute per token — over-limit requests get 429 with a Retry-After header (seconds).\n\nOutbound webhooks: workspaces can register endpoints (workspace settings → Integrations) that receive every board event as a JSON POST of the typed envelope {v, type, boardId, cardId, at}. Each request carries X-Tasks-Event: <type> and X-Tasks-Signature: sha256=<hex HMAC-SHA256(raw body, endpoint secret)> — verify against the raw body exactly as received. Delivery is at-least-once: failed deliveries are retried up to 5 attempts with linear backoff, so receivers must tolerate duplicates."},"servers":[{"url":"https://simasrazinskas.com/api/tasks/v1"}],"paths":{"/me":{"get":{"summary":"Identify the calling agent","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Agent identity, instructions and token scopes","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","instructions"],"additionalProperties":false},"scopes":{"type":"array","items":{"type":"string"}}},"required":["agent","scopes"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/work/next":{"post":{"summary":"Claim the next ready card by policy","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The claimed card with instructions, comments and recent events — or work: null when nothing is claimable","content":{"application/json":{"schema":{"type":"object","properties":{"work":{"anyOf":[{"type":"object","properties":{"claim":{"type":"object","properties":{"id":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","expiresAt"],"additionalProperties":false},"card":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptanceCriteria":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failureCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","title","description","acceptanceCriteria","priority","failureCount"],"additionalProperties":false},"board":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","instructions"],"additionalProperties":false},"column":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","instructions"],"additionalProperties":false},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","instructions"],"additionalProperties":false},"comments":{"type":"array","items":{"type":"object","properties":{"authorType":{"type":"string"},"body":{"type":"string"},"question":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["authorType","body","question","createdAt"],"additionalProperties":false}},"recentEvents":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"data":{},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["action","data","createdAt"],"additionalProperties":false}}},"required":["claim","card","board","column","agent","comments","recentEvents"],"additionalProperties":false},{"type":"null"}]}},"required":["work"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Lifecycle rule rejected the request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (60 requests/minute per token) — retry after the number of seconds in the Retry-After header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/claims/{id}/heartbeat":{"post":{"summary":"Extend an active lease by 30 minutes","security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"New expiry","content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["expiresAt"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Lifecycle rule rejected the request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (60 requests/minute per token) — retry after the number of seconds in the Retry-After header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/claims/{id}/fail":{"post":{"summary":"Give up on a claim (counts as a strike)","security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["reason"]}}}},"responses":{"200":{"description":"Released; third strike parks the card in needs_human. Idempotent: re-POSTing an already-failed claim is a 200 no-op with replayed: true; a claim settled with a different outcome is a 422.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"replayed":{"type":"boolean","description":"True for an idempotent re-POST"},"columnKind":{"type":"string","description":"Where the card sits now"}},"required":["ok","replayed","columnKind"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Lifecycle rule rejected the request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (60 requests/minute per token) — retry after the number of seconds in the Retry-After header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/claims/{id}/complete":{"post":{"summary":"Hand the claimed card to in_review","security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Card moved to in_review, claim settled as completed. Idempotent: re-POSTing an already-completed claim is a 200 no-op with replayed: true; a claim settled with a different outcome is a 422.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"replayed":{"type":"boolean","description":"True for an idempotent re-POST"},"columnKind":{"type":"string","description":"Where the card sits now"}},"required":["ok","replayed","columnKind"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Lifecycle rule rejected the request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (60 requests/minute per token) — retry after the number of seconds in the Retry-After header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/boards":{"get":{"summary":"List the workspace's boards with columns and card counts","description":"Browse path for agent clients (the claim loop never needs it). Full per-column card lists live at GET /boards/{id}.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Boards in the token's workspace","content":{"application/json":{"schema":{"type":"object","properties":{"boards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["backlog","ready","in_progress","in_review","done","awaiting_input","needs_human"]},"cardCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","kind","cardCount"],"additionalProperties":false}}},"required":["id","name","instructions","columns"],"additionalProperties":false}}},"required":["boards"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/boards/{id}":{"get":{"summary":"Board snapshot: ordered columns with their live cards","security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"The board's columns in order with unarchived cards — titles, priority, claim status, labels, due dates (what the kanban UI renders)","content":{"application/json":{"schema":{"type":"object","properties":{"board":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","instructions"],"additionalProperties":false},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["backlog","ready","in_progress","in_review","done","awaiting_input","needs_human"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"cards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failureCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"claimedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"claimExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"assigneeName":{"anyOf":[{"type":"string"},{"type":"null"}]},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}}},"required":["id","title","priority","failureCount","position","claimedBy","claimExpiresAt","dueDate","assigneeName","labels"],"additionalProperties":false}}},"required":["id","name","kind","position","instructions","cards"],"additionalProperties":false}}},"required":["board","columns"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/docs":{"get":{"summary":"List the workspace's docs (runbooks, conventions, specs)","description":"Live docs only — archived docs leave the list but any id stays fetchable at GET /docs/{id}. Summaries only; fetch a doc id for its markdown body.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Docs in the token's workspace","content":{"application/json":{"schema":{"type":"object","properties":{"docs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","title","slug","updatedAt"],"additionalProperties":false}}},"required":["docs"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/docs/{id}":{"get":{"summary":"Read a doc's full markdown body","description":"Archived docs are fetchable too — the archived flag says so. Ids outside the token's workspace are 404.","security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"The doc with its markdown body","content":{"application/json":{"schema":{"type":"object","properties":{"doc":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"body":{"type":"string","description":"Markdown source"},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","title","slug","updatedAt","body","archived","createdAt"],"additionalProperties":false}},"required":["doc"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/cards":{"get":{"summary":"Search cards across the workspace","description":"Free-text `query` matches title and description (case-insensitive); `label` accepts a label id or exact name; results come newest-updated first. Page with `cursor` (the offset the previous response returned as nextCursor).","security":[{"bearerAuth":[]}],"parameters":[{"in":"query","name":"query","schema":{"type":"string","minLength":1,"maxLength":200}},{"in":"query","name":"status","schema":{"type":"string","enum":["backlog","ready","in_progress","in_review","done","awaiting_input","needs_human"]}},{"in":"query","name":"label","schema":{"type":"string","minLength":1,"maxLength":120}},{"in":"query","name":"board","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"archived","schema":{"default":"false","type":"string","enum":["true","false"]}},{"in":"query","name":"limit","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"Matching cards plus the cursor for the next page","content":{"application/json":{"schema":{"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"boardId":{"type":"string"},"boardName":{"type":"string"},"columnKind":{"type":"string","enum":["backlog","ready","in_progress","in_review","done","awaiting_input","needs_human"]},"columnName":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failureCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueDate":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"claimedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeName":{"anyOf":[{"type":"string"},{"type":"null"}]},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}}},"required":["id","title","boardId","boardName","columnKind","columnName","priority","failureCount","dueDate","updatedAt","archivedAt","claimedBy","assigneeName","labels"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Pass as cursor for the next page; null when exhausted"}},"required":["cards","nextCursor"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"File a follow-up card into a board's backlog","description":"Agents record work they discover mid-task. The card lands in the board's backlog column — never ready — so a human triages it before any agent can claim it.","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"boardId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":20000},"acceptanceCriteria":{"type":"string","maxLength":20000},"priority":{"default":1,"type":"integer","minimum":1,"maximum":5}},"required":["boardId","title"]}}}},"responses":{"201":{"description":"Card created in the backlog","content":{"application/json":{"schema":{"type":"object","properties":{"card":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["card"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Lifecycle rule rejected the request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (60 requests/minute per token) — retry after the number of seconds in the Retry-After header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/cards/{id}":{"get":{"summary":"Read a card with comments, events, dependencies and links","security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Card detail (workspace-scoped)","content":{"application/json":{"schema":{"type":"object","properties":{"card":{"type":"object","properties":{},"additionalProperties":{}}},"required":["card"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Edit, move, or archive/restore a card","description":"One call covers field edits (title, description, acceptance criteria, priority, due date, labels and links as full replacement sets — link labels derive server-side: \"owner/repo#123\" for GitHub PR/issue URLs, hostname otherwise), a column move via columnId (+ optional position; board-management semantics: moving to ready clears strikes, moving a claimed card off in_progress releases the claim), and archived: true/false to archive or restore. Lifecycle rule violations are 422.","security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"acceptanceCriteria":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"priority":{"type":"integer","minimum":1,"maximum":5},"dueDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"labelIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"links":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["url"]}},"columnId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Patch applied; the fresh card detail rides along","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"card":{"type":"object","properties":{},"additionalProperties":{}}},"required":["ok","card"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Lifecycle rule rejected the request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (60 requests/minute per token) — retry after the number of seconds in the Retry-After header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/cards/{id}/comments":{"post":{"summary":"Comment on a card; question=true parks it for human input","security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":20000},"question":{"default":false,"type":"boolean"}},"required":["body"]}}}},"responses":{"201":{"description":"Comment added; questions move the card to awaiting_input and free the lease","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"Invalid or missing bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Lifecycle rule rejected the request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded (60 requests/minute per token) — retry after the number of seconds in the Retry-After header","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}