{"openapi":"3.1.0","info":{"title":"Motir API","version":"1.22.0","summary":"The Motir public REST API, v1.","description":"The versioned integration surface every Motir client shares. Authenticate with a personal access token as `Authorization: Bearer motir_pat_…`. Within a major version this contract is additive-only: fields and endpoints may be ADDED without notice, and nothing is removed, renamed or re-typed. Clients MUST therefore tolerate unknown fields and unknown enum values, and MUST NOT parse the human `error` sentence — only the machine `code`.","license":{"name":"GPL-3.0","identifier":"GPL-3.0-only"}},"paths":{"/api/v1/projects/{projectKey}/work-items":{"get":{"operationId":"listProjectWorkItems","summary":"List a project’s work items","description":"A cursor-paged collection of a project’s work items, optionally narrowed by a filter expression. Ordered by `(createdAt, id)` ascending — the position the cursor encodes.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project’s key — the prefix of its work items’ keys, e.g. `MOTIR`.","schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"description":"An opaque page cursor from a previous response’s `nextCursor`. Omit for the first page. A cursor is signed and scoped to its collection — one issued elsewhere is a 422, never a silent reset.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Rows per page. Defaults to 50; a larger value is CLAMPED to 100 rather than rejected.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"filter","in":"query","required":false,"description":"A serialised filter expression, in the same form the product’s own list views use. An unknown field, operator or value is a 422 naming which.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"A page of work-item summaries.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PageEnvelope"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkItemSummary"}}}}]}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]},"post":{"operationId":"createWorkItem","summary":"Create a work item","description":"Create a work item in a project. The parent, if given, is named by its key and must be a kind-legal parent in the same project.\n\nRequires the `work_item:edit` permission.","x-motir-permission":"work_item:edit","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project’s key — the prefix of its work items’ keys, e.g. `MOTIR`.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"The work item to create.","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string","minLength":1},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"descriptionMd":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"type":{"anyOf":[{"type":"string","enum":["code","design","test","content","copy","translate","research","review","verification","decision","deploy","manual","legal","chore"]},{"type":"null"}]},"executor":{"anyOf":[{"type":"string","enum":["coding_agent","human"]},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number","minimum":0,"maximum":9999.99},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"targetRepo":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetRepos":{"type":"array","items":{"type":"string"}},"targetRepositories":{"type":"array","items":{"type":"string"}},"assigneeId":{"anyOf":[{"type":"string"},{"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"}]}},"required":["kind","title"],"additionalProperties":false}}}},"responses":{"201":{"description":"The created work item.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemDetail"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/projects/{projectKey}/work-items/count":{"get":{"operationId":"countProjectWorkItems","summary":"Count a project’s work items","description":"How many work items match a filter, in ONE request and without paging the match set. Takes the same `filter` the collection takes, and counts exactly what that collection would page. Exact, never capped.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project’s key — the prefix of its work items’ keys, e.g. `MOTIR`.","schema":{"type":"string","minLength":1}},{"name":"filter","in":"query","required":false,"description":"A serialised filter expression, in the same form the collection takes. Omit to count every work item in the project. An unknown field, operator or value is a 422 naming which.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"How many work items match.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemCount"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}":{"get":{"operationId":"getWorkItem","summary":"Read a work item","description":"The full work item: its own fields, its parent and children, its five link groups, its readiness verdict and its comment count. The response carries an `ETag` for use as an `If-Match` on a later update.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}],"responses":{"200":{"description":"The work item.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemDetail"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]},"patch":{"operationId":"updateWorkItem","summary":"Update a work item","description":"Patch any subset of a work item’s fields. A field that is ABSENT is untouched; a field explicitly set to `null` CLEARS it. Send `If-Match` to make the update conditional on the item not having moved.\n\nRequires the `work_item:edit` permission.","x-motir-permission":"work_item:edit","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}},{"name":"If-Match","in":"header","required":false,"description":"An `ETag` from a previous read of this work item. When present, the update is refused with 412 if the item moved since that read. Omitting it means last-write-wins.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"The fields to change.","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string","minLength":1},"descriptionMd":{"anyOf":[{"type":"string"},{"type":"null"}]},"explanationMd":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"type":{"anyOf":[{"type":"string","enum":["code","design","test","content","copy","translate","research","review","verification","decision","deploy","manual","legal","chore"]},{"type":"null"}]},"executor":{"anyOf":[{"type":"string","enum":["coding_agent","human"]},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number","minimum":0,"maximum":9999.99},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"targetRepo":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetRepos":{"type":"array","items":{"type":"string"}},"targetRepositories":{"type":"array","items":{"type":"string"}},"assigneeId":{"anyOf":[{"type":"string"},{"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"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"The updated work item.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemDetail"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"412":{"description":"An `If-Match` precondition failed — the resource moved since the validator was issued.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/transitions":{"get":{"operationId":"listWorkItemTransitions","summary":"List the statuses a work item can move to","description":"The workflow-legal targets from the item’s current status. An `open`-policy project permits every other status; a `restricted` one permits only the declared edges.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}],"responses":{"200":{"description":"The legal transition targets.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransitionList"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]},"post":{"operationId":"transitionWorkItem","summary":"Move a work item to a new status","description":"Apply a workflow transition. A status the workflow does not define and a status not reachable from here are DIFFERENT errors, because a client can fix only one of them.\n\nRequires the `work_item:edit` permission.","x-motir-permission":"work_item:edit","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}],"requestBody":{"required":true,"description":"The target status key.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","minLength":1}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"The work item at its new status.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemDetail"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/links":{"get":{"operationId":"listWorkItemLinks","summary":"Read a work item’s relationship edges","description":"All five edge groups. An empty group is `[]`, never an absent key — to a typed client those are different things.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}],"responses":{"200":{"description":"The five edge groups.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemLinkGroups"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]},"post":{"operationId":"createWorkItemLink","summary":"Create a relationship edge","description":"Link this work item to another by key. Creating an edge that already exists is a 409 — the body is valid, the state is not what the request assumed.\n\nRequires the `work_item:edit` permission.","x-motir-permission":"work_item:edit","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}],"requestBody":{"required":true,"description":"The other endpoint and the relationship.","content":{"application/json":{"schema":{"type":"object","properties":{"toKey":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"relationship":{"type":"string","enum":["blocked_by","blocks","relates_to","duplicates","clones"]}},"required":["toKey","relationship"],"additionalProperties":false}}}},"responses":{"201":{"description":"The created edge.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"toKey":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"relationship":{"type":"string","enum":["blocked_by","blocks","relates_to","duplicates","clones"]}},"required":["toKey","relationship"],"additionalProperties":false}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The request conflicts with existing state. The body is well-formed; the state is not what the request assumed.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]},"delete":{"operationId":"deleteWorkItemLink","summary":"Remove a relationship edge","description":"Remove the edge named by its ENDPOINTS — the same pair that created it. Idempotent: 204 whether or not an edge was there, because the post-condition holds either way.\n\nRequires the `work_item:edit` permission.","x-motir-permission":"work_item:edit","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}},{"name":"toKey","in":"query","required":true,"description":"The other endpoint’s key.","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}},{"name":"relationship","in":"query","required":true,"description":"The relationship to remove.","schema":{"type":"string","enum":["blocked_by","blocks","relates_to","duplicates","clones"]}}],"responses":{"204":{"description":"The edge does not exist.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/comments":{"get":{"operationId":"listWorkItemComments","summary":"List a work item’s comments","description":"Root comments with their single-level reply threads, cursor-paged. This collection DOES report a total, because the shipped read computes it as a bounded aggregate.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}},{"name":"cursor","in":"query","required":false,"description":"An opaque page cursor from a previous response’s `nextCursor`. Omit for the first page. A cursor is signed and scoped to its collection — one issued elsewhere is a 422, never a silent reset.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Rows per page. Defaults to 50; a larger value is CLAMPED to 100 rather than rejected.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"order","in":"query","required":false,"description":"Root-comment order — `asc` (oldest first, the default) or `desc`.","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"A page of comment threads, with the total behind it.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RankedPageEnvelope"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CommentThread"}}}}]}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]},"post":{"operationId":"createWorkItemComment","summary":"Comment on a work item","description":"Add a root comment, or a reply by naming a root comment as its parent. Replies are single-level: a reply to a reply is a 422.\n\nRequires the `comment:add` permission.","x-motir-permission":"comment:add","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}],"requestBody":{"required":true,"description":"The comment to add.","content":{"application/json":{"schema":{"type":"object","properties":{"bodyMd":{"type":"string","minLength":1},"parentCommentId":{"type":"string","minLength":1}},"required":["bodyMd"],"additionalProperties":false}}}},"responses":{"201":{"description":"The created comment.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"parentCommentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"bodyMd":{"type":"string"},"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))$"},"editedAt":{"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"}]},"mentionedUserIds":{"type":"array","items":{"type":"string"}}},"required":["id","parentCommentId","authorId","author","bodyMd","createdAt","editedAt","mentionedUserIds"],"additionalProperties":false}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/attachments":{"post":{"operationId":"uploadWorkItemAttachment","summary":"Attach a file to a work item","description":"Upload a file and attach it to the work item, as `multipart/form-data` with a single `file` part. This is the GENERAL door: it carries no artifact kind and belongs to no lifecycle, so any deliverable a card produces — a research findings document, a review’s notes — can reach the card that commissioned it. A DESIGN asset does not use this endpoint; it has its own publisher, whose result renders in the Design result panel. ⚠️ Two size limits apply and the SMALLER one is not this API’s: the organization’s plan sets a per-file entitlement (10 MB, or 100 MB on a paid plan) and is what returns 413, while a direct upload is separately capped at roughly 4.5 MB by the serving platform and is refused before the request reaches Motir.\n\nRequires the `work_item:edit` permission.","x-motir-permission":"work_item:edit","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}],"requestBody":{"required":true,"description":"The file to attach, in a `file` part. An empty part is a 422.","content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string"}},"required":["file"],"additionalProperties":false}}}},"responses":{"201":{"description":"The created attachment.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"402":{"description":"A plan entitlement is exhausted — the workspace owner’s AI credits, or the organization’s total attachment-storage cap. The request was valid; it was refused for want of headroom, and retrying will not help until the limit is lifted.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"The uploaded file is larger than the per-file limit this organization’s plan allows. Note the SEPARATE platform ceiling on a direct upload, documented on the operation itself (docs/decisions/attachment-api-door.md §1).","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"415":{"description":"The uploaded file’s media type is not on the allowlist. `text/html` is deliberately absent: the three layers that make HTML safe to serve belong to the design-result lifecycle and its own publisher (design-result.md §5a).","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/archive":{"post":{"operationId":"archiveWorkItem","summary":"Archive a work item","description":"A recoverable soft-remove. Does NOT cascade to children — the irreversible subtree delete is not exposed by this API at all (ADR §3).\n\nRequires the `work_item:archive` permission.","x-motir-permission":"work_item:archive","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}],"responses":{"200":{"description":"The archived work item.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemDetail"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/restore":{"post":{"operationId":"restoreWorkItem","summary":"Restore an archived work item","description":"The inverse of archiving. Idempotent on an item that is not archived.\n\nRequires the `work_item:archive` permission.","x-motir-permission":"work_item:archive","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key. Never its internal id (ADR §7).","schema":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}],"responses":{"200":{"description":"The restored work item.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemDetail"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/me":{"get":{"operationId":"getMe","summary":"Who this token is","description":"The token owner, the workspace the token is bound to, and the scopes it was granted. Call this first: the scope list is how a client discovers what its own credential may do without probing endpoints and collecting 403s.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","responses":{"200":{"description":"The token’s identity and granted scopes.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/workspaces":{"get":{"operationId":"listWorkspaces","summary":"List the workspaces this token’s owner belongs to","description":"A discovery read, and the ONE place v1 answers at the account level rather than the bound workspace: it returns the workspaces the token OWNER is a member of, so a client holding a fresh token can learn which workspace ids exist for it. Every resource endpoint stays scoped to the bound workspace.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"cursor","in":"query","required":false,"description":"An opaque page cursor from a previous response’s `nextCursor`. Omit for the first page. Cursors are signed and scoped to their own collection — one issued elsewhere is a 422, never a silent reset.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Rows per page. Defaults to 50; a larger value is CLAMPED to 100 rather than rejected.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"A page of workspaces.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PageEnvelope"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceSummary"}}}}]}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/projects":{"get":{"operationId":"listProjects","summary":"List the projects in this token’s workspace","description":"Every project the token owner may browse in the bound workspace, ordered by key ascending — a total order the page addressing owns, so a cursor can never skip or duplicate a row.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"cursor","in":"query","required":false,"description":"An opaque page cursor from a previous response’s `nextCursor`. Omit for the first page. Cursors are signed and scoped to their own collection — one issued elsewhere is a 422, never a silent reset.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Rows per page. Defaults to 50; a larger value is CLAMPED to 100 rather than rejected.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"A page of projects.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PageEnvelope"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}}]}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/projects/{projectKey}":{"get":{"operationId":"getProject","summary":"Read a project","description":"One project by key. A project the caller may not browse answers 404, not 403 — a 403 would confirm the project exists and let a caller enumerate which keys are real.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project’s key — the prefix of its work items’ keys, e.g. `MOTIR`.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"The project.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/projects/{projectKey}/repositories":{"get":{"operationId":"listProjectRepositories","summary":"List a project’s repositories","description":"The project’s repository SET, in set order — the FIRST row is the project’s primary repository. Each row carries what a client needs to FIND and CLONE one: the checkout `name` (the host’s own casing, which is what a `targetRepo` pin stores), `repoRef`, `cloneUrl`, `defaultBranch` and `archived`. ⚠️ A row with no repository behind it yet is PRESENT with those fields `null` and its own `state` — a `proposed` row is a real member of the set, and a client must be able to say why it was skipped rather than watch it vanish. Branch on `established`, which is the same two-part rule (`state` is `created` or `connected` AND the repository is still connected) that dispatch itself resolves a checkout with. `cloneUrl` is DERIVED, and is `null` for a provider this build cannot address — the API never invents a host. Gated on `project:browse`, the key a CLI-minted token already holds.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project’s key — the prefix of its work items’ keys, e.g. `MOTIR`.","schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"description":"An opaque page cursor from a previous response’s `nextCursor`. Omit for the first page. Cursors are signed and scoped to their own collection — one issued elsewhere is a 422, never a silent reset.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Rows per page. Defaults to 50; a larger value is CLAMPED to 100 rather than rejected.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"A page of the project’s repositories, primary first.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PageEnvelope"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProjectRepository"}}}}]}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/projects/{projectKey}/sprints":{"get":{"operationId":"listProjectSprints","summary":"List a project’s sprints","description":"The project’s sprints in sequence order, cursor-paged.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project’s key — the prefix of its work items’ keys, e.g. `MOTIR`.","schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"description":"An opaque page cursor from a previous response’s `nextCursor`. Omit for the first page. Cursors are signed and scoped to their own collection — one issued elsewhere is a 422, never a silent reset.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Rows per page. Defaults to 50; a larger value is CLAMPED to 100 rather than rejected.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"A page of sprints.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PageEnvelope"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Sprint"}}}}]}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]},"post":{"operationId":"createSprint","summary":"Create a planned sprint","description":"Create a sprint in the `planned` state. ⚠️ TWO gates apply: the token must be granted `sprint:manage`, AND its OWNER must be a sprint admin — a grant narrows a role and never widens it, so an ordinary member’s token is refused with the distinct `NOT_SPRINT_ADMIN` code rather than `INSUFFICIENT_PERMISSION`. The `Location` header names the created sprint.\n\nRequires the `sprint:manage` permission.","x-motir-permission":"sprint:manage","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project’s key — the prefix of its work items’ keys, e.g. `MOTIR`.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"The sprint to create.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"goal":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"201":{"description":"The created sprint.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sprint"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/projects/{projectKey}/backlog":{"get":{"operationId":"getProjectBacklog","summary":"Read a project’s backlog","description":"The to-be-planned pile, in backlog-rank order. ⚠️ Done-category items are EXCLUDED — a finished unsprinted item does not belong in the backlog. (A sprint’s members are deliberately NOT filtered that way; see `listSprintWorkItems`.) Reports a total, because the read behind it already computes one.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project’s key — the prefix of its work items’ keys, e.g. `MOTIR`.","schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"description":"An opaque page cursor from a previous response’s `nextCursor`. Omit for the first page. Cursors are signed and scoped to their own collection — one issued elsewhere is a 422, never a silent reset.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Rows per page. Defaults to 50; a larger value is CLAMPED to 100 rather than rejected.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"filter","in":"query","required":false,"description":"A serialised filter expression, in the same grammar the product’s own list views use — never an ad-hoc `?status=&assignee=` axis. An unknown field, operator or value is a 422 naming which.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"A page of backlog items, with the total behind it.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RankedPageEnvelope"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkItemRef"}}}}]}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/projects/{projectKey}/backlog/work-items":{"post":{"operationId":"moveWorkItemsToBacklog","summary":"Move work items out of their sprint and back to the backlog","description":"An atomic batch move. An EMPTY array is a deliberate 200 no-op, not an error: a script that computed an empty batch has nothing to do rather than a mistake to fix. An over-cap batch is refused WHOLE, never partially applied.\n\nRequires the `sprint:manage` permission.","x-motir-permission":"sprint:manage","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project’s key — the prefix of its work items’ keys, e.g. `MOTIR`.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"The work items to move.","content":{"application/json":{"schema":{"type":"object","properties":{"workItemKeys":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}},"required":["workItemKeys"],"additionalProperties":false}}}},"responses":{"200":{"description":"The keys that moved, in request order.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipMoveResult"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/projects/{projectKey}/ready":{"get":{"operationId":"getProjectReadySet","summary":"Read a project’s READY set","description":"The work items whose every `blocked_by` dependency is done — what an agent loop claims from. Each row carries its dependency edges. Reports no total: unlike the backlog, this read has no cheap bounded count.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project’s key — the prefix of its work items’ keys, e.g. `MOTIR`.","schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"description":"An opaque page cursor from a previous response’s `nextCursor`. Omit for the first page. Cursors are signed and scoped to their own collection — one issued elsewhere is a 422, never a silent reset.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Rows per page. Defaults to 50; a larger value is CLAMPED to 100 rather than rejected.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"kind","in":"query","required":false,"description":"Narrow to one or more work-item kinds, as `?kind=epic&kind=story`. An unknown kind is a 422.","explode":true,"schema":{"type":"array","items":{"type":"string","minLength":1}}},{"name":"priority","in":"query","required":false,"description":"Narrow to one or more priorities, as `?priority=high&priority=urgent`. An unknown priority is a 422.","explode":true,"schema":{"type":"array","items":{"type":"string","minLength":1}}},{"name":"assigneeId","in":"query","required":false,"description":"TRI-STATE, and all three are reachable: OMIT for any assignee, the literal `none` for the unassigned bucket, or a user id for that user's items. An empty value is treated as omitted.","schema":{"type":"string","minLength":1}},{"name":"ancestor","in":"query","required":false,"description":"SCOPE the read to the ready leaves STRICTLY BENEATH one or more containers, at ANY depth, as `?ancestor=MOTIR-42&ancestor=MOTIR-43` — an any-of set, like `kind`. The named container is NOT in its own result, so a childless one returns an empty page rather than itself: that is the honest answer to “what is ready under this story” for a story nobody has decomposed. ⚠️ It NARROWS the same answer the unfaceted read gives and can never widen it — a leaf whose ancestor chain reaches the named container but is not itself all-ready stays absent, because the parent-ready cascade is computed first and this filters its result. An unknown key, or one belonging to another project, is a 422 — indistinguishable from each other.","explode":true,"schema":{"type":"array","items":{"type":"string","minLength":1}}},{"name":"sprintId","in":"query","required":false,"description":"SCOPE the read to the items whose OWN `sprintId` matches — a sprint id, or the reserved literal `active` for the project's active sprint. SINGLE-VALUED: membership is a scalar column, so there is no any-of question to ask. Membership is DIRECT and never inherited — an item under an in-sprint parent but not itself in the sprint is out of scope. A sprint that is not this project's, and `active` on a project between sprints, are both a 422 rather than a silently unfiltered page. An empty value is treated as omitted.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"A page of ready work items with their dependency edges.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PageEnvelope"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReadyItem"}}}}]}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/sprints/{sprintId}":{"get":{"operationId":"getSprint","summary":"Read a sprint","description":"One sprint by id. A sprint in another workspace and one that never existed are the same 404 — the existence-oracle rule.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"sprintId","in":"path","required":true,"description":"The sprint’s id. A sprint has no `MOTIR-<n>` key, so its id is its name on the wire.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"The sprint.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sprint"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]},"patch":{"operationId":"updateSprint","summary":"Update a sprint","description":"Patch a sprint’s name, goal or window. A COMPLETED sprint is frozen: the body is fine, the state is not, so the refusal is a 409 rather than a 422.\n\nRequires the `sprint:manage` permission.","x-motir-permission":"sprint:manage","parameters":[{"name":"sprintId","in":"path","required":true,"description":"The sprint’s id. A sprint has no `MOTIR-<n>` key, so its id is its name on the wire.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"The fields to change.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"goal":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"The updated sprint.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sprint"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The request conflicts with existing state. The body is well-formed; the state is not what the request assumed.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/sprints/{sprintId}/start":{"post":{"operationId":"startSprint","summary":"Start a sprint","description":"Move a planned sprint to active. ⚠️ Losing the race to activate is a 409, not a 422: the request was valid when it was sent and another one committed first, so the right instruction is re-read-and-retry rather than fix-your-body. Starting a sprint that is not planned is a 422 — a state the caller can see from a read.\n\nRequires the `sprint:manage` permission.","x-motir-permission":"sprint:manage","parameters":[{"name":"sprintId","in":"path","required":true,"description":"The sprint’s id. A sprint has no `MOTIR-<n>` key, so its id is its name on the wire.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"The sprint window, if it is being set here.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"goal":{"anyOf":[{"type":"string"},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"The active sprint.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sprint"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The request conflicts with existing state. The body is well-formed; the state is not what the request assumed.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/sprints/{sprintId}/complete":{"post":{"operationId":"completeSprint","summary":"Complete a sprint","description":"Close an active sprint, optionally carrying its unfinished items over to a named target. Completing a sprint that is not active is a 422.\n\nRequires the `sprint:manage` permission.","x-motir-permission":"sprint:manage","parameters":[{"name":"sprintId","in":"path","required":true,"description":"The sprint’s id. A sprint has no `MOTIR-<n>` key, so its id is its name on the wire.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"Where unfinished items go, if anywhere.","content":{"application/json":{"schema":{"type":"object","properties":{"carryOverTo":{"anyOf":[{"type":"string","const":"backlog"},{"type":"object","properties":{"sprintId":{"type":"string","minLength":1}},"required":["sprintId"],"additionalProperties":false}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"The completed sprint.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sprint"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/sprints/{sprintId}/work-items":{"get":{"operationId":"listSprintWorkItems","summary":"List a sprint’s members","description":"The items in a sprint, in rank order. ⚠️ Deliberately asymmetric with the backlog: done items STAY in their sprint, because that is what makes a completed sprint a historical record. Reports a total, because the read behind it already computes one.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"sprintId","in":"path","required":true,"description":"The sprint’s id. A sprint has no `MOTIR-<n>` key, so its id is its name on the wire.","schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"description":"An opaque page cursor from a previous response’s `nextCursor`. Omit for the first page. Cursors are signed and scoped to their own collection — one issued elsewhere is a 422, never a silent reset.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Rows per page. Defaults to 50; a larger value is CLAMPED to 100 rather than rejected.","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"filter","in":"query","required":false,"description":"A serialised filter expression, in the same grammar the product’s own list views use — never an ad-hoc `?status=&assignee=` axis. An unknown field, operator or value is a 422 naming which.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"A page of sprint members, with the total behind it.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RankedPageEnvelope"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkItemRef"}}}}]}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]},"post":{"operationId":"moveWorkItemsToSprint","summary":"Move work items into a sprint","description":"An atomic batch move into this sprint. An empty array is a 200 no-op; an item belonging to another project rejects the WHOLE batch before any write, so a partial move cannot happen.\n\nRequires the `sprint:manage` permission.","x-motir-permission":"sprint:manage","parameters":[{"name":"sprintId","in":"path","required":true,"description":"The sprint’s id. A sprint has no `MOTIR-<n>` key, so its id is its name on the wire.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"description":"The work items to move.","content":{"application/json":{"schema":{"type":"object","properties":{"workItemKeys":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}},"required":["workItemKeys"],"additionalProperties":false}}}},"responses":{"200":{"description":"The keys that moved, in request order.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipMoveResult"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/dispatch-prompt":{"get":{"operationId":"getWorkItemDispatchPrompt","summary":"Read the canonical coding-agent prompt for a work item","description":"Return the server-assembled prompt for one work item — the CONTEXT / WHAT TO DO / ACCEPTANCE CRITERIA / GIT WORKFLOW sections built from the item, its parent, its dependencies and its repo — plus the repo to run it in and which git workflow it carries. A PURE READ: it does not claim the item, move its status, or change its recorded session branch, so fetching a prompt to look at it is always safe. The text is deliberately identical for every agent harness; do not rewrite it. `advisories` is never a gate — it changes what you are told, never what you may do.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key (case-insensitive).","schema":{"type":"string"}},{"name":"sessionBranch","in":"query","required":false,"description":"A session branch to FALL BACK to when this item carries no lineage of its own — the unattended-run seed. It never overrides: an item whose dependencies are already integrated, or that is itself integrated, keeps its own branch, so a caller cannot redirect a live lineage.","schema":{"type":"string"}}],"responses":{"200":{"description":"The assembled prompt and the facts a client routes on.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchPrompt"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/claim":{"post":{"operationId":"claimWorkItem","summary":"Atomically claim one work item by key","description":"CLAIM one work item, named by key, so that concurrent dispatchers cannot both start it. In ONE transaction the row is locked, its status is re-checked against the TO-DO category, and — if it holds — the item is assigned to the caller AND moved to “In progress”. The to-do category is `todo` AND `blocked`, so a deliberately forced dispatch of a card whose dependencies are unmet still works. ⚠️ A refusal is a 200 with an `outcome`, not an error, because three of the four outcomes are ordinary: `claimed` (it is yours), `mine` (already yours — resume your own interrupted run), `taken` (somebody else holds it, and they are named), `not_claimable` (finished, under review, or otherwise outside the to-do category). Claiming is IDEMPOTENT for the holder and never re-opens finished work. The claim IS the dispatch status flip — do not also POST a transition afterwards.\n\nRequires the `work_item:edit` permission.","x-motir-permission":"work_item:edit","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key (case-insensitive).","schema":{"type":"string"}}],"responses":{"200":{"description":"What the claim resolved to, and who holds the item.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkItemClaim"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/scope-claims":{"post":{"operationId":"claimScope","summary":"Atomically claim a whole story or sprint, all or nothing","description":"CLAIM an entire SCOPE — a container work item and its children, or a project’s ACTIVE sprint — so a scoped run owns the whole set before its first agent starts. In ONE transaction the scope is validated, every row is locked in a deterministic order, every row’s status is re-checked against the TO-DO category, and — if all of them hold — every row is assigned to the caller AND moved to “In progress”. ⚠️ ALL OR NOTHING: if ANY member is un-claimable the whole claim rolls back and NOTHING is written, because a partially-claimed scope is the one outcome with no good handling — you can neither finish it nor cleanly abandon it. ⚠️ EVERY CARD IN A CLAIMED SCOPE READS “In progress” FOR THE WHOLE RUN, while only one of them is being worked at a time. That is deliberate and it changes what the status MEANS: from “an agent is on this right now” to “this run owns it”. The board therefore shows the run’s FOOTPRINT rather than its cursor — the price of exclusive ownership, which is what lets a scoped run promise to finish what it started. A refusal is a 200 with an `outcome`: `claimed`, `mine` (already yours — resume), `taken` (a member is held by somebody else, and they are named), `not_claimable` (a member is finished or under review), `wrong_shape` (a work-item scope whose child is itself a container — re-plan it, do not retry), `not_finishable` (work OUTSIDE the scope gates work inside it). A STORY scope is ONE LAYER and that is checked; a SPRINT scope may span many layers and no shape check applies, because `validate_sprint` has already guaranteed its membership is closed. A sprint’s scope is exactly the items whose OWN `sprintId` matches — an item under an in-sprint parent but not itself in the sprint is NOT claimed. The claim IS the dispatch status flip — do not also POST a transition afterwards.\n\nRequires the `work_item:edit` permission.","x-motir-permission":"work_item:edit","requestBody":{"required":true,"description":"The scope to claim: `{ \"kind\": \"work_item\", \"key\": \"MOTIR-42\" }` for a container and its children, or `{ \"kind\": \"sprint\", \"projectKey\": \"MOTIR\" }` for that project’s active sprint.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"work_item"},"key":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","key"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"sprint"},"projectKey":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","projectKey"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"What the claim resolved to, and — on a refusal — why.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeClaim"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The request conflicts with existing state. The body is well-formed; the state is not what the request assumed.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/integration":{"post":{"operationId":"recordWorkItemIntegration","summary":"Record a work item as integrated on a session branch","description":"Record that a work item’s work has been integrated onto a session branch: it moves to “In review” and records the branch, in ONE transaction, which unblocks its dependents while the session pull request awaits a human merge. Optionally self-report the implementation harness and model (`implementationSource` defaults to `byok`); omit all three to leave the item’s recorded provenance untouched. Honors the project’s workflow rules — an item with no legal path to “In review” is refused and its branch is left unchanged.\n\nRequires the `work_item:edit` permission.","x-motir-permission":"work_item:edit","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key (case-insensitive).","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The session branch the work was integrated onto, and optional provenance.","content":{"application/json":{"schema":{"type":"object","properties":{"sessionBranch":{"type":"string","minLength":1,"maxLength":200},"implementationSource":{"type":"string","enum":["byok","manual"]},"implementationHarness":{"type":"string","minLength":1},"implementationModel":{"type":"string","minLength":1}},"required":["sessionBranch"],"additionalProperties":false}}}},"responses":{"200":{"description":"The item’s new status, its recorded branch and its provenance.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationResult"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/implementation":{"post":{"operationId":"reportWorkItemImplementation","summary":"Record what BUILT a work item","description":"Record implementation provenance — the harness and model an agent ran as, and whether the run was `byok` or `manual` — WITHOUT asserting anything about where the work is integrated. Use this on the per-item pull-request path, where there is no session branch to report; use `POST …/integration` when there is one. It moves NO status and leaves the item’s session branch untouched, both of which are echoed back so a client can see it. A field you omit is left exactly as it is — omitting all of them changes nothing.\n\nRequires the `work_item:edit` permission.","x-motir-permission":"work_item:edit","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key (case-insensitive).","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The provenance to record. `sessionBranch` is NOT accepted here — send it to `POST …/integration`, which is the operation that asserts integration.","content":{"application/json":{"schema":{"type":"object","properties":{"implementationSource":{"type":"string","enum":["byok","manual"]},"implementationHarness":{"type":"string","minLength":1},"implementationModel":{"type":"string","minLength":1}},"additionalProperties":false}}}},"responses":{"200":{"description":"The item’s recorded provenance, with its unchanged status and branch.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"status":{"type":"string"},"sessionBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"implementationSource":{"anyOf":[{"type":"string","enum":["byok","manual"]},{"type":"null"}]},"implementationHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"implementationModel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","status","sessionBranch","updatedAt","implementationSource","implementationHarness","implementationModel"],"additionalProperties":false}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/sessions/complete":{"post":{"operationId":"completeSession","summary":"Close out a merged session branch","description":"Close out a session branch after its pull request is merged: every work item recorded on the branch moves to “Done” and its recorded branch is cleared. Returns a PER-ITEM outcome (`completed` / `already_done` / `failed`) — a partial close-out is a real result, not an error: the items that could close DID, and the ones that could not are named with a reason. Read the results; do not infer an outcome from their count. A branch nothing is recorded on returns an empty list, not a 404. The branch travels in the BODY because a git ref routinely contains `/`.\n\nRequires the `work_item:edit` permission.","x-motir-permission":"work_item:edit","requestBody":{"required":true,"description":"The merged session branch, and optional provenance for every item closed.","content":{"application/json":{"schema":{"type":"object","properties":{"sessionBranch":{"type":"string","minLength":1,"maxLength":200},"implementationSource":{"type":"string","enum":["byok","manual"]},"implementationHarness":{"type":"string","minLength":1},"implementationModel":{"type":"string","minLength":1}},"required":["sessionBranch"],"additionalProperties":false}}}},"responses":{"200":{"description":"The branch and one outcome per item that was recorded on it.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCloseOut"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/expansions":{"post":{"operationId":"submitWorkItemExpansion","summary":"Submit an AI expansion of a container work item","description":"Submit an AI expansion of one CONTAINER work item (epic / story / task / bug): the planner drafts the children it should have. Returns `202` with `{ jobId, planId, statusUrl }` the moment the job is ACCEPTED — it does not wait for the planner, and the body carries no result because there is none yet. ⚠️ IMPORTANT: this does NOT create work items. The job produces a PLAN of proposals, and approving that plan in Motir is the only thing that turns a proposal into a work item. Do not report expanded children as created. ⚠️ A submit SPENDS the token owner’s AI credits, so wrapping this call in a blind retry-on-timeout costs real money — poll `statusUrl` instead of resubmitting. A leaf (subtask) cannot be expanded.\n\nRequires the `ai:plan` permission.","x-motir-permission":"ai:plan","parameters":[{"name":"key","in":"path","required":true,"description":"The container work item’s `MOTIR-<n>` key (case-insensitive).","schema":{"type":"string"}}],"responses":{"202":{"description":"The job was accepted. Nothing has been planned yet — poll `statusUrl` for the outcome.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanJobHandle"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"402":{"description":"A plan entitlement is exhausted — the workspace owner’s AI credits, or the organization’s total attachment-storage cap. The request was valid; it was refused for want of headroom, and retrying will not help until the limit is lifted.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}},"503":{"description":"A dependency this operation needs — the motir-ai planning service — could not be reached or is misconfigured. The request itself was fine; retrying later is the right response.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/plans/{planId}/status":{"get":{"operationId":"getPlanStatus","summary":"Read what became of a submitted planning job","description":"Read a plan’s status (`generating` / `planned` / `approved` / `declined`), how many PROPOSALS it bundles, and — while it is still generating — whether the producing job is alive or already FAILED. That last distinction is the point of this endpoint: a failed job writes no terminal plan state of its own — a background reconciler declines an empty one within the hour, so the plan status alone cannot tell you to stop polling NOW. `job.reachable: false` means motir-ai could not be asked, not that the job died. A pure read; the proposal count is NOT a count of created work items.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"planId","in":"path","required":true,"description":"The plan id an expansion or plan-session submit returned.","schema":{"type":"string"}}],"responses":{"200":{"description":"The plan’s status, its proposal count, and the job’s liveness.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOutcome"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/plans/{planId}":{"get":{"operationId":"getPlan","summary":"Read a plan with the proposals it bundles","description":"Read a plan WITH its proposals — what a planning pass actually proposed, not just how many. Each proposal carries its `op` (`add` / `modify` / `remove`), the `proposedFields` of an `add`, the `patch` of a `modify`, and the `parentRef` / `blockedByRefs` that let you rebuild the proposed tree and its dependency edges. ⚠️ These are PROPOSALS, not work items: an `add`’s `workItemKey` is `null` and stays null until the plan is approved in Motir, which is the only path from a proposal to a work item. A plan still generating returns the proposals that have arrived so far.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"planId","in":"path","required":true,"description":"The plan id.","schema":{"type":"string"}}],"responses":{"200":{"description":"The plan and its proposals.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/plan-approval":{"post":{"operationId":"approveWorkItemPlan","summary":"Approve the plan this work item produced","description":"APPROVE the plan a work item’s own re-plan produced, without a browser session — the entrance `motir auto --auto-approve-replan` drives. Its proposals become work items: an `add` creates, a `modify` applies to the same item, a `remove` archives. ⚠️ IT IS ADDRESSED BY THE CARD, and that is the bound: the server resolves the plan from the planning conversation ANCHORED at this key, so there is no way to name a plan the card did not produce. Every other plan — a cadence plan, an onboarding generation, one submitted from the project-wide panel — is refused here and keeps the human decision it was written under. It calls the same service the in-app approve does, so the confirmation gate, the re-validation and the one-shot concurrency guard are identical; a plan that has already been approved or declined answers 409, exactly as it does in the app.\n\nRequires the `ai:decide_plan` permission.","x-motir-permission":"ai:decide_plan","parameters":[{"name":"key","in":"path","required":true,"description":"The work item whose plan is approved (case-insensitive).","schema":{"type":"string"}}],"responses":{"200":{"description":"The approved plan and its proposals, each now carrying the `workItemKey` it materialized into. The plan’s own id is on the body, which is how a caller that never knew it can report what was approved.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The request conflicts with existing state. The body is well-formed; the state is not what the request assumed.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/projects/{projectKey}/plan-session":{"post":{"operationId":"openPlanSession","summary":"Open or resume the planning conversation for a scope","description":"Open — or RESUME — the planning conversation for a project, and read its thread. Changing a plan in Motir is a multi-turn CONVERSATION: add turns, then send the accumulated intent. There is ONE thread per project per anchor set, so calling this again returns the SAME conversation, with every turn already on it — including the one the Motir web app shows. Pass `targetKeys` to anchor the conversation at specific work items (\"re-plan these two\"); omit it for the project-wide thread. The anchor set is the thread’s identity: order and duplicates do not matter. Opening submits nothing and costs nothing — which is why it is `read`-scoped despite being a POST (a GET that creates a row would not be safe).\n\nRequires the `ai:plan` permission.","x-motir-permission":"ai:plan","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project key, e.g. `MOTIR`.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The optional anchor set. Omit for the project-wide thread.","content":{"application/json":{"schema":{"type":"object","properties":{"targetKeys":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false}}}},"responses":{"200":{"description":"The thread, with every turn on it.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanSession"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/projects/{projectKey}/plan-session/turns":{"post":{"operationId":"appendPlanTurn","summary":"Add one turn to the planning conversation","description":"Add ONE turn — what you want changed about the plan. ⚠️ IMPORTANT: appending does NOT submit. The turn is persisted immediately, but no job starts, no credits are spent and no work item changes; turns ACCUMULATE until you post a submission, which is what sends them to the planner. That separation is the point — a later turn REFINES the earlier ones rather than replacing them, so \"add auth to the billing epic\" then \"keep them under 3 points\" go out as ONE coherent change. Addresses the thread by scope, so it always extends the same conversation.\n\nRequires the `ai:plan` permission.","x-motir-permission":"ai:plan","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project key, e.g. `MOTIR`.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"What to say in this turn, and the optional anchor set it belongs to.","content":{"application/json":{"schema":{"type":"object","properties":{"targetKeys":{"type":"array","items":{"type":"string","minLength":1}},"body":{"type":"string","minLength":1}},"required":["body"],"additionalProperties":false}}}},"responses":{"200":{"description":"The thread, with the new turn appended.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanSession"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The request conflicts with existing state. The body is well-formed; the state is not what the request assumed.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/projects/{projectKey}/plan-session/submissions":{"post":{"operationId":"submitPlanSession","summary":"Send the thread’s accumulated intent to the planner","description":"Send this conversation’s accumulated intent to the planner: every turn on the thread, in order, as ONE change. Returns `202` with `{ jobId, planId, statusUrl }` the moment the job is accepted — it does not wait, and the body carries no result because there is none yet. The thread stays INTACT and can be refined with another turn. ⚠️ This is the act that SPENDS the token owner’s AI credits, and it produces a PLAN of proposals: approving that plan in Motir is the only thing that turns a proposal into a work item. Submitting a thread with no turns is refused.\n\nRequires the `ai:plan` permission.","x-motir-permission":"ai:plan","parameters":[{"name":"projectKey","in":"path","required":true,"description":"The project key, e.g. `MOTIR`.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The optional anchor set naming which thread to submit.","content":{"application/json":{"schema":{"type":"object","properties":{"targetKeys":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false}}}},"responses":{"202":{"description":"The job was accepted. Nothing has been planned yet — poll `statusUrl` for the outcome.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanJobHandle"}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"402":{"description":"A plan entitlement is exhausted — the workspace owner’s AI credits, or the organization’s total attachment-storage cap. The request was valid; it was refused for want of headroom, and retrying will not help until the limit is lifted.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}},"503":{"description":"A dependency this operation needs — the motir-ai planning service — could not be reached or is misconfigured. The request itself was fine; retrying later is the right response.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearerPat":[]}]}},"/api/v1/work-items/{key}/activity":{"get":{"operationId":"getWorkItemActivity","summary":"Read a work item’s activity — changes, comments, or both","description":"Read a work item’s activity in one of three views: `all` (default — comments and the change trail interleaved in timestamp order), `comments` (the discussion), or `history` (the change trail only). Every entry carries a `type` so one renderer serves all three. The `cursor` is OPAQUE and SCOPED TO ITS VIEW: echo it back verbatim, never construct or parse one, and never hand a cursor from one view to another — that is a 422, not a silent restart. A page may be SHORTER than you expect while more remains (the change scan is noise-filtered and a comment page drags whole reply threads along), so walk until `nextCursor` is `null`, never until a page looks short. `GET /api/v1/work-items/{key}/comments` still exists and is unchanged — this view is the same data through the same read, offered so one code path can walk all three.\n\nRequires the `project:browse` permission.","x-motir-permission":"project:browse","parameters":[{"name":"key","in":"path","required":true,"description":"The work item’s `MOTIR-<n>` key (case-insensitive).","schema":{"type":"string"}},{"name":"view","in":"query","required":false,"description":"Which stream to read. Defaults to `all`.","schema":{"type":"string","enum":["all","comments","history"]}},{"name":"order","in":"query","required":false,"description":"Page-walk direction. Omit for each view’s shipped default — `desc` (newest first) for `all` and `history`, `asc` for `comments`.","schema":{"type":"string","enum":["asc","desc"]}},{"name":"cursor","in":"query","required":false,"description":"An opaque page cursor from a previous response’s `nextCursor`. Omit for the first page. Scoped to its own VIEW — one issued elsewhere is a 422, never a silent reset.","schema":{"type":"string"}}],"responses":{"200":{"description":"One page of activity entries. `totalCount` is the number of entries in this view; `totalComments` / `totalChanges` break that down for the merged `all` view, and each is null on a view that did not count that source.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RankedPageEnvelope"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ActivityEntry"}}}},{"type":"object","properties":{"totalComments":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"totalChanges":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["totalComments","totalChanges"]}]}}}},"401":{"description":"Authentication required. No token, or a token that is malformed, unknown, revoked or expired — the five are deliberately undifferentiated.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"The token is valid but its granted scopes do not include the one this operation requires.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The resource does not exist, or it is outside the workspace this token is bound to — deliberately the same answer.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The request is malformed in a way the caller can fix: an invalid cursor, an out-of-range `limit`, a failed body validation.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"The token's rate-limit budget for the current window is exhausted. Read `X-RateLimit-Reset` for when it refills.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"An unexpected server fault. The body carries no `code`, no stack and no driver text.","headers":{"X-Request-Id":{"description":"A correlation id for this response. Echoes the request `X-Request-Id` when it is id-shaped (`[A-Za-z0-9._-]{1,128}`), otherwise newly minted. Present on every response, success and failure alike.","schema":{"type":"string","minLength":1}},"X-Motir-Api-Version":{"description":"The version of the API CONTRACT that served this response, as `MAJOR.MINOR.PATCH` — the same value as this document's `info.version`. MAJOR is the path version (`1`), MINOR moves on an additive change, PATCH on a documentation-only correction. It is NOT the deployment's release number. Present on every response, success and failure alike, so a client can check for version skew without fetching this document.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"}},"X-RateLimit-Limit":{"description":"The number of requests this token may make in the current window.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Remaining":{"description":"Requests left in the current window. Reaches `0` before a 429 is returned.","schema":{"type":"string","pattern":"^\\d+$"}},"X-RateLimit-Reset":{"description":"Unix epoch SECONDS at which the current window resets and the budget refills. This is the value a client backs off until after a 429 — v1 sends no `Retry-After`, deliberately, because one absolute instant cannot go stale in transit the way a relative duration can.","schema":{"type":"string","pattern":"^\\d+$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalErrorBody"}}}}},"security":[{"bearerPat":[]}]}}},"components":{"schemas":{"ErrorBody":{"type":"object","properties":{"code":{"type":"string","minLength":1},"error":{"type":"string","minLength":1}},"required":["code","error"],"additionalProperties":false},"InternalErrorBody":{"type":"object","properties":{"error":{"type":"string","minLength":1}},"required":["error"],"additionalProperties":false},"PageEnvelope":{"type":"object","properties":{"items":{"type":"array","items":{}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]},"RankedPageEnvelope":{"type":"object","properties":{"items":{"type":"array","items":{}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"totalCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["items","nextCursor","totalCount"]},"WorkItemSummary":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"type":{"anyOf":[{"type":"string","enum":["code","design","test","content","copy","translate","research","review","verification","decision","deploy","manual","legal","chore"]},{"type":"null"}]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"reporterId":{"type":"string"},"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"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"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))$"},"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))$"},"dependencies":{"type":"object","properties":{"blockedBy":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"title":{"type":"string"},"status":{"type":"string"}},"required":["key","title","status"],"additionalProperties":false}},"blocks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"title":{"type":"string"},"status":{"type":"string"}},"required":["key","title","status"],"additionalProperties":false}}},"required":["blockedBy","blocks"],"additionalProperties":false}},"required":["key","kind","type","title","status","priority","assigneeId","reporterId","dueDate","estimateMinutes","storyPoints","createdAt","updatedAt","dependencies"],"additionalProperties":false},"WorkItemCount":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count"],"additionalProperties":false},"WorkItemDetail":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"type":{"anyOf":[{"type":"string","enum":["code","design","test","content","copy","translate","research","review","verification","decision","deploy","manual","legal","chore"]},{"type":"null"}]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"reporterId":{"type":"string"},"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"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"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))$"},"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))$"},"descriptionMd":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"ancestorKeys":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}},"children":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"},"dependencies":{"type":"object","properties":{"blockedBy":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"title":{"type":"string"},"status":{"type":"string"}},"required":["key","title","status"],"additionalProperties":false}},"blocks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"title":{"type":"string"},"status":{"type":"string"}},"required":["key","title","status"],"additionalProperties":false}}},"required":["blockedBy","blocks"],"additionalProperties":false}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived","dependencies"],"additionalProperties":false}},"links":{"type":"object","properties":{"blockedBy":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false}},"blocks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false}},"relatesTo":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false}},"duplicates":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false}},"clones":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false}}},"required":["blockedBy","blocks","relatesTo","duplicates","clones"],"additionalProperties":false},"readiness":{"type":"object","properties":{"ready":{"type":"boolean"},"openBlockers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false}},"blockedByAncestorKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"blockedByAncestorTitle":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ready","openBlockers","blockedByAncestorKey","blockedByAncestorTitle"],"additionalProperties":false},"labels":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"components":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"commentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sprintId":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetRepo":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetRepos":{"type":"array","items":{"type":"string"}},"targetRepositories":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"},"primary":{"type":"boolean"}},"required":["ref","name","role","label","state","primary"],"additionalProperties":false}},"executor":{"anyOf":[{"type":"string","enum":["coding_agent","human"]},{"type":"null"}]},"planningSource":{"anyOf":[{"type":"string","enum":["native","mcp","manual","api"]},{"type":"null"}]},"planningHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"planningModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"implementationSource":{"anyOf":[{"type":"string","enum":["hosted","byok","manual"]},{"type":"null"}]},"implementationHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"implementationModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"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"}]},"deliveries":{"type":"array","items":{"type":"object","properties":{"repo":{"type":"string"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"url":{"type":"string"},"state":{"type":"string","enum":["open","merged","closed"]},"ci":{"anyOf":[{"type":"string","enum":["passing","failing","running"]},{"type":"null"}]},"baseRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"type":"string"}},"required":["repo","number","title","url","state","ci","baseRef","defaultBranch"],"additionalProperties":false}}},"required":["key","kind","type","title","status","priority","assigneeId","reporterId","dueDate","estimateMinutes","storyPoints","createdAt","updatedAt","descriptionMd","parentKey","ancestorKeys","children","links","readiness","labels","components","commentCount","sprintId","targetRepo","targetRepos","targetRepositories","executor","planningSource","planningHarness","planningModel","implementationSource","implementationHarness","implementationModel","archivedAt","deliveries"],"additionalProperties":false},"WorkItemLinkGroups":{"type":"object","properties":{"blockedBy":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false}},"blocks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false}},"relatesTo":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false}},"duplicates":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false}},"clones":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false}}},"required":["blockedBy","blocks","relatesTo","duplicates","clones"],"additionalProperties":false},"CommentThread":{"type":"object","properties":{"id":{"type":"string"},"parentCommentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"bodyMd":{"type":"string"},"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))$"},"editedAt":{"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"}]},"mentionedUserIds":{"type":"array","items":{"type":"string"}},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentCommentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"bodyMd":{"type":"string"},"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))$"},"editedAt":{"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"}]},"mentionedUserIds":{"type":"array","items":{"type":"string"}}},"required":["id","parentCommentId","authorId","author","bodyMd","createdAt","editedAt","mentionedUserIds"],"additionalProperties":false}}},"required":["id","parentCommentId","authorId","author","bodyMd","createdAt","editedAt","mentionedUserIds","replies"],"additionalProperties":false},"TransitionList":{"type":"object","properties":{"transitions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["todo","in_progress","done"]}},"required":["key","label","category"],"additionalProperties":false}}},"required":["transitions"],"additionalProperties":false},"Attachment":{"type":"object","properties":{"id":{"type":"string"},"workItemKey":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source":{"type":"string","enum":["editor","panel","api"]},"contentPath":{"type":"string"},"uploader":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","workItemKey","filename","mimeType","sizeBytes","source","contentPath","uploader","createdAt"],"additionalProperties":false},"Me":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"workspaceId":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}}},"required":["user","workspaceId","permissions"],"additionalProperties":false},"WorkspaceSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","slug","createdAt"],"additionalProperties":false},"Project":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*$"},"name":{"type":"string"},"accessLevel":{"type":"string","enum":["open","limited","private","public"]},"archived":{"type":"boolean"}},"required":["key","name","accessLevel","archived"],"additionalProperties":false},"ProjectRepository":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["web","api","mobile","shared","infra","other"]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"repoRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"cloneUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived":{"type":"boolean"},"state":{"type":"string","enum":["proposed","creating","created","connected","skipped","failed"]},"established":{"type":"boolean"}},"required":["id","role","label","name","repoRef","cloneUrl","defaultBranch","archived","state","established"],"additionalProperties":false},"Sprint":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"goal":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string","enum":["planned","active","complete"]},"startDate":{"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"}]},"endDate":{"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"}]},"completedAt":{"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"}]},"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"issueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"committedPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"committedIssueCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","name","goal","state","startDate","endDate","completedAt","sequence","issueCount","committedPoints","committedIssueCount"],"additionalProperties":false},"ReadyItem":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"status":{"type":"object","properties":{"key":{"type":"string"},"category":{"type":"string"}},"required":["key","category"],"additionalProperties":false},"type":{"anyOf":[{"type":"string","enum":["code","design","test","content","copy","translate","research","review","verification","decision","deploy","manual","legal","chore"]},{"type":"null"}]},"executor":{"anyOf":[{"type":"string","enum":["coding_agent","human"]},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignee":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"descriptionExcerpt":{"anyOf":[{"type":"string"},{"type":"null"}]},"inheritedSessionBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependencies":{"type":"object","properties":{"blockedBy":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"title":{"type":"string"},"status":{"type":"string"}},"required":["key","title","status"],"additionalProperties":false}},"blocks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"title":{"type":"string"},"status":{"type":"string"}},"required":["key","title","status"],"additionalProperties":false}}},"required":["blockedBy","blocks"],"additionalProperties":false}},"required":["key","kind","title","priority","status","type","executor","assigneeId","assignee","descriptionExcerpt","inheritedSessionBranch","dependencies"],"additionalProperties":false},"MembershipMoveResult":{"type":"object","properties":{"movedKeys":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}}},"required":["movedKeys"],"additionalProperties":false},"WorkItemRef":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"kind":{"type":"string","enum":["epic","story","task","subtask","bug"]},"title":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string","enum":["lowest","low","medium","high","highest"]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["key","kind","title","status","priority","assigneeId","estimateMinutes","storyPoints","parentKey","archived"],"additionalProperties":false},"DispatchPrompt":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"prompt":{"type":"string"},"parentKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"targetRepo":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetRepoCloneUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetRepoDefaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetRepos":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"cloneUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"delivery":{"anyOf":[{"type":"string","enum":["delivered","awaiting","unknown","unestablished","excluded"]},{"type":"null"}]}},"required":["name","cloneUrl","defaultBranch","delivery"],"additionalProperties":false}},"workflowMode":{"type":"string","enum":["per_item_pr","session_lineage"]},"sessionBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"advisories":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"shape"},"item":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"severity":{"type":"string"},"criterionIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"phrase":{"type":"string"},"path":{"type":"string"},"repo":{"type":"string"},"reason":{"type":"string"}},"required":["kind","item","severity","criterionIndex"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"shape"},"item":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"severity":{"type":"string"},"threshold":{"type":"string"},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","item","severity","threshold","storyPoints","estimateMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"shape"},"item":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"severity":{"type":"string"},"designCriterionIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"surfaceCriterionIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kind","item","severity","designCriterionIndex","surfaceCriterionIndex"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"subsumption"},"item":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"severity":{"type":"string"},"path":{"type":"string"},"pullRequest":{"type":"string"},"pullRequestTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string","const":"merged"},"mergedAt":{"type":"string"}},"required":["kind","item","severity","path","pullRequest","pullRequestTitle","state","mergedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"subsumption"},"item":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"severity":{"type":"string"},"path":{"type":"string"},"pullRequest":{"type":"string"},"pullRequestTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string","const":"open"},"mergedAt":{"type":"null"}},"required":["kind","item","severity","path","pullRequest","pullRequestTitle","state","mergedAt"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","const":"reference"},"item":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"referenced":{"type":"string"},"referencedStatus":{"type":"string"},"severity":{"type":"string"}},"required":["item","referenced","referencedStatus","severity"],"additionalProperties":false}]}}},"required":["key","prompt","parentKey","targetRepo","targetRepoCloneUrl","targetRepoDefaultBranch","targetRepos","workflowMode","sessionBranch","advisories"],"additionalProperties":false},"WorkItemClaim":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"title":{"type":"string"},"outcome":{"type":"string","enum":["claimed","mine","taken","not_claimable"]},"claimed":{"type":"boolean"},"status":{"type":"object","properties":{"key":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","category"],"additionalProperties":false},"assignee":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"transitionedBy":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"transitionedAt":{"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"}]}},"required":["key","title","outcome","claimed","status","assignee","transitionedBy","transitionedAt"],"additionalProperties":false},"ScopeClaim":{"type":"object","properties":{"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["work_item","sprint"]},"key":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"sprintId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}},"required":["kind","key","sprintId","name"],"additionalProperties":false},"outcome":{"type":"string","enum":["claimed","mine","taken","not_claimable","wrong_shape","not_finishable"]},"claimed":{"type":"boolean"},"members":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"title":{"type":"string"},"status":{"type":"object","properties":{"key":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","category"],"additionalProperties":false}},"required":["key","title","status"],"additionalProperties":false}},"offender":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"title":{"type":"string"},"status":{"type":"object","properties":{"key":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","category"],"additionalProperties":false},"assignee":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"transitionedBy":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"transitionedAt":{"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"}]}},"required":["key","title","status","assignee","transitionedBy","transitionedAt"],"additionalProperties":false},{"type":"null"}]},"shape":{"anyOf":[{"type":"object","properties":{"child":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"childTitle":{"type":"string"},"depth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["child","childTitle","depth"],"additionalProperties":false},{"type":"null"}]},"blockers":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"blockedBy":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"blockerStatus":{"type":"string"},"blockerSprintId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["item","blockedBy","blockerStatus","blockerSprintId"],"additionalProperties":false}}},"required":["scope","outcome","claimed","members","offender","shape","blockers"],"additionalProperties":false},"IntegrationResult":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"status":{"type":"string"},"sessionBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"implementationSource":{"anyOf":[{"type":"string","enum":["byok","manual"]},{"type":"null"}]},"implementationHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"implementationModel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","status","sessionBranch","updatedAt","implementationSource","implementationHarness","implementationModel"],"additionalProperties":false},"SessionCloseOut":{"type":"object","properties":{"sessionBranch":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},"outcome":{"type":"string","enum":["completed","already_done","failed"]},"reason":{"type":"string"}},"required":["key","outcome"],"additionalProperties":false}}},"required":["sessionBranch","results"],"additionalProperties":false},"PlanJobHandle":{"type":"object","properties":{"jobId":{"type":"string"},"planId":{"type":"string"},"statusUrl":{"type":"string"}},"required":["jobId","planId","statusUrl"],"additionalProperties":false},"PlanOutcome":{"type":"object","properties":{"planId":{"type":"string"},"status":{"type":"string","enum":["generating","planned","stale","approved","declined"]},"origin":{"type":"string","enum":["user","cadence"]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"proposalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"plannedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"reachable":{"type":"boolean"},"failure":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]}},"required":["status","reachable","failure"],"additionalProperties":false},{"type":"null"}]}},"required":["planId","status","origin","jobId","proposalCount","createdAt","plannedAt","decidedAt","job"],"additionalProperties":false},"Plan":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["generating","planned","stale","approved","declined"]},"origin":{"type":"string","enum":["user","cadence"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceJobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"proposalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"plannedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"proposals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"op":{"type":"string","enum":["add","modify","remove"]},"workItemKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]},"proposedFields":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"type":"string"},{"type":"null"}]},"executor":{"anyOf":[{"type":"string"},{"type":"null"}]},"storyPoints":{"anyOf":[{"type":"number"},{"type":"null"}]},"estimateMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"descriptionMd":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetRepo":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["title","kind","type","priority","executor","storyPoints","estimateMinutes","descriptionMd","targetRepo"],"additionalProperties":false},{"type":"null"}]},"patch":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"parentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"blockedByRefs":{"type":"array","items":{"type":"string"}}},"required":["id","op","workItemKey","proposedFields","patch","parentRef","blockedByRefs"],"additionalProperties":false}}},"required":["id","status","origin","title","summary","sourceJobId","proposalCount","createdAt","plannedAt","decidedAt","proposals"],"additionalProperties":false},"PlanSession":{"type":"object","properties":{"id":{"type":"string"},"targetKeys":{"type":"array","items":{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"}},"turnCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastJobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSubmittedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"turns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"role":{"type":"string","enum":["user","system","assistant"]},"body":{"type":"string"},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"question":{"anyOf":[{"type":"string"},{"type":"null"}]},"isAnswer":{"type":"boolean"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","seq","role","body","jobId","question","isAnswer","authorId","createdAt"],"additionalProperties":false}}},"required":["id","targetKeys","turnCount","lastJobId","lastSubmittedAt","createdAt","updatedAt","turns"],"additionalProperties":false},"ActivityEntry":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"comment"},"comment":{"type":"object","properties":{"id":{"type":"string"},"parentCommentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"bodyMd":{"type":"string"},"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))$"},"editedAt":{"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"}]},"mentionedUserIds":{"type":"array","items":{"type":"string"}},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentCommentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"bodyMd":{"type":"string"},"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))$"},"editedAt":{"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"}]},"mentionedUserIds":{"type":"array","items":{"type":"string"}}},"required":["id","parentCommentId","authorId","author","bodyMd","createdAt","editedAt","mentionedUserIds"],"additionalProperties":false}}},"required":["id","parentCommentId","authorId","author","bodyMd","createdAt","editedAt","mentionedUserIds","replies"],"additionalProperties":false}},"required":["type","comment"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"change"},"change":{"type":"object","properties":{"id":{"type":"string"},"changeKind":{"type":"string"},"changedAt":{"type":"string"},"actor":{"type":"object","properties":{"userId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["userId","name"],"additionalProperties":false},"parts":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"created"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"archived"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unarchived"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field"},"field":{"type":"string"},"from":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"none"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"status"},"key":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","key","label"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"user"},"userId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","userId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"date"},"date":{"type":"string"}},"required":["type","date"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sprint"},"sprintId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sprintId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"issue"},"workItemKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]}},"required":["type","workItemKey"],"additionalProperties":false}]},"to":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"none"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"status"},"key":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","key","label"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"user"},"userId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","userId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"date"},"date":{"type":"string"}},"required":["type","date"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sprint"},"sprintId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sprintId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"issue"},"workItemKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]}},"required":["type","workItemKey"],"additionalProperties":false}]}},"required":["kind","field","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fieldEdited"},"field":{"type":"string"}},"required":["kind","field"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"op":{"type":"string","enum":["added","removed"]},"linkKind":{"type":"string"},"target":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"none"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"status"},"key":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","key","label"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"user"},"userId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","userId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"date"},"date":{"type":"string"}},"required":["type","date"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sprint"},"sprintId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sprintId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"issue"},"workItemKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]}},"required":["type","workItemKey"],"additionalProperties":false}]}},"required":["kind","op","linkKind","target"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"collection"},"field":{"type":"string"},"op":{"type":"string","enum":["added","removed"]},"items":{"type":"array","items":{"type":"string"}}},"required":["kind","field","op","items"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"commentDeleted"},"author":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"none"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"status"},"key":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","key","label"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"user"},"userId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","userId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"date"},"date":{"type":"string"}},"required":["type","date"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"sprint"},"sprintId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","sprintId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"issue"},"workItemKey":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9]*-\\d+$"},{"type":"null"}]}},"required":["type","workItemKey"],"additionalProperties":false}]},"replyCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kind","author","replyCount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"generic"},"key":{"type":"string"},"from":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","key","from","to"],"additionalProperties":false}]}}},"required":["id","changeKind","changedAt","actor","parts"],"additionalProperties":false}},"required":["type","change"],"additionalProperties":false}]}},"securitySchemes":{"bearerPat":{"type":"http","scheme":"bearer","bearerFormat":"motir_pat_<secret>","description":"A Motir personal access token, sent as `Authorization: Bearer motir_pat_…`. Mint one in Settings → Account → Tokens. A token is BOUND to one workspace and GRANTS a set of permissions that NARROW — never widen — its owner’s role: an operation is permitted only when the owner’s role allows it AND the token’s grant contains the operation’s permission. The permission each operation requires is published on it as `x-motir-permission`, in the same `resource:action` vocabulary the Roles & permissions screen shows."}}},"security":[{"bearerPat":[]}]}