{
  "openapi": "3.1.0",
  "info": {
    "title": "Muninlist API",
    "version": "1.0.0-beta",
    "description": "The Muninlist API: lists, tasks, subtasks, tags, images, search, trash and activity.\n\n**Beta.** `/v1` is beta until the end of phase 2; after that breaking changes only ship in `/v2` and additive changes may appear in `/v1`.\n\n**Authentication.** Send `Authorization: Bearer <token>`. The token is either a Muninlist app session token (the access token of a signed-in user) or a personal access token (`mlt_...`, created under `/v1/tokens` or in the app) for scripts and integrations. A personal access token acts as you but can be limited to selected lists, can do what the app can on those lists (deleting lists included), and shows up as \"via API\" in the activity. AI assistants connect through Muninlist's OAuth server (`/.well-known/oauth-authorization-server`) and then use an opaque `mlo_...` access token the same way, limited to the lists the person chose. The Muninlist app also hands its own native parts (the Android home-screen widget) a device token (`mld_...`, created under `/v1/devices`) that acts as you on all lists and shows as the app. Account security actions (managing access tokens and devices, approving assistants, deleting the account) need a signed-in user session and answer `403 session_required` for personal access tokens, device tokens and AI assistants.\n\n**Errors.** Failures answer `{ \"error\": \"<code>\", \"message\": \"<for people>\" }`. Statuses: 400 `invalid_request`, 401 `unauthorized`, 403 (`forbidden`, `agent_scope`, `token_scope`, `session_required`, `premium_required`, `name_required`), 404 `not_found`, 409 `conflict`, 429 `rate_limited` (with `Retry-After`).\n\n**Sharing.** Lists are shared with invite links: an owner creates a link (`POST /v1/lists/{id}/invites`) with a role (`editor` or `viewer`; owners are made by changing a member's role), an expiry and an optional limit of uses, and sends it to people, who open it and join (`POST /v1/invites/{token}/accept`). The link is shown once, when it is created. A list can have several owners and always keeps at least one. Members see each other's display names and avatars, never email addresses; you need a display name yourself before you can create or accept a link (`403 name_required`, set it with `PATCH /v1/me`). Assistants and personal access tokens can share the lists they can use. Tasks can be assigned to members of the list. `GET /v1/invites/{id}` (with the link's token as `id`: what a link is for) is the only route that needs no authentication.\n\n**Groups.** A group is a set of people who share all the group's lists, like a family or a team (`/v1/groups`). Creating one needs Premium; joining is free. People join with an invite link like the ones for lists (`POST /v1/groups/{id}/invites`, then `POST /v1/invites/{token}/accept`) and are `member`s; the owner can make others `admin`s and hand the group over. Create lists in a group with `groupId` on `POST /v1/lists`, and move a list in or out with `POST /v1/lists/{id}/move`. On a list of a group the `myRole` and member roles are effective roles: group owners and admins count as list owners, members as editors. Deleting a group never deletes lists: they become the owner's personal lists. Assistants and access tokens that can use all lists may use groups (deleting and handing over included); ones limited to selected lists get `403 agent_scope` or `403 token_scope`.\n\n**Writes.** Every write endpoint takes an optional `Idempotency-Key` header (a UUID): a retry with the same key applies the change once and returns the same outcome, including the same error. Creates accept a client-chosen `id`; where a position is optional it defaults to the end."
  },
  "servers": [
    {
      "url": "https://api.muninlist.com"
    }
  ],
  "tags": [
    {
      "name": "Lists",
      "description": "Lists of tasks."
    },
    {
      "name": "Tasks",
      "description": "Tasks with their subtasks and attachments."
    },
    {
      "name": "Search",
      "description": "Full-text search over tasks."
    },
    {
      "name": "Tags",
      "description": "Tags in use."
    },
    {
      "name": "Sharing",
      "description": "Invite links and the people on a list."
    },
    {
      "name": "Groups",
      "description": "Groups of people who share lists, their members and invite links."
    },
    {
      "name": "Trash",
      "description": "Recently deleted items."
    },
    {
      "name": "Tokens",
      "description": "Personal access tokens (signed-in session only)."
    },
    {
      "name": "Devices",
      "description": "Device tokens for the app's native parts, like the Android widget (signed-in session only)."
    },
    {
      "name": "Connected assistants",
      "description": "Approving AI assistants that ask to connect through OAuth (signed-in session only)."
    },
    {
      "name": "Account",
      "description": "Your profile, plan, export and deletion."
    },
    {
      "name": "Activity",
      "description": "The activity feed."
    },
    {
      "name": "Places",
      "description": "Place search for task locations."
    },
    {
      "name": "Attachments",
      "description": "Signed URLs for images."
    },
    {
      "name": "Sync",
      "description": "Advanced change feed for integrations that keep a local copy."
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "A Muninlist session token (the access token of a signed-in user) or a personal access token (`mlt_...`)."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "A UUID that makes the request safe to retry. A retry with the same key applies the change once and returns the same outcome (the resource as it is now, or the same error). Use a new key per distinct change; reusing a key for a different request has no defined result. Creates without `id` derive it from the key, so a retry returns the same resource.",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "schemas": {
      "ListCollection": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/List"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "List": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "groupId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "openTaskCount": {
            "type": "integer",
            "minimum": 0
          },
          "myRole": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "owner",
              "editor",
              "viewer",
              null
            ]
          },
          "memberCount": {
            "type": "integer",
            "minimum": 0
          },
          "shared": {
            "type": "boolean"
          },
          "pinned": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "icon",
          "position",
          "groupId",
          "createdAt",
          "updatedAt",
          "openTaskCount",
          "myRole",
          "memberCount",
          "shared",
          "pinned"
        ]
      },
      "Unauthorized": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "unauthorized",
              "invalid_token"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "message"
        ]
      },
      "RateLimited": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "rate_limited"
            ]
          },
          "retryAfterSeconds": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "error",
          "retryAfterSeconds"
        ]
      },
      "TaskPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "listId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dueHasTime": {
            "type": "boolean"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "position": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 200
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -90,
                "maximum": 90
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -180,
                "maximum": 180
              }
            },
            "required": [
              "name",
              "address",
              "lat",
              "lng"
            ]
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "maxLength": 2000
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "url",
                "title"
              ]
            }
          },
          "assigneeId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "assignee": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "displayName"
            ]
          },
          "agentHandoff": {
            "type": "boolean"
          },
          "createdVia": {
            "type": "string",
            "enum": [
              "app",
              "api",
              "mcp"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "listId",
          "title",
          "description",
          "dueAt",
          "dueHasTime",
          "completedAt",
          "position",
          "tags",
          "location",
          "links",
          "assigneeId",
          "assignee",
          "agentHandoff",
          "createdVia",
          "createdAt",
          "updatedAt"
        ]
      },
      "TaskDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "listId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dueHasTime": {
            "type": "boolean"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "position": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 200
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -90,
                "maximum": 90
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -180,
                "maximum": 180
              }
            },
            "required": [
              "name",
              "address",
              "lat",
              "lng"
            ]
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "maxLength": 2000
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "url",
                "title"
              ]
            }
          },
          "assigneeId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "assignee": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "displayName"
            ]
          },
          "agentHandoff": {
            "type": "boolean"
          },
          "createdVia": {
            "type": "string",
            "enum": [
              "app",
              "api",
              "mcp"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "subtasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Subtask"
            }
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attachment"
            }
          }
        },
        "required": [
          "id",
          "listId",
          "title",
          "description",
          "dueAt",
          "dueHasTime",
          "completedAt",
          "position",
          "tags",
          "location",
          "links",
          "assigneeId",
          "assignee",
          "agentHandoff",
          "createdVia",
          "createdAt",
          "updatedAt",
          "subtasks",
          "attachments"
        ]
      },
      "Subtask": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "taskId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "position": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "taskId",
          "title",
          "completedAt",
          "position",
          "createdAt",
          "updatedAt"
        ]
      },
      "Attachment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "taskId": {
            "type": "string",
            "format": "uuid"
          },
          "mime": {
            "type": "string"
          },
          "sizeBytes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "width": {
            "type": [
              "integer",
              "null"
            ]
          },
          "height": {
            "type": [
              "integer",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "taskId",
          "mime",
          "sizeBytes",
          "width",
          "height",
          "createdAt"
        ]
      },
      "TagCollection": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagCount"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "TagCount": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "tag",
          "count"
        ]
      },
      "Trash": {
        "type": "object",
        "properties": {
          "lists": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "deletedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "name",
                "deletedAt"
              ]
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "listId": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": "string"
                },
                "deletedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "listId",
                "title",
                "deletedAt"
              ]
            }
          },
          "subtasks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "taskId": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": "string"
                },
                "deletedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "taskId",
                "title",
                "deletedAt"
              ]
            }
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "taskId": {
                  "type": "string",
                  "format": "uuid"
                },
                "mime": {
                  "type": "string"
                },
                "deletedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "taskId",
                "mime",
                "deletedAt"
              ]
            }
          }
        },
        "required": [
          "lists",
          "tasks",
          "subtasks",
          "attachments"
        ]
      },
      "CreateListBody": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Client-chosen id. Omit it and the server picks one."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 32
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "position": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Sort key (fractional index). Omit it to place the list after your last list."
          },
          "groupId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateListBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 32
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "position": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        }
      },
      "CreateTaskBody": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Client-chosen id. Omit it and the server picks one."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20000
          },
          "dueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dueHasTime": {
            "type": "boolean"
          },
          "assigneeId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "agentHandoff": {
            "type": "boolean"
          },
          "location": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 200
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -90,
                "maximum": 90
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -180,
                "maximum": 180
              }
            },
            "required": [
              "name",
              "address",
              "lat",
              "lng"
            ]
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "maxLength": 2000
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 200,
                  "default": null
                }
              },
              "required": [
                "url"
              ]
            },
            "maxItems": 20
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50,
              "pattern": "^[^\\s#,]+$"
            },
            "maxItems": 50
          },
          "position": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Sort key (fractional index). Omit it to place the task at the top of the list."
          },
          "at": {
            "type": "string",
            "enum": [
              "start",
              "end"
            ],
            "description": "Where the task goes when you send no `position`: `start` (default) before the first task, so new tasks show on top; `end` after the last one. Not together with `position`."
          }
        },
        "required": [
          "title"
        ]
      },
      "UpdateTaskBody": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20000
          },
          "dueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dueHasTime": {
            "type": "boolean"
          },
          "assigneeId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "agentHandoff": {
            "type": "boolean"
          },
          "location": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 200
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500
              },
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -90,
                "maximum": 90
              },
              "lng": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -180,
                "maximum": 180
              }
            },
            "required": [
              "name",
              "address",
              "lat",
              "lng"
            ]
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "maxLength": 2000
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 200,
                  "default": null
                }
              },
              "required": [
                "url"
              ]
            },
            "maxItems": 20
          }
        }
      },
      "MoveTaskBody": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "format": "uuid",
            "description": "Move to this list (you need edit rights on both lists)."
          },
          "position": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Sort key in the destination list. Omit it to move to the end."
          }
        }
      },
      "AddLinkBody": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2000
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200
          }
        },
        "required": [
          "url"
        ]
      },
      "AddSubtaskBody": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Client-chosen id. Omit it and the server picks one."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "position": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Sort key (fractional index). Omit it to place the subtask after the last one."
          }
        },
        "required": [
          "title"
        ]
      },
      "UpdateSubtaskBody": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "position": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        }
      },
      "AddAttachmentBody": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "image"
            ]
          },
          "storagePath": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "mime": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp",
              "image/heic",
              "image/heif"
            ]
          },
          "width": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000
          },
          "height": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000
          },
          "sizeBytes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10485760
          }
        },
        "required": [
          "id",
          "kind",
          "storagePath",
          "mime",
          "sizeBytes"
        ]
      },
      "InviteCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "listId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "editor",
              "viewer"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "maxUses": {
            "type": [
              "integer",
              "null"
            ],
            "exclusiveMinimum": 0
          },
          "useCount": {
            "type": "integer",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "displayName"
            ]
          },
          "token": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "listId",
          "role",
          "expiresAt",
          "maxUses",
          "useCount",
          "createdAt",
          "createdBy",
          "token",
          "url"
        ]
      },
      "CreateInviteBody": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "editor",
              "viewer"
            ],
            "default": "editor",
            "description": "What people joining get. Default `editor`."
          },
          "expiresInDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30,
            "default": 7,
            "description": "Days until the link stops working (1 to 30). Default 7."
          },
          "maxUses": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 1000,
            "description": "How many people may join with the link. Omit for no limit."
          }
        }
      },
      "InviteList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invite"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "Invite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "listId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "editor",
              "viewer"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "maxUses": {
            "type": [
              "integer",
              "null"
            ],
            "exclusiveMinimum": 0
          },
          "useCount": {
            "type": "integer",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "displayName"
            ]
          }
        },
        "required": [
          "id",
          "listId",
          "role",
          "expiresAt",
          "maxUses",
          "useCount",
          "createdAt",
          "createdBy"
        ]
      },
      "InvitePreview": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "list",
              "group"
            ]
          },
          "listName": {
            "type": [
              "string",
              "null"
            ]
          },
          "groupName": {
            "type": [
              "string",
              "null"
            ]
          },
          "inviterDisplayName": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "editor",
              "viewer",
              "member"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "valid",
              "expired",
              "revoked",
              "used_up",
              "list_deleted"
            ]
          }
        },
        "required": [
          "kind",
          "listName",
          "groupName",
          "inviterDisplayName",
          "role",
          "expiresAt",
          "status"
        ]
      },
      "AcceptedInviteResponse": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "list",
              "group"
            ]
          },
          "listId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "groupId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "editor",
              "viewer",
              "admin",
              "member"
            ]
          },
          "alreadyMember": {
            "type": "boolean"
          },
          "list": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "position": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "groupId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "openTaskCount": {
                "type": "integer",
                "minimum": 0
              },
              "myRole": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "owner",
                  "editor",
                  "viewer",
                  null
                ]
              },
              "memberCount": {
                "type": "integer",
                "minimum": 0
              },
              "shared": {
                "type": "boolean"
              },
              "pinned": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "name",
              "color",
              "icon",
              "position",
              "groupId",
              "createdAt",
              "updatedAt",
              "openTaskCount",
              "myRole",
              "memberCount",
              "shared",
              "pinned"
            ],
            "description": "The list as you see it now; null for a group link or if this credential may not read it."
          },
          "group": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "myRole": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "member"
                ]
              },
              "ownerId": {
                "type": "string",
                "format": "uuid"
              },
              "memberCount": {
                "type": "integer",
                "minimum": 0
              },
              "listCount": {
                "type": "integer",
                "minimum": 0
              },
              "ownerHasPremium": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "name",
              "createdAt",
              "updatedAt",
              "myRole",
              "ownerId",
              "memberCount",
              "listCount",
              "ownerHasPremium"
            ],
            "description": "The group as you see it now; null for a list link or if this credential may not use groups."
          }
        },
        "required": [
          "kind",
          "listId",
          "groupId",
          "role",
          "alreadyMember",
          "list",
          "group"
        ]
      },
      "MemberList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "Member": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "avatarUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "editor",
              "viewer"
            ]
          },
          "access": {
            "type": "string",
            "enum": [
              "direct",
              "group",
              "both"
            ]
          },
          "groupRole": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "owner",
              "admin",
              "member",
              null
            ]
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "displayName",
          "avatarUrl",
          "role",
          "access",
          "groupRole",
          "joinedAt"
        ]
      },
      "UpdateMemberRoleBody": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "editor",
              "viewer"
            ]
          }
        },
        "required": [
          "role"
        ]
      },
      "GroupList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Group"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "Group": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "myRole": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "memberCount": {
            "type": "integer",
            "minimum": 0
          },
          "listCount": {
            "type": "integer",
            "minimum": 0
          },
          "ownerHasPremium": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "createdAt",
          "updatedAt",
          "myRole",
          "ownerId",
          "memberCount",
          "listCount",
          "ownerHasPremium"
        ]
      },
      "CreateGroupBody": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "A UUID you choose, so a retry never creates a second group."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "The group's name (1 to 100 characters)."
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateGroupBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "The group's name (1 to 100 characters)."
          }
        },
        "required": [
          "name"
        ]
      },
      "GroupMemberList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupMember"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "GroupMember": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "avatarUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "displayName",
          "avatarUrl",
          "role",
          "joinedAt"
        ]
      },
      "UpdateGroupMemberRoleBody": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ],
            "description": "The new role. `owner` hands the group over: that person becomes owner and you become admin."
          }
        },
        "required": [
          "role"
        ]
      },
      "GroupInviteCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "groupId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "member"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "maxUses": {
            "type": [
              "integer",
              "null"
            ],
            "exclusiveMinimum": 0
          },
          "useCount": {
            "type": "integer",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "displayName"
            ]
          },
          "token": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "groupId",
          "role",
          "expiresAt",
          "maxUses",
          "useCount",
          "createdAt",
          "createdBy",
          "token",
          "url"
        ]
      },
      "CreateGroupInviteBody": {
        "type": "object",
        "properties": {
          "expiresInDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30,
            "default": 7,
            "description": "Days until the link stops working (1 to 30). Default 7."
          },
          "maxUses": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 1000,
            "description": "How many people may join with the link. Omit for no limit."
          }
        }
      },
      "GroupInviteList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupInvite"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "GroupInvite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "groupId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "member"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "maxUses": {
            "type": [
              "integer",
              "null"
            ],
            "exclusiveMinimum": 0
          },
          "useCount": {
            "type": "integer",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "displayName"
            ]
          }
        },
        "required": [
          "id",
          "groupId",
          "role",
          "expiresAt",
          "maxUses",
          "useCount",
          "createdAt",
          "createdBy"
        ]
      },
      "MoveListBody": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The group to move the list into, or null to move it out of its group."
          }
        },
        "required": [
          "groupId"
        ]
      },
      "ApiTokenList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiToken"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "ApiToken": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "selected"
            ]
          },
          "listIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "scope",
          "listIds",
          "expiresAt",
          "lastUsedAt",
          "createdAt"
        ]
      },
      "CreatedApiToken": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "selected"
            ]
          },
          "listIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "token": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "scope",
          "listIds",
          "expiresAt",
          "lastUsedAt",
          "createdAt",
          "token"
        ]
      },
      "CreateTokenBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "What the token is for, e.g. \"Home Assistant\"."
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "selected"
            ],
            "description": "`all`: every list you can use (Premium or trial); `selected`: only `listIds`."
          },
          "listIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 100,
            "description": "The lists the token may use. Required for `selected`, empty for `all`."
          },
          "expiresInDays": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 365,
            "description": "Days until the token stops working. Omit or `null`: never expires."
          }
        },
        "required": [
          "name",
          "scope"
        ]
      },
      "UpdateTokenBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "selected"
            ]
          },
          "listIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 100
          }
        }
      },
      "DeviceList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Device"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "Device": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "lastUsedAt",
          "createdAt"
        ]
      },
      "CreatedDevice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "token": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "lastUsedAt",
          "createdAt",
          "token"
        ]
      },
      "CreateDeviceBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "What the device is, e.g. \"Android widget (Pixel 8)\"."
          }
        },
        "required": [
          "name"
        ]
      },
      "AgentConnectionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentConnection"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AgentConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "selected"
            ]
          },
          "listIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "paused": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "redirectHost": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "clientId",
          "scope",
          "listIds",
          "paused",
          "createdAt",
          "lastUsedAt",
          "redirectHost"
        ]
      },
      "UpdateAgentConnectionBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "paused": {
            "type": "boolean"
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "selected"
            ]
          },
          "listIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 100
          }
        }
      },
      "OAuthRequestDetails": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "client": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "redirectHost": {
            "type": "string"
          },
          "redirectKind": {
            "type": "string",
            "enum": [
              "web",
              "loopback",
              "app"
            ]
          },
          "existingConnection": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "scope": {
                "type": "string",
                "enum": [
                  "all",
                  "selected"
                ]
              },
              "listIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "paused": {
                "type": "boolean"
              }
            },
            "required": [
              "scope",
              "listIds",
              "paused"
            ]
          },
          "plan": {
            "type": "string",
            "enum": [
              "free",
              "premium"
            ]
          },
          "limits": {
            "type": "object",
            "properties": {
              "scopeAll": {
                "type": "boolean"
              },
              "listLimit": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "scopeAll",
              "listLimit"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "client",
          "redirectHost",
          "redirectKind",
          "existingConnection",
          "plan",
          "limits",
          "expiresAt"
        ]
      },
      "OAuthDecisionResult": {
        "type": "object",
        "properties": {
          "redirectUrl": {
            "type": "string"
          }
        },
        "required": [
          "redirectUrl"
        ]
      },
      "OAuthDecisionBody": {
        "type": "object",
        "properties": {
          "approve": {
            "type": "boolean"
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "selected"
            ]
          },
          "listIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 100
          }
        },
        "required": [
          "approve"
        ]
      },
      "Me": {
        "type": "object",
        "properties": {
          "profile": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "displayName": {
                "type": "string"
              },
              "avatarUrl": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "homeRegion": {
                "type": "string"
              },
              "trialEndsAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "allowAgentHandoff": {
                "type": "boolean"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "displayName",
              "avatarUrl",
              "homeRegion",
              "trialEndsAt",
              "allowAgentHandoff",
              "createdAt",
              "updatedAt"
            ]
          },
          "entitlement": {
            "type": "object",
            "properties": {
              "plan": {
                "type": "string",
                "enum": [
                  "free",
                  "premium"
                ]
              },
              "source": {
                "type": "string",
                "enum": [
                  "subscription",
                  "trial",
                  "none"
                ]
              },
              "premiumUntil": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "plan",
              "source",
              "premiumUntil"
            ]
          }
        },
        "required": [
          "profile",
          "entitlement"
        ]
      },
      "ErrorBody": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "issues": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "error"
        ]
      },
      "UpdateProfileBody": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          }
        },
        "required": [
          "displayName"
        ]
      },
      "AccountExport": {
        "type": "object",
        "additionalProperties": {}
      },
      "ActivityFeed": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "verb": {
                  "type": "string",
                  "enum": [
                    "list_created",
                    "list_updated",
                    "list_deleted",
                    "task_created",
                    "task_updated",
                    "task_moved",
                    "task_completed",
                    "task_reopened",
                    "task_deleted",
                    "task_tagged",
                    "task_untagged",
                    "list_restored",
                    "task_restored",
                    "subtask_added",
                    "subtask_updated",
                    "subtask_completed",
                    "subtask_reopened",
                    "subtask_deleted",
                    "subtask_restored",
                    "attachment_added",
                    "attachment_deleted",
                    "attachment_restored",
                    "member_joined",
                    "member_left",
                    "member_removed",
                    "member_role_changed",
                    "invite_created",
                    "invite_revoked"
                  ]
                },
                "listId": {
                  "type": "string"
                },
                "taskId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "data": {
                  "type": "object",
                  "additionalProperties": {}
                },
                "actor": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "userId": {
                      "type": "string"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "userId",
                    "name"
                  ]
                },
                "subject": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "userId": {
                      "type": "string"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "userId",
                    "name"
                  ]
                },
                "via": {
                  "type": "string",
                  "enum": [
                    "app",
                    "api",
                    "mcp"
                  ]
                },
                "viaName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "list": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "color": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "icon": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "color",
                    "icon"
                  ]
                },
                "task": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "title",
                    "deleted"
                  ]
                }
              },
              "required": [
                "id",
                "verb",
                "listId",
                "taskId",
                "data",
                "actor",
                "subject",
                "via",
                "viaName",
                "createdAt",
                "list",
                "task"
              ]
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "events",
          "nextCursor"
        ]
      },
      "Place": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200
          },
          "address": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90
          },
          "lng": {
            "type": "number",
            "minimum": -180,
            "maximum": 180
          }
        },
        "required": [
          "name",
          "address",
          "lat",
          "lng"
        ]
      },
      "AddTaskImageUrlBody": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "description": "Public http(s) address of the image."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Client-chosen attachment id."
          }
        },
        "required": [
          "url"
        ]
      },
      "SyncPushResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "mutationId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    }
                  },
                  "required": [
                    "mutationId",
                    "status"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "mutationId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "rejected"
                      ]
                    },
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "mutationId",
                    "status",
                    "code",
                    "message"
                  ]
                }
              ]
            }
          }
        },
        "required": [
          "results"
        ]
      },
      "SyncPushRequest": {
        "type": "object",
        "properties": {
          "formatVersion": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "mutations": {
            "type": "array",
            "items": {},
            "minItems": 1,
            "maxItems": 100
          }
        },
        "required": [
          "formatVersion",
          "mutations"
        ]
      },
      "SyncPullResponse": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "integer",
            "minimum": 0
          },
          "hasMore": {
            "type": "boolean"
          },
          "upserts": {
            "type": "object",
            "properties": {
              "lists": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "color": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "icon": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "ownerUserId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "groupId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "position": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "color",
                    "icon",
                    "ownerUserId",
                    "groupId",
                    "position",
                    "createdBy",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ]
                }
              },
              "tasks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "listId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "dueAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "dueHasTime": {
                      "type": "boolean"
                    },
                    "assigneeId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "agentHandoff": {
                      "type": "boolean"
                    },
                    "locationName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "locationAddress": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "locationLat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "locationLng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "maxLength": 2000
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "url",
                          "title"
                        ]
                      },
                      "default": []
                    },
                    "recurrenceRule": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "recurrenceBasis": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "due_date",
                        "completion_date",
                        null
                      ]
                    },
                    "seriesId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "occurrenceIndex": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "completedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "completedBy": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "position": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "createdVia": {
                      "type": "string",
                      "enum": [
                        "app",
                        "api",
                        "mcp"
                      ]
                    },
                    "viaConnectionId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "listId",
                    "title",
                    "description",
                    "dueAt",
                    "dueHasTime",
                    "assigneeId",
                    "agentHandoff",
                    "locationName",
                    "locationAddress",
                    "locationLat",
                    "locationLng",
                    "tags",
                    "recurrenceRule",
                    "recurrenceBasis",
                    "seriesId",
                    "occurrenceIndex",
                    "completedAt",
                    "completedBy",
                    "position",
                    "createdBy",
                    "createdVia",
                    "viaConnectionId",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ]
                }
              },
              "subtasks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "taskId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "completedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "position": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "taskId",
                    "title",
                    "completedAt",
                    "position",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ]
                }
              },
              "attachments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "taskId": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "image"
                      ]
                    },
                    "storagePath": {
                      "type": "string"
                    },
                    "mime": {
                      "type": "string"
                    },
                    "width": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "height": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "sizeBytes": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "createdBy": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "taskId",
                    "kind",
                    "storagePath",
                    "mime",
                    "width",
                    "height",
                    "sizeBytes",
                    "createdBy",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ]
                }
              },
              "groups": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "createdBy",
                    "createdAt",
                    "updatedAt",
                    "deletedAt"
                  ]
                }
              },
              "profiles": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pinnedListIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "displayName",
                    "avatarUrl"
                  ]
                }
              },
              "listMembers": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "listId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "owner",
                          "editor",
                          "viewer"
                        ]
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "listId",
                      "userId",
                      "role",
                      "createdAt"
                    ]
                  }
                }
              },
              "groupMembers": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "groupId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "owner",
                          "admin",
                          "member"
                        ]
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "groupId",
                      "userId",
                      "role",
                      "createdAt"
                    ]
                  }
                }
              }
            },
            "required": [
              "lists",
              "tasks",
              "subtasks",
              "attachments",
              "groups",
              "profiles",
              "listMembers",
              "groupMembers"
            ]
          },
          "trash": {
            "type": "object",
            "properties": {
              "lists": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "deletedAt"
                  ]
                }
              },
              "tasks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "listId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "listId",
                    "title",
                    "deletedAt"
                  ]
                }
              }
            },
            "required": [
              "lists",
              "tasks"
            ]
          },
          "deletes": {
            "type": "object",
            "properties": {
              "lists": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "tasks": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "subtasks": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "attachments": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "groups": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "lists",
              "tasks",
              "subtasks",
              "attachments",
              "groups"
            ]
          },
          "access": {
            "type": "object",
            "properties": {
              "granted": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "revoked": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "granted",
              "revoked"
            ]
          }
        },
        "required": [
          "cursor",
          "hasMore",
          "upserts",
          "trash",
          "deletes",
          "access"
        ]
      },
      "SyncSnapshotResponse": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "integer",
            "minimum": 0
          },
          "lists": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "color": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "icon": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ownerUserId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "groupId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "position": {
                  "type": "string"
                },
                "createdBy": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "deletedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "name",
                "color",
                "icon",
                "ownerUserId",
                "groupId",
                "position",
                "createdBy",
                "createdAt",
                "updatedAt",
                "deletedAt"
              ]
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "listId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dueAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "dueHasTime": {
                  "type": "boolean"
                },
                "assigneeId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "agentHandoff": {
                  "type": "boolean"
                },
                "locationName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "locationAddress": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "locationLat": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "locationLng": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "links": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "url",
                      "title"
                    ]
                  },
                  "default": []
                },
                "recurrenceRule": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "recurrenceBasis": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "due_date",
                    "completion_date",
                    null
                  ]
                },
                "seriesId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "occurrenceIndex": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "completedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "completedBy": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "position": {
                  "type": "string"
                },
                "createdBy": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "createdVia": {
                  "type": "string",
                  "enum": [
                    "app",
                    "api",
                    "mcp"
                  ]
                },
                "viaConnectionId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "deletedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "listId",
                "title",
                "description",
                "dueAt",
                "dueHasTime",
                "assigneeId",
                "agentHandoff",
                "locationName",
                "locationAddress",
                "locationLat",
                "locationLng",
                "tags",
                "recurrenceRule",
                "recurrenceBasis",
                "seriesId",
                "occurrenceIndex",
                "completedAt",
                "completedBy",
                "position",
                "createdBy",
                "createdVia",
                "viaConnectionId",
                "createdAt",
                "updatedAt",
                "deletedAt"
              ]
            }
          },
          "subtasks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "taskId": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "completedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "position": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "deletedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "taskId",
                "title",
                "completedAt",
                "position",
                "createdAt",
                "updatedAt",
                "deletedAt"
              ]
            }
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "taskId": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "image"
                  ]
                },
                "storagePath": {
                  "type": "string"
                },
                "mime": {
                  "type": "string"
                },
                "width": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "height": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "sizeBytes": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "createdBy": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "deletedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "taskId",
                "kind",
                "storagePath",
                "mime",
                "width",
                "height",
                "sizeBytes",
                "createdBy",
                "createdAt",
                "updatedAt",
                "deletedAt"
              ]
            }
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "createdBy": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "deletedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "name",
                "createdBy",
                "createdAt",
                "updatedAt",
                "deletedAt"
              ]
            }
          },
          "profiles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "avatarUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pinnedListIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "id",
                "displayName",
                "avatarUrl"
              ]
            }
          },
          "trash": {
            "type": "object",
            "properties": {
              "lists": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "deletedAt"
                  ]
                }
              },
              "tasks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "listId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "listId",
                    "title",
                    "deletedAt"
                  ]
                }
              }
            },
            "required": [
              "lists",
              "tasks"
            ]
          },
          "listMembers": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "listId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "editor",
                      "viewer"
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "listId",
                  "userId",
                  "role",
                  "createdAt"
                ]
              }
            }
          },
          "groupMembers": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "member"
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "groupId",
                  "userId",
                  "role",
                  "createdAt"
                ]
              }
            }
          },
          "missing": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "cursor",
          "lists",
          "tasks",
          "subtasks",
          "attachments",
          "groups",
          "profiles",
          "trash",
          "listMembers",
          "groupMembers",
          "missing"
        ]
      }
    }
  },
  "paths": {
    "/v1/lists": {
      "get": {
        "operationId": "listLists",
        "tags": [
          "Lists"
        ],
        "summary": "List your lists",
        "description": "The live lists this token can read, in position order, with the number of open tasks in each.",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The lists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCollection"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Lists"
        ],
        "operationId": "createList",
        "summary": "Create a list",
        "description": "Without `position` the list goes after your last list. With `groupId` the list is created in that group instead of as your personal list: you must be a member of the group and the group owner needs Premium (`403 premium_required`); a group can have 20 lists. Assistants and access tokens that can use all lists may create lists, in a group too. Ones limited to selected lists cannot (`agent_scope`, `token_scope`).",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateListBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/lists/{id}": {
      "get": {
        "operationId": "getList",
        "tags": [
          "Lists"
        ],
        "summary": "Get one list",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Lists"
        ],
        "operationId": "updateList",
        "summary": "Update a list",
        "description": "Send only the fields to change; `null` clears color or icon.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateListBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Lists"
        ],
        "operationId": "deleteList",
        "summary": "Delete a list",
        "description": "Moves the list (with its tasks) to the trash for 90 days; restore it with `POST /v1/lists/{id}/restore`. Needs the list owner right (on a group list, group owners and admins have it). Other members lose access while it is in the trash. Assistants and access tokens may do it on the lists they can use.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/lists/{id}/tasks": {
      "get": {
        "operationId": "listTasks",
        "tags": [
          "Tasks"
        ],
        "summary": "List the tasks of a list",
        "description": "Live tasks of one list, in the order of the list in the app (by position). With `status=completed` the newest completions come first. Pages are keyset based: pass `nextCursor` back as `cursor`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "completed",
                "all"
              ],
              "description": "Which tasks to return. Default `open`."
            },
            "required": false,
            "description": "Which tasks to return. Default `open`.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only tasks due strictly before this instant."
            },
            "required": false,
            "description": "Only tasks due strictly before this instant.",
            "name": "dueBefore",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only tasks due at or after this instant."
            },
            "required": false,
            "description": "Only tasks due at or after this instant.",
            "name": "dueAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "description": "Only tasks with this tag (case-insensitive)."
            },
            "required": false,
            "description": "Only tasks with this tag (case-insensitive).",
            "name": "tag",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Only tasks changed after this instant."
            },
            "required": false,
            "description": "Only tasks changed after this instant.",
            "name": "updatedSince",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "description": "Page size, 1 to 200. Default 50.",
              "minimum": 1,
              "maximum": 200
            },
            "required": false,
            "description": "Page size, 1 to 200. Default 50.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500,
              "description": "The `nextCursor` of the previous page. Opaque."
            },
            "required": false,
            "description": "The `nextCursor` of the previous page. Opaque.",
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "createTask",
        "summary": "Create a task",
        "description": "Without `position` the task goes to the top of the list, or to the end with `at: \"end\"`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/{id}": {
      "get": {
        "operationId": "getTask",
        "tags": [
          "Tasks"
        ],
        "summary": "Get one task",
        "description": "A live task with its live subtasks and attachments.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Tasks"
        ],
        "operationId": "updateTask",
        "summary": "Update a task",
        "description": "Send only the fields to change; `null` clears description, due date, assignee and location. To change the list or the order use `POST /v1/tasks/{id}/move`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tasks"
        ],
        "operationId": "deleteTask",
        "summary": "Delete a task",
        "description": "Moves the task to the trash; restore it with `POST /v1/tasks/{id}/restore`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks": {
      "get": {
        "operationId": "searchTasks",
        "tags": [
          "Search"
        ],
        "summary": "Search tasks, or list the ones assigned to you",
        "description": "Full-text search over titles and descriptions of live tasks in every list this token can read. Words are ANDed and the last word also matches as a prefix. Newest-updated first. Send `assignee=me` for the tasks assigned to you across your lists (open ones unless `status` says otherwise), `handoff=true` for only the tasks handed to an AI assistant, and `tag` for the tasks carrying a tag (case-insensitive); `q` is optional when you send any of them, and they combine with `q` and each other. Without `q` the order is still newest-updated first.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Search text, 1 to 200 characters."
            },
            "required": false,
            "description": "Search text, 1 to 200 characters.",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "me"
              ],
              "description": "Only tasks assigned to you (the only value is `me`)."
            },
            "required": false,
            "description": "Only tasks assigned to you (the only value is `me`).",
            "name": "assignee",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "With `true`, only tasks handed to an AI assistant."
            },
            "required": false,
            "description": "With `true`, only tasks handed to an AI assistant.",
            "name": "handoff",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "description": "Only tasks with this tag (case-insensitive)."
            },
            "required": false,
            "description": "Only tasks with this tag (case-insensitive).",
            "name": "tag",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "completed",
                "all"
              ],
              "description": "Which tasks to return. Default `open`."
            },
            "required": false,
            "description": "Which tasks to return. Default `open`.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "description": "Page size, 1 to 200. Default 50.",
              "minimum": 1,
              "maximum": 200
            },
            "required": false,
            "description": "Page size, 1 to 200. Default 50.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500,
              "description": "The `nextCursor` of the previous page. Opaque."
            },
            "required": false,
            "description": "The `nextCursor` of the previous page. Opaque.",
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agenda": {
      "get": {
        "operationId": "getAgenda",
        "tags": [
          "Tasks"
        ],
        "summary": "Tasks that are due soon",
        "description": "Open tasks (not completed, not deleted) from every list this token can read whose due date is at or before `until`, overdue ones included. Earliest due first, then by position. Pages are keyset based: pass `nextCursor` back as `cursor`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Include tasks due at or before this instant."
            },
            "required": true,
            "description": "Include tasks due at or before this instant.",
            "name": "until",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "description": "Page size, 1 to 200. Default 50.",
              "minimum": 1,
              "maximum": 200
            },
            "required": false,
            "description": "Page size, 1 to 200. Default 50.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500,
              "description": "The `nextCursor` of the previous page. Opaque."
            },
            "required": false,
            "description": "The `nextCursor` of the previous page. Opaque.",
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tags": {
      "get": {
        "operationId": "listTags",
        "tags": [
          "Tags"
        ],
        "summary": "Tags in use",
        "description": "Every tag used on a live task in a readable list, with how many tasks carry it.",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The tags",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagCollection"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/trash": {
      "get": {
        "operationId": "getTrash",
        "tags": [
          "Trash"
        ],
        "summary": "Recently deleted items",
        "description": "Lists, tasks, subtasks and attachments deleted within the retention window, newest first, at most 500 per kind (the most recent ones). Tasks, subtasks and attachments are only listed while their parent is not deleted: restore the parent first.",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Trash"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/lists/{id}/restore": {
      "post": {
        "tags": [
          "Lists"
        ],
        "operationId": "restoreList",
        "summary": "Restore a deleted list",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/lists/{id}/pin": {
      "put": {
        "tags": [
          "Lists"
        ],
        "operationId": "pinList",
        "summary": "Pin a list",
        "description": "Pins are personal: they show the list first in your overview, in the order you pinned. Pinning a list that is already pinned changes nothing.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The list, with `pinned: true`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Lists"
        ],
        "operationId": "unpinList",
        "summary": "Unpin a list",
        "description": "Removes the pin; unpinning a list that is not pinned changes nothing. Also works for a list that was deleted or that you can no longer read, which is then answered with 204 instead of the list.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The list, with `pinned: false`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "204": {
            "description": "Unpinned; the list is deleted or not readable, so there is nothing to return"
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/{id}/move": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "moveTask",
        "summary": "Move or reorder a task",
        "description": "Moves the task to another list (`listId`) and/or changes its place (`position`). Without `position` the task goes to the end of the destination list.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveTaskBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The moved task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/{id}/complete": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "completeTask",
        "summary": "Complete a task",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The completed task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/{id}/reopen": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "reopenTask",
        "summary": "Reopen a completed task",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The reopened task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/{id}/restore": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "restoreTask",
        "summary": "Restore a deleted task",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/{id}/tags/{tag}": {
      "put": {
        "tags": [
          "Tasks"
        ],
        "operationId": "addTag",
        "summary": "Add a tag to a task",
        "description": "Idempotent: adding a tag the task has is a no-op. Tags match case-insensitively.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50,
              "pattern": "^[^\\s#,]+$",
              "description": "The tag, URL-encoded. No spaces, `#` or commas."
            },
            "required": true,
            "description": "The tag, URL-encoded. No spaces, `#` or commas.",
            "name": "tag",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The task with its tags",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tasks"
        ],
        "operationId": "removeTag",
        "summary": "Remove a tag from a task",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50,
              "pattern": "^[^\\s#,]+$",
              "description": "The tag, URL-encoded."
            },
            "required": true,
            "description": "The tag, URL-encoded.",
            "name": "tag",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The task with its tags",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/{id}/links": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "addLink",
        "summary": "Add a link to a task",
        "description": "Adds the link at the end. If the task already has that URL (compared in normalized form) nothing is added; a `title` in the request then replaces the existing title. At most 20 links per task.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddLinkBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The task with its links",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tasks"
        ],
        "operationId": "removeLink",
        "summary": "Remove a link from a task",
        "description": "Removing a URL the task does not have is a no-op.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 2000,
              "description": "The link URL, URL-encoded."
            },
            "required": true,
            "description": "The link URL, URL-encoded.",
            "name": "url",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The task with its links",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/{id}/subtasks": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "addSubtask",
        "summary": "Add a subtask",
        "description": "Without `position` the subtask goes after the last one.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddSubtaskBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new subtask",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subtask"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/subtasks/{id}": {
      "patch": {
        "tags": [
          "Tasks"
        ],
        "operationId": "updateSubtask",
        "summary": "Update a subtask",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Subtask id"
            },
            "required": true,
            "description": "Subtask id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubtaskBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated subtask",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subtask"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tasks"
        ],
        "operationId": "deleteSubtask",
        "summary": "Delete a subtask",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Subtask id"
            },
            "required": true,
            "description": "Subtask id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/subtasks/{id}/complete": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "completeSubtask",
        "summary": "Complete a subtask",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Subtask id"
            },
            "required": true,
            "description": "Subtask id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The completed subtask",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subtask"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/subtasks/{id}/reopen": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "reopenSubtask",
        "summary": "Reopen a completed subtask",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Subtask id"
            },
            "required": true,
            "description": "Subtask id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The reopened subtask",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subtask"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/subtasks/{id}/restore": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "restoreSubtask",
        "summary": "Restore a deleted subtask",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Subtask id"
            },
            "required": true,
            "description": "Subtask id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored subtask",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subtask"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/{id}/attachments": {
      "post": {
        "tags": [
          "Attachments"
        ],
        "operationId": "addAttachment",
        "summary": "Attach an uploaded image to a task",
        "description": "Step 2 of the upload: first `POST /v1/attachments/upload-url` and upload the file to the returned URL, then call this with the same `id` and the returned `path` as `storagePath`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddAttachmentBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new attachment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attachment"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attachments/{id}": {
      "delete": {
        "tags": [
          "Attachments"
        ],
        "operationId": "deleteAttachment",
        "summary": "Delete an attachment",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Attachment id"
            },
            "required": true,
            "description": "Attachment id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attachments/{id}/restore": {
      "post": {
        "tags": [
          "Attachments"
        ],
        "operationId": "restoreAttachment",
        "summary": "Restore a deleted attachment",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Attachment id"
            },
            "required": true,
            "description": "Attachment id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored attachment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attachment"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use, or the change conflicts with the current state (`conflict`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/lists/{id}/invites": {
      "post": {
        "tags": [
          "Sharing"
        ],
        "operationId": "createInvite",
        "summary": "Create an invite link",
        "description": "Owners only. The response is the **only** one that contains the link (`url`) and its `token`: Muninlist keeps just a hash, so a lost link cannot be shown again (cancel it and make a new one). Anyone who has the link and a Muninlist account with a display name can join with the role the link grants (`editor` by default, or `viewer`; never `owner`). Links expire after 7 days by default (at most 30), a list can have 20 active links, and you can create 30 links per hour. Assistants and personal access tokens may create links for the lists they can use.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInviteBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new link, including its token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteCreated"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed (`forbidden`: your role on the list is too low), the list is outside the access token's or assistant's scope (`token_scope`, `agent_scope`), or you need a display name first (`name_required`: set it with `PATCH /v1/me`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A request with this `Idempotency-Key` was already applied (`conflict`). Only sent by `POST /v1/lists/{id}/invites`: the link cannot be shown twice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Sharing"
        ],
        "operationId": "listInvites",
        "summary": "List the active invite links",
        "description": "Owners only. Links that can still be used, newest first: role, expiry and how often they were used. Never the token or the link itself. Cancelled, expired and used-up links are left out.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The links",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed (`forbidden`: your role on the list is too low), the list is outside the access token's or assistant's scope (`token_scope`, `agent_scope`), or you need a display name first (`name_required`: set it with `PATCH /v1/me`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/invites/{id}": {
      "delete": {
        "tags": [
          "Sharing"
        ],
        "operationId": "revokeInvite",
        "summary": "Cancel an invite link",
        "description": "Works for list links and group links. List links: list owners only. Group links: the group owner and admins (assistants and tokens need access to all lists). A link you cannot manage reads as `404`. The link stops working at once; people who already joined stay. Cancelling a cancelled link succeeds.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Invite id"
            },
            "required": true,
            "description": "Invite id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Cancelled"
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed (`forbidden`: your role on the list is too low), the list is outside the access token's or assistant's scope (`token_scope`, `agent_scope`), or you need a display name first (`name_required`: set it with `PATCH /v1/me`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Sharing"
        ],
        "operationId": "previewInvite",
        "summary": "See what an invite link is for",
        "description": "**No authentication**, so a landing page can show it before sign-in. `id` is the link's token (`mli_...`). A link is for one list or for a whole group (`kind`). Shows the list or group name, the display name of the person who made the link, the role it grants (`editor` or `viewer` for a list, `member` for a group), when it expires and its `status`; never who is on the list or in the group. Unknown tokens are `404 not_found`. Limited to 60 requests per minute per client IP.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The invite token (`mli_...`)"
            },
            "required": true,
            "description": "The invite token (`mli_...`)",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The invite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitePreview"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/invites/{token}/accept": {
      "post": {
        "tags": [
          "Sharing"
        ],
        "operationId": "acceptInvite",
        "summary": "Join a list or group with an invite link",
        "description": "You need a display name first (`403 name_required`; set it with `PATCH /v1/me`). Accepting is safe to repeat: if you are already on the list or in the group your role is never lowered and no use of the link is spent (`alreadyMember: true`). A group link adds you as a `member`; it needs the group to have room (100 people) and its owner to have Premium (`403 premium_required`). The response carries the `list` or the `group` you joined. An expired, cancelled, used-up or deleted link answers `400 invalid_request`; a token that does not exist, `404`. You can accept 30 links per hour.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The invite token (`mli_...`)"
            },
            "required": true,
            "description": "The invite token (`mli_...`)",
            "name": "token",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "You are on the list or in the group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedInviteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed (`forbidden`: your role on the list is too low), the list is outside the access token's or assistant's scope (`token_scope`, `agent_scope`), or you need a display name first (`name_required`: set it with `PATCH /v1/me`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/lists/{id}/members": {
      "get": {
        "tags": [
          "Sharing"
        ],
        "operationId": "listMembers",
        "summary": "List the people on a list",
        "description": "Everyone on the list can see it (viewers too): user id, display name, avatar, role and when they joined. Never an email address. For a list of a group, this is everyone with access: people added to the list and the members of the group. `role` is the effective role (the higher of the two), `access` says how the person reaches the list (`direct`, `group` or `both`) and `groupRole` is their role in the group. Owners first.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The members",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/lists/{id}/members/{userId}": {
      "patch": {
        "tags": [
          "Sharing"
        ],
        "operationId": "updateMemberRole",
        "summary": "Change someone's role",
        "description": "Owners only (group owners and admins count as owners on a group list). Any owner can make others owners. This changes the role a person was given on the list itself: someone who has access only through the group is `404 not_found` here (change their group role instead). A personal list always keeps an owner: the last owner cannot be demoted, removed or leave (`invalid_request`). A list of a group may have no direct owner.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The member's user id (see `GET /v1/lists/{id}/members`). Your own id means leave."
            },
            "required": true,
            "description": "The member's user id (see `GET /v1/lists/{id}/members`). Your own id means leave.",
            "name": "userId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMemberRoleBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The member with the new role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Member"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed (`forbidden`: your role on the list is too low), the list is outside the access token's or assistant's scope (`token_scope`, `agent_scope`), or you need a display name first (`name_required`: set it with `PATCH /v1/me`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Sharing"
        ],
        "operationId": "removeMember",
        "summary": "Remove someone, or leave a list",
        "description": "Owners can remove anyone; with your own user id you leave the list (any role). Tasks assigned to the person on this list lose their assignee, and their assistants and tokens lose the list. Their tasks and comments stay. Only people added to the list itself can be removed here, not people who have access through a group (`404 not_found`). A personal list always keeps an owner: the last owner cannot be demoted, removed or leave (`invalid_request`). A list of a group may have no direct owner.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "List id"
            },
            "required": true,
            "description": "List id",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The member's user id (see `GET /v1/lists/{id}/members`). Your own id means leave."
            },
            "required": true,
            "description": "The member's user id (see `GET /v1/lists/{id}/members`). Your own id means leave.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed (`forbidden`: your role on the list is too low), the list is outside the access token's or assistant's scope (`token_scope`, `agent_scope`), or you need a display name first (`name_required`: set it with `PATCH /v1/me`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/groups": {
      "get": {
        "tags": [
          "Groups"
        ],
        "operationId": "listGroups",
        "summary": "List your groups",
        "description": "The groups you are in, by name, with your role, how many people and lists each has, and whether the owner still has Premium. Assistants and personal access tokens need access to all lists for this (`403 agent_scope` or `token_scope` otherwise): a group spans lists outside a narrowed scope.",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The groups",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: your role in the group is too low (`forbidden`), the credential is limited to selected lists (`agent_scope`, `token_scope`), you need a display name first (`name_required`: set it with `PATCH /v1/me`), or the group needs Premium for this (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Groups"
        ],
        "operationId": "createGroup",
        "summary": "Create a group",
        "description": "A group is a set of people who share all the group's lists, like a family or a team. You become its owner. Creating a group needs Premium (`403 premium_required`; the trial counts) and a display name (`403 name_required`). You can own 20 groups. People without Premium can still join a group. Send your own `id` so a retry never creates a second group: repeating the request with the same id and name answers the existing group. Assistants and personal access tokens need access to all lists for this (`403 agent_scope` or `token_scope` otherwise): a group spans lists outside a narrowed scope.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGroupBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Group"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: your role in the group is too low (`forbidden`), the credential is limited to selected lists (`agent_scope`, `token_scope`), you need a display name first (`name_required`: set it with `PATCH /v1/me`), or the group needs Premium for this (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use (`conflict`), or a request with this `Idempotency-Key` was already applied. Only `POST /v1/groups/{id}/invites` answers the second: the link cannot be shown twice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/groups/{id}": {
      "get": {
        "tags": [
          "Groups"
        ],
        "operationId": "getGroup",
        "summary": "Get a group",
        "description": "Any member can read it. A group you are not in is `404 not_found`. Assistants and personal access tokens need access to all lists for this (`403 agent_scope` or `token_scope` otherwise): a group spans lists outside a narrowed scope.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Group id"
            },
            "required": true,
            "description": "Group id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Group"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: your role in the group is too low (`forbidden`), the credential is limited to selected lists (`agent_scope`, `token_scope`), you need a display name first (`name_required`: set it with `PATCH /v1/me`), or the group needs Premium for this (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Groups"
        ],
        "operationId": "updateGroup",
        "summary": "Rename a group",
        "description": "The group owner and admins can rename it. Assistants and personal access tokens need access to all lists for this (`403 agent_scope` or `token_scope` otherwise): a group spans lists outside a narrowed scope.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Group id"
            },
            "required": true,
            "description": "Group id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGroupBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Group"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: your role in the group is too low (`forbidden`), the credential is limited to selected lists (`agent_scope`, `token_scope`), you need a display name first (`name_required`: set it with `PATCH /v1/me`), or the group needs Premium for this (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Groups"
        ],
        "operationId": "deleteGroup",
        "summary": "Delete a group",
        "description": "Owner only. Lists are never deleted with a group: every list of the group, the ones in the trash too, becomes your own personal list. The other members lose access to them, unless a list was also shared with them directly. Their tasks assigned to them there lose the assignee. The group, its memberships and its invite links are deleted for good. It fails with `400 invalid_request` when the lists would take you over the limit of 20 lists. Assistants and personal access tokens need access to all lists for this (`403 agent_scope` or `token_scope` otherwise): a group spans lists outside a narrowed scope.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Group id"
            },
            "required": true,
            "description": "Group id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: your role in the group is too low (`forbidden`), the credential is limited to selected lists (`agent_scope`, `token_scope`), you need a display name first (`name_required`: set it with `PATCH /v1/me`), or the group needs Premium for this (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/groups/{id}/members": {
      "get": {
        "tags": [
          "Groups"
        ],
        "operationId": "listGroupMembers",
        "summary": "List the people in a group",
        "description": "Any member can see it: user id, display name, avatar, role and when they joined. Never an email address. The owner first, then admins, then by when they joined. Assistants and personal access tokens need access to all lists for this (`403 agent_scope` or `token_scope` otherwise): a group spans lists outside a narrowed scope.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Group id"
            },
            "required": true,
            "description": "Group id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The members",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupMemberList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: your role in the group is too low (`forbidden`), the credential is limited to selected lists (`agent_scope`, `token_scope`), you need a display name first (`name_required`: set it with `PATCH /v1/me`), or the group needs Premium for this (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/groups/{id}/members/{userId}": {
      "patch": {
        "tags": [
          "Groups"
        ],
        "operationId": "updateGroupMemberRole",
        "summary": "Change someone's role in a group",
        "description": "Owner only. Use `admin` or `member` for anyone but the owner. Admins can rename the group, make and cancel invite links, remove members and manage the group's lists like an owner. `owner` hands the group over: that person (who must be a member with Premium, `403 premium_required`) becomes the owner and you become an admin. The owner's own role cannot be changed directly (`400 invalid_request`). Assistants and personal access tokens need access to all lists for this (`403 agent_scope` or `token_scope` otherwise): a group spans lists outside a narrowed scope.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Group id"
            },
            "required": true,
            "description": "Group id",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The member's user id (see `GET /v1/groups/{id}/members`). Your own id means leave."
            },
            "required": true,
            "description": "The member's user id (see `GET /v1/groups/{id}/members`). Your own id means leave.",
            "name": "userId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGroupMemberRoleBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The member with the new role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: your role in the group is too low (`forbidden`), the credential is limited to selected lists (`agent_scope`, `token_scope`), you need a display name first (`name_required`: set it with `PATCH /v1/me`), or the group needs Premium for this (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Groups"
        ],
        "operationId": "removeGroupMember",
        "summary": "Remove someone from a group, or leave",
        "description": "The owner can remove admins and members, admins can remove members. With your own user id you leave the group (any member except the owner, who hands the group over or deletes it: `400 invalid_request`). People who no longer reach a list of the group lose its tasks assigned to them there, and their assistants and tokens lose the list. Their tasks stay. Assistants and personal access tokens need access to all lists for this (`403 agent_scope` or `token_scope` otherwise): a group spans lists outside a narrowed scope.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Group id"
            },
            "required": true,
            "description": "Group id",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The member's user id (see `GET /v1/groups/{id}/members`). Your own id means leave."
            },
            "required": true,
            "description": "The member's user id (see `GET /v1/groups/{id}/members`). Your own id means leave.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: your role in the group is too low (`forbidden`), the credential is limited to selected lists (`agent_scope`, `token_scope`), you need a display name first (`name_required`: set it with `PATCH /v1/me`), or the group needs Premium for this (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/groups/{id}/invites": {
      "post": {
        "tags": [
          "Groups"
        ],
        "operationId": "createGroupInvite",
        "summary": "Create an invite link to a group",
        "description": "The group owner and admins can. The response is the **only** one that contains the link (`url`) and its `token`: Muninlist keeps just a hash, so a lost link cannot be shown again (cancel it and make a new one). Anyone who has the link and a Muninlist account with a display name joins as a `member`. Links expire after 7 days by default (at most 30), a group can have 20 active links and 100 people, and you can create 30 links per hour (lists and groups together). The group owner needs Premium (`403 premium_required`). People join with `POST /v1/invites/{token}/accept`. Assistants and personal access tokens need access to all lists for this (`403 agent_scope` or `token_scope` otherwise): a group spans lists outside a narrowed scope.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Group id"
            },
            "required": true,
            "description": "Group id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGroupInviteBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new link, including its token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupInviteCreated"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: your role in the group is too low (`forbidden`), the credential is limited to selected lists (`agent_scope`, `token_scope`), you need a display name first (`name_required`: set it with `PATCH /v1/me`), or the group needs Premium for this (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The id is already in use (`conflict`), or a request with this `Idempotency-Key` was already applied. Only `POST /v1/groups/{id}/invites` answers the second: the link cannot be shown twice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Groups"
        ],
        "operationId": "listGroupInvites",
        "summary": "List the active invite links of a group",
        "description": "The group owner and admins can. Links that can still be used, newest first. Never the token or the link itself. Cancel one with `DELETE /v1/invites/{id}`. Assistants and personal access tokens need access to all lists for this (`403 agent_scope` or `token_scope` otherwise): a group spans lists outside a narrowed scope.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Group id"
            },
            "required": true,
            "description": "Group id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The links",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupInviteList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: your role in the group is too low (`forbidden`), the credential is limited to selected lists (`agent_scope`, `token_scope`), you need a display name first (`name_required`: set it with `PATCH /v1/me`), or the group needs Premium for this (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/lists/{id}/move": {
      "post": {
        "tags": [
          "Groups"
        ],
        "operationId": "moveList",
        "summary": "Move a list into a group, out of it, or between groups",
        "description": "Send `{ \"groupId\": \"<group id>\" }` to move a personal list into a group, or `{ \"groupId\": null }` to move it out of its group. Into a group: only the person whose personal list it is can do it, they must be a member of the group, the group owner needs Premium and the group can have 20 lists. People the list was shared with directly keep their access. Out of a group: whoever may manage the list's sharing (group owner and admins) can do it; the list becomes that person's personal list and they become its owner. Group members who were not also added to the list lose access. A list can move from one group straight into another with the new group's id: whoever may manage the list's sharing (owner and admins of the current group) can do it if they are a member of the target group, whose owner needs Premium; people only in the old group lose access and people shared directly keep it. Moving a list to where it already is succeeds without a change. The answer is the list as you see it now. Assistants and personal access tokens need access to all lists for this (`403 agent_scope` or `token_scope` otherwise): a group spans lists outside a narrowed scope.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Group id"
            },
            "required": true,
            "description": "Group id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveListBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: your role in the group is too low (`forbidden`), the credential is limited to selected lists (`agent_scope`, `token_scope`), you need a display name first (`name_required`: set it with `PATCH /v1/me`), or the group needs Premium for this (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tokens": {
      "get": {
        "tags": [
          "Tokens"
        ],
        "operationId": "listTokens",
        "summary": "List your access tokens",
        "description": "Your personal access tokens that are not revoked, oldest first. The token value and its hash are never returned. **Signed-in session only:** personal access tokens and AI assistants get `403 session_required`, so a leaked token can never create more access.",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The tokens",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`), or the plan does not allow this scope (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tokens"
        ],
        "operationId": "createToken",
        "summary": "Create an access token",
        "description": "The response contains the token (`mlt_...`) **once**; Muninlist stores only a hash, so a lost token cannot be shown again. Scope `selected` limits the token to `listIds`; scope `all` needs Premium (or the trial). On the free plan a token can use one list. At most 20 active tokens per account. A token can do what an AI assistant can, on the lists it may use (including sharing and deleting lists), but it cannot manage tokens, devices or connections. **Signed-in session only:** personal access tokens and AI assistants get `403 session_required`, so a leaked token can never create more access.",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTokenBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new token, including its value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedApiToken"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`), or the plan does not allow this scope (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tokens/{id}": {
      "patch": {
        "tags": [
          "Tokens"
        ],
        "operationId": "updateToken",
        "summary": "Rename a token or change its lists",
        "description": "The token value does not change. Changing to scope `selected` needs `listIds`. **Signed-in session only:** personal access tokens and AI assistants get `403 session_required`, so a leaked token can never create more access.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Token id"
            },
            "required": true,
            "description": "Token id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTokenBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiToken"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`), or the plan does not allow this scope (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tokens"
        ],
        "operationId": "revokeToken",
        "summary": "Revoke a token",
        "description": "The token stops working at once. Revoking a revoked token succeeds. **Signed-in session only:** personal access tokens and AI assistants get `403 session_required`, so a leaked token can never create more access.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Token id"
            },
            "required": true,
            "description": "Token id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Revoked"
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`), or the plan does not allow this scope (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/devices": {
      "get": {
        "tags": [
          "Devices"
        ],
        "operationId": "listDevices",
        "summary": "List your device tokens",
        "description": "Your device tokens that are not revoked, oldest first (`lastUsedAt` shows which are in use). The token value and its hash are never returned. **Signed-in session only:** personal access tokens, device tokens and AI assistants get `403 session_required`, so a leaked token can never create more access.",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The devices",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Devices"
        ],
        "operationId": "createDevice",
        "summary": "Create a device token",
        "description": "A device token (`mld_...`) lets the Muninlist app on a device, such as its Android home-screen widget, call this API as you: all your lists, on any plan, shown as the app in the activity. The response contains the token **once**; Muninlist stores only a hash. Device tokens never expire. It cannot manage access tokens, devices (other than revoking itself), AI assistants, OAuth consent or the account. At most 10 active devices per account: creating another signs out the least recently used one. **Signed-in session only:** personal access tokens, device tokens and AI assistants get `403 session_required`, so a leaked token can never create more access.",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeviceBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new device token, including its value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedDevice"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/devices/{id}": {
      "delete": {
        "tags": [
          "Devices"
        ],
        "operationId": "revokeDevice",
        "summary": "Sign a device out",
        "description": "The device token stops working at once (its next request gets `401`). Revoking a revoked device succeeds. **Signed-in session, or the device token itself** (a device can revoke only its own id); every other credential gets `403 session_required`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Device id"
            },
            "required": true,
            "description": "Device id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Revoked"
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agent-connections": {
      "get": {
        "tags": [
          "Connected assistants"
        ],
        "operationId": "listAgentConnections",
        "summary": "List your connected assistants",
        "description": "The AI assistants you approved that are not disconnected, newest first. **Signed-in session only:** access tokens and AI assistants get `403 session_required`, so an assistant can never widen or restore its own access.",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The connections",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConnectionList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`), or the plan does not allow this scope (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/agent-connections/{id}": {
      "patch": {
        "tags": [
          "Connected assistants"
        ],
        "operationId": "updateAgentConnection",
        "summary": "Rename, pause or change the lists of a connected assistant",
        "description": "Changes apply to the assistant's next request. A paused assistant is refused until you resume it. Changing scope or lists is checked against your plan (`premium_required`); renaming and pausing are always allowed. **Signed-in session only:** access tokens and AI assistants get `403 session_required`, so an assistant can never widen or restore its own access.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Connection id"
            },
            "required": true,
            "description": "Connection id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAgentConnectionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentConnection"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`), or the plan does not allow this scope (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Connected assistants"
        ],
        "operationId": "revokeAgentConnection",
        "summary": "Disconnect an assistant",
        "description": "Revokes the connection and every access and refresh token it holds, at once. The assistant has to be approved again to reconnect. Disconnecting a disconnected assistant succeeds. **Signed-in session only:** access tokens and AI assistants get `403 session_required`, so an assistant can never widen or restore its own access.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Connection id"
            },
            "required": true,
            "description": "Connection id",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Disconnected"
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`), or the plan does not allow this scope (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/oauth/requests/{id}": {
      "get": {
        "tags": [
          "Connected assistants"
        ],
        "operationId": "getOAuthRequest",
        "summary": "Show an assistant waiting for approval",
        "description": "What the consent screen shows when an AI assistant asks to connect: its name, the host it will be sent back to, your current connection for it, and what your plan allows. Requests expire after 10 minutes. **Signed-in session only:** access tokens and AI assistants get `403 session_required`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "description": "The `request` value of the consent URL."
            },
            "required": true,
            "description": "The `request` value of the consent URL.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The pending request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthRequestDetails"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/oauth/requests/{id}/decision": {
      "post": {
        "tags": [
          "Connected assistants"
        ],
        "operationId": "decideOAuthRequest",
        "summary": "Approve or deny an assistant",
        "description": "Approving creates (or updates) your connection for this assistant with the chosen lists and returns the address to send the browser to, carrying a single-use code. Denying returns an address with `error=access_denied`. A request can be answered once; an answered or expired one is `410`. If the plan does not allow the choice (`premium_required`) the request stays open. **Signed-in session only:** access tokens and AI assistants get `403 session_required`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "description": "The `request` value of the consent URL."
            },
            "required": true,
            "description": "The `request` value of the consent URL.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthDecisionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Where to send the browser next",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthDecisionResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not a signed-in session (`session_required`), or the plan does not allow this choice (`premium_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is not visible to this token (`not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "410": {
            "description": "The request was already answered or has expired (`gone`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "getMe",
        "tags": [
          "Account"
        ],
        "summary": "Your profile and plan",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Profile and entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No profile",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateMe",
        "tags": [
          "Account"
        ],
        "summary": "Change your display name",
        "description": "Other members of a shared list see your display name and avatar, and nothing else (never your email address). The name is trimmed and must be 1 to 50 characters without control characters. Allowed for personal access tokens and AI assistants too. Returns the same body as `GET /v1/me`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated profile and plan",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name (`invalid_request`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteAccount",
        "tags": [
          "Account"
        ],
        "summary": "Delete the account (signed-in session only)",
        "description": "Deletes the account and all its data, immediately and for good. **Account security actions need a signed-in user session**: personal access tokens and AI assistant connections cannot call this endpoint (owner decision, so a leaked token can never close an account). Body: `{ \"confirm\": \"DELETE\" }`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "enum": [
                      "DELETE"
                    ]
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing confirmation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          },
          "500": {
            "description": "Data deleted but the account could not be closed; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Account deletion unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me/export": {
      "get": {
        "operationId": "exportAccount",
        "tags": [
          "Account"
        ],
        "summary": "Export all your data",
        "description": "Everything the account has in Muninlist (profile, lists, tasks, subtasks, attachments with signed download URLs, activity), as a JSON download. Limited to 5 per hour.",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The export (attachment download)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountExport"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/activity": {
      "get": {
        "operationId": "getActivity",
        "tags": [
          "Activity"
        ],
        "summary": "Activity feed",
        "description": "What happened in the accessible lists, newest first. Pass `nextCursor` back as `before`.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "description": "Default 50.",
              "minimum": 1,
              "maximum": 100
            },
            "required": false,
            "description": "Default 50.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": false,
            "name": "before",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityFeed"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/places/search": {
      "get": {
        "operationId": "searchPlaces",
        "tags": [
          "Places"
        ],
        "summary": "Search places",
        "description": "Place search for task locations. Limited to 30 per minute.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 200
            },
            "required": true,
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "`lat,lng` to bias results.",
              "example": "52.52,13.405"
            },
            "required": false,
            "description": "`lat,lng` to bias results.",
            "name": "near",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "description": "Default 5.",
              "minimum": 1,
              "maximum": 10
            },
            "required": false,
            "description": "Default 5.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching places",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "places": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Place"
                      }
                    }
                  },
                  "required": [
                    "places"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          },
          "502": {
            "description": "The place provider failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Place search is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/places/reverse": {
      "get": {
        "operationId": "reversePlace",
        "tags": [
          "Places"
        ],
        "summary": "Place at a coordinate",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "52.52"
            },
            "required": true,
            "name": "lat",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "13.405"
            },
            "required": true,
            "name": "lng",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The place, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "place": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Place"
                        },
                        {
                          "type": [
                            "object",
                            "null"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "place"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          },
          "502": {
            "description": "The place provider failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Place search is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attachments/upload-url": {
      "post": {
        "operationId": "createAttachmentUploadUrl",
        "tags": [
          "Attachments"
        ],
        "summary": "Get a signed upload URL for an image",
        "description": "Step 1 of adding an image: upload the bytes to the returned URL, then create the attachment row (the `addAttachment` mutation through the sync push endpoint). Limited to 60 per hour.",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "attachmentId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "mime": {
                    "type": "string",
                    "enum": [
                      "image/jpeg",
                      "image/png",
                      "image/webp",
                      "image/heic",
                      "image/heif"
                    ]
                  },
                  "sizeBytes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10485760
                  }
                },
                "required": [
                  "taskId",
                  "attachmentId",
                  "mime",
                  "sizeBytes"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed upload URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "string"
                    },
                    "uploadUrl": {
                      "type": "string"
                    },
                    "token": {
                      "type": "string"
                    },
                    "expiresInSeconds": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "path",
                    "uploadUrl",
                    "token",
                    "expiresInSeconds"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or storage limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          },
          "502": {
            "description": "Storage failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Storage is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/{id}/images": {
      "post": {
        "operationId": "addTaskImage",
        "tags": [
          "Attachments"
        ],
        "summary": "Add an image to a task in one step",
        "description": "Send the image itself (the request body is the file, `Content-Type` `image/jpeg`, `image/png`, `image/webp`, `image/heic` or `image/heif`, at most 10 MB) or JSON `{ \"url\": \"https://...\" }` and the API downloads it from that public address (private and internal addresses are refused, at most 3 redirects, 10 seconds). The type is detected from the bytes, not from the headers, and the dimensions are read where possible. Needs edit rights on the list; a task holds at most 20 images. Without `id`, the attachment id is derived from the `Idempotency-Key` header if given, so a retry answers the same attachment instead of adding a second one; otherwise it is a new UUID. Shares the upload allowance of `POST /v1/attachments/upload-url` (60 per hour).",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Task id"
            },
            "required": true,
            "description": "Task id",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddTaskImageUrlBody"
              }
            },
            "image/*": {
              "schema": {
                "type": "string",
                "format": "binary",
                "description": "The image file."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new attachment (or the existing one, on a retry)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attachment"
                }
              }
            }
          },
          "400": {
            "description": "Not an image, not downloadable, over a limit, or invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "413": {
            "description": "The image is larger than 10 MB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          },
          "502": {
            "description": "Storage failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Storage is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attachments/{id}/url": {
      "get": {
        "operationId": "getAttachmentUrl",
        "tags": [
          "Attachments"
        ],
        "summary": "Get a signed download URL for an image",
        "description": "Limited to 600 per hour.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Signed download URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "expiresInSeconds": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "url",
                    "expiresInSeconds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such attachment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          },
          "502": {
            "description": "Storage failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "Storage is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sync/push": {
      "post": {
        "operationId": "syncPush",
        "tags": [
          "Sync"
        ],
        "summary": "Apply a batch of mutations",
        "description": "Applies up to 100 mutations idempotently (by `mutationId`), each answered `ok` or `rejected`. Limited to 120 requests and 2,000 mutations per minute; a batch that does not fit is refused whole. The sync endpoints are the advanced change feed for integrations that keep a local copy of the data (what our own apps use); most integrations are simpler with the resource endpoints.",
        "security": [
          {
            "bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncPushRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One result per mutation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncPushResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sync/pull": {
      "get": {
        "operationId": "syncPull",
        "tags": [
          "Sync"
        ],
        "summary": "Changes since a cursor",
        "description": "Rows changed since `cursor` (start at 0, then pass the returned `cursor`; repeat while `hasMore`). 410 `cursor_expired` means the change log was pruned: fetch a snapshot and restart. Limited to 120 per minute together with the snapshot endpoint. The sync endpoints are the advanced change feed for integrations that keep a local copy of the data (what our own apps use); most integrations are simpler with the resource endpoints.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "description": "Default 0.",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "required": false,
            "description": "Default 0.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "description": "Default 500.",
              "minimum": 1,
              "maximum": 1000
            },
            "required": false,
            "description": "Default 500.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Changes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncPullResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "410": {
            "description": "`cursor_expired`: fetch a snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sync/snapshot": {
      "get": {
        "operationId": "syncSnapshot",
        "tags": [
          "Sync"
        ],
        "summary": "Full state",
        "description": "All accessible lists with their tasks, or only the lists given as repeated `listId` parameters. The sync endpoints are the advanced change feed for integrations that keep a local copy of the data (what our own apps use); most integrations are simpler with the resource endpoints.",
        "security": [
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 100
            },
            "required": false,
            "name": "listId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncSnapshotResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired bearer token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Not allowed: the list is outside the access token's scope (`token_scope`), the action is not available to tokens and agents, the token is not connected to an agent connection, or you need a display name first (`name_required`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the number of seconds in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string",
                  "description": "Seconds to wait.",
                  "example": "12"
                },
                "required": true,
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimited"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}
