{
    "openapi": "3.1.0",
    "info": {
        "title": "GetItDone API",
        "version": "1.0.0",
        "description": "The public GetItDone REST API — AI-native task management for people and agents. Authenticate with a `gid_` API key (or OAuth 2.1 access token) via `Authorization: Bearer`.",
        "contact": {
            "name": "GetItDone support",
            "url": "https://nowgetitdone.com",
            "email": "support@devino.ca"
        }
    },
    "servers": [
        {
            "url": "https://app.nowgetitdone.com",
            "description": "Production"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "Organizations",
            "x-displayName": "Organizations",
            "description": "Organizations (workspaces) — the tenant every task, project and API credential belongs to."
        },
        {
            "name": "Usage",
            "x-displayName": "Usage",
            "description": "Plan usage — billing period, per-meter consumption, and the per-credential burst policy."
        },
        {
            "name": "Members",
            "x-displayName": "Members",
            "description": "The organization's member roster."
        },
        {
            "name": "Projects",
            "x-displayName": "Projects",
            "description": "Named groupings of tasks within an organization."
        },
        {
            "name": "API keys",
            "x-displayName": "API keys",
            "description": "The organization's API credentials — list, mint and revoke."
        },
        {
            "name": "Tasks",
            "x-displayName": "Tasks",
            "description": "Tasks — the core work items. Public ids are product short ids (`T-123`); every content change is an immutable version, browsable via the history endpoint."
        },
        {
            "name": "Task occurrences",
            "x-displayName": "Task occurrences",
            "description": "The per-day ledger of a repeating task — one date-keyed row per day it is due, each completed or skipped independently (including past days and days finished early)."
        },
        {
            "name": "Task dependencies",
            "x-displayName": "Task dependencies",
            "description": "Finish-to-start links between tasks — what a task is blocked by and what it blocks. The graph is guaranteed acyclic, and blocked state is derived on read rather than stored."
        },
        {
            "name": "Daily plan",
            "x-displayName": "Daily plan",
            "description": "The credential user's per-date daily board: a TODO (plan) section and a PROGRESS section, each holding planned tasks."
        },
        {
            "name": "Attachments",
            "x-displayName": "Attachments",
            "description": "Task file attachments — two-phase presigned uploads and short-lived presigned downloads."
        },
        {
            "name": "Notes",
            "x-displayName": "Notes",
            "description": "Notes"
        },
        {
            "name": "Webhook endpoints",
            "x-displayName": "Webhook endpoints",
            "description": "Outbound customer webhook endpoints (PRO+) — register, verify, rotate secrets, send test events, and read the delivery log."
        }
    ],
    "paths": {
        "/v1/organizations": {
            "get": {
                "operationId": "listOrganizations",
                "summary": "List organizations",
                "description": "Lists the organizations this credential can access. A credential is bound to exactly one organization today, so the list always fits one page.",
                "tags": [
                    "Organizations"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "workspaces:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "responses": {
                    "200": {
                        "description": "The organizations visible to this credential.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OrganizationList"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/organizations/{organization_id}": {
            "get": {
                "operationId": "getOrganization",
                "summary": "Get an organization",
                "description": "Fetches a single organization by id. The id MUST equal this credential's own organization — any other id (including one that genuinely exists for a different tenant) answers 404 `resource_not_found`; there is no cross-org existence oracle.",
                "tags": [
                    "Organizations"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "workspaces:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "organization_id",
                        "schema": {
                            "type": "string",
                            "description": "Must equal the credential's own organization id."
                        },
                        "required": true,
                        "description": "Must equal the credential's own organization id."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The organization.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Organization"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/usage": {
            "get": {
                "operationId": "getUsage",
                "summary": "Get plan usage",
                "description": "Reports the current billing period, per-meter consumption against the plan, and the per-credential burst allowance. Reading usage never consumes the API-call quota (the meter cost is zero), so this endpoint stays reachable even when the period allowance is exhausted.",
                "tags": [
                    "Usage"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "usage:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 0
                },
                "responses": {
                    "200": {
                        "description": "The organization's current usage snapshot.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Usage"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/members": {
            "get": {
                "operationId": "listMembers",
                "summary": "List members",
                "description": "Cursor-paginated list of the credential's organization members, newest membership first.",
                "tags": [
                    "Members"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "members:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "limit",
                        "schema": {
                            "default": 25,
                            "description": "Maximum number of items to return (1-100).",
                            "example": 25,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "examples": [
                                25
                            ]
                        },
                        "description": "Maximum number of items to return (1-100)."
                    },
                    {
                        "in": "query",
                        "name": "after",
                        "schema": {
                            "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`.",
                            "type": "string"
                        },
                        "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Page of the organization's members.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MemberList"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/projects": {
            "get": {
                "operationId": "listProjects",
                "summary": "List projects",
                "description": "Cursor-paginated list of the credential's organization projects, newest first. Archived projects are not listed.",
                "tags": [
                    "Projects"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "projects:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "limit",
                        "schema": {
                            "default": 25,
                            "description": "Maximum number of items to return (1-100).",
                            "example": 25,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "examples": [
                                25
                            ]
                        },
                        "description": "Maximum number of items to return (1-100)."
                    },
                    {
                        "in": "query",
                        "name": "after",
                        "schema": {
                            "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`.",
                            "type": "string"
                        },
                        "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Page of the organization's projects.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProjectList"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "createProject",
                "summary": "Create a project",
                "description": "Creates a project in the credential's organization. Supports the optional `Idempotency-Key` header for safe retries; a project name that already exists in this organization answers 400 `validation_failed` with a `/name` field error (the uniqueness rule the in-app project creator also enforces) — note that when an Idempotency-Key IS supplied, that 400 is itself stored and replayed byte-identically on retry with the SAME key, exactly like any other outcome (D5).",
                "tags": [
                    "Projects"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "projects:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateProjectBody"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The created project.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Project"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/projects/{project_id}": {
            "get": {
                "operationId": "getProject",
                "summary": "Get a project",
                "description": "Fetches a single project by id, scoped to the credential's organization. A project id from another organization (or an unknown id) answers 404 `resource_not_found` — no cross-org existence oracle.",
                "tags": [
                    "Projects"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "projects:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "project_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The project.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Project"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/api-keys": {
            "get": {
                "operationId": "listApiKeys",
                "summary": "List API keys",
                "description": "Cursor-paginated list of the organization's API keys (both generations), metadata only — never hashes or plaintext secrets.",
                "tags": [
                    "API keys"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "api-keys:manage"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "limit",
                        "schema": {
                            "default": 25,
                            "description": "Maximum number of items to return (1-100).",
                            "example": 25,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "examples": [
                                25
                            ]
                        },
                        "description": "Maximum number of items to return (1-100)."
                    },
                    {
                        "in": "query",
                        "name": "after",
                        "schema": {
                            "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`.",
                            "type": "string"
                        },
                        "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Page of the organization's API keys.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiKeyList"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "createApiKey",
                "summary": "Create an API key",
                "description": "Mints a new org-owned API key. Beyond the `api-keys:manage` scope check, the CALLING credential's creator must currently hold an owner/admin membership in the organization — a key minted while its creator was an admin stops being able to mint further keys the moment that user is demoted (403 `insufficient_scope`). Supports the optional `Idempotency-Key` header; note the replay caution: a replayed response includes the ORIGINAL plaintext `key` again within the 24h replay window (the same tradeoff Stripe makes for idempotent secret-bearing responses) — treat a stored Idempotency-Key as equally sensitive to the secret itself.",
                "tags": [
                    "API keys"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "api-keys:manage"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateApiKeyBody"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The created key, with its plaintext secret shown once.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreatedApiKey"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/api-keys/{key_id}": {
            "delete": {
                "operationId": "deleteApiKey",
                "summary": "Revoke an API key",
                "description": "Revokes an API key (either generation) — org-scoped; an id from another organization or an unknown id answers 404 `resource_not_found` (no cross-org existence oracle). A key revoking ITSELF is allowed: the credential is only checked at the top of the request, before the revoke runs. DELETE is naturally idempotent by HTTP semantics — this route does not use the Idempotency-Key ledger.",
                "tags": [
                    "API keys"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "api-keys:manage"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "key_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The key was revoked.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RevokedApiKey"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks": {
            "get": {
                "operationId": "listTasks",
                "summary": "List tasks",
                "description": "Cursor-paginated list of the credential organization's tasks (current version of each), most recently updated first. Filters: `status`, `project_id`, `parent_task_id` (subtasks of one task) and `archived` (default false — archived tasks are excluded). Every filter is baked into the cursor: reusing an `after` cursor with different filters answers 400 `validation_failed`.",
                "tags": [
                    "Tasks"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "limit",
                        "schema": {
                            "default": 25,
                            "description": "Maximum number of items to return (1-100).",
                            "example": 25,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "examples": [
                                25
                            ]
                        },
                        "description": "Maximum number of items to return (1-100)."
                    },
                    {
                        "in": "query",
                        "name": "after",
                        "schema": {
                            "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`.",
                            "type": "string"
                        },
                        "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`."
                    },
                    {
                        "in": "query",
                        "name": "status",
                        "schema": {
                            "description": "Only tasks whose CURRENT version has this status.",
                            "$ref": "#/components/schemas/TaskStatus"
                        },
                        "description": "Only tasks whose CURRENT version has this status."
                    },
                    {
                        "in": "query",
                        "name": "project_id",
                        "schema": {
                            "description": "Only tasks whose CURRENT version is linked to this project.",
                            "type": "string"
                        },
                        "description": "Only tasks whose CURRENT version is linked to this project."
                    },
                    {
                        "in": "query",
                        "name": "parent_task_id",
                        "schema": {
                            "description": "Only direct subtasks of this task. An unknown (or other-organization) parent answers 404 `resource_not_found`.",
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "description": "Only direct subtasks of this task. An unknown (or other-organization) parent answers 404 `resource_not_found`."
                    },
                    {
                        "in": "query",
                        "name": "archived",
                        "schema": {
                            "default": "false",
                            "description": "true = ONLY archived tasks; false (default) = only active tasks.",
                            "type": "string",
                            "enum": [
                                "true",
                                "false"
                            ]
                        },
                        "description": "true = ONLY archived tasks; false (default) = only active tasks."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Page of tasks.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskList"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "createTask",
                "summary": "Create a task",
                "description": "Creates a task in the credential's organization, owned by the credential's user — the SAME operation the external MCP `create_task` tool executes. `project_id` / `parent_task_id` additionally link the new task org-scoped (unknown ids answer 400 `validation_failed`). Supports the optional `Idempotency-Key` header for exactly-once retries.",
                "tags": [
                    "Tasks"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateTaskBody"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The created task.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Task"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks/{task_id}": {
            "get": {
                "operationId": "getTask",
                "summary": "Get a task",
                "description": "Fetches a single task by short id, scoped to the credential's organization. A short id from another organization (or an unknown one) answers 404 `resource_not_found` — no cross-org existence oracle.",
                "tags": [
                    "Tasks"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The task.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Task"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "updateTask",
                "summary": "Update a task",
                "description": "Partial update — the SAME operation the external MCP `update_task` tool executes: it writes a NEW immutable version carrying every omitted field (and the project links, attachments and collaborators) over from the current one. The change appears as a new entry in the task history.",
                "tags": [
                    "Tasks"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateTaskBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The updated task.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Task"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks/{task_id}/archive": {
            "post": {
                "operationId": "archiveTask",
                "summary": "Archive a task",
                "description": "Archives the task (hides it from active lists; no data is deleted) — the SAME operation the external MCP `archive_task` tool executes. Archiving an already-archived task succeeds unchanged. Supports the optional `Idempotency-Key` header.",
                "tags": [
                    "Tasks"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    },
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The archived task.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Task"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks/{task_id}/unarchive": {
            "post": {
                "operationId": "unarchiveTask",
                "summary": "Unarchive a task",
                "description": "Restores an archived task to the active lists — the archive operation with `archive: false`, exactly as the MCP `archive_task` tool exposes it. Supports the optional `Idempotency-Key` header.",
                "tags": [
                    "Tasks"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    },
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The unarchived task.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Task"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks/{task_id}/history": {
            "get": {
                "operationId": "listTaskHistory",
                "summary": "List task history",
                "description": "Cursor-paginated, read-only version history of a task, newest first — every content change (in-app, MCP or this API) is an immutable version snapshot. This is the ONE endpoint where versions surface; their ids are accepted nowhere else.",
                "tags": [
                    "Tasks"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "limit",
                        "schema": {
                            "default": 25,
                            "description": "Maximum number of items to return (1-100).",
                            "example": 25,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "examples": [
                                25
                            ]
                        },
                        "description": "Maximum number of items to return (1-100)."
                    },
                    {
                        "in": "query",
                        "name": "after",
                        "schema": {
                            "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`.",
                            "type": "string"
                        },
                        "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`."
                    },
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Page of version snapshots.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskHistoryList"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks/{task_id}/occurrences": {
            "get": {
                "operationId": "listTaskOccurrences",
                "summary": "List a task's occurrences",
                "description": "Cursor-paginated ledger of the days a repeating task is due, most recent day first. Filter with `status`, and with `starting_on` / `ending_on` for a calendar window (both inclusive, and both interpreted in the recurrence's own timezone). Future days already exist inside the materialization horizon — that is what makes completing early possible. A task that does not repeat answers an empty page rather than 404. Every filter is baked into the cursor: reusing an `after` cursor with different filters answers 400 `validation_failed`.",
                "tags": [
                    "Task occurrences"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "limit",
                        "schema": {
                            "default": 25,
                            "description": "Maximum number of items to return (1-100).",
                            "example": 25,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "examples": [
                                25
                            ]
                        },
                        "description": "Maximum number of items to return (1-100)."
                    },
                    {
                        "in": "query",
                        "name": "after",
                        "schema": {
                            "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`.",
                            "type": "string"
                        },
                        "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`."
                    },
                    {
                        "in": "query",
                        "name": "status",
                        "schema": {
                            "description": "Only occurrences currently in this state.",
                            "$ref": "#/components/schemas/TaskOccurrenceStatus"
                        },
                        "description": "Only occurrences currently in this state."
                    },
                    {
                        "in": "query",
                        "name": "starting_on",
                        "schema": {
                            "description": "Only occurrences on or after this calendar day (YYYY-MM-DD).",
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "example": "2026-08-06",
                            "examples": [
                                "2026-08-06"
                            ]
                        },
                        "description": "Only occurrences on or after this calendar day (YYYY-MM-DD)."
                    },
                    {
                        "in": "query",
                        "name": "ending_on",
                        "schema": {
                            "description": "Only occurrences on or before this calendar day (YYYY-MM-DD).",
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "example": "2026-08-06",
                            "examples": [
                                "2026-08-06"
                            ]
                        },
                        "description": "Only occurrences on or before this calendar day (YYYY-MM-DD)."
                    },
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Page of occurrences.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskOccurrenceList"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks/{task_id}/occurrences/{occurrence_date}": {
            "patch": {
                "operationId": "setTaskOccurrenceStatus",
                "summary": "Complete or skip one day",
                "description": "Marks ONE day of a repeating task completed or skipped — the SAME shared operation the MCP `complete_task_occurrence` tool executes. The day may be in the PAST (\"I brushed my teeth yesterday\") or a scheduled FUTURE day finished early; neither breaks the chain, and neither touches any other day or the task's own `status`. Re-sending the state a day is already in is a no-op success, so retries are safe. A day the schedule does not produce (or a task that does not repeat) answers 404 `resource_not_found`.",
                "tags": [
                    "Task occurrences"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    },
                    {
                        "in": "path",
                        "name": "occurrence_date",
                        "schema": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "description": "The calendar day the occurrence is for, as YYYY-MM-DD in the recurrence timezone.",
                            "example": "2026-08-06",
                            "examples": [
                                "2026-08-06"
                            ]
                        },
                        "required": true,
                        "description": "The calendar day the occurrence is for, as YYYY-MM-DD in the recurrence timezone."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetTaskOccurrenceStatusBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The updated occurrence.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskOccurrence"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks/{task_id}/dependencies": {
            "get": {
                "operationId": "listTaskDependencies",
                "summary": "Get a task's dependencies",
                "description": "Both directions of the task's blocker graph one hop out: `blocked_by` (must finish first) and `blocking` (waiting on this task), plus the derived `is_blocked`. A task with no links answers an empty view rather than 404. This is not paginated — the answer is a task's immediate neighbours, not a traversal; walk the chain by following each `task_id`.",
                "tags": [
                    "Task dependencies"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The task's dependencies in both directions.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskDependencies"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "addTaskDependency",
                "summary": "Record a blocker",
                "description": "Records that the task in the path is blocked by `blocker_task_id` — the SAME operation the MCP `link_task_dependency` tool executes. Recording a link that already exists succeeds unchanged (no duplicate row, no second webhook), so retries are safe. A link that would close a loop is REFUSED with 409 `dependency_cycle`: the graph a client reads is guaranteed acyclic. A task cannot block itself (400 `validation_failed`), and a blocker in another organization is indistinguishable from one that does not exist (404 `resource_not_found`). Answers the task's full dependency view, so the caller can see whether it is now blocked without a second call.",
                "tags": [
                    "Task dependencies"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    },
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AddTaskDependencyBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The task's dependencies after the link was recorded.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskDependencies"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`. `dependency_cycle`: Dependency link would create a loop.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks/{task_id}/dependencies/{blocker_task_id}": {
            "delete": {
                "operationId": "removeTaskDependency",
                "summary": "Remove a blocker",
                "description": "Removes the blocked-by link between the two tasks — neither task is otherwise touched, and completion history is untouched. Removing a link that is not there succeeds unchanged, so retries are safe. When this frees the task (its last OPEN blocker is gone), the `task.unblocked` webhook fires — the same event a blocker being completed or archived produces. Answers the task's full dependency view after the removal.",
                "tags": [
                    "Task dependencies"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    },
                    {
                        "in": "path",
                        "name": "blocker_task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "The blocker to unlink from the task in the path.",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "The blocker to unlink from the task in the path."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The task's dependencies after the link was removed.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskDependencies"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "`validation_failed`: Request validation failed.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/daily-plan": {
            "get": {
                "operationId": "getDailyPlan",
                "summary": "Get the daily board",
                "description": "The credential user's board for a date: both sections (TODO plan + PROGRESS) with their fill-status and entries. Read-only — unlike the in-app board it never creates section rows; a date nobody planned answers empty sections with status NOT_FILLED.",
                "tags": [
                    "Daily plan"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "date",
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "description": "Board date as YYYY-MM-DD (UTC day).",
                            "example": "2026-07-23",
                            "examples": [
                                "2026-07-23"
                            ]
                        },
                        "required": true,
                        "description": "Board date as YYYY-MM-DD (UTC day)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The date's board.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DailyPlan"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "setDailyPlanStatus",
                "summary": "Set a section's daily status",
                "description": "Sets the fill-status of one section of the credential user's board for a date (creating the section row if the date was never touched — the in-app board creates it on view).",
                "tags": [
                    "Daily plan"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "date",
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "description": "Board date as YYYY-MM-DD (UTC day).",
                            "example": "2026-07-23",
                            "examples": [
                                "2026-07-23"
                            ]
                        },
                        "required": true,
                        "description": "Board date as YYYY-MM-DD (UTC day)."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SetDailyPlanStatusBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The updated section status.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DailyPlanStatus"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/daily-plan/entries": {
            "post": {
                "operationId": "createDailyPlanEntry",
                "summary": "Plan a task onto the board",
                "description": "Pins a task (current version) onto one section of the credential user's board for a date — mirroring the in-app add: only tasks OWNED by the credential's user and not archived can be planned; a parent task brings its subtasks along; a task already on that section answers 400 `validation_failed`. Supports the optional `Idempotency-Key` header.",
                "tags": [
                    "Daily plan"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateDailyPlanEntryBody"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The created board entry.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DailyPlanEntry"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/daily-plan/entries/{entry_id}": {
            "patch": {
                "operationId": "moveDailyPlanEntry",
                "summary": "Move an entry between sections",
                "description": "Moves a board entry to the other section of the same date, mirroring the in-app move: subtask entries of a parent move along, a task already present in the target section answers 400 `validation_failed`, and the move RE-CREATES the entry — the returned entry carries a NEW id. Sections are the only movement the board models (no positional reorder exists).",
                "tags": [
                    "Daily plan"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "entry_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/MoveDailyPlanEntryBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The entry in its new section (new id).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DailyPlanEntry"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "deleteDailyPlanEntry",
                "summary": "Remove an entry from the board",
                "description": "Removes a board entry (the task itself is untouched), mirroring the in-app remove: a parent entry takes its subtasks' entries on the same board with it. An entry from another organization or user answers 404 `resource_not_found`.",
                "tags": [
                    "Daily plan"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "entry_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Removal acknowledgement.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeletedDailyPlanEntry"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks/{task_id}/attachments": {
            "get": {
                "operationId": "listTaskAttachments",
                "summary": "List task attachments",
                "description": "Cursor-paginated attachments of the task's CURRENT version, newest first (metadata only — mint download URLs per attachment via the `download-url` endpoint).",
                "tags": [
                    "Attachments"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "limit",
                        "schema": {
                            "default": 25,
                            "description": "Maximum number of items to return (1-100).",
                            "example": 25,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "examples": [
                                25
                            ]
                        },
                        "description": "Maximum number of items to return (1-100)."
                    },
                    {
                        "in": "query",
                        "name": "after",
                        "schema": {
                            "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`.",
                            "type": "string"
                        },
                        "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`."
                    },
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Page of attachments.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AttachmentList"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "createTaskAttachment",
                "summary": "Register an uploaded attachment",
                "description": "Phase 2 of the two-phase upload: attaches the uploaded file (by its `file_key`) to the task's CURRENT version — exactly how the in-app flow registers uploads after the presigned PUT. Supports the optional `Idempotency-Key` header for exactly-once retries.",
                "tags": [
                    "Attachments"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    },
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateAttachmentBody"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The registered attachment.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Attachment"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks/{task_id}/attachments/uploads": {
            "post": {
                "operationId": "createAttachmentUpload",
                "summary": "Start an attachment upload",
                "description": "Phase 1 of the two-phase upload (the SAME presign flow the in-app uploader uses): declares the file and answers a short-lived presigned PUT URL plus the `file_key` to register afterwards. Checked against the plan's file-size and storage allowances. Nothing is attached until phase 2. Supports the optional `Idempotency-Key` header (a replay returns the SAME URL, which may have expired — start a fresh upload instead of replaying old keys).",
                "tags": [
                    "Attachments"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:T-)?[0-9]{1,12}$",
                            "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                            "example": "T-123",
                            "examples": [
                                "T-123"
                            ]
                        },
                        "required": true,
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input)."
                    },
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateAttachmentUploadBody"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Where to PUT the file.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AttachmentUpload"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/attachments/{attachment_id}/download-url": {
            "get": {
                "operationId": "getAttachmentDownloadUrl",
                "summary": "Mint an attachment download URL",
                "description": "Answers a short-lived presigned GET URL for the attachment's bytes (the SAME signer the in-app proxy and the MCP `get_task_details` tool use). An attachment from another organization (or an unknown id) answers 404 `resource_not_found`.",
                "tags": [
                    "Attachments"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "attachment_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The presigned download URL.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AttachmentDownloadUrl"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/notes": {
            "get": {
                "operationId": "listNotes",
                "summary": "List workspace notes",
                "description": "Cursor-paginated list of the organization's shared notes, newest first. Returns previews; use the get endpoint for the full body.",
                "tags": [
                    "Notes"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "limit",
                        "schema": {
                            "default": 25,
                            "description": "Maximum number of items to return (1-100).",
                            "example": 25,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "examples": [
                                25
                            ]
                        },
                        "description": "Maximum number of items to return (1-100)."
                    },
                    {
                        "in": "query",
                        "name": "after",
                        "schema": {
                            "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`.",
                            "type": "string"
                        },
                        "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`."
                    },
                    {
                        "in": "query",
                        "name": "search",
                        "schema": {
                            "description": "Case-insensitive substring search across note titles and bodies.",
                            "type": "string"
                        },
                        "description": "Case-insensitive substring search across note titles and bodies."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Page of the organization's notes.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NoteList"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "createNote",
                "summary": "Create a note",
                "description": "Creates a workspace note in the credential's organization. A title that already exists answers 400 `validation_failed`.",
                "tags": [
                    "Notes"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateNoteBody"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The created note.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Note"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/notes/{note_id}": {
            "get": {
                "operationId": "getNote",
                "summary": "Get a note",
                "description": "Fetches a single workspace note by id, including the full body. Scoped to the credential's organization.",
                "tags": [
                    "Notes"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:read"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "note_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The note with full body.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Note"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "updateNote",
                "summary": "Update a note",
                "description": "Rewrites a note's title and/or body. Requires `base_updated_at` (the `updated_at` from the last read) — the update is refused with 409 `conflict` if the note has been modified since, preventing agents from silently overwriting each other.",
                "tags": [
                    "Notes"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "note_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateNoteBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The updated note.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Note"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/notes/{note_id}/append": {
            "post": {
                "operationId": "appendNote",
                "summary": "Append to a note",
                "description": "Appends a dated entry to the end of a workspace note without rewriting it. Use this for incremental additions (status updates, log entries) instead of the full-body update.",
                "tags": [
                    "Notes"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "note_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AppendNoteBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The note after the append.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Note"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tasks/{task_id}/notes": {
            "post": {
                "operationId": "appendTaskNote",
                "summary": "Append to a task's notes",
                "description": "Appends a dated entry to the end of a task's notes without rewriting them. The task_id may be the stable id or the short id. Use this for progress updates, handover entries, and structured log entries that should live on the task itself.",
                "tags": [
                    "Tasks"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "tasks:write"
                ],
                "x-entitlement": "public_api",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/AppendTaskNoteBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The task note after the append.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskNoteResult"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/webhook-endpoints": {
            "get": {
                "operationId": "listWebhookEndpoints",
                "summary": "List webhook endpoints",
                "description": "Cursor-paginated list of the organization's webhook endpoints. PRO plan and above (`outbound_webhooks`) — a FREE-plan credential gets 403 `feature_not_enabled`. Never includes signing secrets.",
                "tags": [
                    "Webhook endpoints"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "webhooks:read"
                ],
                "x-entitlement": "outbound_webhooks",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "limit",
                        "schema": {
                            "default": 25,
                            "description": "Maximum number of items to return (1-100).",
                            "example": 25,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "examples": [
                                25
                            ]
                        },
                        "description": "Maximum number of items to return (1-100)."
                    },
                    {
                        "in": "query",
                        "name": "after",
                        "schema": {
                            "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`.",
                            "type": "string"
                        },
                        "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Page of the organization's webhook endpoints.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEndpointList"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "createWebhookEndpoint",
                "summary": "Create a webhook endpoint",
                "description": "Registers a new webhook endpoint in the credential's organization and mints its signing secret, returned EXACTLY ONCE in this response. The endpoint starts UNVERIFIED (`verified: false`) — call the `verify` action before relying on it; the worker only queues deliveries to enabled AND verified endpoints. The URL is validated at save time (https, port 443, no embedded credentials) — a disallowed URL answers 422 `webhook_url_rejected` and creates NO row. Supports the optional `Idempotency-Key` header; a replayed response includes the ORIGINAL plaintext secret again within the 24h replay window (same tradeoff as `createApiKey`).",
                "tags": [
                    "Webhook endpoints"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "webhooks:write"
                ],
                "x-entitlement": "outbound_webhooks",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateWebhookEndpointBody"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The created endpoint, with its plaintext secret shown once.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreatedWebhookEndpoint"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`. `webhook_url_rejected`: Webhook endpoint URL rejected.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/webhook-endpoints/{endpoint_id}": {
            "get": {
                "operationId": "getWebhookEndpoint",
                "summary": "Get a webhook endpoint",
                "description": "Fetches a single webhook endpoint by id, scoped to the credential's organization. An id from another organization (or an unknown id) answers 404 `resource_not_found` — no cross-org existence oracle. Never includes the signing secret.",
                "tags": [
                    "Webhook endpoints"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "webhooks:read"
                ],
                "x-entitlement": "outbound_webhooks",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "endpoint_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The webhook endpoint.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEndpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "updateWebhookEndpoint",
                "summary": "Update a webhook endpoint",
                "description": "Partial update of url/event_types/enabled — org-scoped, 404 for a cross-org or unknown id. NEVER rotates the secret (use the `rotate-secret` action). Changing `url` to a different value resets `verified` to false. The (re-validated) URL check can answer 422 `webhook_url_rejected`.",
                "tags": [
                    "Webhook endpoints"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "webhooks:write"
                ],
                "x-entitlement": "outbound_webhooks",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "endpoint_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateWebhookEndpointBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The updated endpoint.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEndpoint"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "`webhook_url_rejected`: Webhook endpoint URL rejected.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "deleteWebhookEndpoint",
                "summary": "Delete a webhook endpoint",
                "description": "Permanently (hard) deletes the endpoint — org-scoped, 404 for a cross-org or unknown id — mirroring how `deleteApiKey` hard-deletes a plugin key. The delete CASCADES (schema.prisma `onDelete: Cascade` on WebhookDelivery.endpointId, and from there to WebhookAttempt) to every delivery still queued for this endpoint: pending/in-flight deliveries for this endpoint stop existing rather than being left stuck. DELETE is naturally idempotent by HTTP semantics — this route does not use the Idempotency-Key ledger.",
                "tags": [
                    "Webhook endpoints"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "webhooks:write"
                ],
                "x-entitlement": "outbound_webhooks",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "endpoint_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The endpoint was deleted.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DeletedWebhookEndpoint"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/webhook-endpoints/{endpoint_id}/rotate-secret": {
            "post": {
                "operationId": "rotateWebhookEndpointSecret",
                "summary": "Rotate a webhook endpoint secret",
                "description": "Create-overlap-revoke rotation: mints a NEW signing secret (returned ONCE, same as create) and moves the CURRENT secret to `previous_secret_expires_at`-bounded overlap — the worker signs every delivery with BOTH secrets during that ~24h window so you can finish updating your verifier without dropping deliveries. Rotating a SECOND time before the first rotation's grace window elapses immediately drops the FIRST previous secret (there is only ever one previous-secret slot, not a stack) — do not chain rotations faster than your own verifier can keep up. Never mutates a secret in place; always mints fresh. Supports the optional `Idempotency-Key` header (a replay returns the SAME newly-minted secret again, never rotates twice for one logical request).",
                "tags": [
                    "Webhook endpoints"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "webhooks:write"
                ],
                "x-entitlement": "outbound_webhooks",
                "x-idempotent": true,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "endpoint_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "in": "header",
                        "name": "Idempotency-Key",
                        "schema": {
                            "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee.",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "description": "Optional client-generated key (1-255 visible ASCII characters; a UUID works) making this POST safely retryable. Retrying with the SAME key and byte-identical body within 24h replays the stored first response (marked `Idempotency-Replayed: true`, never re-executed, never charged against quota). The same key with a different body answers 422 `idempotency_key_reused`; a retry racing the first execution answers 409 `idempotency_in_progress`. Omitting the header executes normally with no idempotency guarantee."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The endpoint with its newly rotated secret.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/RotatedWebhookEndpointSecret"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request with this Idempotency-Key is still executing — `idempotency_in_progress`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Idempotency-Key reused with a different request body — `idempotency_key_reused`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/webhook-endpoints/{endpoint_id}/verify": {
            "post": {
                "operationId": "verifyWebhookEndpoint",
                "summary": "Verify a webhook endpoint",
                "description": "Live, synchronous probe: SSRF-checks the stored URL, then POSTs a signed synthetic test request (Standard Webhooks headers; event type `webhook.verification` — NOT part of the delivery vocabulary, never persisted as a WebhookEvent) and requires a 2xx to mark the endpoint verified. This is a re-runnable probe, not a consequential write — no Idempotency-Key support (`idempotent: false`). A failure reports `verified: false` with a `reason` and does NOT unset a previously-earned verified state.",
                "tags": [
                    "Webhook endpoints"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "webhooks:write"
                ],
                "x-entitlement": "outbound_webhooks",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "endpoint_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The verification probe result.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEndpointVerificationResult"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/webhook-endpoints/{endpoint_id}/test-event": {
            "post": {
                "operationId": "testWebhookEndpointEvent",
                "summary": "Send a test event to a webhook endpoint",
                "description": "Sends a synchronous, signed sample of a REAL event type (default `task.created`, using a representative sample task payload in the same TaskDto shape real deliveries carry) directly to the endpoint's URL and returns the immediate HTTP outcome. Does NOT create a queued WebhookDelivery row and never appears in the delivery log — it is a live probe, not a domain event. Re-runnable; no Idempotency-Key support.",
                "tags": [
                    "Webhook endpoints"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "webhooks:write"
                ],
                "x-entitlement": "outbound_webhooks",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "endpoint_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateWebhookEndpointTestEventBody"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The immediate delivery outcome.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEndpointTestEventResult"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/webhook-endpoints/{endpoint_id}/deliveries": {
            "get": {
                "operationId": "listWebhookEndpointDeliveries",
                "summary": "List a webhook endpoint delivery log",
                "description": "Cursor-paginated, REDACTED delivery log for one endpoint — org-scoped via the endpoint (404 for a cross-org or unknown endpoint id). Never includes response bodies or the signing secret. Optional `state` filter.",
                "tags": [
                    "Webhook endpoints"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "webhooks:read"
                ],
                "x-entitlement": "outbound_webhooks",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "query",
                        "name": "limit",
                        "schema": {
                            "default": 25,
                            "description": "Maximum number of items to return (1-100).",
                            "example": 25,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "examples": [
                                25
                            ]
                        },
                        "description": "Maximum number of items to return (1-100)."
                    },
                    {
                        "in": "query",
                        "name": "after",
                        "schema": {
                            "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`.",
                            "type": "string"
                        },
                        "description": "Opaque cursor from a previous page's `next_cursor` — omit for the first page. Reusing a cursor with DIFFERENT query parameters (e.g. a different `limit`) answers 400 `validation_failed`."
                    },
                    {
                        "in": "query",
                        "name": "state",
                        "schema": {
                            "description": "Filter to deliveries currently in this state.",
                            "example": "FAILED",
                            "$ref": "#/components/schemas/WebhookDeliveryState"
                        },
                        "description": "Filter to deliveries currently in this state."
                    },
                    {
                        "in": "path",
                        "name": "endpoint_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Page of the endpoint's delivery log.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookDeliveryList"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/webhook-endpoints/{endpoint_id}/deliveries/{delivery_id}/replay": {
            "post": {
                "operationId": "replayWebhookDelivery",
                "summary": "Replay a webhook delivery",
                "description": "Re-enqueues one delivery, Stripe-style: creates a FRESH PENDING WebhookDelivery row for the SAME event and endpoint (attempt count 0, next attempt now) that the worker picks up on its normal cycle — the original row is never mutated, so the log keeps the full history. Allowed only when the target delivery is in a terminal state (FAILED, SUCCEEDED or DISABLED — replaying a succeeded delivery is a deliberate resend). Answers 409 `delivery_already_pending` when ANY delivery for this event+endpoint pair is already PENDING or DELIVERING (no double-enqueue) — which also makes an accidental double-click naturally safe, so this route does not use the Idempotency-Key ledger. The replayed delivery carries the SAME `webhook-id` signature header as the original (the event id), so consumer-side dedup keeps working. Replaying does NOT re-enable a disabled endpoint — the worker only delivers to enabled endpoints; re-enable via the update route first.",
                "tags": [
                    "Webhook endpoints"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "webhooks:write"
                ],
                "x-entitlement": "outbound_webhooks",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "endpoint_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "in": "path",
                        "name": "delivery_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "202": {
                        "description": "The freshly enqueued replay delivery.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookDelivery"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "`delivery_already_pending`: A delivery for this event is already queued.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/webhook-endpoints/{endpoint_id}/replay-failed": {
            "post": {
                "operationId": "replayFailedWebhookDeliveries",
                "summary": "Replay all recently failed deliveries",
                "description": "Bulk sibling of the single replay: creates FRESH PENDING deliveries for this endpoint's FAILED/DISABLED deliveries created at or after `since`, skipping every event that already has a PENDING/DELIVERING delivery queued for this endpoint (no double-enqueue) — hard-capped at 1000 replays per call (call again with the same `since` for the rest; already-replayed events are skipped by the pending check). Repeating the call is naturally near-idempotent for the same reason, so this route does not use the Idempotency-Key ledger. Does NOT re-enable a disabled endpoint — the “re-enable & replay” console flow is: update `enabled: true` (which resets the failure counter), then call this.",
                "tags": [
                    "Webhook endpoints"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-scopes": [
                    "webhooks:write"
                ],
                "x-entitlement": "outbound_webhooks",
                "x-idempotent": false,
                "x-meter": {
                    "metric": "API_CALLS",
                    "cost": 1
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "endpoint_id",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ReplayFailedWebhookDeliveriesBody"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "How many deliveries were re-enqueued.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            },
                            "RateLimit-Policy": {
                                "required": true,
                                "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 structured-field policy list, burst window first, e.g. `\"per-key-minute\";q=120;w=60, \"api-calls-period\";q=50000;w=2592000`."
                                }
                            },
                            "RateLimit": {
                                "required": true,
                                "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`.",
                                "schema": {
                                    "type": "string",
                                    "description": "IETF draft-11 current state of the primary (burst) policy, e.g. `\"per-key-minute\";r=97;t=42`."
                                }
                            },
                            "X-RateLimit-Limit": {
                                "required": true,
                                "description": "Primary window request allowance (de-facto trio).",
                                "schema": {
                                    "type": "string",
                                    "description": "Primary window request allowance (de-facto trio)."
                                }
                            },
                            "X-RateLimit-Remaining": {
                                "required": true,
                                "description": "Requests remaining in the primary window.",
                                "schema": {
                                    "type": "string",
                                    "description": "Requests remaining in the primary window."
                                }
                            },
                            "X-RateLimit-Reset": {
                                "required": true,
                                "description": "Unix epoch seconds at which the primary window resets.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unix epoch seconds at which the primary window resets."
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReplayedWebhookDeliveries"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed request — `validation_failed` (see `errors`; a malformed `Idempotency-Key` header lands here too).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials — `missing_credentials`, `invalid_api_key` or `invalid_token`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Authenticated but denied — `insufficient_scope` or `feature_not_enabled`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource in this organization — `resource_not_found`.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Over a limit — `rate_limited` (burst; retry after `Retry-After`) or `quota_exhausted` (billing-period allowance).",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Unexpected server error — `internal_error`; quote `request_id` when reporting.",
                        "headers": {
                            "x-request-id": {
                                "required": true,
                                "description": "Unique id for this request — present on EVERY response; quote it in support requests.",
                                "schema": {
                                    "type": "string",
                                    "description": "Unique id for this request — present on EVERY response; quote it in support requests."
                                }
                            }
                        },
                        "content": {
                            "application/problem+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Problem"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "CreateProjectBody": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "description": "Display name, 1-200 characters after trimming.",
                        "example": "Website redesign",
                        "examples": [
                            "Website redesign"
                        ]
                    },
                    "description": {
                        "description": "Optional free-text description (max 2000 characters).",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2000
                    }
                },
                "required": [
                    "name"
                ],
                "description": "Fields for creating a project."
            },
            "CreateApiKeyBody": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "description": "Caller-given label for the key.",
                        "example": "CI deploy bot",
                        "examples": [
                            "CI deploy bot"
                        ]
                    },
                    "scopes": {
                        "description": "Subset of scopes to grant. Defaults to every scope EXCEPT `api-keys:manage` — key-minting is never granted by default and must be requested explicitly.",
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "workspaces:read",
                                "tasks:read",
                                "tasks:write",
                                "members:read",
                                "projects:read",
                                "projects:write",
                                "usage:read",
                                "api-keys:manage",
                                "webhooks:read",
                                "webhooks:write",
                                "destructive:run",
                                "billing:manage",
                                "account:manage",
                                "team:manage",
                                "connections:manage",
                                "support:write"
                            ]
                        }
                    },
                    "test_mode": {
                        "description": "Mint a `gid_test_…` sandbox-prefixed key instead of a live one.",
                        "type": "boolean"
                    },
                    "expires_in_days": {
                        "description": "Expiry in days from now (1-365). Omit for no expiry.",
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 365
                    }
                },
                "required": [
                    "name"
                ],
                "description": "Fields for minting a new API key."
            },
            "TaskStatus": {
                "type": "string",
                "enum": [
                    "TODO",
                    "IN_PROGRESS",
                    "IN_REVIEW",
                    "COMPLETED",
                    "BLOCKED"
                ],
                "description": "Task workflow status."
            },
            "CreateTaskBody": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500,
                        "description": "Task title, 1-500 characters after trimming.",
                        "example": "Ship the public API",
                        "examples": [
                            "Ship the public API"
                        ]
                    },
                    "description": {
                        "type": "string",
                        "maxLength": 10000
                    },
                    "status": {
                        "description": "Initial status (defaults to TODO).",
                        "$ref": "#/components/schemas/TaskStatus"
                    },
                    "priority": {
                        "$ref": "#/components/schemas/TaskPriority"
                    },
                    "start_date": {
                        "description": "Start date (defer-until) as YYYY-MM-DD (interpreted as UTC).",
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "due_date": {
                        "description": "Due date as YYYY-MM-DD (interpreted as UTC).",
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "notes": {
                        "type": "string",
                        "maxLength": 100000
                    },
                    "story_points": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000
                    },
                    "project_id": {
                        "description": "Link the new task to this project (must belong to the credential's organization).",
                        "type": "string"
                    },
                    "parent_task_id": {
                        "description": "Create as a subtask of this task (short id, must belong to the credential's organization).",
                        "type": "string",
                        "pattern": "^(?:T-)?[0-9]{1,12}$",
                        "example": "T-123",
                        "examples": [
                            "T-123"
                        ]
                    }
                },
                "required": [
                    "title"
                ],
                "description": "Fields for creating a task."
            },
            "TaskPriority": {
                "type": "string",
                "enum": [
                    "LOW",
                    "MEDIUM",
                    "HIGH",
                    "URGENT"
                ],
                "description": "Task priority level."
            },
            "UpdateTaskBody": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                    },
                    "status": {
                        "$ref": "#/components/schemas/TaskStatus"
                    },
                    "priority": {
                        "$ref": "#/components/schemas/TaskPriority"
                    },
                    "start_date": {
                        "description": "New start date (defer-until) as YYYY-MM-DD (interpreted as UTC). Cannot be cleared — the shared update operation treats absence as \"keep\".",
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "due_date": {
                        "description": "New due date as YYYY-MM-DD (interpreted as UTC). Cannot be cleared — the shared update operation treats absence as \"keep\".",
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "notes": {
                        "type": "string",
                        "maxLength": 100000
                    },
                    "story_points": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000
                    }
                },
                "description": "Partial update — omitted fields keep their current value. Exactly the field set the external MCP `update_task` tool supports; `description`, project links and the parent are not updatable here (the shared update operation carries them over unchanged)."
            },
            "TaskOccurrenceStatus": {
                "type": "string",
                "enum": [
                    "PENDING",
                    "COMPLETED",
                    "SKIPPED",
                    "MISSED"
                ],
                "description": "Per-day state of one occurrence of a repeating task. `PENDING` is written by materialization and `MISSED` by the rollover sweep — only `COMPLETED` and `SKIPPED` are user-written."
            },
            "SetTaskOccurrenceStatusBody": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "enum": [
                            "COMPLETED",
                            "SKIPPED"
                        ],
                        "description": "`COMPLETED` = the work for that day is done (records the completion instant and actor). `SKIPPED` = it will not be done and the day is closed rather than rolled over."
                    }
                },
                "required": [
                    "status"
                ],
                "description": "The new state for this one day of the series."
            },
            "AddTaskDependencyBody": {
                "type": "object",
                "properties": {
                    "blocker_task_id": {
                        "type": "string",
                        "pattern": "^(?:T-)?[0-9]{1,12}$",
                        "description": "The task that must finish FIRST. It must be in the same organization as the task in the path.",
                        "example": "T-123",
                        "examples": [
                            "T-123"
                        ]
                    }
                },
                "required": [
                    "blocker_task_id"
                ],
                "description": "The blocker to record for the task in the path."
            },
            "SetDailyPlanStatusBody": {
                "type": "object",
                "properties": {
                    "section": {
                        "$ref": "#/components/schemas/DailySection"
                    },
                    "status": {
                        "$ref": "#/components/schemas/DailyStatus"
                    }
                },
                "required": [
                    "section",
                    "status"
                ],
                "description": "Which section, and its new status."
            },
            "DailySection": {
                "type": "string",
                "enum": [
                    "TODO",
                    "PROGRESS"
                ],
                "description": "Daily-board section: `TODO` = the plan list, `PROGRESS` = the in-progress list."
            },
            "DailyStatus": {
                "type": "string",
                "enum": [
                    "COMPLETED",
                    "PLANNED",
                    "NOT_FILLED",
                    "FILLING"
                ],
                "description": "Fill-state of one daily-board section for one date."
            },
            "CreateDailyPlanEntryBody": {
                "type": "object",
                "properties": {
                    "date": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "description": "Board date as YYYY-MM-DD (UTC day)."
                    },
                    "task_id": {
                        "type": "string",
                        "pattern": "^(?:T-)?[0-9]{1,12}$",
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                        "example": "T-123",
                        "examples": [
                            "T-123"
                        ]
                    },
                    "section": {
                        "$ref": "#/components/schemas/DailySection"
                    }
                },
                "required": [
                    "date",
                    "task_id",
                    "section"
                ],
                "description": "Which task, which date, which section."
            },
            "MoveDailyPlanEntryBody": {
                "type": "object",
                "properties": {
                    "section": {
                        "$ref": "#/components/schemas/DailySection"
                    }
                },
                "required": [
                    "section"
                ],
                "description": "The target section."
            },
            "CreateAttachmentBody": {
                "type": "object",
                "properties": {
                    "file_name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                    },
                    "file_key": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024,
                        "description": "The `file_key` returned by the upload endpoint."
                    },
                    "content_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                    },
                    "size": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "File size in bytes as uploaded."
                    }
                },
                "required": [
                    "file_name",
                    "file_key",
                    "content_type",
                    "size"
                ],
                "description": "Phase 2 of the two-phase upload: register the uploaded file on the task."
            },
            "CreateAttachmentUploadBody": {
                "type": "object",
                "properties": {
                    "file_name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "example": "screenshot.png",
                        "examples": [
                            "screenshot.png"
                        ]
                    },
                    "content_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "example": "image/png",
                        "examples": [
                            "image/png"
                        ]
                    },
                    "size": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "File size in bytes — checked against the organization's plan file-size and storage allowances."
                    }
                },
                "required": [
                    "file_name",
                    "content_type",
                    "size"
                ],
                "description": "What you are about to upload."
            },
            "CreateNoteBody": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "description": "Note title (1-200 characters after trimming).",
                        "example": "Deployment runbook",
                        "examples": [
                            "Deployment runbook"
                        ]
                    },
                    "body": {
                        "default": "",
                        "description": "Note body, plain text or Markdown (max 100000 characters). Defaults to empty.",
                        "type": "string",
                        "maxLength": 100000
                    },
                    "project_id": {
                        "description": "Optional project to attach the note to. Must be a project in the same organization.",
                        "type": "string"
                    }
                },
                "required": [
                    "title"
                ],
                "description": "Fields for creating a workspace note."
            },
            "UpdateNoteBody": {
                "type": "object",
                "properties": {
                    "title": {
                        "description": "New title (1-200 characters after trimming).",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                    },
                    "body": {
                        "description": "New body (max 100000 characters). Replaces the entire body.",
                        "type": "string",
                        "maxLength": 100000
                    },
                    "base_updated_at": {
                        "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))$",
                        "description": "The `updated_at` value from the last read of this note. The update is refused with 409 `conflict` if the note has been modified since this timestamp — re-read the note and rebase your changes. This prevents agents from silently overwriting each other's edits."
                    }
                },
                "required": [
                    "base_updated_at"
                ],
                "description": "Fields for updating a note. Requires the base_updated_at compare-and-set value."
            },
            "AppendNoteBody": {
                "type": "object",
                "properties": {
                    "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000,
                        "description": "The entry to append (1-10000 characters). A date header is prepended automatically."
                    },
                    "author": {
                        "description": "Author label for the entry. Defaults to the credential label.",
                        "type": "string",
                        "maxLength": 100
                    }
                },
                "required": [
                    "text"
                ],
                "description": "A dated entry to append to a note."
            },
            "AppendTaskNoteBody": {
                "type": "object",
                "properties": {
                    "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10000,
                        "description": "The entry to append (1-10000 characters). A date header is prepended automatically."
                    },
                    "author": {
                        "description": "Author label for the entry. Defaults to the credential label.",
                        "type": "string",
                        "maxLength": 100
                    }
                },
                "required": [
                    "text"
                ],
                "description": "A dated entry to append to a task's notes without rewriting them."
            },
            "CreateWebhookEndpointBody": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048,
                        "description": "The https destination URL. Must be https, port 443 (explicit or default), and carry no `user:pass@` credentials — a URL failing this check answers 422 `webhook_url_rejected` with the specific reason and creates NO row.",
                        "example": "https://example.com/webhooks/getitdone",
                        "examples": [
                            "https://example.com/webhooks/getitdone"
                        ]
                    },
                    "event_types": {
                        "description": "Subset of event types to subscribe to. Omit or send an empty array to subscribe to every type.",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebhookEndpointEventType"
                        }
                    },
                    "enabled": {
                        "description": "Defaults to true.",
                        "type": "boolean"
                    }
                },
                "required": [
                    "url"
                ],
                "description": "Fields for registering a new webhook endpoint."
            },
            "WebhookEndpointEventType": {
                "type": "string",
                "enum": [
                    "task.created",
                    "task.updated",
                    "task.archived"
                ],
                "description": "One of the frozen domain event types an endpoint can subscribe to."
            },
            "UpdateWebhookEndpointBody": {
                "type": "object",
                "properties": {
                    "url": {
                        "description": "New destination URL, re-validated the same way as create. Changing the URL to a DIFFERENT value resets `verified` to false — the new destination must be re-verified.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048
                    },
                    "event_types": {
                        "description": "Replaces the full subscribed-type set.",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebhookEndpointEventType"
                        }
                    },
                    "enabled": {
                        "description": "Enable or disable delivery. Disabling holds every delivery already queued for the endpoint (they are not sent while it is disabled). Re-enabling (false → true) clears any prior auto-disable reason and resets the consecutive-failure counter; deliveries held while it was off then resume.",
                        "type": "boolean"
                    }
                },
                "description": "Partial update — only send the fields you want to change; at least one is required."
            },
            "CreateWebhookEndpointTestEventBody": {
                "type": "object",
                "properties": {
                    "event_type": {
                        "description": "Which sample event to send. Defaults to `task.created`.",
                        "$ref": "#/components/schemas/WebhookEndpointEventType"
                    }
                },
                "description": "Optional choice of which sample event type to send."
            },
            "WebhookDeliveryState": {
                "type": "string",
                "enum": [
                    "PENDING",
                    "DELIVERING",
                    "SUCCEEDED",
                    "FAILED",
                    "DISABLED"
                ],
                "description": "Lifecycle state of one (event, endpoint) delivery."
            },
            "ReplayFailedWebhookDeliveriesBody": {
                "type": "object",
                "properties": {
                    "since": {
                        "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))$",
                        "description": "Only FAILED/DISABLED deliveries created at or after this ISO-8601 instant are replayed.",
                        "example": "2026-07-24T00:00:00Z",
                        "examples": [
                            "2026-07-24T00:00:00Z"
                        ]
                    }
                },
                "required": [
                    "since"
                ],
                "description": "Time window for the bulk replay."
            },
            "OrganizationList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Organization"
                        },
                        "description": "The current page of results."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "True when another page exists after this one."
                    },
                    "next_cursor": {
                        "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "additionalProperties": false,
                "description": "Cursor-envelope page of organizations."
            },
            "Organization": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable opaque organization id.",
                        "example": "9f6acab2-8f8e-4c7e-9c3a-2f6d0c9e4b11",
                        "examples": [
                            "9f6acab2-8f8e-4c7e-9c3a-2f6d0c9e4b11"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name.",
                        "example": "Acme Inc",
                        "examples": [
                            "Acme Inc"
                        ]
                    },
                    "slug": {
                        "type": "string",
                        "description": "URL-safe unique slug.",
                        "example": "acme-inc",
                        "examples": [
                            "acme-inc"
                        ]
                    },
                    "image_url": {
                        "description": "Logo URL, or null when none is set.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "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))$",
                        "description": "Creation time, ISO-8601 UTC.",
                        "example": "2026-01-15T09:30:00.000Z",
                        "examples": [
                            "2026-01-15T09:30:00.000Z"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "slug",
                    "image_url",
                    "created_at"
                ],
                "additionalProperties": false,
                "description": "An organization (workspace) — the tenant every task, project and API credential belongs to."
            },
            "Problem": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "URI identifying the problem class; resolves to its docs page.",
                        "example": "https://nowgetitdone.com/docs/api/problems/validation-failed",
                        "examples": [
                            "https://nowgetitdone.com/docs/api/problems/validation-failed"
                        ]
                    },
                    "title": {
                        "type": "string",
                        "description": "Short human-readable summary of the problem class. Never parse it — switch on `code`."
                    },
                    "status": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "HTTP status code, duplicated from the response.",
                        "example": 400,
                        "examples": [
                            400
                        ]
                    },
                    "detail": {
                        "description": "Human-readable explanation specific to this occurrence.",
                        "type": "string"
                    },
                    "code": {
                        "type": "string",
                        "enum": [
                            "missing_credentials",
                            "invalid_api_key",
                            "invalid_token",
                            "insufficient_scope",
                            "feature_not_enabled",
                            "validation_failed",
                            "resource_not_found",
                            "rate_limited",
                            "quota_exhausted",
                            "idempotency_key_missing",
                            "idempotency_key_reused",
                            "idempotency_in_progress",
                            "webhook_url_rejected",
                            "delivery_already_pending",
                            "conflict",
                            "dependency_cycle",
                            "internal_error"
                        ],
                        "description": "Stable machine-readable problem code — the value SDKs branch on."
                    },
                    "request_id": {
                        "type": "string",
                        "description": "The x-request-id of the failing request — quote it in support requests."
                    },
                    "errors": {
                        "description": "Field-level failures (present on validation_failed).",
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/FieldError"
                        }
                    }
                },
                "required": [
                    "type",
                    "title",
                    "status",
                    "code",
                    "request_id"
                ],
                "additionalProperties": false,
                "description": "RFC 9457 problem document with the GetItDone `code` extension."
            },
            "FieldError": {
                "type": "object",
                "properties": {
                    "pointer": {
                        "type": "string",
                        "description": "RFC 6901 JSON Pointer to the offending request field.",
                        "example": "/name",
                        "examples": [
                            "/name"
                        ]
                    },
                    "code": {
                        "type": "string",
                        "description": "Machine-readable per-field validation code.",
                        "example": "invalid_type",
                        "examples": [
                            "invalid_type"
                        ]
                    },
                    "message": {
                        "type": "string",
                        "description": "Human-readable explanation for this field."
                    }
                },
                "required": [
                    "pointer",
                    "code",
                    "message"
                ],
                "additionalProperties": false,
                "description": "A single field-level validation failure."
            },
            "Usage": {
                "type": "object",
                "properties": {
                    "plan": {
                        "type": "string",
                        "enum": [
                            "FREE",
                            "PRO",
                            "TEAM"
                        ],
                        "description": "The organization's current plan tier.",
                        "example": "FREE",
                        "examples": [
                            "FREE"
                        ]
                    },
                    "period_start": {
                        "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))$",
                        "description": "Start of the current billing period, ISO-8601 UTC. Paid plans anchor at their subscription renewal; free plans at the first of the calendar month.",
                        "example": "2026-07-01T00:00:00.000Z",
                        "examples": [
                            "2026-07-01T00:00:00.000Z"
                        ]
                    },
                    "period_end": {
                        "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))$",
                        "description": "End of the current billing period, ISO-8601 UTC — when period meters reset.",
                        "example": "2026-08-01T00:00:00.000Z",
                        "examples": [
                            "2026-08-01T00:00:00.000Z"
                        ]
                    },
                    "meters": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/UsageMeter"
                        },
                        "description": "Per-meter consumption for the current period."
                    },
                    "burst": {
                        "type": "object",
                        "properties": {
                            "per_minute_limit": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991,
                                "description": "Requests each individual credential may make per minute before 429 rate_limited.",
                                "example": 10,
                                "examples": [
                                    10
                                ]
                            }
                        },
                        "required": [
                            "per_minute_limit"
                        ],
                        "additionalProperties": false,
                        "description": "The per-credential burst policy (separate from period quotas; every key/token gets its own window)."
                    }
                },
                "required": [
                    "plan",
                    "period_start",
                    "period_end",
                    "meters",
                    "burst"
                ],
                "additionalProperties": false,
                "description": "The organization's consumption against its plan for the current billing period, plus the burst policy."
            },
            "UsageMeter": {
                "type": "object",
                "properties": {
                    "meter": {
                        "type": "string",
                        "enum": [
                            "api_calls"
                        ],
                        "description": "Which allowance this entry reports.",
                        "example": "api_calls",
                        "examples": [
                            "api_calls"
                        ]
                    },
                    "used": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991,
                        "description": "Units consumed so far in the current period.",
                        "example": 27,
                        "examples": [
                            27
                        ]
                    },
                    "limit": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "The plan's allowance for this meter per period.",
                        "example": 50,
                        "examples": [
                            50
                        ]
                    },
                    "remaining": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991,
                        "description": "Units left before requests answer 429 quota_exhausted.",
                        "example": 23,
                        "examples": [
                            23
                        ]
                    }
                },
                "required": [
                    "meter",
                    "used",
                    "limit",
                    "remaining"
                ],
                "additionalProperties": false,
                "description": "Consumption against one plan allowance."
            },
            "MemberList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Member"
                        },
                        "description": "The current page of results."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "True when another page exists after this one."
                    },
                    "next_cursor": {
                        "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "additionalProperties": false,
                "description": "Cursor-envelope page of an organization's members."
            },
            "Member": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable id of the membership row itself."
                    },
                    "user": {
                        "$ref": "#/components/schemas/MemberUser"
                    },
                    "role": {
                        "type": "string",
                        "description": "The member's role in the organization.",
                        "example": "owner",
                        "examples": [
                            "owner"
                        ]
                    },
                    "created_at": {
                        "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))$",
                        "description": "When this membership was created, ISO-8601 UTC."
                    }
                },
                "required": [
                    "id",
                    "user",
                    "role",
                    "created_at"
                ],
                "additionalProperties": false,
                "description": "One membership row — a user attached to this organization."
            },
            "MemberUser": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The member user id."
                    },
                    "email": {
                        "type": "string",
                        "description": "The member's email address."
                    },
                    "name": {
                        "description": "Display name, or null when never set.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "email",
                    "name"
                ],
                "additionalProperties": false,
                "description": "The user identity behind a membership row."
            },
            "ProjectList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Project"
                        },
                        "description": "The current page of results."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "True when another page exists after this one."
                    },
                    "next_cursor": {
                        "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "additionalProperties": false,
                "description": "Cursor-envelope page of an organization's projects."
            },
            "Project": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable opaque project id."
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name, unique within the organization.",
                        "example": "Website redesign",
                        "examples": [
                            "Website redesign"
                        ]
                    },
                    "description": {
                        "description": "Free-text description, or null when unset.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "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))$",
                        "description": "Creation time, ISO-8601 UTC."
                    },
                    "updated_at": {
                        "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))$",
                        "description": "Last-modified time, ISO-8601 UTC."
                    }
                },
                "required": [
                    "id",
                    "name",
                    "description",
                    "created_at",
                    "updated_at"
                ],
                "additionalProperties": false,
                "description": "A project — a named grouping of tasks within an organization."
            },
            "ApiKeyList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ApiKey"
                        },
                        "description": "The current page of results."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "True when another page exists after this one."
                    },
                    "next_cursor": {
                        "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "additionalProperties": false,
                "description": "Cursor-envelope page of the organization's API keys."
            },
            "ApiKey": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable id of the key row."
                    },
                    "name": {
                        "description": "Caller-given label.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "key_prefix": {
                        "description": "Non-secret fingerprint prefix shown in key lists (e.g. `gid_ab12`); never the full secret.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "scopes": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "workspaces:read",
                                "tasks:read",
                                "tasks:write",
                                "members:read",
                                "projects:read",
                                "projects:write",
                                "usage:read",
                                "api-keys:manage",
                                "webhooks:read",
                                "webhooks:write",
                                "destructive:run",
                                "billing:manage",
                                "account:manage",
                                "team:manage",
                                "connections:manage",
                                "support:write"
                            ]
                        },
                        "description": "Scopes granted to this key."
                    },
                    "last_used_at": {
                        "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"
                            }
                        ],
                        "description": "Last time this key authenticated a request, or null."
                    },
                    "expires_at": {
                        "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"
                            }
                        ],
                        "description": "Expiry time, or null when the key never expires."
                    },
                    "created_at": {
                        "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))$",
                        "description": "ISO-8601 UTC."
                    },
                    "legacy": {
                        "type": "boolean",
                        "description": "True for a pre-migration user-owned key; false for a current org-owned key. Legacy keys are read-only here — mint new keys as non-legacy."
                    }
                },
                "required": [
                    "id",
                    "name",
                    "key_prefix",
                    "scopes",
                    "last_used_at",
                    "expires_at",
                    "created_at",
                    "legacy"
                ],
                "additionalProperties": false,
                "description": "API-key metadata — never the hash or the plaintext secret."
            },
            "CreatedApiKey": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable id of the key row."
                    },
                    "name": {
                        "description": "Caller-given label.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "key_prefix": {
                        "description": "Non-secret fingerprint prefix shown in key lists (e.g. `gid_ab12`); never the full secret.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "scopes": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "workspaces:read",
                                "tasks:read",
                                "tasks:write",
                                "members:read",
                                "projects:read",
                                "projects:write",
                                "usage:read",
                                "api-keys:manage",
                                "webhooks:read",
                                "webhooks:write",
                                "destructive:run",
                                "billing:manage",
                                "account:manage",
                                "team:manage",
                                "connections:manage",
                                "support:write"
                            ]
                        },
                        "description": "Scopes granted to this key."
                    },
                    "last_used_at": {
                        "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"
                            }
                        ],
                        "description": "Last time this key authenticated a request, or null."
                    },
                    "expires_at": {
                        "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"
                            }
                        ],
                        "description": "Expiry time, or null when the key never expires."
                    },
                    "created_at": {
                        "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))$",
                        "description": "ISO-8601 UTC."
                    },
                    "legacy": {
                        "type": "boolean",
                        "description": "True for a pre-migration user-owned key; false for a current org-owned key. Legacy keys are read-only here — mint new keys as non-legacy."
                    },
                    "key": {
                        "type": "string",
                        "description": "The plaintext secret — shown EXACTLY ONCE. Store it now; it cannot be retrieved again.",
                        "example": "gid_51f3...redacted",
                        "examples": [
                            "gid_51f3...redacted"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "key_prefix",
                    "scopes",
                    "last_used_at",
                    "expires_at",
                    "created_at",
                    "legacy",
                    "key"
                ],
                "additionalProperties": false,
                "description": "A freshly minted API key, including its one-time plaintext secret."
            },
            "RevokedApiKey": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The id of the revoked key."
                    },
                    "legacy": {
                        "type": "boolean",
                        "description": "True when the revoked key was a legacy row (soft-revoked); false for a plugin key (deleted)."
                    }
                },
                "required": [
                    "id",
                    "legacy"
                ],
                "additionalProperties": false,
                "description": "Confirmation that a key was revoked and can no longer authenticate."
            },
            "TaskList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Task"
                        },
                        "description": "The current page of results."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "True when another page exists after this one."
                    },
                    "next_cursor": {
                        "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "additionalProperties": false,
                "description": "Cursor-envelope page of tasks, most recently updated first."
            },
            "Task": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The task short id — the ONE public task identifier.",
                        "example": "T-123",
                        "examples": [
                            "T-123"
                        ]
                    },
                    "title": {
                        "type": "string",
                        "example": "Ship the public API",
                        "examples": [
                            "Ship the public API"
                        ]
                    },
                    "description": {
                        "description": "Free-text description, or null when unset.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status": {
                        "$ref": "#/components/schemas/TaskStatus"
                    },
                    "priority": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TaskPriority"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "start_date": {
                        "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"
                            }
                        ],
                        "description": "Start date (defer-until), ISO-8601 UTC, or null. The task is not meant to be worked on before this day."
                    },
                    "due_date": {
                        "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"
                            }
                        ],
                        "description": "Due date, ISO-8601 UTC, or null."
                    },
                    "notes": {
                        "description": "Rich-text notes of the current version, or null.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "story_points": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "project_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Ids of the projects the CURRENT version is linked to (a task can belong to several)."
                    },
                    "parent_task_id": {
                        "description": "The parent task's short id when this is a subtask, else null.",
                        "example": "T-99",
                        "examples": [
                            "T-99"
                        ],
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "archived": {
                        "type": "boolean"
                    },
                    "created_via": {
                        "description": "Who wrote the CURRENT version. Pair with client_label to render \"via Claude\".",
                        "$ref": "#/components/schemas/TaskCreatedVia"
                    },
                    "client_label": {
                        "anyOf": [
                            {
                                "type": "string",
                                "maxLength": 64
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The agent or key that wrote the current version — the OAuth client name or the API key name — or null for an in-app edit. Display text chosen by the key owner or the OAuth client registrant: treat it as untrusted.",
                        "example": "Claude Code",
                        "examples": [
                            "Claude Code"
                        ]
                    },
                    "recurrence": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TaskRecurrence"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The repeat schedule when this task recurs, else null. Per-day completion lives in the occurrence ledger (`/v1/tasks/{task_id}/occurrences`), never in `status` — completing Monday leaves Tuesday untouched."
                    },
                    "created_at": {
                        "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))$",
                        "description": "Task creation time (first version), ISO-8601 UTC."
                    },
                    "updated_at": {
                        "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))$",
                        "description": "Last content change (current version), ISO-8601 UTC."
                    }
                },
                "required": [
                    "id",
                    "title",
                    "description",
                    "status",
                    "priority",
                    "start_date",
                    "due_date",
                    "notes",
                    "story_points",
                    "project_ids",
                    "parent_task_id",
                    "archived",
                    "created_via",
                    "client_label",
                    "recurrence",
                    "created_at",
                    "updated_at"
                ],
                "additionalProperties": false,
                "description": "A task, projected from its stable identity plus its CURRENT version."
            },
            "TaskCreatedVia": {
                "type": "string",
                "enum": [
                    "SESSION",
                    "API_KEY",
                    "OAUTH"
                ],
                "description": "Which kind of credential wrote the current version: SESSION (in-app), API_KEY (a gid_ API key, e.g. a coding agent) or OAUTH (an OAuth connection, e.g. Claude)."
            },
            "TaskRecurrence": {
                "type": "object",
                "properties": {
                    "frequency": {
                        "$ref": "#/components/schemas/RecurrenceFrequency"
                    },
                    "interval": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Repeat every N units of `frequency` — 2 with WEEKLY is \"every other week\".",
                        "example": 1,
                        "examples": [
                            1
                        ]
                    },
                    "by_weekday": {
                        "type": "array",
                        "items": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                        },
                        "description": "WEEKLY only: the weekdays it falls on, 0 = Sunday through 6 = Saturday (`[1,2,3,4,5]` is \"every weekday\"). Empty for DAILY and MONTHLY.",
                        "example": [
                            1,
                            2,
                            3,
                            4,
                            5
                        ],
                        "examples": [
                            [
                                1,
                                2,
                                3,
                                4,
                                5
                            ]
                        ]
                    },
                    "by_month_day": {
                        "anyOf": [
                            {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "MONTHLY only: day of the month, 1-31, clamped to the last day of shorter months (31 lands on Feb 28, or Feb 29 in a leap year). Null otherwise.",
                        "example": 15,
                        "examples": [
                            15
                        ]
                    },
                    "basis": {
                        "$ref": "#/components/schemas/RecurrenceBasis"
                    },
                    "timezone": {
                        "type": "string",
                        "description": "IANA timezone whose CALENDAR DAYS the occurrences fall on.",
                        "example": "America/Toronto",
                        "examples": [
                            "America/Toronto"
                        ]
                    },
                    "start_date": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "description": "First day the task may recur (RRULE DTSTART). No occurrence is ever created before it.",
                        "example": "2026-08-06",
                        "examples": [
                            "2026-08-06"
                        ]
                    },
                    "end_date": {
                        "anyOf": [
                            {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                "description": "The calendar day the occurrence is for, as YYYY-MM-DD in the recurrence timezone.",
                                "example": "2026-08-06",
                                "examples": [
                                    "2026-08-06"
                                ]
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Last day the task may recur (RRULE UNTIL), or null for a schedule with no end date."
                    },
                    "max_occurrences": {
                        "anyOf": [
                            {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Total number of occurrences the schedule stops after (RRULE COUNT), or null.",
                        "example": 10,
                        "examples": [
                            10
                        ]
                    },
                    "rollover_enabled": {
                        "type": "boolean",
                        "description": "When true, an unfinished occurrence keeps surfacing on later days instead of silently vanishing."
                    },
                    "active": {
                        "type": "boolean",
                        "description": "False once the schedule was stopped (cleared, series completed, or task archived). Past occurrences are KEPT either way — completion history is never rewritten."
                    },
                    "rrule": {
                        "type": "string",
                        "description": "RFC 5545 projection of the fields above, derived on read — never stored, never accepted on input.",
                        "example": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR",
                        "examples": [
                            "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"
                        ]
                    }
                },
                "required": [
                    "frequency",
                    "interval",
                    "by_weekday",
                    "by_month_day",
                    "basis",
                    "timezone",
                    "start_date",
                    "end_date",
                    "max_occurrences",
                    "rollover_enabled",
                    "active",
                    "rrule"
                ],
                "additionalProperties": false,
                "description": "A task's repeat schedule. Each day is completed independently through the task-occurrence operations."
            },
            "RecurrenceFrequency": {
                "type": "string",
                "enum": [
                    "DAILY",
                    "WEEKLY",
                    "MONTHLY"
                ],
                "description": "How often a repeating task recurs — the RRULE `FREQ` this rule projects to."
            },
            "RecurrenceBasis": {
                "type": "string",
                "enum": [
                    "SCHEDULE",
                    "AFTER_COMPLETION"
                ],
                "description": "Whether the next day is measured from the calendar (`SCHEDULE`) or from the day the previous occurrence was completed (`AFTER_COMPLETION`)."
            },
            "TaskHistoryList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TaskHistoryEntry"
                        },
                        "description": "The current page of results."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "True when another page exists after this one."
                    },
                    "next_cursor": {
                        "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "additionalProperties": false,
                "description": "Cursor-envelope page of task versions, newest first."
            },
            "TaskHistoryEntry": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Opaque version identifier — read-only; accepted nowhere else on this API."
                    },
                    "title": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status": {
                        "$ref": "#/components/schemas/TaskStatus"
                    },
                    "priority": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TaskPriority"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "start_date": {
                        "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"
                            }
                        ]
                    },
                    "due_date": {
                        "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"
                            }
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "story_points": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "created_at": {
                        "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))$",
                        "description": "When this version was written, ISO-8601 UTC."
                    }
                },
                "required": [
                    "id",
                    "title",
                    "description",
                    "status",
                    "priority",
                    "start_date",
                    "due_date",
                    "notes",
                    "story_points",
                    "created_at"
                ],
                "additionalProperties": false,
                "description": "One immutable content snapshot from a task's version history — the ONE place versions surface on this API."
            },
            "TaskOccurrenceList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TaskOccurrence"
                        },
                        "description": "The current page of results."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "True when another page exists after this one."
                    },
                    "next_cursor": {
                        "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "additionalProperties": false,
                "description": "Cursor-envelope page of occurrences, most recent day first. A task that does not repeat answers an empty page."
            },
            "TaskOccurrence": {
                "type": "object",
                "properties": {
                    "task_id": {
                        "type": "string",
                        "description": "The repeating task's short id.",
                        "example": "T-123",
                        "examples": [
                            "T-123"
                        ]
                    },
                    "occurrence_date": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "description": "The calendar day the occurrence is for, as YYYY-MM-DD in the recurrence timezone.",
                        "example": "2026-08-06",
                        "examples": [
                            "2026-08-06"
                        ]
                    },
                    "sequence": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "1-based ordinal of this day within the series — what an RRULE COUNT limit and streak math count.",
                        "example": 12,
                        "examples": [
                            12
                        ]
                    },
                    "status": {
                        "$ref": "#/components/schemas/TaskOccurrenceStatus"
                    },
                    "completed_at": {
                        "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"
                            }
                        ],
                        "description": "The INSTANT the user completed this day, ISO-8601 UTC, or null. Deliberately distinct from `occurrence_date`: completing Tuesday on Monday records both truths."
                    }
                },
                "required": [
                    "task_id",
                    "occurrence_date",
                    "sequence",
                    "status",
                    "completed_at"
                ],
                "additionalProperties": false,
                "description": "One DAY of a repeating task, with its own completion state."
            },
            "TaskDependencies": {
                "type": "object",
                "properties": {
                    "task_id": {
                        "type": "string",
                        "pattern": "^(?:T-)?[0-9]{1,12}$",
                        "description": "The task this view is for.",
                        "example": "T-123",
                        "examples": [
                            "T-123"
                        ]
                    },
                    "is_blocked": {
                        "type": "boolean",
                        "description": "DERIVED on every read: true when at least one entry in `blocked_by` is still `open`. Never a stored column and never written to the task's `status` — a blocked task keeps whatever status its owner set."
                    },
                    "blocked_by_count": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "How many tasks must finish first, open or not — `blocked_by.length`.",
                        "example": 2,
                        "examples": [
                            2
                        ]
                    },
                    "blocking_count": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "How many tasks wait on this one — `blocking.length`.",
                        "example": 1,
                        "examples": [
                            1
                        ]
                    },
                    "blocked_by": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TaskDependencyRef"
                        },
                        "description": "Tasks that must finish before this one can be worked on, oldest link first."
                    },
                    "blocking": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TaskDependencyRef"
                        },
                        "description": "Tasks waiting on this one, oldest link first — the other direction of the same edges."
                    }
                },
                "required": [
                    "task_id",
                    "is_blocked",
                    "blocked_by_count",
                    "blocking_count",
                    "blocked_by",
                    "blocking"
                ],
                "additionalProperties": false,
                "description": "Both directions of a task's blocker graph, one hop out, plus its derived blocked state."
            },
            "TaskDependencyRef": {
                "type": "object",
                "properties": {
                    "task_id": {
                        "type": "string",
                        "pattern": "^(?:T-)?[0-9]{1,12}$",
                        "description": "Task short id, e.g. `T-123` (a bare `123` is also accepted on input).",
                        "example": "T-123",
                        "examples": [
                            "T-123"
                        ]
                    },
                    "title": {
                        "type": "string",
                        "description": "The other task's title (its current version).",
                        "example": "Ship the public API",
                        "examples": [
                            "Ship the public API"
                        ]
                    },
                    "status": {
                        "$ref": "#/components/schemas/TaskStatus"
                    },
                    "open": {
                        "type": "boolean",
                        "description": "Whether this task is still outstanding — not COMPLETED and not archived. Only OPEN blockers hold work back, so this is the flag `is_blocked` aggregates."
                    }
                },
                "required": [
                    "task_id",
                    "title",
                    "status",
                    "open"
                ],
                "additionalProperties": false,
                "description": "A task on the other end of a dependency link."
            },
            "DailyPlan": {
                "type": "object",
                "properties": {
                    "date": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "description": "The board date (UTC day)."
                    },
                    "sections": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/DailyPlanSection"
                        },
                        "description": "Always both sections: TODO then PROGRESS."
                    }
                },
                "required": [
                    "date",
                    "sections"
                ],
                "additionalProperties": false,
                "description": "The credential user's daily board for one date in the credential's organization."
            },
            "DailyPlanSection": {
                "type": "object",
                "properties": {
                    "section": {
                        "$ref": "#/components/schemas/DailySection"
                    },
                    "status": {
                        "$ref": "#/components/schemas/DailyStatus"
                    },
                    "entries": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/DailyPlanEntry"
                        },
                        "description": "Entries in placement order (oldest first)."
                    }
                },
                "required": [
                    "section",
                    "status",
                    "entries"
                ],
                "additionalProperties": false,
                "description": "One section of the user's board for one date."
            },
            "DailyPlanEntry": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Board-entry id. NOTE: moving an entry between sections re-creates it (mirroring the in-app move), so the id CHANGES on move."
                    },
                    "section": {
                        "$ref": "#/components/schemas/DailySection"
                    },
                    "task_id": {
                        "type": "string",
                        "description": "The planned task's short id.",
                        "example": "T-123",
                        "examples": [
                            "T-123"
                        ]
                    },
                    "title": {
                        "type": "string",
                        "description": "The planned task's current title."
                    },
                    "status": {
                        "description": "The planned task's current workflow status.",
                        "$ref": "#/components/schemas/TaskStatus"
                    },
                    "created_at": {
                        "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))$",
                        "description": "When the task was placed on this section, ISO-8601 UTC. Entries within a section are ordered by this (oldest first) — there is no free positional reorder."
                    }
                },
                "required": [
                    "id",
                    "section",
                    "task_id",
                    "title",
                    "status",
                    "created_at"
                ],
                "additionalProperties": false,
                "description": "One task pinned onto one daily-board section."
            },
            "DailyPlanStatus": {
                "type": "object",
                "properties": {
                    "date": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    "section": {
                        "$ref": "#/components/schemas/DailySection"
                    },
                    "status": {
                        "$ref": "#/components/schemas/DailyStatus"
                    }
                },
                "required": [
                    "date",
                    "section",
                    "status"
                ],
                "additionalProperties": false,
                "description": "One section's fill-status for one date."
            },
            "DeletedDailyPlanEntry": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "deleted": {
                        "type": "boolean",
                        "const": true
                    }
                },
                "required": [
                    "id",
                    "deleted"
                ],
                "additionalProperties": false,
                "description": "Acknowledgement of a removed board entry."
            },
            "AttachmentList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Attachment"
                        },
                        "description": "The current page of results."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "True when another page exists after this one."
                    },
                    "next_cursor": {
                        "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "additionalProperties": false,
                "description": "Cursor-envelope page of the task's current-version attachments."
            },
            "Attachment": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable opaque attachment id."
                    },
                    "file_name": {
                        "type": "string",
                        "example": "screenshot.png",
                        "examples": [
                            "screenshot.png"
                        ]
                    },
                    "content_type": {
                        "type": "string",
                        "example": "image/png",
                        "examples": [
                            "image/png"
                        ]
                    },
                    "size": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "File size in bytes.",
                        "example": 248312,
                        "examples": [
                            248312
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    }
                },
                "required": [
                    "id",
                    "file_name",
                    "content_type",
                    "size",
                    "created_at"
                ],
                "additionalProperties": false,
                "description": "A file attached to a task's current version. Fetch its bytes via the `download-url` endpoint."
            },
            "AttachmentUpload": {
                "type": "object",
                "properties": {
                    "upload_url": {
                        "type": "string",
                        "description": "Presigned URL — PUT the raw file bytes here (Content-Type must match what you declared)."
                    },
                    "upload_method": {
                        "type": "string",
                        "const": "PUT"
                    },
                    "file_key": {
                        "type": "string",
                        "description": "Opaque storage key; pass it back when registering the attachment after the upload succeeds."
                    },
                    "expires_at": {
                        "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))$",
                        "description": "When the upload URL stops working, ISO-8601 UTC."
                    }
                },
                "required": [
                    "upload_url",
                    "upload_method",
                    "file_key",
                    "expires_at"
                ],
                "additionalProperties": false,
                "description": "Phase 1 of the two-phase upload: where to PUT the file."
            },
            "AttachmentDownloadUrl": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "description": "Presigned GET URL."
                    },
                    "expires_at": {
                        "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))$",
                        "description": "When the URL stops working, ISO-8601 UTC."
                    }
                },
                "required": [
                    "url",
                    "expires_at"
                ],
                "additionalProperties": false,
                "description": "A short-lived presigned download URL."
            },
            "NoteList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/NotePreview"
                        },
                        "description": "The current page of results."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "True when another page exists after this one."
                    },
                    "next_cursor": {
                        "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "additionalProperties": false,
                "description": "Cursor-envelope page of an organization's shared notes."
            },
            "NotePreview": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable opaque note id."
                    },
                    "title": {
                        "type": "string",
                        "description": "Note title."
                    },
                    "preview": {
                        "type": "string",
                        "description": "Plain-text start of the body, truncated when longer than the preview limit."
                    },
                    "length": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Character count of the full body.",
                        "example": 1840,
                        "examples": [
                            1840
                        ]
                    },
                    "project_name": {
                        "description": "Project display name, or null.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "archived": {
                        "type": "boolean",
                        "description": "True when the note is archived."
                    },
                    "updated_at": {
                        "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))$",
                        "description": "Last-modified time, ISO-8601 UTC."
                    },
                    "updated_by_name": {
                        "description": "Display name of the last editor.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "title",
                    "preview",
                    "length",
                    "project_name",
                    "archived",
                    "updated_at",
                    "updated_by_name"
                ],
                "additionalProperties": false,
                "description": "A note as it appears in a list — a truncated preview, never the full body."
            },
            "Note": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable opaque note id."
                    },
                    "title": {
                        "type": "string",
                        "description": "Note title, unique within the organization.",
                        "example": "Deployment runbook",
                        "examples": [
                            "Deployment runbook"
                        ]
                    },
                    "body": {
                        "type": "string",
                        "description": "Full note body (plain text or Markdown). Only returned by the get-one endpoint; list returns a preview."
                    },
                    "project_id": {
                        "description": "Project the note belongs to, or null when workspace-wide.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "project_name": {
                        "description": "Project display name, or null.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "archived": {
                        "type": "boolean",
                        "description": "True when the note is archived."
                    },
                    "length": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Character count of the full body.",
                        "example": 1840,
                        "examples": [
                            1840
                        ]
                    },
                    "updated_at": {
                        "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))$",
                        "description": "Last-modified time, ISO-8601 UTC."
                    },
                    "updated_by_name": {
                        "description": "Display name of the last person or agent who wrote to this note.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "title",
                    "body",
                    "project_id",
                    "project_name",
                    "archived",
                    "length",
                    "updated_at",
                    "updated_by_name"
                ],
                "additionalProperties": false,
                "description": "A workspace shared note."
            },
            "TaskNoteResult": {
                "type": "object",
                "properties": {
                    "task_id": {
                        "type": "string",
                        "description": "Task id."
                    },
                    "short_id": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Human-readable short id.",
                        "example": 123,
                        "examples": [
                            123
                        ]
                    },
                    "notes_length": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Character count of the notes after the append.",
                        "example": 512,
                        "examples": [
                            512
                        ]
                    },
                    "message": {
                        "type": "string",
                        "description": "Human-readable confirmation."
                    }
                },
                "required": [
                    "task_id",
                    "short_id",
                    "notes_length",
                    "message"
                ],
                "additionalProperties": false,
                "description": "Result of appending to a task note."
            },
            "WebhookEndpointList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebhookEndpoint"
                        },
                        "description": "The current page of results."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "True when another page exists after this one."
                    },
                    "next_cursor": {
                        "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "additionalProperties": false,
                "description": "Cursor-envelope page of the organization's webhook endpoints."
            },
            "WebhookEndpoint": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable id of the endpoint."
                    },
                    "url": {
                        "type": "string",
                        "description": "The https destination URL."
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "False when disabled — manually, auto-disabled after repeated delivery failures, or paused when the account that set it up had its email address verified (see `disabled_reason`). A disabled endpoint receives nothing: deliveries already queued for it are held, not sent, and go out only if it is re-enabled."
                    },
                    "event_types": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebhookEndpointEventType"
                        },
                        "description": "Subscribed event types. An EMPTY array means \"every type\"."
                    },
                    "verified": {
                        "type": "boolean",
                        "description": "True once the `verify` action has proven this endpoint accepts a correctly-signed request."
                    },
                    "disabled_reason": {
                        "description": "Why the endpoint was auto-disabled or paused by an account take-back, or null when it never was.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "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))$",
                        "description": "ISO-8601 UTC."
                    },
                    "updated_at": {
                        "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))$",
                        "description": "ISO-8601 UTC."
                    }
                },
                "required": [
                    "id",
                    "url",
                    "enabled",
                    "event_types",
                    "verified",
                    "disabled_reason",
                    "created_at",
                    "updated_at"
                ],
                "additionalProperties": false,
                "description": "A webhook endpoint configuration — NEVER includes the signing secret (shown once, at creation/rotation)."
            },
            "CreatedWebhookEndpoint": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable id of the endpoint."
                    },
                    "url": {
                        "type": "string",
                        "description": "The https destination URL."
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "False when disabled — manually, auto-disabled after repeated delivery failures, or paused when the account that set it up had its email address verified (see `disabled_reason`). A disabled endpoint receives nothing: deliveries already queued for it are held, not sent, and go out only if it is re-enabled."
                    },
                    "event_types": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebhookEndpointEventType"
                        },
                        "description": "Subscribed event types. An EMPTY array means \"every type\"."
                    },
                    "verified": {
                        "type": "boolean",
                        "description": "True once the `verify` action has proven this endpoint accepts a correctly-signed request."
                    },
                    "disabled_reason": {
                        "description": "Why the endpoint was auto-disabled or paused by an account take-back, or null when it never was.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "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))$",
                        "description": "ISO-8601 UTC."
                    },
                    "updated_at": {
                        "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))$",
                        "description": "ISO-8601 UTC."
                    },
                    "secret": {
                        "type": "string",
                        "description": "The signing secret (`whsec_…`) — shown EXACTLY ONCE. Store it now; it cannot be retrieved again, only rotated. Note: replaying this exact request within the 24h Idempotency-Key window returns this SAME secret again — treat a stored Idempotency-Key as equally sensitive to the secret itself.",
                        "example": "whsec_51f3...redacted",
                        "examples": [
                            "whsec_51f3...redacted"
                        ]
                    }
                },
                "required": [
                    "id",
                    "url",
                    "enabled",
                    "event_types",
                    "verified",
                    "disabled_reason",
                    "created_at",
                    "updated_at",
                    "secret"
                ],
                "additionalProperties": false,
                "description": "A freshly registered endpoint, including its one-time signing secret. Starts UNVERIFIED — call the `verify` action to prove ownership before relying on deliveries."
            },
            "DeletedWebhookEndpoint": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "The id of the deleted endpoint."
                    }
                },
                "required": [
                    "id"
                ],
                "additionalProperties": false,
                "description": "Confirmation that the endpoint — and every pending/queued delivery for it — was permanently deleted."
            },
            "RotatedWebhookEndpointSecret": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable id of the endpoint."
                    },
                    "url": {
                        "type": "string",
                        "description": "The https destination URL."
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "False when disabled — manually, auto-disabled after repeated delivery failures, or paused when the account that set it up had its email address verified (see `disabled_reason`). A disabled endpoint receives nothing: deliveries already queued for it are held, not sent, and go out only if it is re-enabled."
                    },
                    "event_types": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebhookEndpointEventType"
                        },
                        "description": "Subscribed event types. An EMPTY array means \"every type\"."
                    },
                    "verified": {
                        "type": "boolean",
                        "description": "True once the `verify` action has proven this endpoint accepts a correctly-signed request."
                    },
                    "disabled_reason": {
                        "description": "Why the endpoint was auto-disabled or paused by an account take-back, or null when it never was.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "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))$",
                        "description": "ISO-8601 UTC."
                    },
                    "updated_at": {
                        "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))$",
                        "description": "ISO-8601 UTC."
                    },
                    "secret": {
                        "type": "string",
                        "description": "The NEW signing secret — shown EXACTLY ONCE.",
                        "example": "whsec_51f3...redacted",
                        "examples": [
                            "whsec_51f3...redacted"
                        ]
                    },
                    "previous_secret_expires_at": {
                        "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))$",
                        "description": "The prior secret keeps signing outgoing deliveries alongside the new one until this time (~24h out) — dual-secret acceptance so you can finish updating your verifier before the old secret dies."
                    }
                },
                "required": [
                    "id",
                    "url",
                    "enabled",
                    "event_types",
                    "verified",
                    "disabled_reason",
                    "created_at",
                    "updated_at",
                    "secret",
                    "previous_secret_expires_at"
                ],
                "additionalProperties": false,
                "description": "Result of a create-overlap-revoke secret rotation. Rotating a SECOND time before the first rotation's grace window elapses immediately drops the FIRST previous secret — there is only ever one previous-secret slot, not a stack."
            },
            "WebhookEndpointVerificationResult": {
                "type": "object",
                "properties": {
                    "verified": {
                        "type": "boolean",
                        "description": "True when the endpoint answered the signed test request with a 2xx status. On true, the endpoint's verified state is set."
                    },
                    "status": {
                        "description": "The HTTP status the endpoint returned, when a response was received at all (absent for a blocked/timed-out/network-failed probe).",
                        "example": 200,
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "examples": [
                            200
                        ]
                    },
                    "reason": {
                        "description": "Present when `verified` is false — why the probe failed.",
                        "type": "string"
                    }
                },
                "required": [
                    "verified"
                ],
                "additionalProperties": false,
                "description": "Result of a live, synchronous verification probe. A failure does NOT unset a previously-earned verified state — only a success ever (re)sets it."
            },
            "WebhookEndpointTestEventResult": {
                "type": "object",
                "properties": {
                    "outcome": {
                        "$ref": "#/components/schemas/WebhookTestEventOutcome"
                    },
                    "status": {
                        "description": "The HTTP status returned, when a response was received.",
                        "example": 200,
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "examples": [
                            200
                        ]
                    },
                    "duration_ms": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Wall-clock time the probe took.",
                        "example": 184,
                        "examples": [
                            184
                        ]
                    }
                },
                "required": [
                    "outcome",
                    "duration_ms"
                ],
                "additionalProperties": false,
                "description": "Result of a synchronous, signed sample-event delivery. This is a LIVE probe — it does not create a queued WebhookDelivery row, so it never appears in the delivery log."
            },
            "WebhookTestEventOutcome": {
                "type": "string",
                "enum": [
                    "delivered",
                    "blocked",
                    "redirect_blocked",
                    "request_failed",
                    "timeout"
                ],
                "description": "The immediate outcome of the synchronous test POST."
            },
            "WebhookDeliveryList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebhookDelivery"
                        },
                        "description": "The current page of results."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "True when another page exists after this one."
                    },
                    "next_cursor": {
                        "description": "Opaque cursor for the next page (pass as `after`); null on the last page.",
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "data",
                    "has_more",
                    "next_cursor"
                ],
                "additionalProperties": false,
                "description": "Cursor-envelope page of one endpoint's delivery log."
            },
            "WebhookDelivery": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable id of the delivery row."
                    },
                    "event_id": {
                        "type": "string",
                        "description": "The owning WebhookEvent's id — also the `webhook-id` signature header on the wire."
                    },
                    "event_type": {
                        "type": "string",
                        "description": "The domain event type."
                    },
                    "state": {
                        "$ref": "#/components/schemas/WebhookDeliveryState"
                    },
                    "attempt_count": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Number of delivery attempts made so far.",
                        "example": 1,
                        "examples": [
                            1
                        ]
                    },
                    "last_status": {
                        "anyOf": [
                            {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "HTTP status of the most recent attempt, or null before any attempt has run.",
                        "example": 200,
                        "examples": [
                            200
                        ]
                    },
                    "next_attempt_at": {
                        "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"
                            }
                        ],
                        "description": "When the next retry is scheduled, or null when not PENDING."
                    },
                    "created_at": {
                        "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))$",
                        "description": "ISO-8601 UTC."
                    }
                },
                "required": [
                    "id",
                    "event_id",
                    "event_type",
                    "state",
                    "attempt_count",
                    "last_status",
                    "next_attempt_at",
                    "created_at"
                ],
                "additionalProperties": false,
                "description": "One delivery-log row — REDACTED: never includes response bodies or the signing secret."
            },
            "ReplayedWebhookDeliveries": {
                "type": "object",
                "properties": {
                    "replayed_count": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "How many FRESH PENDING deliveries this call created (capped at 1000 per call).",
                        "example": 3,
                        "examples": [
                            3
                        ]
                    }
                },
                "required": [
                    "replayed_count"
                ],
                "additionalProperties": false,
                "description": "Result of a bulk replay of failed deliveries."
            }
        },
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "A `gid_` API key ([Profile → API Keys](https://app.nowgetitdone.com/settings/api-keys)) or an OAuth 2.1 access token."
            }
        }
    }
}
