{
  "openapi": "3.0.4",
  "info": {
    "title": "To-Done API",
    "description": "Record work that needs a human, and mark it done. Authenticate with a personal token from the Agents page: `Authorization: Bearer td_...` (or `X-Api-Key`). **Full** tokens can use every endpoint; **Mark-done-only** tokens can call just `POST /api/v1/todos/{id}/complete`. **Calendar-feed** tokens can fetch only the iCalendar feed. **Every identifier is a UUID string** (todos, notes, links, teams, tokens, invites); a path id that is not a UUID is a 404. Agents that speak MCP can use `/mcp` instead.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://www.to-done.online/"
    }
  ],
  "paths": {
    "/api/v1/auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Sign in and get a token (for native apps)",
        "description": "Exchanges email and password for a Full-access token, named after `deviceName`, to send as `Authorization: Bearer <token>`. The token acts in one team: `teamId` if you send one (you must belong to it: 403 otherwise), else your default team. The response says which. The token is revocable from the Connect page or with `DELETE /api/v1/auth/token`, and is shown only here. Failed attempts count towards the same lockout as the website (5 attempts, 15 minutes). **Two-factor:** if the account has it on, a correct password without `twoFactorCode` answers 401 with `twoFactorRequired: true`; ask for the code and send the same request again with `twoFactorCode` (the 6-digit code from the authenticator app, or a recovery code, which is then used up). A wrong code is 401 with `twoFactorRequired: true` again, and counts towards the lockout. 401 wrong email or password (or code), 403 email not yet confirmed, 429 locked out.",
        "operationId": "Login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/token": {
      "delete": {
        "tags": [
          "Auth"
        ],
        "summary": "Revoke the token you're calling with (sign out)",
        "description": "After this the token stops working everywhere. Works with any kind of token.",
        "operationId": "Logout",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/tokens": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Your signed-in devices",
        "description": "The caller's personal tokens (what each sign-in and each token made on the Connect page created), newest first, with when each was last used. `current` marks the token making this request. `signIn` is true for app sign-ins (made by `POST /api/v1/auth/login`), which expire after 90 days unused (each use pushes `expiresAt` out); other tokens were made on the Connect page and have a fixed `expiresAt`, or none. Expired and revoked tokens are not listed. Team tokens are never listed. Requires a full-access personal token.",
        "operationId": "ListMyTokens",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PersonalTokenDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/tokens/sign-out-others": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Sign out every other device",
        "description": "Revokes all of the caller's app sign-ins except the token making this request. Tokens made on the Connect page (agents, sites, calendar feeds) are not touched. Answers how many were signed out. Requires a full-access personal token.",
        "operationId": "SignOutOtherDevices",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedOutResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/tokens/{id}": {
      "delete": {
        "tags": [
          "Auth"
        ],
        "summary": "Sign a device out",
        "description": "Revokes one of your personal tokens by id (a UUID, from `GET /api/v1/auth/tokens`); it stops working at once. It may be the token you are calling with. Someone else's token, a team token and an unknown id are all 404. Requires a full-access personal token.",
        "operationId": "RevokeMyToken",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/me": {
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Delete your account",
        "description": "Permanently deletes the caller's account, with `{\"password\": \"...\"}` in the body to confirm. For each team you are in: if you are its only member, the team and all its data are deleted; if you are its only admin and it has other members, nothing is deleted and the answer is 409 asking you to hand over admin first; otherwise you leave it (your todos there become unassigned and your tokens for it are revoked; team tokens you made stay and become another admin's). Then your account, tokens and settings are deleted. 204 on success, after which every token you had stops working. 403 wrong password (counts towards the sign-in lockout), 409 you are the only admin of a team with other members, 503 a team that would be deleted has a paid subscription that couldn't be cancelled just now (nothing was deleted; try again). Requires a full-access personal token.",
        "operationId": "DeleteAccount",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccountRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The signed-in user",
        "description": "Identity, whether the email is confirmed, the timezone digests use, whether this server can send email, and the team (with your role) this token or session is acting in. Requires a Full token belonging to a person.",
        "operationId": "GetMe",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/switch-team": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Work in another of your teams",
        "description": "A token acts in one team. This issues a new personal token for `teamId` (you must be a member: otherwise 403) and revokes the token you called with, so the app swaps tokens and the old one stops working. `deviceName` defaults to the old token's name. Requires a full-access personal token.",
        "operationId": "SwitchTeam",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchTeamRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/info": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "What this server supports",
        "description": "No authentication needed, and deliberately not versioned: it is how a client finds out which versions to use, and it keeps answering even after an old version is retired. `supportedVersions` lists the path versions this server serves (`/api/v1`, ...); pick the newest one you understand. `apiVersion` is the newest as a number. `features` lists capabilities within a version (new ones are only ever added, so a client should treat an unknown name as ignorable and a missing one as 'this server is older'); `emailEnabled` says whether the server can send email; `serverVersion` is the build the server is running.",
        "operationId": "GetInfo",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InfoResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/info": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "What this server supports (versioned path)",
        "description": "The same answer as `GET /api/info`, under `/api/v1`. Prefer `/api/info` for discovery, because it is never retired.",
        "operationId": "GetInfoV1",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InfoResponse"
                }
              }
            }
          }
        }
      }
    },
    "/calendar/{token}.ics": {
      "get": {
        "tags": [
          "Calendar"
        ],
        "summary": "Subscribable iCalendar feed",
        "description": "Planned todos as events and outstanding deadlines as tasks, for subscribing from Google Calendar, Apple Calendar, Outlook and the like. The {token} is a Calendar-feed token from the Agents page; it grants read access to this feed only. Unknown or revoked tokens get 404.",
        "operationId": "CalendarFeed",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/calendar": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/api/v1/todos/{id}/complete": {
      "post": {
        "tags": [
          "Todos"
        ],
        "summary": "Mark a todo done",
        "description": "Marks the todo Done, optionally adding a note credited to the calling token. Idempotent: completing an already-done todo returns it unchanged, so webhook retries are safe. Accepts a Full or Mark-done-only token. Returns 404 if the todo doesn't exist or belongs to someone else.",
        "operationId": "CompleteTodo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteTodoRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos/complete-by-ref": {
      "post": {
        "tags": [
          "Todos"
        ],
        "summary": "Mark a todo done by your own reference",
        "description": "Like completing by id, but looked up by the `externalId` you supplied when creating it. Idempotent. Accepts a Full or Mark-done-only token. 404 if you have no todo with that reference.",
        "operationId": "CompleteTodoByReference",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteByRefRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/settings": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Notification settings",
        "description": "Everything on the website's Settings page. The Discord webhook is a secret and is never returned, only whether one is saved and its masked tail. Requires a Full token.",
        "operationId": "GetSettings",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsDto"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Settings"
        ],
        "summary": "Change notification settings",
        "description": "Partial update: only the fields you send change. Enum fields are names (`Weekly`, `Monday`, `High`). `discordWebhook` sets the webhook (only real Discord webhook URLs are accepted); `removeDiscordWebhook` clears it; `clearQuietHours` removes quiet hours. Returns the full settings. Requires a Full token.",
        "operationId": "UpdateSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/settings/test/email": {
      "post": {
        "tags": [
          "Settings"
        ],
        "summary": "Send a test email",
        "description": "Sends a test message to the account's email address. Overrides a paused channel: a successful test resumes it. Requires a Full token.",
        "operationId": "TestEmail",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/settings/test/discord": {
      "post": {
        "tags": [
          "Settings"
        ],
        "summary": "Send a test message to Discord",
        "description": "Posts a test message to the saved webhook. Overrides a paused channel: a successful test resumes it. Requires a Full token.",
        "operationId": "TestDiscord",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/settings/digest-now": {
      "post": {
        "tags": [
          "Settings"
        ],
        "summary": "Send a digest now",
        "description": "A preview of the digest, sent to every channel that's set up. It doesn't affect the schedule. Requires a Full token.",
        "operationId": "SendDigestNow",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/teams": {
      "get": {
        "tags": [
          "Teams"
        ],
        "summary": "Your teams",
        "description": "Every team you belong to, with your role (`Admin` or `Member`) in it. `active` marks the one this token or session is acting in. To work in another, call `POST /api/v1/auth/switch-team`. Requires a Full token belonging to a person.",
        "operationId": "ListTeams",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TeamDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/team": {
      "get": {
        "tags": [
          "Teams"
        ],
        "summary": "The team you are acting in",
        "description": "Its id, name, `plan` (`free` until billing exists), your role in it (`Admin` or `Member`), the plan's `limits` and what the team currently uses (`usage`). At a limit, creating that kind of thing answers 402 with a message that says which. Managing the team (invites, roles, removing people, renaming, deleting) is on the website for now. Requires a Full token belonging to a person.",
        "operationId": "GetTeam",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamDetailDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/team/members": {
      "get": {
        "tags": [
          "Teams"
        ],
        "summary": "The people in the team",
        "description": "Every member of the team you are acting in, oldest first, with their role. Any member can read it (use it to pick an assignee). Requires a Full token belonging to a person.",
        "operationId": "ListTeamMembers",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MemberDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/export": {
      "get": {
        "tags": [
          "Teams"
        ],
        "summary": "Download the team's data",
        "description": "Every todo in the team you are acting in, as JSON: `{version, exportedAt, team: {id, name, plan}, todos: [...]}`. Each todo has the same shape as `GET /api/v1/todos/{id}`: its fields, `links`, `notes` (author, text, time), `dependsOn` and `blocking`, assignee, and every status including Done. Only an admin of the team can export it (403 otherwise). Requires a Full token belonging to a person.",
        "operationId": "ExportTeam",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamExport"
                }
              }
            }
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos/{id}/event.ics": {
      "get": {
        "tags": [
          "Calendar"
        ],
        "summary": "Download a scheduled todo as an .ics event",
        "description": "For adding one planned todo to any calendar app. The todo must be scheduled and assigned to you (anything else is 404). Requires a Full token.",
        "operationId": "TodoCalendarEvent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/calendar": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos": {
      "get": {
        "tags": [
          "Todos"
        ],
        "summary": "List and filter todos",
        "description": "Defaults to outstanding items (Open and InProgress), most urgent first. All filters combine with AND. `status` is a comma-separated list of Open, InProgress, Done, Dismissed. `dueBefore` is exclusive and `dueAfter` inclusive (likewise for `scheduledBefore`/`scheduledAfter`); items with no due date, estimate or schedule never match a bound on that field. `overdue` means past due and still outstanding. `sort` is Priority (default), Due, Scheduled or Shortest. `updatedAfter` and `completedAfter` answer \"what changed since I last looked?\": `completedAfter` defaults the status filter to Done and Dismissed. `blocked=true` is todos waiting on an unfinished todo, `blocked=false` is the ones ready to do. `assignee` is `me`, `unassigned` (anyone in the team can claim these) or a team member's email; leave it out to see the whole team's list. Page with `limit` (max 200) and `offset`; the `X-Total-Count` response header says how many todos match in all. Requires a Full token.",
        "operationId": "ListTodos",
        "parameters": [
          {
            "name": "Status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Project",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Priority",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "DueBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "DueAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Overdue",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "HasDueDate",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "MinMinutes",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "MaxMinutes",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "HasEstimate",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Scheduled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "ScheduledBefore",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ScheduledAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UpdatedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "CompletedAfter",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Blocked",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Assignee",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TodoDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Todos"
        ],
        "summary": "Record work for the human",
        "description": "Creates a todo. `priority` is one of Low, Normal, High, Urgent. `estimateMinutes` is the human's time, 1 to 43200. Links must be absolute http(s) URLs. `createdBy` defaults to the token's name. Send your own `externalId` (a ticket or job id) to make this idempotent: if you already created a todo with that reference, it is returned unchanged with 200 instead of creating a duplicate (201 means newly created). `dependsOn` (todo ids, which are UUIDs) and `dependsOnExternalIds` make the new todo wait for those todos (see POST /api/v1/todos/{id}/dependencies). `assignee` is a team member's email; leave it out and the todo goes to the token's default assignee (a person's own tokens assign to them, a team token to whoever its admin chose, or nobody). `unassigned: true` leaves it for anyone in the team to claim. 402 means the team already has as many open todos as its plan allows (see `GET /api/v1/team`). Requires a Full token.",
        "operationId": "CreateTodo",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTodoRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos/{id}": {
      "get": {
        "tags": [
          "Todos"
        ],
        "summary": "Get one todo",
        "description": "Includes links and notes. Requires a Full token.",
        "operationId": "GetTodo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Todos"
        ],
        "summary": "Edit a todo",
        "description": "Partial update: fields you leave out are unchanged. An empty string clears `details` or `project`; `estimateMinutes: 0` clears the estimate; `clearDueDate: true` removes the due date. `assignee` (a team member's email) assigns it and `clearAssignee: true` unassigns it. Status, schedule, notes and dependencies have their own endpoints. Requires a Full token.",
        "operationId": "UpdateTodo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTodoRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos/by-ref": {
      "get": {
        "tags": [
          "Todos"
        ],
        "summary": "Get a todo by your own reference",
        "description": "Looks up the todo you created with this `externalId`. Requires a Full token.",
        "operationId": "GetTodoByReference",
        "parameters": [
          {
            "name": "externalId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos/{id}/dependencies": {
      "post": {
        "tags": [
          "Dependencies"
        ],
        "summary": "Make a todo wait for another",
        "description": "Todo `id` becomes blocked until the other todo is Done or Dismissed. Identify the other one by `dependsOnId` or `dependsOnExternalId`. Adding an existing dependency is a no-op. A todo can't depend on itself, on something that already depends on it (directly or through others), or on more than 25 others. Blocking is advisory: a blocked todo can still be completed. Requires a Full token.",
        "operationId": "AddTodoDependency",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDependencyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos/{id}/dependencies/{dependsOnId}": {
      "delete": {
        "tags": [
          "Dependencies"
        ],
        "summary": "Stop a todo waiting for another",
        "description": "Removes the dependency; removing one that doesn't exist is a no-op. Returns the updated todo. Requires a Full token.",
        "operationId": "RemoveTodoDependency",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dependsOnId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos/{id}/schedule": {
      "post": {
        "tags": [
          "Todos"
        ],
        "summary": "Plan when to do a todo",
        "description": "Sets the planned start (ISO 8601). It blocks out the todo's estimate on the calendar, or 30 minutes if it has none. Send `{\"startAt\": null}` to unschedule. Scheduling an unassigned todo assigns it to the person who scheduled it. Requires a Full token.",
        "operationId": "ScheduleTodo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/summary": {
      "get": {
        "tags": [
          "Todos"
        ],
        "summary": "Counts and outstanding time",
        "description": "Counts by status, plus total outstanding human time by project and priority, for the whole team. `assignee` (`me`, `unassigned` or a member's email) narrows it to one person's share or to the unclaimed work. Requires a Full token.",
        "operationId": "Summarize",
        "parameters": [
          {
            "name": "assignee",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SummaryDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos/{id}/status": {
      "post": {
        "tags": [
          "Todos"
        ],
        "summary": "Set a todo's status",
        "description": "`status` is one of Open, InProgress, Done, Dismissed. Requires a Full token.",
        "operationId": "SetTodoStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos/{id}/claim": {
      "post": {
        "tags": [
          "Todos"
        ],
        "summary": "Take an unassigned todo",
        "description": "Assigns the todo to you. Idempotent if it is already yours. 409 if it is assigned to someone else (use assign to hand it over). A team token isn't a person and can't claim: it gets 400. Requires a Full token.",
        "operationId": "ClaimTodo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos/{id}/assign": {
      "post": {
        "tags": [
          "Todos"
        ],
        "summary": "Give a todo to a teammate, or unassign it",
        "description": "`assignee` is a team member's email, or null to unassign it so anyone can claim it. The person must belong to the todo's team (400 otherwise). Whoever it is handed to gets the usual new-todo alert. Requires a Full token.",
        "operationId": "AssignTodo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/todos/{id}/notes": {
      "post": {
        "tags": [
          "Todos"
        ],
        "summary": "Add a note",
        "description": "Appends a note credited to the calling token. Send an optional `clientId` (up to 64 characters, e.g. a UUID the app makes) to make a retry safe: a second request with the same `clientId` on the same todo adds nothing and returns the todo as it is. Requires a Full token.",
        "operationId": "AddTodoNote",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddNoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodoDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked token."
          },
          "403": {
            "description": "The token is mark-done-only; this endpoint needs a Full token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ActionResponse": {
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "AddDependencyRequest": {
        "required": [
          "dependsOnId",
          "dependsOnExternalId"
        ],
        "type": "object",
        "properties": {
          "dependsOnId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "dependsOnExternalId": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AddNoteRequest": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "clientId": {
            "type": "string",
            "default": null,
            "nullable": true
          }
        }
      },
      "AssignRequest": {
        "required": [
          "assignee"
        ],
        "type": "object",
        "properties": {
          "assignee": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CompleteByRefRequest": {
        "required": [
          "externalId",
          "note"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string"
          },
          "note": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CompleteTodoRequest": {
        "required": [
          "note"
        ],
        "type": "object",
        "properties": {
          "note": {
            "type": "string",
            "nullable": true
          }
        },
        "nullable": true
      },
      "CreateTodoRequest": {
        "required": [
          "title",
          "details",
          "estimateMinutes",
          "priority",
          "dueAt",
          "project",
          "createdBy",
          "links",
          "scheduledAt",
          "externalId",
          "dependsOn",
          "dependsOnExternalIds",
          "assignee",
          "unassigned"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "details": {
            "type": "string",
            "nullable": true
          },
          "estimateMinutes": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "priority": {
            "enum": [
              "Low",
              "Normal",
              "High",
              "Urgent"
            ],
            "type": "string",
            "nullable": true
          },
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "project": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkInput"
            },
            "nullable": true
          },
          "scheduledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "dependsOn": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "dependsOnExternalIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "assignee": {
            "type": "string",
            "nullable": true
          },
          "unassigned": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "DeleteAccountRequest": {
        "required": [
          "password"
        ],
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "nullable": true
          }
        },
        "nullable": true
      },
      "DependencyDto": {
        "required": [
          "id",
          "title",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "enum": [
              "Open",
              "InProgress",
              "Done",
              "Dismissed"
            ],
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "required": [
          "error"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "ExportTeam": {
        "required": [
          "id",
          "name",
          "plan"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          }
        }
      },
      "InfoResponse": {
        "required": [
          "name",
          "apiVersion",
          "supportedVersions",
          "features",
          "emailEnabled",
          "serverVersion"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "apiVersion": {
            "type": "integer",
            "format": "int32"
          },
          "supportedVersions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "emailEnabled": {
            "type": "boolean"
          },
          "serverVersion": {
            "type": "string"
          }
        }
      },
      "LinkDto": {
        "required": [
          "id",
          "url",
          "label"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string"
          },
          "label": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "LinkInput": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "label": {
            "type": "string",
            "default": null,
            "nullable": true
          }
        }
      },
      "LoginErrorResponse": {
        "required": [
          "error"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "twoFactorRequired": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "LoginRequest": {
        "required": [
          "email",
          "password",
          "deviceName"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          },
          "deviceName": {
            "type": "string",
            "nullable": true
          },
          "teamId": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "twoFactorCode": {
            "type": "string",
            "default": null,
            "nullable": true
          }
        }
      },
      "LoginResponse": {
        "required": [
          "token",
          "tokenId",
          "name",
          "user",
          "team"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "tokenId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/UserSummary"
          },
          "team": {
            "$ref": "#/components/schemas/TeamSummary"
          }
        }
      },
      "MemberDto": {
        "required": [
          "id",
          "email",
          "role",
          "joinedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MeResponse": {
        "required": [
          "id",
          "email",
          "emailConfirmed",
          "timeZone",
          "emailAvailable"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "emailConfirmed": {
            "type": "boolean"
          },
          "timeZone": {
            "type": "string"
          },
          "emailAvailable": {
            "type": "boolean"
          },
          "team": {
            "$ref": "#/components/schemas/TeamSummary2"
          }
        }
      },
      "NoteDto": {
        "required": [
          "id",
          "author",
          "text",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "author": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "clientId": {
            "type": "string",
            "default": null,
            "nullable": true
          }
        }
      },
      "PersonalTokenDto": {
        "required": [
          "id",
          "name",
          "prefix",
          "scope",
          "teamId",
          "createdAt",
          "lastUsedAt",
          "current"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "teamId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "current": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "default": null,
            "nullable": true
          },
          "signIn": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "PlanLimits": {
        "required": [
          "openTodos",
          "members",
          "activeTokens",
          "pendingInvites"
        ],
        "type": "object",
        "properties": {
          "openTodos": {
            "type": "integer",
            "format": "int32"
          },
          "members": {
            "type": "integer",
            "format": "int32"
          },
          "activeTokens": {
            "type": "integer",
            "format": "int32"
          },
          "pendingInvites": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "PlanUsage": {
        "required": [
          "openTodos",
          "members",
          "activeTokens",
          "pendingInvites"
        ],
        "type": "object",
        "properties": {
          "openTodos": {
            "type": "integer",
            "format": "int32"
          },
          "members": {
            "type": "integer",
            "format": "int32"
          },
          "activeTokens": {
            "type": "integer",
            "format": "int32"
          },
          "pendingInvites": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ScheduleRequest": {
        "required": [
          "startAt"
        ],
        "type": "object",
        "properties": {
          "startAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "SetStatusRequest": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "Open",
              "InProgress",
              "Done",
              "Dismissed"
            ],
            "type": "string"
          }
        }
      },
      "SettingsDto": {
        "required": [
          "timeZone",
          "notifyMinPriority",
          "quietStartHour",
          "quietEndHour",
          "reminderLeadMinutes",
          "digestDay",
          "digestHour",
          "digestSkipWhenEmpty",
          "emailAvailable",
          "emailNewTodos",
          "emailReminders",
          "emailOverdue",
          "emailDigest",
          "emailLastError",
          "emailPaused",
          "discordConfigured",
          "discordWebhookMasked",
          "discordNewTodos",
          "discordReminders",
          "discordOverdue",
          "discordDigest",
          "discordLastError",
          "discordPaused"
        ],
        "type": "object",
        "properties": {
          "timeZone": {
            "type": "string"
          },
          "notifyMinPriority": {
            "enum": [
              "Low",
              "Normal",
              "High",
              "Urgent"
            ],
            "type": "string"
          },
          "quietStartHour": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "quietEndHour": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "reminderLeadMinutes": {
            "type": "integer",
            "format": "int32"
          },
          "digestDay": {
            "enum": [
              "Sunday",
              "Monday",
              "Tuesday",
              "Wednesday",
              "Thursday",
              "Friday",
              "Saturday"
            ],
            "type": "string"
          },
          "digestHour": {
            "type": "integer",
            "format": "int32"
          },
          "digestSkipWhenEmpty": {
            "type": "boolean"
          },
          "emailAvailable": {
            "type": "boolean"
          },
          "emailNewTodos": {
            "type": "boolean"
          },
          "emailReminders": {
            "type": "boolean"
          },
          "emailOverdue": {
            "type": "boolean"
          },
          "emailDigest": {
            "enum": [
              "Off",
              "Daily",
              "Weekly"
            ],
            "type": "string"
          },
          "emailLastError": {
            "type": "string",
            "nullable": true
          },
          "emailPaused": {
            "type": "boolean"
          },
          "discordConfigured": {
            "type": "boolean"
          },
          "discordWebhookMasked": {
            "type": "string",
            "nullable": true
          },
          "discordNewTodos": {
            "type": "boolean"
          },
          "discordReminders": {
            "type": "boolean"
          },
          "discordOverdue": {
            "type": "boolean"
          },
          "discordDigest": {
            "enum": [
              "Off",
              "Daily",
              "Weekly"
            ],
            "type": "string"
          },
          "discordLastError": {
            "type": "string",
            "nullable": true
          },
          "discordPaused": {
            "type": "boolean"
          }
        }
      },
      "SettingsUpdate": {
        "type": "object",
        "properties": {
          "timeZone": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "notifyMinPriority": {
            "enum": [
              "Low",
              "Normal",
              "High",
              "Urgent"
            ],
            "type": "string",
            "default": null,
            "nullable": true
          },
          "quietStartHour": {
            "type": "integer",
            "format": "int32",
            "default": null,
            "nullable": true
          },
          "quietEndHour": {
            "type": "integer",
            "format": "int32",
            "default": null,
            "nullable": true
          },
          "clearQuietHours": {
            "type": "boolean",
            "default": null,
            "nullable": true
          },
          "reminderLeadMinutes": {
            "type": "integer",
            "format": "int32",
            "default": null,
            "nullable": true
          },
          "digestDay": {
            "enum": [
              "Sunday",
              "Monday",
              "Tuesday",
              "Wednesday",
              "Thursday",
              "Friday",
              "Saturday"
            ],
            "type": "string",
            "default": null,
            "nullable": true
          },
          "digestHour": {
            "type": "integer",
            "format": "int32",
            "default": null,
            "nullable": true
          },
          "digestSkipWhenEmpty": {
            "type": "boolean",
            "default": null,
            "nullable": true
          },
          "emailNewTodos": {
            "type": "boolean",
            "default": null,
            "nullable": true
          },
          "emailReminders": {
            "type": "boolean",
            "default": null,
            "nullable": true
          },
          "emailOverdue": {
            "type": "boolean",
            "default": null,
            "nullable": true
          },
          "emailDigest": {
            "enum": [
              "Off",
              "Daily",
              "Weekly"
            ],
            "type": "string",
            "default": null,
            "nullable": true
          },
          "discordWebhook": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "removeDiscordWebhook": {
            "type": "boolean",
            "default": null,
            "nullable": true
          },
          "discordNewTodos": {
            "type": "boolean",
            "default": null,
            "nullable": true
          },
          "discordReminders": {
            "type": "boolean",
            "default": null,
            "nullable": true
          },
          "discordOverdue": {
            "type": "boolean",
            "default": null,
            "nullable": true
          },
          "discordDigest": {
            "enum": [
              "Off",
              "Daily",
              "Weekly"
            ],
            "type": "string",
            "default": null,
            "nullable": true
          }
        }
      },
      "SignedOutResponse": {
        "required": [
          "signedOut"
        ],
        "type": "object",
        "properties": {
          "signedOut": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "SummaryDto": {
        "required": [
          "countByStatus",
          "outstandingCount",
          "outstandingEstimateMinutes",
          "outstandingEstimate",
          "outstandingWithoutEstimate",
          "outstandingMinutesByProject",
          "outstandingCountByPriority"
        ],
        "type": "object",
        "properties": {
          "countByStatus": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "outstandingCount": {
            "type": "integer",
            "format": "int32"
          },
          "outstandingEstimateMinutes": {
            "type": "integer",
            "format": "int32"
          },
          "outstandingEstimate": {
            "type": "string"
          },
          "outstandingWithoutEstimate": {
            "type": "integer",
            "format": "int32"
          },
          "outstandingMinutesByProject": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "outstandingCountByPriority": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      },
      "SwitchTeamRequest": {
        "required": [
          "teamId",
          "deviceName"
        ],
        "type": "object",
        "properties": {
          "teamId": {
            "type": "string",
            "nullable": true
          },
          "deviceName": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "TeamDetailDto": {
        "required": [
          "id",
          "name",
          "plan",
          "role",
          "limits",
          "usage"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "limits": {
            "$ref": "#/components/schemas/PlanLimits"
          },
          "usage": {
            "$ref": "#/components/schemas/PlanUsage"
          }
        }
      },
      "TeamDto": {
        "required": [
          "id",
          "name",
          "role",
          "active"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "TeamExport": {
        "required": [
          "version",
          "exportedAt",
          "team",
          "todos"
        ],
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "exportedAt": {
            "type": "string",
            "format": "date-time"
          },
          "team": {
            "$ref": "#/components/schemas/ExportTeam"
          },
          "todos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TodoDto"
            }
          }
        }
      },
      "TeamSummary": {
        "required": [
          "id",
          "name",
          "role"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "TeamSummary2": {
        "required": [
          "id",
          "name",
          "role"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "default": null,
        "nullable": true
      },
      "TodoDto": {
        "required": [
          "id",
          "title",
          "details",
          "status",
          "priority",
          "estimateMinutes",
          "estimate",
          "dueAt",
          "scheduledStart",
          "scheduledEnd",
          "externalId",
          "project",
          "createdBy",
          "createdAt",
          "updatedAt",
          "completedAt",
          "links",
          "notes",
          "blocked",
          "dependsOn",
          "blocking"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "details": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "enum": [
              "Open",
              "InProgress",
              "Done",
              "Dismissed"
            ],
            "type": "string"
          },
          "priority": {
            "enum": [
              "Low",
              "Normal",
              "High",
              "Urgent"
            ],
            "type": "string"
          },
          "estimateMinutes": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "estimate": {
            "type": "string",
            "nullable": true
          },
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "scheduledStart": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "scheduledEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "project": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkDto"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NoteDto"
            }
          },
          "blocked": {
            "type": "boolean"
          },
          "dependsOn": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DependencyDto"
            }
          },
          "blocking": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DependencyDto"
            }
          },
          "assigneeId": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "assigneeEmail": {
            "type": "string",
            "default": null,
            "nullable": true
          }
        }
      },
      "UpdateTodoRequest": {
        "required": [
          "title",
          "details",
          "estimateMinutes",
          "priority",
          "dueAt",
          "clearDueDate",
          "project",
          "assignee",
          "clearAssignee"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "details": {
            "type": "string",
            "nullable": true
          },
          "estimateMinutes": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "priority": {
            "enum": [
              "Low",
              "Normal",
              "High",
              "Urgent"
            ],
            "type": "string",
            "nullable": true
          },
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "clearDueDate": {
            "type": "boolean",
            "nullable": true
          },
          "project": {
            "type": "string",
            "nullable": true
          },
          "assignee": {
            "type": "string",
            "nullable": true
          },
          "clearAssignee": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "UserSummary": {
        "required": [
          "id",
          "email"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "Create tokens on the Agents page. Shown once when created.",
        "scheme": "bearer",
        "bearerFormat": "td_ personal access token"
      }
    }
  },
  "tags": [
    {
      "name": "Auth"
    },
    {
      "name": "Account"
    },
    {
      "name": "Calendar"
    },
    {
      "name": "Todos"
    },
    {
      "name": "Settings"
    },
    {
      "name": "Teams"
    },
    {
      "name": "Dependencies"
    }
  ]
}