{"openapi":"3.1.0","info":{"title":"Aisenhour REST API","version":"2.0.0","description":"Public OpenAPI 3.1 specification for the Aisenhour Eisenhower Matrix REST API (/api/v1). By default, assistants only see tasks assigned to them with agentPickup enabled. When \"Can read my whole board\" is enabled in Settings > My agents, read endpoints also return active human-owned tasks across quadrants (projected without private notes or comments). All write operations remain strictly restricted to tasks assigned to the calling assistant.","contact":{"name":"Aisenhour","url":"https://aisenhour.com"}},"servers":[{"url":"https://aisenhour.com/api","description":"Aisenhour API server"}],"security":[{"bearerAuth":[]},{"oauth2":["read","write"]}],"tags":[{"name":"Matrix","description":"Executive matrix summary and quadrant counts."},{"name":"Tasks","description":"Task discovery, creation, updates, completion, and archiving."},{"name":"Execution","description":"Assistant progress reporting, deliverables, and clarifying questions."},{"name":"Comments","description":"Task comment threads (private and shared)."}],"paths":{"/v1/summary":{"get":{"operationId":"getMatrixSummary","summary":"Get matrix summary briefing","description":"Provides executive summary counts of active tasks across all four quadrants (doFirst, decide, delegate, delete), upcoming deadlines, and claimable items. What this assistant may touch: Tasks assigned to this assistant with pickup enabled; when \"Can read my whole board\" is enabled in Settings > My agents, active human-owned tasks across all four quadrants are also visible read-only (projected without private notes or comments). What this assistant may NOT touch: Pending contact invites, archived human-owned tasks, private notes/comments on unowned tasks, and any write operations on tasks not assigned to this assistant.","tags":["Matrix"],"security":[{"bearerAuth":[]},{"oauth2":["read"]}],"responses":{"200":{"description":"Get matrix summary briefing — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"totalActiveTasks":11,"upcomingTasksCount":1,"quadrantCounts":{"doFirst":3,"decide":5,"delegate":2,"delete":1},"doFirstTasks":[{"id":"tsk_101","title":"Finalize Q4 forecast","dueDate":"2026-11-15"}],"delegateTasks":[{"id":"tsk_123456789","title":"Audit third-party dependencies","pendingSubtasks":1}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/agent-tasks":{"get":{"operationId":"listAgentTasks","summary":"Retrieve tasks enabled for assistant pickup across any quadrant","description":"Lists actionable tasks across all four quadrants assigned to the calling assistant with pickup enabled. What this assistant may touch: Only tasks assigned to this assistant (agentPickup: true). What this assistant may NOT touch: Unassigned tasks, human-owned tasks, pending invites, or write actions on unowned tasks.","tags":["Tasks"],"security":[{"bearerAuth":[]},{"oauth2":["read"]}],"parameters":[{"name":"quadrant","in":"query","required":false,"description":"Filter by Eisenhower quadrant (doFirst, decide, delegate, delete).","schema":{"type":"string","enum":["doFirst","decide","delegate","delete"],"description":"Filter by Eisenhower quadrant (doFirst, decide, delegate, delete)."}}],"responses":{"200":{"description":"Retrieve tasks enabled for assistant pickup across any quadrant — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"count":1,"tasks":[{"id":"tsk_123456789","title":"Audit third-party dependencies","quadrant":"delegate","category":"Work","agentPickup":true,"subtasks":[{"id":"sub_1","text":"Run license scanner","checked":false}]}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/delegate-queue":{"get":{"operationId":"listDelegateQueue","summary":"Retrieve tasks in delegate queue","description":"Lists tasks in the Delegate quadrant assigned to the calling assistant, plus unassigned claimable tasks when canClaim is enabled on the agent key. What this assistant may touch: Assigned Delegate tasks and claimable queue summaries (unclaimed tasks omit subtasks until claimed). What this assistant may NOT touch: Tasks in other quadrants, or mutating unclaimed tasks before claiming.","tags":["Tasks"],"security":[{"bearerAuth":[]},{"oauth2":["read"]}],"responses":{"200":{"description":"Retrieve tasks in delegate queue — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"queueCount":1,"tasks":[{"id":"tsk_123456789","title":"Audit third-party dependencies","category":"Work","description":"Check package.json for outdated licenses","subtasks":[{"id":"sub_1","text":"Run license scanner","checked":false}],"agentPickup":true,"claimable":false}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/tasks":{"get":{"operationId":"listTasks","summary":"List tasks enabled for pickup","description":"Lists tasks from the Eisenhower Matrix with optional filters for quadrant, category, lifecycle, and completion status. What this assistant may touch: Tasks assigned to this assistant with pickup enabled; when \"Can read my whole board\" is enabled in Settings > My agents, active human-owned tasks across all four quadrants are also visible read-only (projected without private notes or comments). What this assistant may NOT touch: Pending contact invites, archived human-owned tasks, private notes/comments on unowned tasks, and any write operations on tasks not assigned to this assistant.","tags":["Tasks"],"security":[{"bearerAuth":[]},{"oauth2":["read"]}],"parameters":[{"name":"quadrant","in":"query","required":false,"description":"Filter by Eisenhower quadrant (doFirst, decide, delegate, delete).","schema":{"type":"string","enum":["doFirst","decide","delegate","delete"],"description":"Filter by Eisenhower quadrant (doFirst, decide, delegate, delete)."}},{"name":"category","in":"query","required":false,"description":"Filter by task category.","schema":{"type":"string","enum":["Work","Finance","Personal","Health","Education","Travel","Shopping","Other"],"description":"Filter by task category."}},{"name":"lifecycle","in":"query","required":false,"description":"Filter by task lifecycle (active or archived). Defaults to active.","schema":{"type":"string","enum":["active","archived"],"description":"Filter by task lifecycle (active or archived). Defaults to active."}},{"name":"include_scheduled","in":"query","required":false,"description":"Pass \"true\" to include tasks scheduled for a future start date.","schema":{"type":"string","description":"Pass \"true\" to include tasks scheduled for a future start date."}},{"name":"include_completed","in":"query","required":false,"description":"Pass \"true\" to include completed-but-not-archived tasks.","schema":{"type":"string","description":"Pass \"true\" to include completed-but-not-archived tasks."}},{"name":"status","in":"query","required":false,"description":"Filter active tasks by completion status: \"open\" (default), \"completed\", or \"all\".","schema":{"type":"string","enum":["open","completed","all"],"description":"Filter active tasks by completion status: \"open\" (default), \"completed\", or \"all\"."}}],"responses":{"200":{"description":"List tasks enabled for pickup — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"count":1,"tasks":[{"id":"tsk_123456789","title":"Draft quarterly report outline","quadrant":"delegate","category":"Work","lifecycle":"active"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"createTask","summary":"Create a new task","description":"Adds a new task to the user's Eisenhower Matrix canvas. Specify assignTo (\"me\" to capture for the person, or \"self\" for the assistant). What this assistant may touch: Tasks created with assignTo: \"self\" are bound to this assistant (agentPickup: true). What this assistant may NOT touch: Tasks captured with assignTo: \"me\" are human-owned (agentPickup: false), enforce the user's active-task plan limit, return { id, title }, and cannot be read back or modified unless whole-board reading is enabled (read-only).","tags":["Tasks"],"security":[{"bearerAuth":[]},{"oauth2":["write"]}],"responses":{"201":{"description":"Create a new task — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"id":"tsk_987654321","title":"Review supplier contract"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskInput"},"example":{"assignTo":"me","title":"Review supplier contract","quadrant":"delegate","category":"Work","description":"Check renewal terms and notice periods","subtasks":["Compare 2026 rates","Draft counter-offer email"]}}}}}},"/v1/tasks/{taskId}":{"get":{"operationId":"getTask","summary":"Get single task details","description":"Retrieves one task by ID, limited to the calling assistant's assigned tasks with pickup enabled (or an active board task when whole-board reading is enabled). What this assistant may touch: Tasks assigned to this assistant with pickup enabled; when \"Can read my whole board\" is enabled in Settings > My agents, active human-owned tasks across all four quadrants are also visible read-only (projected without private notes or comments). What this assistant may NOT touch: Pending contact invites, archived human-owned tasks, private notes/comments on unowned tasks, and any write operations on tasks not assigned to this assistant.","tags":["Tasks"],"security":[{"bearerAuth":[]},{"oauth2":["read"]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique task identifier.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Get single task details — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"task":{"id":"tsk_123456789","title":"Draft quarterly report outline","quadrant":"delegate","category":"Work","subtasks":[{"id":"sub_1","text":"Outline key highlights","checked":true}]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"updateTask","summary":"Update task fields, quadrant, or subtasks","description":"Updates mutable task fields (title, description, quadrant, category, subtasks, dueDate, scheduledFor, recurring, doneWhen, constraints) on an assigned task. What this assistant may touch: Only tasks assigned to this assistant (agentPickup: true with matching assignedAgentKeyId). What this assistant may NOT touch: Human-owned tasks, unassigned tasks, pending contact invites, or tasks assigned to other agents cannot be modified even when \"Can read my whole board\" is enabled in Settings > My agents.","tags":["Tasks"],"security":[{"bearerAuth":[]},{"oauth2":["write"]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique task identifier.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Update task fields, quadrant, or subtasks — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"task":{"id":"tsk_123456789","title":"Draft quarterly report outline","quadrant":"doFirst","externallyModified":true}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTaskInput"},"example":{"quadrant":"doFirst","subtasks":[{"id":"sub_1","text":"Outline key highlights","checked":true}]}}}}},"delete":{"operationId":"deleteTask","summary":"Delete a task","description":"Permanently deletes an assigned task and cancels any active runs associated with it. What this assistant may touch: Only tasks assigned to this assistant (agentPickup: true with matching assignedAgentKeyId). What this assistant may NOT touch: Human-owned tasks, unassigned tasks, pending contact invites, or tasks assigned to other agents cannot be modified even when \"Can read my whole board\" is enabled in Settings > My agents.","tags":["Tasks"],"security":[{"bearerAuth":[]},{"oauth2":["write"]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique task identifier.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Delete a task — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"message":"Task tsk_123456789 deleted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/tasks/{taskId}/request-input":{"post":{"operationId":"requestTaskInput","summary":"Ask the human a clarifying question","description":"Asks the user a clarifying question about an assigned task, optionally offering quick-choice answer options. What this assistant may touch: Only tasks assigned to this assistant (agentPickup: true with matching assignedAgentKeyId). What this assistant may NOT touch: Human-owned tasks, unassigned tasks, pending contact invites, or tasks assigned to other agents cannot be modified even when \"Can read my whole board\" is enabled in Settings > My agents.","tags":["Execution"],"security":[{"bearerAuth":[]},{"oauth2":["write"]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique task identifier.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Ask the human a clarifying question — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"question":"Should I focus on enterprise or self-serve accounts?","options":["Enterprise","Self-serve"],"assistantQuestion":{"question":"Should I focus on enterprise or self-serve accounts?","options":["Enterprise","Self-serve"],"askedAt":"2026-11-12T05:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestInputBody"},"example":{"question":"Should I focus on enterprise or self-serve accounts?","options":["Enterprise","Self-serve"]}}}}}},"/v1/tasks/{taskId}/progress":{"post":{"operationId":"reportTaskProgress","summary":"Report execution progress or delivered results","description":"Logs an agent execution report and deliverable directly into the user's real-time Aisenhour drawer. Status must be \"in_progress\" or \"delivered\". What this assistant may touch: Only tasks assigned to this assistant (agentPickup: true with matching assignedAgentKeyId). What this assistant may NOT touch: Human-owned tasks, unassigned tasks, pending contact invites, or tasks assigned to other agents cannot be modified even when \"Can read my whole board\" is enabled in Settings > My agents.","tags":["Execution"],"security":[{"bearerAuth":[]},{"oauth2":["write"]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique task identifier.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Report execution progress or delivered results — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"taskId":"tsk_123456789","runId":"agent-run-1762776000000"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportProgressInput"},"example":{"status":"delivered","summary":"Finished analysis with full report.","thought":"Analyzed vendor terms and identified 2 clauses to renegotiate.","deliverable":"Drafted counter-offer with recommended redlines.","completedSubtaskIds":["sub_1"]}}}}}},"/v1/tasks/{taskId}/report":{"post":{"operationId":"reportTaskProgressAlias","summary":"Report execution progress and deliverables (alias)","description":"Legacy alias for /v1/tasks/{taskId}/progress. Logs an agent execution report and deliverable directly into the user's real-time Aisenhour drawer. Status must be \"in_progress\" or \"delivered\". What this assistant may touch: Only tasks assigned to this assistant (agentPickup: true with matching assignedAgentKeyId). What this assistant may NOT touch: Human-owned tasks, unassigned tasks, pending contact invites, or tasks assigned to other agents cannot be modified even when \"Can read my whole board\" is enabled in Settings > My agents.","tags":["Execution"],"security":[{"bearerAuth":[]},{"oauth2":["write"]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique task identifier.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Report execution progress and deliverables (alias) — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"taskId":"tsk_123456789","runId":"agent-run-1762776000000"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportProgressInput"},"example":{"status":"delivered","summary":"Finished analysis with full report.","thought":"Analyzed vendor terms and identified 2 clauses to renegotiate.","deliverable":"Drafted counter-offer with recommended redlines.","completedSubtaskIds":["sub_1"]}}}}}},"/v1/tasks/{taskId}/complete":{"post":{"operationId":"completeTask","summary":"Mark task completed","description":"Marks a non-recurring or recurring task completed. For non-recurring tasks, sets completedAt without archiving (the task stays in the matrix until explicitly archived). What this assistant may touch: Only tasks assigned to this assistant (agentPickup: true with matching assignedAgentKeyId). What this assistant may NOT touch: Human-owned tasks, unassigned tasks, pending contact invites, or tasks assigned to other agents cannot be modified even when \"Can read my whole board\" is enabled in Settings > My agents.","tags":["Tasks"],"security":[{"bearerAuth":[]},{"oauth2":["write"]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique task identifier.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Mark task completed — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"recurring":false,"task":{"id":"tsk_123456789","lifecycle":"active","completedAt":"2026-11-10T12:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/tasks/{taskId}/archive":{"post":{"operationId":"archiveTask","summary":"Archive task","description":"Archives a task by setting lifecycle to \"archived\", moving it out of active matrix views into the Archive. What this assistant may touch: Only tasks assigned to this assistant (agentPickup: true with matching assignedAgentKeyId). What this assistant may NOT touch: Human-owned tasks, unassigned tasks, pending contact invites, or tasks assigned to other agents cannot be modified even when \"Can read my whole board\" is enabled in Settings > My agents.","tags":["Tasks"],"security":[{"bearerAuth":[]},{"oauth2":["write"]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique task identifier.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Archive task — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"task":{"id":"tsk_123456789","lifecycle":"archived"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/tasks/{taskId}/comments":{"get":{"operationId":"listTaskComments","summary":"List task notes and comments","description":"Lists comments on a task enabled for AI agent pickup. Can specify target \"private\" or \"shared\". What this assistant may touch: Comments on tasks assigned to this assistant (agentPickup: true). What this assistant may NOT touch: Comments on human-owned or unassigned tasks, even when \"Can read my whole board\" is enabled in Settings > My agents.","tags":["Comments"],"security":[{"bearerAuth":[]},{"oauth2":["read"]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique task identifier.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}},{"name":"target","in":"query","required":false,"description":"Target comment thread: \"private\" (default) or \"shared\".","schema":{"type":"string","enum":["private","shared"],"default":"private","description":"Target comment thread: \"private\" (default) or \"shared\"."}}],"responses":{"200":{"description":"List task notes and comments — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"comments":[{"id":"cmt_1","text":"Need this done before Thursday meeting.","createdAt":"2026-11-10T12:00:00Z"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"addTaskComment","summary":"Add a task note or comment","description":"Adds a comment on a task enabled for AI agent pickup. Defaults to private comments. Posting to a share thread requires a write key. What this assistant may touch: Only tasks assigned to this assistant (agentPickup: true with matching assignedAgentKeyId). What this assistant may NOT touch: Human-owned tasks, unassigned tasks, pending contact invites, or tasks assigned to other agents cannot be modified even when \"Can read my whole board\" is enabled in Settings > My agents.","tags":["Comments"],"security":[{"bearerAuth":[]},{"oauth2":["write"]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique task identifier.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"201":{"description":"Add a task note or comment — succeeded.","content":{"application/json":{"schema":{"type":"object"},"example":{"success":true,"comment":{"id":"cmt_2","text":"Initial research completed. Preparing options outline.","authorKind":"agent"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCommentBody"},"example":{"text":"Initial research completed. Preparing options outline.","target":"private"}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Aisenhour API key (ah_live_...) passed via \"Authorization: Bearer <API_KEY>\" (or \"x-api-key\" header). Create keys in Aisenhour Settings > My agents."},"oauth2":{"type":"oauth2","description":"OAuth 2.1 Authorization Code flow with PKCE (S256), using the authorization and token endpoints advertised by /.well-known/oauth-authorization-server (/api/oauth/authorize also redirects to /oauth/consent).","flows":{"authorizationCode":{"authorizationUrl":"https://aisenhour.com/oauth/consent","tokenUrl":"https://aisenhour.com/oauth/token","scopes":{"read":"Read tasks assigned to this assistant (and active board tasks when whole-board reading is enabled)","write":"Create tasks and update, comment on, complete, or archive tasks assigned to this assistant"}}}}},"schemas":{"Quadrant":{"type":"string","enum":["doFirst","decide","delegate","delete"]},"TaskCategory":{"type":"string","enum":["Work","Finance","Personal","Health","Education","Travel","Shopping","Other"]},"TaskLifecycle":{"type":"string","enum":["active","archived"]},"Subtask":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string","minLength":1,"maxLength":500},"checked":{"type":"boolean","default":false},"assignedToAgent":{"type":"boolean"},"completedByAgent":{"type":"boolean"}},"required":["id","text"]},"RecurringFrequency":{"type":"string","enum":["daily","weekly","monthly"]},"RecurringSettings":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"customDays":{"type":"array","items":{"type":"number","minimum":0,"maximum":6}},"dayOfMonth":{"type":"number","minimum":1,"maximum":31},"dayOfWeek":{"type":"number","minimum":0,"maximum":6},"streakCount":{"type":"number","minimum":0,"default":0},"totalCompletedDays":{"type":"integer","minimum":0},"startDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lastCompletedDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"nextDueDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["frequency"]},"Task":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"quadrant":{"type":"string","enum":["doFirst","decide","delegate","delete"]},"category":{"type":"string","enum":["Work","Finance","Personal","Health","Education","Travel","Shopping","Other"]},"lifecycle":{"type":"string","enum":["active","archived"]},"order":{"type":"number"},"completedAt":{"type":["string","null"]},"subtasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string","minLength":1,"maxLength":500},"checked":{"type":"boolean","default":false},"assignedToAgent":{"type":"boolean"},"completedByAgent":{"type":"boolean"}},"required":["id","text"]},"maxItems":50,"default":[]},"dueDate":{"type":"string"},"scheduledFor":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"recurring":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"customDays":{"type":"array","items":{"type":"number","minimum":0,"maximum":6}},"dayOfMonth":{"type":"number","minimum":1,"maximum":31},"dayOfWeek":{"type":"number","minimum":0,"maximum":6},"streakCount":{"type":"number","minimum":0,"default":0},"totalCompletedDays":{"type":"integer","minimum":0},"startDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lastCompletedDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"nextDueDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["frequency"]},"onboardingSample":{"type":"boolean","const":true},"agentRunId":{"type":"string"},"agentStatus":{"type":"string","enum":["queued","running","waiting_for_approval","completed","failed","cancelled"]},"agentPickup":{"type":"boolean"},"assignedAgentKeyId":{"type":["string","null"]},"assignedAt":{"type":["string","null"]},"addedByAgentName":{"type":["string","null"]},"addedByAgentKeyId":{"type":["string","null"]},"source":{"type":"string","enum":["web","mcp","rest"]},"createdVia":{"type":"string","enum":["web","mcp","rest"]},"externallyModified":{"type":"boolean"},"invitedBy":{"anyOf":[{"anyOf":[{"type":"object","properties":{"uid":{"type":"string"},"displayName":{"type":"string"}},"required":["uid","displayName"]},{"type":"object","properties":{"displayName":{"type":"string","const":"Deleted user"}},"required":["displayName"],"additionalProperties":false}]},{"type":"null"}]},"sharedWith":{"anyOf":[{"anyOf":[{"type":"object","properties":{"uid":{"type":"string"},"displayName":{"type":"string"}},"required":["uid","displayName"]},{"type":"object","properties":{"displayName":{"type":"string","const":"Deleted user"}},"required":["displayName"],"additionalProperties":false}]},{"type":"null"}]},"inviteId":{"type":["string","null"]},"sharingRevoked":{"type":"boolean"},"commentsCount":{"type":"integer","minimum":0},"unreadComments":{"type":"boolean"},"assistantQuestion":{"type":["object","null"],"properties":{"question":{"type":"string","minLength":1,"maxLength":1000},"options":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":5},"askedAt":{"type":"string"},"agentKeyId":{"type":"string"},"agentName":{"type":"string"}},"required":["question","askedAt"]},"assistantAnswer":{"type":["object","null"],"properties":{"question":{"type":"string","maxLength":1000},"answer":{"type":"string","minLength":1,"maxLength":1000},"answeredAt":{"type":"string"}},"required":["question","answer","answeredAt"]},"deliverableStatus":{"type":["string","null"],"enum":["in_progress","delivered","accepted","changes_requested"]},"deliverableSummary":{"type":["string","null"],"maxLength":4000},"deliverableUpdatedAt":{"type":["string","null"]},"deliverableFeedback":{"type":["object","null"],"properties":{"verdict":{"type":"string","enum":["accepted","changes_requested"]},"note":{"type":"string","maxLength":1000},"decidedAt":{"type":"string"}},"required":["verdict","decidedAt"]},"sentBackCount":{"type":"integer","minimum":0},"doneWhen":{"type":["string","null"],"maxLength":500},"constraints":{"type":["string","null"],"maxLength":500},"assignee":{"type":"string","maxLength":100},"isExpanded":{"type":"boolean","default":true},"createdAt":{"type":"string"},"lastModified":{"type":"string"}},"required":["id","userId","title","quadrant","category","lifecycle","createdAt","lastModified"]},"Comment":{"type":"object","properties":{"id":{"type":"string"},"authorUid":{"type":"string"},"authorName":{"type":"string","minLength":1,"maxLength":100},"authorKind":{"type":"string","enum":["human","agent"]},"authorAgentKeyId":{"type":["string","null"]},"text":{"type":"string","minLength":1,"maxLength":2000},"createdAt":{"type":"string"},"editedAt":{"type":"string"}},"required":["id","authorUid","authorName","authorKind","text","createdAt"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Short machine-readable error category."},"message":{"type":"string","description":"Human and assistant-actionable explanation with next steps."},"reason":{"type":"string","description":"Optional structured reason code (for example \"suspended\")."},"details":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}},{"type":"object","additionalProperties":{}}],"description":"Optional validation issues or plan-limit metadata."}},"required":["error","message"]},"CreateTaskInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"quadrant":{"type":"string","enum":["doFirst","decide","delegate","delete"],"default":"doFirst"},"category":{"type":"string","enum":["Work","Finance","Personal","Health","Education","Travel","Shopping","Other"],"default":"Work"},"lifecycle":{"type":"string","enum":["active","archived"],"default":"active"},"order":{"type":"number"},"subtasks":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string","minLength":1,"maxLength":500},"checked":{"type":"boolean","default":false},"assignedToAgent":{"type":"boolean"},"completedByAgent":{"type":"boolean"}},"required":["id","text"]},"maxItems":50},{"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"maxItems":50}]},"dueDate":{"type":"string"},"scheduledFor":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"recurring":{"type":"object","properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"customDays":{"type":"array","items":{"type":"number","minimum":0,"maximum":6}},"dayOfMonth":{"type":"number","minimum":1,"maximum":31},"dayOfWeek":{"type":"number","minimum":0,"maximum":6},"streakCount":{"type":"number","minimum":0,"default":0},"totalCompletedDays":{"type":"integer","minimum":0},"startDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lastCompletedDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"nextDueDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["frequency"]},"agentPickup":{"type":"boolean"},"assignedAgentKeyId":{"type":["string","null"]},"addedByAgentName":{"type":["string","null"]},"addedByAgentKeyId":{"type":["string","null"]},"source":{"type":"string","enum":["web","mcp","rest"]},"createdVia":{"type":"string","enum":["web","mcp","rest"]},"externallyModified":{"type":"boolean"},"invitedBy":{"anyOf":[{"anyOf":[{"type":"object","properties":{"uid":{"type":"string"},"displayName":{"type":"string"}},"required":["uid","displayName"]},{"type":"object","properties":{"displayName":{"type":"string","const":"Deleted user"}},"required":["displayName"],"additionalProperties":false}]},{"type":"null"}]},"sharedWith":{"anyOf":[{"anyOf":[{"type":"object","properties":{"uid":{"type":"string"},"displayName":{"type":"string"}},"required":["uid","displayName"]},{"type":"object","properties":{"displayName":{"type":"string","const":"Deleted user"}},"required":["displayName"],"additionalProperties":false}]},{"type":"null"}]},"inviteId":{"type":["string","null"]},"sharingRevoked":{"type":"boolean"},"commentsCount":{"type":"integer","minimum":0},"unreadComments":{"type":"boolean"},"sentBackCount":{"type":"integer","minimum":0},"doneWhen":{"type":["string","null"],"maxLength":500},"constraints":{"type":["string","null"],"maxLength":500},"assignee":{"type":"string","maxLength":100},"isExpanded":{"type":"boolean"},"assignTo":{"type":"string","enum":["me","self"]}},"required":["title","assignTo"],"additionalProperties":false},"UpdateTaskInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"quadrant":{"type":"string","enum":["doFirst","decide","delegate","delete"]},"category":{"type":"string","enum":["Work","Finance","Personal","Health","Education","Travel","Shopping","Other"]},"lifecycle":{"type":"string","enum":["active","archived"]},"order":{"type":["number","null"]},"completedAt":{"type":["string","null"]},"subtasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string","minLength":1,"maxLength":500},"checked":{"type":"boolean","default":false},"assignedToAgent":{"type":"boolean"},"completedByAgent":{"type":"boolean"}},"required":["id","text"]},"maxItems":50},"dueDate":{"type":["string","null"]},"scheduledFor":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"recurring":{"type":["object","null"],"properties":{"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"customDays":{"type":"array","items":{"type":"number","minimum":0,"maximum":6}},"dayOfMonth":{"type":"number","minimum":1,"maximum":31},"dayOfWeek":{"type":"number","minimum":0,"maximum":6},"streakCount":{"type":"number","minimum":0,"default":0},"totalCompletedDays":{"type":"integer","minimum":0},"startDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lastCompletedDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"nextDueDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["frequency"]},"commentsCount":{"type":"integer","minimum":0},"unreadComments":{"type":"boolean"},"sentBackCount":{"type":"integer","minimum":0},"doneWhen":{"type":["string","null"],"maxLength":500},"constraints":{"type":["string","null"],"maxLength":500},"assignee":{"type":["string","null"],"maxLength":100},"isExpanded":{"type":"boolean"}},"additionalProperties":false},"RequestInputBody":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":1000,"description":"Clarifying question for the task owner (1..1000 chars)"},"options":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":5,"description":"Optional quick-choice answer options (up to 5 options, each max 120 chars)"}},"required":["question"],"additionalProperties":false},"ReportProgressInput":{"type":"object","properties":{"status":{"type":"string","enum":["in_progress","delivered"]},"thought":{"type":"string","maxLength":2000},"summary":{"type":"string","maxLength":4000},"deliverable":{"type":"string","maxLength":10000},"completedSubtaskIds":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"maxItems":50}},"required":["status"],"additionalProperties":false},"AddCommentBody":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":2000},"target":{"type":"string","enum":["private","shared"],"default":"private"}},"required":["text"],"additionalProperties":false}},"responses":{"BadRequest":{"description":"Validation Error or Forbidden update field. Fix the parameters and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Validation Error","message":"Invalid task input. Fix the parameters and retry.","details":[{"field":"title","message":"Title is required"}]}}}},"Unauthorized":{"description":"Invalid or missing Aisenhour API key. Pass \"Authorization: Bearer ah_live_...\" or \"x-api-key\" header. Note: OAuth access tokens minted for MCP (ah_mcp_at_...) cannot be used on REST endpoints.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Unauthorized","message":"Invalid or missing Aisenhour API key. Pass \"Authorization: Bearer ah_live_...\" or \"x-api-key\" header."}}}},"Forbidden":{"description":"Forbidden: API key lacks write permission required for modifying tasks, account is suspended, or Free plan active task limit reached (complete or archive existing tasks, or upgrade to Pro; check Settings > My agents for permissions).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Plan Limit Exceeded","message":"Active task limit reached for Free plan (25/25). Complete or archive existing tasks, or upgrade to Pro.","details":{"reason":"plan_limit","feature":"active_tasks","limit":25,"currentCount":25}}}}},"NotFound":{"description":"Task not found or not accessible. Call GET /v1/tasks (or aisenhour_list_tasks) to view accessible tasks, or call aisenhour_claim_task first if a Delegate task is unclaimed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Task not found","message":"Task not found or not accessible. Call GET /v1/tasks to view accessible tasks."}}}},"TooManyRequests":{"description":"Rate limit exceeded (120 requests/min per API key). Wait for the Retry-After interval before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"Too Many Requests","message":"Rate limit exceeded. Please wait before retrying."}}}}}}}