{
  "openapi": "3.1.0",
  "info": {
    "title": "YoAgent API",
    "version": "0.1.0"
  },
  "paths": {
    "/v0/me": {
      "get": {
        "tags": [
          "me"
        ],
        "summary": "Me",
        "description": "The signed-in person (if any) and their organization.",
        "operationId": "getMe",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v0/projects": {
      "get": {
        "tags": [
          "projects"
        ],
        "summary": "List Projects",
        "description": "List the projects the caller's access shows, in their hand-made order, with what it may do in each.",
        "operationId": "listProjects",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "projects"
        ],
        "summary": "Create Project",
        "description": "Create a project (within the plan's limit of projects, and with room for its ``test@`` under the limit of\ninboxes) with its own mail subdomain, ``test@`` and a catch-all, turned on when the plan has it.",
        "operationId": "createProject",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectOut"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v0/projects/order": {
      "put": {
        "tags": [
          "projects"
        ],
        "summary": "Reorder Projects",
        "description": "Put the projects you see in a new order: each of their ids once, first to last (a changed list is refused; the\nothers keep their places).",
        "operationId": "reorderProjects",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectOrder"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v0/projects/{project_id}": {
      "patch": {
        "tags": [
          "projects"
        ],
        "summary": "Update Project",
        "description": "Change a project's settings: only the fields sent — name, short description, picture and the paid settings\n(catch-all, auto-create, plus addresses: turning one on needs the plan's feature); its subdomain stays.",
        "operationId": "updateProject",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "projects"
        ],
        "summary": "Delete Project",
        "description": "Delete a project with its subdomain, inboxes, mail and webhooks (an organization keeps one); it leaves every\naccess that named it, and a key left reaching nothing is revoked.",
        "operationId": "deleteProject",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/api-keys": {
      "get": {
        "tags": [
          "api-keys"
        ],
        "summary": "List Api Keys",
        "description": "List API keys, newest first (without secrets: one key's own answer gives its maker the secret): every key for\nowners and admins, else one's own; ``project_id`` keeps the keys that reach that project.",
        "operationId": "listApiKeys",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The next_page_token of the previous page"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "name": "inbox_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Inbox Id"
            }
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Active"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyList"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/domains": {
      "get": {
        "tags": [
          "domains"
        ],
        "summary": "List Domains",
        "description": "List the organization's mail domains (each project's shared subdomain and its custom domains), newest first;\n``project_id``, ``kind`` and ``status`` narrow it.",
        "operationId": "listDomains",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The next_page_token of the previous page"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DomainKind"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DomainStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainList"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "post": {
        "tags": [
          "domains"
        ],
        "summary": "Create Domain",
        "description": "Add a custom domain (a root or a subdomain) to a project. Add its ``records`` at the domain's DNS host (or\nimport ``zone_file``): it is verified once they are found, read at once, then after 1, 5 and 15 minutes and every\nhour for three days (or now: ``POST /v0/domains/{domain_id}/verify``).",
        "operationId": "createDomain",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/domains/{domain_id}": {
      "get": {
        "tags": [
          "domains"
        ],
        "summary": "Get Domain",
        "description": "Get a domain with the DNS records it needs and which of them were found.",
        "operationId": "getDomain",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^dom_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Domain Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "domains"
        ],
        "summary": "Update Domain",
        "description": "Turn a custom domain's sending on or off (the domain verified). On: its DKIM records show in its\n``records`` a moment later (not yet in this answer); it sends once SES finds them (``sending_status``).",
        "operationId": "updateDomain",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^dom_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Domain Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "domains"
        ],
        "summary": "Delete Domain",
        "description": "Delete a custom domain with its inboxes and all their mail.",
        "operationId": "deleteDomain",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^dom_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Domain Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/domains/{domain_id}/verify": {
      "post": {
        "tags": [
          "domains"
        ],
        "summary": "Verify Domain",
        "description": "Read a custom domain's DNS records now (at most every 30 seconds): verified once they are all there.",
        "operationId": "verifyDomain",
        "parameters": [
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^dom_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Domain Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/inboxes": {
      "get": {
        "tags": [
          "inboxes"
        ],
        "summary": "List Inboxes",
        "description": "List the organization's inboxes, newest first; ``project_id`` narrows it to one project, ``is_catch_all`` to\nthe catch-all inboxes or to the others, ``search`` to those whose address or display name holds it.",
        "operationId": "listInboxes",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The next_page_token of the previous page"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "name": "is_catch_all",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Catch All"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxList"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "post": {
        "tags": [
          "inboxes"
        ],
        "summary": "Create Inbox",
        "description": "Create an inbox (random username and the shared subdomain unless given).",
        "operationId": "createInbox",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InboxCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/inboxes/delete": {
      "post": {
        "tags": [
          "inboxes"
        ],
        "summary": "Delete Inboxes",
        "description": "Delete inboxes with all their mail (up to 200): all of them or none — one the caller does not see is 404, one\nit may not delete (no ``inbox_delete`` on it, a catch-all) refuses them all.",
        "operationId": "deleteInboxes",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InboxesDelete"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v0/inboxes/{inbox_id}": {
      "get": {
        "tags": [
          "inboxes"
        ],
        "summary": "Get Inbox",
        "description": "Get an inbox by id, address or ``*@domain``.",
        "operationId": "getInbox",
        "parameters": [
          {
            "name": "inbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Inbox id (inb_…), address or *@domain (the catch-all)",
              "title": "Inbox Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "inboxes"
        ],
        "summary": "Update Inbox",
        "description": "Change an inbox's display name or metadata.",
        "operationId": "updateInbox",
        "parameters": [
          {
            "name": "inbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Inbox id (inb_…), address or *@domain (the catch-all)",
              "title": "Inbox Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InboxUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "inboxes"
        ],
        "summary": "Delete Inbox",
        "description": "Delete an inbox with all its mail.",
        "operationId": "deleteInbox",
        "parameters": [
          {
            "name": "inbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Inbox id (inb_…), address or *@domain (the catch-all)",
              "title": "Inbox Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/threads": {
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "List Threads",
        "description": "List threads of all inboxes, newest first; ``inbox_id`` narrows it to one inbox.",
        "operationId": "listThreads",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The next_page_token of the previous page"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "name": "inbox_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Inbox id (inb_…), address or *@domain (the catch-all)"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Inbox Id"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "description": "Words to find in mail, all of them: in the subject, body, names, addresses and file names (`or` between words, `-word` to leave out; quotes do not make a phrase)"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadList"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/threads/{thread_id}": {
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "Get Thread",
        "description": "Get a thread with its messages, oldest first.",
        "operationId": "getThread",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "threads"
        ],
        "summary": "Update Thread",
        "description": "Add or remove labels of a thread.",
        "operationId": "updateThread",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Thread Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ThreadUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreadItem"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "threads"
        ],
        "summary": "Delete Thread",
        "description": "Delete a thread with all its messages, for good.",
        "operationId": "deleteThread",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/inboxes/{inbox_id}/labels": {
      "get": {
        "tags": [
          "labels"
        ],
        "summary": "List Inbox Labels",
        "description": "List an inbox's labels in name order with how many of its messages carry each: every label of its project\n(0 too) and the system labels its messages carry (``received``: messages that arrived, ``unread``: not read yet);\n``labels`` keeps only those, ``system`` only system or only the project's own. ``unread_received``: messages\nthat arrived and are not read yet.",
        "operationId": "listInboxLabels",
        "parameters": [
          {
            "name": "inbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Inbox id (inb_…), address or *@domain (the catch-all)",
              "title": "Inbox Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The next_page_token of the previous page"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "name": "labels",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[\\w.:-]+$"
              },
              "maxItems": 20,
              "default": [],
              "title": "Labels"
            }
          },
          {
            "name": "system",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "System"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelList"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/labels": {
      "post": {
        "tags": [
          "labels"
        ],
        "summary": "Create Label",
        "description": "Make a label of a project (of ``project_id``, or of ``inbox_id``'s project): every inbox of the project shows\nit. The same name again answers the label there is (200).",
        "operationId": "createLabel",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabelCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The project has a label of this name already",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelOut"
                }
              }
            }
          },
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelOut"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v0/labels/delete": {
      "post": {
        "tags": [
          "labels"
        ],
        "summary": "Delete Labels",
        "description": "Delete labels (up to 200), all of them or none: they come off every message and thread of their projects.",
        "operationId": "deleteLabels",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabelsDelete"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelsDeleted"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v0/labels/{label_id}": {
      "get": {
        "tags": [
          "labels"
        ],
        "summary": "Get Label",
        "description": "Get a project's label (its name: a folder of the dashboard is named by the label's id).",
        "operationId": "getLabel",
        "parameters": [
          {
            "name": "label_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^lbl_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Label Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "labels"
        ],
        "summary": "Update Label",
        "description": "Rename a label: every message and thread of its project that carries it carries the new name; a name another\nlabel of the project has is 409.",
        "operationId": "updateLabel",
        "parameters": [
          {
            "name": "label_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^lbl_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Label Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabelUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/inboxes/{inbox_id}/messages/send": {
      "post": {
        "tags": [
          "messages"
        ],
        "summary": "Send Message",
        "description": "Send a message from an inbox, in a new thread (``message_send`` there); delivery goes on after the answer. A\ncatch-all inbox cannot send.",
        "operationId": "sendMessage",
        "parameters": [
          {
            "name": "inbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Inbox id (inb_…), address or *@domain (the catch-all)",
              "title": "Inbox Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "Send at most once: the same key with the same request answers the message sent before",
              "title": "Idempotency-Key"
            },
            "description": "Send at most once: the same key with the same request answers the message sent before"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageSend"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageSent"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/inboxes/{inbox_id}/messages/{message_id}/reply": {
      "post": {
        "tags": [
          "messages"
        ],
        "summary": "Reply To Message",
        "description": "Reply to a message of the inbox, in its thread, to whoever it came from (``message_send`` and\n``message_read`` there).",
        "operationId": "replyToMessage",
        "parameters": [
          {
            "name": "inbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Inbox id (inb_…), address or *@domain (the catch-all)",
              "title": "Inbox Id"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Message Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "Send at most once: the same key with the same request answers the message sent before",
              "title": "Idempotency-Key"
            },
            "description": "Send at most once: the same key with the same request answers the message sent before"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageReply"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageSent"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/inboxes/{inbox_id}/messages/{message_id}/reply-all": {
      "post": {
        "tags": [
          "messages"
        ],
        "summary": "Reply All To Message",
        "description": "Reply to a message of the inbox and to all its other recipients, in its thread (``message_send`` and\n``message_read`` there).",
        "operationId": "replyAllToMessage",
        "parameters": [
          {
            "name": "inbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Inbox id (inb_…), address or *@domain (the catch-all)",
              "title": "Inbox Id"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Message Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "Send at most once: the same key with the same request answers the message sent before",
              "title": "Idempotency-Key"
            },
            "description": "Send at most once: the same key with the same request answers the message sent before"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageReply"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageSent"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/inboxes/{inbox_id}/messages/{message_id}/forward": {
      "post": {
        "tags": [
          "messages"
        ],
        "summary": "Forward Message",
        "description": "Forward a message of the inbox to other recipients, attached whole, in a new thread (``message_send`` and\n``message_read`` there).",
        "operationId": "forwardMessage",
        "parameters": [
          {
            "name": "inbox_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Inbox id (inb_…), address or *@domain (the catch-all)",
              "title": "Inbox Id"
            }
          },
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Message Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "Send at most once: the same key with the same request answers the message sent before",
              "title": "Idempotency-Key"
            },
            "description": "Send at most once: the same key with the same request answers the message sent before"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageForward"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageSent"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/messages": {
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "List Messages",
        "description": "List messages of all inboxes, newest first, with filters; ``project_id`` narrows it to one project,\n``inbox_id`` to one inbox.",
        "operationId": "listMessages",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "name": "subject",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "title": "Subject"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The next_page_token of the previous page"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "name": "inbox_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Inbox id (inb_…), address or *@domain (the catch-all)"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Inbox Id"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          },
          {
            "name": "labels",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[\\w.:-]+$"
              },
              "maxItems": 20,
              "default": [],
              "title": "Labels"
            }
          },
          {
            "name": "exclude_labels",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[\\w.:-]+$"
              },
              "maxItems": 20,
              "default": [],
              "title": "Exclude Labels"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "description": "Words to find in mail, all of them: in the subject, body, names, addresses and file names (`or` between words, `-word` to leave out; quotes do not make a phrase)"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After"
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Before"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageList"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/messages/wait": {
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "Wait For Message",
        "description": "Wait for the earliest message matching ``to``/``inbox_id`` and filters, up to ``timeout`` seconds.\n\n``message`` is null when nothing arrived in time; pass ``cursor`` back to continue (the same answer as the MCP\ntool).",
        "operationId": "waitForMessage",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "name": "subject",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "title": "Subject"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          },
          {
            "name": "inbox_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Inbox id (inb_…), address or *@domain (the catch-all)"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Inbox Id"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The cursor of the previous wait answer (opaque)"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "timeout",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 120,
              "minimum": 1,
              "default": 30,
              "title": "Timeout"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WaitResult"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/messages/update": {
      "post": {
        "tags": [
          "messages"
        ],
        "summary": "Update Messages",
        "description": "Add or remove labels of messages (up to 200; read is removing ``unread``): all of them or none — one the caller\ndoes not see is 404, one it may not change 403. The changed messages as list rows.",
        "operationId": "updateMessages",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagesUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageBatch"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v0/messages/delete": {
      "post": {
        "tags": [
          "messages"
        ],
        "summary": "Delete Messages",
        "description": "Delete messages for good (up to 200): all of them or none — one the caller does not see is 404, one it may not\ndelete 403. A thread left without messages goes too.",
        "operationId": "deleteMessages",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagesDelete"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v0/messages/{message_id}": {
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "Get Message",
        "description": "Get a message with bodies, links, codes and attachments.",
        "operationId": "getMessage",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Message Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "messages"
        ],
        "summary": "Update Message",
        "description": "Add or remove labels of a message.",
        "operationId": "updateMessage",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Message Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "messages"
        ],
        "summary": "Delete Message",
        "description": "Delete a message for good (its thread too when it was the last one).",
        "operationId": "deleteMessage",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Message Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/messages/{message_id}/raw": {
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "Get Raw Message",
        "description": "Download the raw MIME of a message.",
        "operationId": "getRawMessage",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Message Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "message/rfc822": {}
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/messages/{message_id}/attachments/{attachment_id}": {
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "Get Attachment",
        "description": "Download an attachment (always as a download, never rendered).",
        "operationId": "getAttachment",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Message Id"
            }
          },
          {
            "name": "attachment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^att_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Attachment Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/octet-stream": {}
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/messages/{message_id}/links": {
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "Get Message Links",
        "description": "Links found in a message, with their kind (verify, reset, unsubscribe, other); filter by ``kind``.",
        "operationId": "getMessageLinks",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Message Id"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/LinkKind"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkList"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/messages/{message_id}/codes": {
      "get": {
        "tags": [
          "messages"
        ],
        "summary": "Get Message Codes",
        "description": "One-time codes found in a message.",
        "operationId": "getMessageCodes",
        "parameters": [
          {
            "name": "message_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Message Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeList"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/webhooks": {
      "get": {
        "tags": [
          "webhooks"
        ],
        "summary": "List Webhooks",
        "description": "List the organization's webhooks, newest first; ``project_id`` narrows it to one project.",
        "operationId": "listWebhooks",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The next_page_token of the previous page"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookList"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "post": {
        "tags": [
          "webhooks"
        ],
        "summary": "Create Webhook",
        "description": "Subscribe a public https URL to events (``message.received``) of a project, of chosen inboxes, or only of mail\nthat came through the catch-all.",
        "operationId": "createWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/webhooks/{webhook_id}": {
      "get": {
        "tags": [
          "webhooks"
        ],
        "summary": "Get Webhook",
        "description": "Get a webhook (with its ``secret`` for who may create webhooks).",
        "operationId": "getWebhook",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^whk_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "webhooks"
        ],
        "summary": "Update Webhook",
        "description": "Pause or turn on a webhook, replace its events or its inboxes (the whole new list); its URL and scope never\nchange.",
        "operationId": "updateWebhook",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^whk_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Webhook Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookOut"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "webhooks"
        ],
        "summary": "Delete Webhook",
        "description": "Delete a webhook.",
        "operationId": "deleteWebhook",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^whk_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v0/webhooks/{webhook_id}/attempts": {
      "get": {
        "tags": [
          "webhooks"
        ],
        "summary": "List Webhook Attempts",
        "description": "List a webhook's delivery attempts, newest first: delivered, failed (with the URL's status or why), or skipped by the organization's per-minute limit (`skipped`); kept 7 days.",
        "operationId": "listWebhookAttempts",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^whk_[0-7][0-9a-hjkmnp-tv-z]{25}$",
              "title": "Webhook Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "The next_page_token of the previous page"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Page Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookAttemptList"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Not Found"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Method Not Allowed"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Content Too Large"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    }
  },
  "webhooks": {
    "message.received": {
      "post": {
        "summary": "Message Received",
        "description": "A message arrived in an inbox the webhook covers. Answer 2xx within 10 s; anything else is retried after 30 s, 120 s, 600 s, 3600 s, 21600 s, unless the URL now resolves to an address webhooks may not reach (then it is dropped), and 3 failures in a row pause the webhook (`disabled_reason: failing`). Each attempt counts toward the organization's webhook deliveries per minute; one over it is skipped, never sent later. Before each attempt the webhook is checked again: one paused, deleted or no longer wanting the event gets nothing more of it. Every attempt is in the webhook's log (`GET /v0/webhooks/{webhook_id}/attempts`). Verify `webhook-signature` with the webhook's `secret`; `webhook-id` is the same on every retry. An event goes to the webhooks that want it when it is queued for them, so one made right after an event may still receive it if that queuing was retried.",
        "operationId": "message_receivedmessage_received_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageReceivedBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "message.sent": {
      "post": {
        "summary": "Message Sent",
        "description": "A sent message was handed on to its first recipient. Answer 2xx within 10 s; anything else is retried after 30 s, 120 s, 600 s, 3600 s, 21600 s, unless the URL now resolves to an address webhooks may not reach (then it is dropped), and 3 failures in a row pause the webhook (`disabled_reason: failing`). Each attempt counts toward the organization's webhook deliveries per minute; one over it is skipped, never sent later. Before each attempt the webhook is checked again: one paused, deleted or no longer wanting the event gets nothing more of it. Every attempt is in the webhook's log (`GET /v0/webhooks/{webhook_id}/attempts`). Verify `webhook-signature` with the webhook's `secret`; `webhook-id` is the same on every retry. An event goes to the webhooks that want it when it is queued for them, so one made right after an event may still receive it if that queuing was retried.",
        "operationId": "message_sentmessage_sent_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageSentBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "message.delivered": {
      "post": {
        "summary": "Message Delivered",
        "description": "A recipient's server accepted a sent message. Answer 2xx within 10 s; anything else is retried after 30 s, 120 s, 600 s, 3600 s, 21600 s, unless the URL now resolves to an address webhooks may not reach (then it is dropped), and 3 failures in a row pause the webhook (`disabled_reason: failing`). Each attempt counts toward the organization's webhook deliveries per minute; one over it is skipped, never sent later. Before each attempt the webhook is checked again: one paused, deleted or no longer wanting the event gets nothing more of it. Every attempt is in the webhook's log (`GET /v0/webhooks/{webhook_id}/attempts`). Verify `webhook-signature` with the webhook's `secret`; `webhook-id` is the same on every retry. An event goes to the webhooks that want it when it is queued for them, so one made right after an event may still receive it if that queuing was retried.",
        "operationId": "message_deliveredmessage_delivered_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRecipientBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "message.bounced": {
      "post": {
        "summary": "Message Bounced",
        "description": "A sent message bounced for a recipient (its address is suppressed). Answer 2xx within 10 s; anything else is retried after 30 s, 120 s, 600 s, 3600 s, 21600 s, unless the URL now resolves to an address webhooks may not reach (then it is dropped), and 3 failures in a row pause the webhook (`disabled_reason: failing`). Each attempt counts toward the organization's webhook deliveries per minute; one over it is skipped, never sent later. Before each attempt the webhook is checked again: one paused, deleted or no longer wanting the event gets nothing more of it. Every attempt is in the webhook's log (`GET /v0/webhooks/{webhook_id}/attempts`). Verify `webhook-signature` with the webhook's `secret`; `webhook-id` is the same on every retry. An event goes to the webhooks that want it when it is queued for them, so one made right after an event may still receive it if that queuing was retried.",
        "operationId": "message_bouncedmessage_bounced_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRecipientBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "message.complained": {
      "post": {
        "summary": "Message Complained",
        "description": "A recipient marked a sent message as spam (the address is suppressed, sending may be paused). Answer 2xx within 10 s; anything else is retried after 30 s, 120 s, 600 s, 3600 s, 21600 s, unless the URL now resolves to an address webhooks may not reach (then it is dropped), and 3 failures in a row pause the webhook (`disabled_reason: failing`). Each attempt counts toward the organization's webhook deliveries per minute; one over it is skipped, never sent later. Before each attempt the webhook is checked again: one paused, deleted or no longer wanting the event gets nothing more of it. Every attempt is in the webhook's log (`GET /v0/webhooks/{webhook_id}/attempts`). Verify `webhook-signature` with the webhook's `secret`; `webhook-id` is the same on every retry. An event goes to the webhooks that want it when it is queued for them, so one made right after an event may still receive it if that queuing was retried.",
        "operationId": "message_complainedmessage_complained_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRecipientBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "message.rejected": {
      "post": {
        "summary": "Message Rejected",
        "description": "A sent message was not sent to a recipient (the reason says why). Answer 2xx within 10 s; anything else is retried after 30 s, 120 s, 600 s, 3600 s, 21600 s, unless the URL now resolves to an address webhooks may not reach (then it is dropped), and 3 failures in a row pause the webhook (`disabled_reason: failing`). Each attempt counts toward the organization's webhook deliveries per minute; one over it is skipped, never sent later. Before each attempt the webhook is checked again: one paused, deleted or no longer wanting the event gets nothing more of it. Every attempt is in the webhook's log (`GET /v0/webhooks/{webhook_id}/attempts`). Verify `webhook-signature` with the webhook's `secret`; `webhook-id` is the same on every retry. An event goes to the webhooks that want it when it is queued for them, so one made right after an event may still receive it if that queuing was retried.",
        "operationId": "message_rejectedmessage_rejected_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRecipientBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "message.unsubscribed": {
      "post": {
        "summary": "Message Unsubscribed",
        "description": "A recipient unsubscribed from the organization's mail. Answer 2xx within 10 s; anything else is retried after 30 s, 120 s, 600 s, 3600 s, 21600 s, unless the URL now resolves to an address webhooks may not reach (then it is dropped), and 3 failures in a row pause the webhook (`disabled_reason: failing`). Each attempt counts toward the organization's webhook deliveries per minute; one over it is skipped, never sent later. Before each attempt the webhook is checked again: one paused, deleted or no longer wanting the event gets nothing more of it. Every attempt is in the webhook's log (`GET /v0/webhooks/{webhook_id}/attempts`). Verify `webhook-signature` with the webhook's `secret`; `webhook-id` is the same on every retry. An event goes to the webhooks that want it when it is queued for them, so one made right after an event may still receive it if that queuing was retried.",
        "operationId": "message_unsubscribedmessage_unsubscribed_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRecipientBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "domain.verified": {
      "post": {
        "summary": "Domain Verified",
        "description": "A custom domain's DNS records were found (mail to it is accepted), or its sending was verified. Answer 2xx within 10 s; anything else is retried after 30 s, 120 s, 600 s, 3600 s, 21600 s, unless the URL now resolves to an address webhooks may not reach (then it is dropped), and 3 failures in a row pause the webhook (`disabled_reason: failing`). Each attempt counts toward the organization's webhook deliveries per minute; one over it is skipped, never sent later. Before each attempt the webhook is checked again: one paused, deleted or no longer wanting the event gets nothing more of it. Every attempt is in the webhook's log (`GET /v0/webhooks/{webhook_id}/attempts`). Verify `webhook-signature` with the webhook's `secret`; `webhook-id` is the same on every retry. An event goes to the webhooks that want it when it is queued for them, so one made right after an event may still receive it if that queuing was retried.",
        "operationId": "domain_verifieddomain_verified_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainVerifiedBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Access": {
        "properties": {
          "all": {
            "anyOf": [
              {
                "type": "string",
                "const": "full"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ApiPermission"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "All"
          },
          "projects": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "full"
                },
                {
                  "items": {
                    "$ref": "#/components/schemas/ApiPermission"
                  },
                  "type": "array"
                }
              ]
            },
            "propertyNames": {
              "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "object",
            "title": "Projects",
            "default": {}
          },
          "inboxes": {
            "additionalProperties": {
              "$ref": "#/components/schemas/InboxGrant"
            },
            "propertyNames": {
              "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "object",
            "title": "Inboxes",
            "default": {}
          }
        },
        "type": "object",
        "title": "Access",
        "description": "Access as it is stored and shown (``AccessFields``)."
      },
      "AccessIn": {
        "properties": {
          "all": {
            "anyOf": [
              {
                "type": "string",
                "const": "full"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ApiPermission"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "All"
          },
          "projects": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "full"
                },
                {
                  "items": {
                    "$ref": "#/components/schemas/ApiPermission"
                  },
                  "type": "array"
                }
              ]
            },
            "propertyNames": {
              "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "object",
            "title": "Projects",
            "default": {}
          },
          "inboxes": {
            "additionalProperties": {
              "$ref": "#/components/schemas/InboxGrantIn"
            },
            "propertyNames": {
              "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "object",
            "title": "Inboxes",
            "default": {}
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "AccessIn",
        "description": "Access as a caller gives it (a member's, an invitation's): unknown fields are refused."
      },
      "AccessNames": {
        "properties": {
          "projects": {
            "additionalProperties": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ProjectName"
                },
                {
                  "type": "null"
                }
              ]
            },
            "propertyNames": {
              "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "object",
            "title": "Projects"
          },
          "inboxes": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "propertyNames": {
              "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "object",
            "title": "Inboxes"
          }
        },
        "type": "object",
        "required": [
          "projects",
          "inboxes"
        ],
        "title": "AccessNames",
        "description": "What the projects and inboxes an access names are called, as the caller sees them: a project's name and slug,\nan inbox's address; null for one the caller does not see (its id is in the access already: nothing more is\ntold). Answered beside the access of a key, a member and an invitation (``access_names``)."
      },
      "ActivityList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "activities": {
            "items": {
              "$ref": "#/components/schemas/ActivityOut"
            },
            "type": "array",
            "title": "Activities"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "activities"
        ],
        "title": "ActivityList",
        "description": "A page of the activity log, newest first."
      },
      "ActivityOut": {
        "properties": {
          "activity_id": {
            "type": "string",
            "pattern": "^act_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Activity Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "transport": {
            "$ref": "#/components/schemas/Transport"
          },
          "server": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Server"
          },
          "action": {
            "type": "string",
            "title": "Action"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ErrorCode"
              },
              {
                "type": "null"
              }
            ]
          },
          "ms": {
            "type": "integer",
            "title": "Ms"
          },
          "api_key_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^key_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key Id"
          },
          "connection_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^con_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connection Id"
          },
          "caller_name": {
            "type": "string",
            "title": "Caller Name"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "project": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectName"
              },
              {
                "type": "null"
              }
            ]
          },
          "inbox_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inbox Id"
          },
          "inbox_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inbox Address"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject Id"
          },
          "items": {
            "type": "integer",
            "title": "Items"
          },
          "outcome": {
            "$ref": "#/components/schemas/Outcome",
            "description": "Done, refused or failed (``error`` grouped).",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "activity_id",
          "created_at",
          "request_id",
          "transport",
          "server",
          "action",
          "error",
          "ms",
          "api_key_id",
          "connection_id",
          "caller_name",
          "project_id",
          "project",
          "inbox_id",
          "inbox_address",
          "subject_id",
          "items",
          "outcome"
        ],
        "title": "ActivityOut",
        "description": "One call of an API key or an MCP client's OAuth connection in the activity log, at one place (a batch over\nseveral inboxes is a row per inbox, with the same ``request_id``). The same for everyone who may see it: seeing\nthe row's place gives its project's name and its inbox's address; null when deleted since (or the row has no\nplace)."
      },
      "AdminMembership": {
        "properties": {
          "organization_id": {
            "type": "string",
            "pattern": "^org_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          }
        },
        "type": "object",
        "required": [
          "organization_id",
          "name",
          "role"
        ],
        "title": "AdminMembership",
        "description": "An organization a person belongs to, and their role there."
      },
      "AdminOrganizationList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/AdminOrganizationOut"
            },
            "type": "array",
            "title": "Organizations"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "organizations"
        ],
        "title": "AdminOrganizationList",
        "description": "A page of organizations, newest first."
      },
      "AdminOrganizationOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "organization_id": {
            "type": "string",
            "pattern": "^org_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "plan": {
            "$ref": "#/components/schemas/Plan"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "owners": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Owners"
          },
          "members": {
            "type": "integer",
            "title": "Members"
          },
          "inboxes": {
            "type": "integer",
            "title": "Inboxes"
          },
          "received": {
            "$ref": "#/components/schemas/ReceivedMail"
          },
          "sent": {
            "$ref": "#/components/schemas/SentMail"
          },
          "sending_suspended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sending Suspended At"
          },
          "sending_suspended_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sending Suspended Reason"
          }
        },
        "type": "object",
        "required": [
          "version",
          "organization_id",
          "name",
          "slug",
          "plan",
          "created_at",
          "owners",
          "members",
          "inboxes",
          "received",
          "sent",
          "sending_suspended_at",
          "sending_suspended_reason"
        ],
        "title": "AdminOrganizationOut",
        "description": "An organization, its people and its mail."
      },
      "AdminUserList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/AdminUserOut"
            },
            "type": "array",
            "title": "Users"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "users"
        ],
        "title": "AdminUserList",
        "description": "A page of people, newest first."
      },
      "AdminUserOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "user_id": {
            "type": "string",
            "pattern": "^usr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "User Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_sign_in_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sign In At"
          },
          "sending_paused_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sending Paused At"
          },
          "blocked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blocked At"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/AdminMembership"
            },
            "type": "array",
            "title": "Organizations"
          },
          "blockable": {
            "type": "boolean",
            "title": "Blockable"
          }
        },
        "type": "object",
        "required": [
          "version",
          "user_id",
          "email",
          "name",
          "created_at",
          "last_sign_in_at",
          "sending_paused_at",
          "blocked_at",
          "organizations",
          "blockable"
        ],
        "title": "AdminUserOut",
        "description": "A person who signed up."
      },
      "AllowIn": {
        "properties": {
          "decision": {
            "type": "string",
            "const": "allow",
            "title": "Decision"
          },
          "organization_ids": {
            "items": {
              "type": "string",
              "pattern": "^org_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "maxItems": 200,
            "minItems": 1,
            "title": "Organization Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "decision",
          "organization_ids"
        ],
        "title": "AllowIn",
        "description": "The person allows the client, acting as them in the organizations they checked (it switches between them:\n``select_organization``)."
      },
      "ApiKeyCreate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "access": {
            "$ref": "#/components/schemas/KeyAccessIn"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "access"
        ],
        "title": "ApiKeyCreate",
        "description": "Create an API key."
      },
      "ApiKeyCreated": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "api_key_id": {
            "type": "string",
            "pattern": "^key_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Api Key Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "access": {
            "$ref": "#/components/schemas/KeyAccess"
          },
          "names": {
            "$ref": "#/components/schemas/AccessNames"
          },
          "limited": {
            "type": "boolean",
            "title": "Limited"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "api_key": {
            "type": "string",
            "title": "Api Key"
          }
        },
        "type": "object",
        "required": [
          "version",
          "api_key_id",
          "name",
          "access",
          "names",
          "limited",
          "prefix",
          "created_at",
          "last_used_at",
          "revoked_at",
          "expires_at",
          "api_key"
        ],
        "title": "ApiKeyCreated",
        "description": "A new API key with its secret (``api_key``); later only its maker reads it again (``ApiKeyDetail``)."
      },
      "ApiKeyDetail": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "api_key_id": {
            "type": "string",
            "pattern": "^key_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Api Key Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "access": {
            "$ref": "#/components/schemas/KeyAccess"
          },
          "names": {
            "$ref": "#/components/schemas/AccessNames"
          },
          "limited": {
            "type": "boolean",
            "title": "Limited"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          }
        },
        "type": "object",
        "required": [
          "version",
          "api_key_id",
          "name",
          "access",
          "names",
          "limited",
          "prefix",
          "created_at",
          "last_used_at",
          "revoked_at",
          "expires_at",
          "active",
          "api_key"
        ],
        "title": "ApiKeyDetail",
        "description": "One API key, for its window: everything the list shows and, for the person who made it while it works, its\nsecret (``api_key``; null for anyone else, and for a revoked or expired key)."
      },
      "ApiKeyList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "api_keys": {
            "items": {
              "$ref": "#/components/schemas/ApiKeyOut"
            },
            "type": "array",
            "title": "Api Keys"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "api_keys"
        ],
        "title": "ApiKeyList",
        "description": "A page of the organization's API keys, revoked included."
      },
      "ApiKeyOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "api_key_id": {
            "type": "string",
            "pattern": "^key_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Api Key Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "access": {
            "$ref": "#/components/schemas/KeyAccess"
          },
          "names": {
            "$ref": "#/components/schemas/AccessNames"
          },
          "limited": {
            "type": "boolean",
            "title": "Limited"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "version",
          "api_key_id",
          "name",
          "access",
          "names",
          "limited",
          "prefix",
          "created_at",
          "last_used_at",
          "revoked_at",
          "expires_at"
        ],
        "title": "ApiKeyOut",
        "description": "An API key without its secret."
      },
      "ApiKeysRevoke": {
        "properties": {
          "api_key_ids": {
            "items": {
              "type": "string",
              "pattern": "^key_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "maxItems": 200,
            "minItems": 1,
            "title": "Api Key Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key_ids"
        ],
        "title": "ApiKeysRevoke",
        "description": "Revoke API keys: all of them or none."
      },
      "ApiPermission": {
        "type": "string",
        "enum": [
          "inbox_read",
          "inbox_create",
          "inbox_update",
          "inbox_delete",
          "message_read",
          "message_update",
          "message_delete",
          "message_send",
          "webhook_read",
          "webhook_create",
          "webhook_update",
          "webhook_delete",
          "domain_read",
          "domain_create",
          "domain_update",
          "domain_delete"
        ],
        "title": "ApiPermission",
        "description": "What a grant allows in a project, with AgentMail's names (each in a sentence: ``PERMISSION_TEXT``)."
      },
      "AttachmentIn": {
        "properties": {
          "filename": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 998,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          },
          "content_type": {
            "type": "string",
            "maxLength": 255,
            "pattern": "^[a-z0-9!#$&^_.+-]+/[a-z0-9!#$&^_.+-]+$",
            "title": "Content Type",
            "default": "application/octet-stream"
          },
          "content_disposition": {
            "type": "string",
            "enum": [
              "attachment",
              "inline"
            ],
            "title": "Content Disposition",
            "default": "attachment"
          },
          "content_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 998,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Id"
          },
          "content": {
            "type": "string",
            "format": "base64",
            "contentMediaType": "application/octet-stream",
            "title": "Content"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "content"
        ],
        "title": "AttachmentIn",
        "description": "A file to attach, its bytes in base64."
      },
      "AttachmentOut": {
        "properties": {
          "attachment_id": {
            "type": "string",
            "pattern": "^att_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Attachment Id"
          },
          "filename": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          },
          "content_type": {
            "type": "string",
            "title": "Content Type",
            "x-untrusted": true
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "inline": {
            "type": "boolean",
            "title": "Inline"
          },
          "download_url": {
            "type": "string",
            "title": "Download Url"
          }
        },
        "type": "object",
        "required": [
          "attachment_id",
          "filename",
          "content_type",
          "size",
          "inline",
          "download_url"
        ],
        "title": "AttachmentOut",
        "description": "An attachment; ``download_url`` gives its bytes (REST, same API key)."
      },
      "AttemptError": {
        "type": "string",
        "enum": [
          "bad_status",
          "timeout",
          "connection_failed",
          "dns_failed",
          "blocked_target"
        ],
        "title": "AttemptError",
        "description": "Why an attempt failed — our own short reason, never the error's text (the URL may hold a token, and the log is\nshown to who may only read webhooks)."
      },
      "AttemptOutcome": {
        "type": "string",
        "enum": [
          "delivered",
          "failed",
          "skipped"
        ],
        "title": "AttemptOutcome",
        "description": "How a delivery attempt ended."
      },
      "AuthMethods": {
        "properties": {
          "providers": {
            "items": {
              "$ref": "#/components/schemas/ProviderOut"
            },
            "type": "array",
            "title": "Providers"
          }
        },
        "type": "object",
        "required": [
          "providers"
        ],
        "title": "AuthMethods",
        "description": "Sign-in methods of this deployment: email always, plus the configured providers."
      },
      "BillingLink": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "BillingLink",
        "description": "Where the browser goes next: a Stripe page (Checkout or the Customer Portal), good for a short while."
      },
      "BillingOut": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "gives_plan": {
            "type": "boolean",
            "title": "Gives Plan"
          },
          "checkout_pending": {
            "type": "boolean",
            "title": "Checkout Pending"
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Period End"
          },
          "cancel_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancel At"
          },
          "amount": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "interval": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interval"
          },
          "offer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Offer"
              },
              {
                "type": "null"
              }
            ]
          },
          "can_checkout": {
            "type": "boolean",
            "title": "Can Checkout"
          },
          "can_portal": {
            "type": "boolean",
            "title": "Can Portal"
          }
        },
        "type": "object",
        "required": [
          "enabled",
          "status",
          "gives_plan",
          "checkout_pending",
          "period_end",
          "cancel_at",
          "amount",
          "currency",
          "interval",
          "offer",
          "can_checkout",
          "can_portal"
        ],
        "title": "BillingOut",
        "description": "The organization's subscription as Stripe last told (only its owner sees it)."
      },
      "Blocked": {
        "properties": {
          "limit": {
            "type": "string",
            "enum": [
              "projects",
              "inboxes",
              "members",
              "webhooks",
              "custom_domains",
              "organizations"
            ],
            "title": "Limit"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "required_plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Plan"
              },
              {
                "type": "null"
              }
            ]
          },
          "upgrade_in": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Upgrade In"
          }
        },
        "type": "object",
        "required": [
          "limit",
          "message",
          "required_plan"
        ],
        "title": "Blocked",
        "description": "One thing the caller may not add now, with the refusal adding it would get (``403 limit_reached``)."
      },
      "CallbackKind": {
        "type": "string",
        "enum": [
          "computer",
          "website",
          "code"
        ],
        "title": "CallbackKind",
        "description": "Where the browser takes the answer, as the consent page tells the person."
      },
      "Code": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code",
            "x-untrusted": true
          },
          "context": {
            "type": "string",
            "title": "Context",
            "x-untrusted": true
          }
        },
        "type": "object",
        "required": [
          "code",
          "context"
        ],
        "title": "Code",
        "description": "A one-time code found in a message, with the text around it (``mail.content.extract.codes``)."
      },
      "CodeList": {
        "properties": {
          "message_id": {
            "type": "string",
            "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Message Id"
          },
          "codes": {
            "items": {
              "$ref": "#/components/schemas/Code"
            },
            "type": "array",
            "title": "Codes"
          }
        },
        "type": "object",
        "required": [
          "message_id",
          "codes"
        ],
        "title": "CodeList",
        "description": "One-time codes of a message."
      },
      "ConnectionList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "connections": {
            "items": {
              "$ref": "#/components/schemas/ConnectionOut"
            },
            "type": "array",
            "title": "Connections"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "connections"
        ],
        "title": "ConnectionList",
        "description": "A page of the organization's OAuth connections, revoked ones included (until the cleanup removes them)."
      },
      "ConnectionOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "connection_id": {
            "type": "string",
            "pattern": "^con_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Connection Id"
          },
          "client_name": {
            "type": "string",
            "title": "Client Name"
          },
          "user_id": {
            "type": "string",
            "pattern": "^usr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "User Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "type": "object",
        "required": [
          "version",
          "connection_id",
          "client_name",
          "user_id",
          "email",
          "name",
          "created_at",
          "last_used_at",
          "expires_at",
          "revoked_at"
        ],
        "title": "ConnectionOut",
        "description": "An MCP client's OAuth connection, as the API keys page lists it: which client, whose, and when it was used."
      },
      "ConnectionsRevoke": {
        "properties": {
          "connection_ids": {
            "items": {
              "type": "string",
              "pattern": "^con_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "maxItems": 200,
            "minItems": 1,
            "title": "Connection Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "connection_ids"
        ],
        "title": "ConnectionsRevoke",
        "description": "Revoke OAuth connections: all of them or none."
      },
      "ConsentOut": {
        "properties": {
          "redirect_url": {
            "type": "string",
            "title": "Redirect Url"
          }
        },
        "type": "object",
        "required": [
          "redirect_url"
        ],
        "title": "ConsentOut",
        "description": "Where the browser goes next: the client's callback with the code (allowed) or ``access_denied``."
      },
      "ConsentRequestOut": {
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^oar_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Request Id"
          },
          "client_name": {
            "type": "string",
            "title": "Client Name"
          },
          "redirect_host": {
            "type": "string",
            "title": "Redirect Host"
          },
          "callback_kind": {
            "$ref": "#/components/schemas/CallbackKind"
          },
          "scope": {
            "type": "string",
            "title": "Scope"
          },
          "resource": {
            "type": "string",
            "title": "Resource"
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "client_name",
          "redirect_host",
          "callback_kind",
          "scope",
          "resource"
        ],
        "title": "ConsentRequestOut",
        "description": "What an MCP client asks the person for, as the consent page shows it."
      },
      "ContactIn": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "message": {
            "type": "string",
            "maxLength": 5000,
            "minLength": 1,
            "title": "Message"
          },
          "turnstile_token": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "title": "Turnstile Token"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email",
          "message",
          "turnstile_token"
        ],
        "title": "ContactIn",
        "description": "A message from the public site's contact form (``POST /auth/contact``), for our own inbox\n(``Settings.contact_inbox``)."
      },
      "Counts": {
        "properties": {
          "inboxes": {
            "type": "integer",
            "title": "Inboxes"
          },
          "unread": {
            "type": "integer",
            "title": "Unread"
          },
          "webhooks": {
            "type": "integer",
            "title": "Webhooks"
          }
        },
        "type": "object",
        "required": [
          "inboxes",
          "unread",
          "webhooks"
        ],
        "title": "Counts",
        "description": "How many of each thing the projects pane shows (what the caller sees of them)."
      },
      "DenyIn": {
        "properties": {
          "decision": {
            "type": "string",
            "const": "deny",
            "title": "Decision"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "decision"
        ],
        "title": "DenyIn",
        "description": "The person refuses: the client hears ``access_denied``."
      },
      "DisabledReason": {
        "type": "string",
        "enum": [
          "failing"
        ],
        "title": "DisabledReason",
        "description": "Why a webhook is paused by us rather than by a person."
      },
      "DnsRecord": {
        "properties": {
          "key": {
            "$ref": "#/components/schemas/RecordKey"
          },
          "type": {
            "type": "string",
            "enum": [
              "TXT",
              "MX",
              "CNAME"
            ],
            "title": "Type"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "x-untrusted": true
          },
          "value": {
            "type": "string",
            "title": "Value"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "found": {
            "type": "boolean",
            "title": "Found"
          }
        },
        "type": "object",
        "required": [
          "key",
          "type",
          "name",
          "value",
          "found"
        ],
        "title": "DnsRecord",
        "description": "One DNS record the customer adds at their DNS host, and whether the last check that got an answer saw it."
      },
      "DomainCreate": {
        "properties": {
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "DomainCreate",
        "description": "Add a custom domain (a root or a subdomain) to a project: mail to it is accepted once its DNS records are found\n(``records`` of the answer)."
      },
      "DomainFailure": {
        "type": "string",
        "enum": [
          "txt_missing",
          "mx_missing",
          "mx_foreign",
          "taken"
        ],
        "title": "DomainFailure",
        "description": "Why a custom domain is ``failed``: what its DNS lacked at the last check, or that another organization holds\nthe name."
      },
      "DomainFields": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "domain_id": {
            "type": "string",
            "pattern": "^dom_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Domain Id"
          },
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "x-untrusted": true
          },
          "kind": {
            "$ref": "#/components/schemas/DomainKind"
          },
          "status": {
            "$ref": "#/components/schemas/DomainStatus"
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DomainFailure"
              },
              {
                "type": "null"
              }
            ]
          },
          "sending_status": {
            "$ref": "#/components/schemas/SendingStatus"
          },
          "records": {
            "items": {
              "$ref": "#/components/schemas/DnsRecord"
            },
            "type": "array",
            "title": "Records"
          },
          "zone_file": {
            "type": "string",
            "title": "Zone File",
            "x-untrusted": true
          },
          "checked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checked At"
          },
          "next_check_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Check At"
          },
          "failing_since": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failing Since"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified At"
          }
        },
        "type": "object",
        "required": [
          "version",
          "domain_id",
          "project_id",
          "name",
          "kind",
          "status",
          "failure",
          "sending_status",
          "records",
          "zone_file",
          "checked_at",
          "next_check_at",
          "failing_since",
          "verified_at"
        ],
        "title": "DomainFields",
        "description": "A mail domain of the organization: the project's shared subdomain, or a custom domain with the DNS records it\nneeds. Mail to a verified domain reaches its inboxes (any address: its catch-all, while its project has it on).\nThe same for every reader (a webhook body); ``DomainOut`` adds what the caller may do with it."
      },
      "DomainKind": {
        "type": "string",
        "enum": [
          "shared",
          "custom"
        ],
        "title": "DomainKind",
        "description": "Where a domain comes from: our shared domain or the customer's own."
      },
      "DomainList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "domains": {
            "items": {
              "$ref": "#/components/schemas/DomainOut"
            },
            "type": "array",
            "title": "Domains"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "domains"
        ],
        "title": "DomainList",
        "description": "A page of domains."
      },
      "DomainOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "domain_id": {
            "type": "string",
            "pattern": "^dom_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Domain Id"
          },
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "x-untrusted": true
          },
          "kind": {
            "$ref": "#/components/schemas/DomainKind"
          },
          "status": {
            "$ref": "#/components/schemas/DomainStatus"
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DomainFailure"
              },
              {
                "type": "null"
              }
            ]
          },
          "sending_status": {
            "$ref": "#/components/schemas/SendingStatus"
          },
          "records": {
            "items": {
              "$ref": "#/components/schemas/DnsRecord"
            },
            "type": "array",
            "title": "Records"
          },
          "zone_file": {
            "type": "string",
            "title": "Zone File",
            "x-untrusted": true
          },
          "checked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checked At"
          },
          "next_check_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Check At"
          },
          "failing_since": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failing Since"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified At"
          },
          "fails_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fails At"
          },
          "editable": {
            "type": "boolean",
            "title": "Editable"
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable"
          },
          "sendable": {
            "type": "boolean",
            "title": "Sendable"
          }
        },
        "type": "object",
        "required": [
          "version",
          "domain_id",
          "project_id",
          "name",
          "kind",
          "status",
          "failure",
          "sending_status",
          "records",
          "zone_file",
          "checked_at",
          "next_check_at",
          "failing_since",
          "verified_at",
          "fails_at",
          "editable",
          "deletable",
          "sendable"
        ],
        "title": "DomainOut",
        "description": "A mail domain as the caller sees it: what it may do with it, and when mail to it stops being accepted."
      },
      "DomainStatus": {
        "type": "string",
        "enum": [
          "pending",
          "verified",
          "failed"
        ],
        "title": "DomainStatus",
        "description": "Whether mail for the domain is accepted: ``pending`` (a custom domain waiting for its DNS records), ``verified``\n(accepted), ``failed`` (its records were not found in time, or were lost: ``Domain.failure`` says which)."
      },
      "DomainUpdate": {
        "properties": {
          "sending": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sending"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "DomainUpdate",
        "description": "Change a custom domain; omitted fields stay as they are."
      },
      "DomainVerifiedBody": {
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^evt_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Event Id"
          },
          "event_type": {
            "type": "string",
            "const": "domain.verified",
            "title": "Event Type"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "title": "Occurred At"
          },
          "domain": {
            "$ref": "#/components/schemas/DomainFields"
          }
        },
        "type": "object",
        "required": [
          "event_id",
          "event_type",
          "occurred_at",
          "domain"
        ],
        "title": "DomainVerifiedBody",
        "description": "The body POSTed for ``domain.verified``: a custom domain's DNS records were found, and mail to it is accepted\n(the first time, or again after its records came back), or its sending was verified (``sending_status``)."
      },
      "EmailLink": {
        "properties": {
          "token": {
            "type": "string",
            "maxLength": 128,
            "minLength": 20,
            "pattern": "^[A-Za-z0-9_-]+$",
            "title": "Token"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "token"
        ],
        "title": "EmailLink",
        "description": "Sign in with the token from the email link."
      },
      "EmailStart": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "next": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email"
        ],
        "title": "EmailStart",
        "description": "Ask for a sign-in email (a link and a code)."
      },
      "EmailVerify": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "code": {
            "type": "string",
            "title": "Code"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email",
          "code"
        ],
        "title": "EmailVerify",
        "description": "Sign in with the 6-digit code from the email."
      },
      "Entitlements": {
        "properties": {
          "projects": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 0,
            "title": "Projects"
          },
          "inboxes": {
            "type": "integer",
            "minimum": 0,
            "title": "Inboxes"
          },
          "messages_per_month": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Messages Per Month"
          },
          "retention_days": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Retention Days"
          },
          "activity_retention_days": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Activity Retention Days"
          },
          "received_per_day": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Received Per Day"
          },
          "api_requests_per_minute": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Api Requests Per Minute"
          },
          "members": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Members"
          },
          "custom_domains": {
            "type": "integer",
            "minimum": 0,
            "title": "Custom Domains"
          },
          "webhooks": {
            "type": "integer",
            "minimum": 0,
            "title": "Webhooks"
          },
          "webhook_deliveries_per_minute": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Webhook Deliveries Per Minute"
          },
          "catch_all": {
            "type": "boolean",
            "title": "Catch All"
          },
          "auto_create_inboxes": {
            "type": "boolean",
            "title": "Auto Create Inboxes"
          },
          "plus_addresses": {
            "type": "boolean",
            "title": "Plus Addresses"
          },
          "custom_domain_sending": {
            "type": "boolean",
            "title": "Custom Domain Sending"
          },
          "recipients_per_minute": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Recipients Per Minute"
          },
          "recipients_per_day": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Recipients Per Day"
          },
          "new_recipients_without_ramp": {
            "type": "boolean",
            "title": "New Recipients Without Ramp"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "projects",
          "inboxes",
          "messages_per_month",
          "retention_days",
          "activity_retention_days",
          "received_per_day",
          "api_requests_per_minute",
          "members",
          "custom_domains",
          "webhooks",
          "webhook_deliveries_per_minute",
          "catch_all",
          "auto_create_inboxes",
          "plus_addresses",
          "custom_domain_sending",
          "recipients_per_minute",
          "recipients_per_day",
          "new_recipients_without_ramp"
        ],
        "title": "Entitlements",
        "description": "What one organization may have and do: its plan's limits and paid features with its overrides (the plan\nitself is ``Organization.plan``)."
      },
      "ErrorBody": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "fields": {
            "additionalProperties": {
              "items": {
                "$ref": "#/components/schemas/FieldError"
              },
              "type": "array"
            },
            "type": "object",
            "title": "Fields",
            "default": {}
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          },
          "feature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feature"
          },
          "required_plan": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required Plan"
          },
          "upgrade_in": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Upgrade In"
          }
        },
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "ErrorBody",
        "description": "The error inside every error answer: code, message for people, failing input fields and request id."
      },
      "ErrorCode": {
        "type": "string",
        "enum": [
          "invalid",
          "invalid_url",
          "invalid_code",
          "code_locked",
          "invalid_link",
          "unauthorized",
          "forbidden",
          "csrf",
          "not_found",
          "no_organization",
          "method_not_allowed",
          "already_exists",
          "conflict",
          "catch_all",
          "limit_reached",
          "plan_required",
          "rate_limited",
          "message_rejected",
          "trial_ended",
          "account_blocked",
          "account_suspended",
          "too_large",
          "unavailable",
          "email_not_sent",
          "internal"
        ],
        "title": "ErrorCode",
        "description": "What went wrong, for programs; ``message`` is for people."
      },
      "ErrorResponse": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          }
        },
        "type": "object",
        "required": [
          "error"
        ],
        "title": "ErrorResponse",
        "description": "The body of every error answer."
      },
      "FieldError": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "FieldError",
        "description": "One problem with one input field."
      },
      "ImageUpload": {
        "properties": {
          "image_id": {
            "type": "string",
            "pattern": "^img_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Image Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "fields": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Fields"
          },
          "side": {
            "type": "integer",
            "title": "Side"
          },
          "max_bytes": {
            "type": "integer",
            "title": "Max Bytes"
          }
        },
        "type": "object",
        "required": [
          "image_id",
          "url",
          "fields",
          "side",
          "max_bytes"
        ],
        "title": "ImageUpload",
        "description": "Where to send a picture: an S3 form (POST ``url`` with ``fields``, then the file as ``file``) that accepts one\nJPEG of up to ``max_bytes`` for ``UPLOAD_SECONDS``; once sent, ``image_id`` saves it in the field's update."
      },
      "ImageUploadCreate": {
        "properties": {
          "field": {
            "type": "string",
            "title": "Field"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "field"
        ],
        "title": "ImageUploadCreate",
        "description": "What a picture will be uploaded for."
      },
      "InboxCreate": {
        "properties": {
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "username": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64,
                "minLength": 1,
                "pattern": "^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Username"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "InboxCreate",
        "description": "Create an inbox. Without ``username`` a random one is picked; without ``domain`` the project's shared\nsubdomain; ``domain`` without ``project_id`` names the project too."
      },
      "InboxGrant": {
        "properties": {
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          },
          "grant": {
            "anyOf": [
              {
                "type": "string",
                "const": "full"
              },
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "inbox_read",
                    "inbox_update",
                    "message_read",
                    "message_update",
                    "message_delete",
                    "message_send",
                    "domain_read"
                  ]
                },
                "type": "array"
              }
            ],
            "title": "Grant"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "grant"
        ],
        "title": "InboxGrant",
        "description": "A grant on one inbox as it is stored and shown."
      },
      "InboxGrantIn": {
        "properties": {
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          },
          "grant": {
            "anyOf": [
              {
                "type": "string",
                "const": "full"
              },
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "inbox_read",
                    "inbox_update",
                    "message_read",
                    "message_update",
                    "message_delete",
                    "message_send",
                    "domain_read"
                  ]
                },
                "type": "array"
              }
            ],
            "title": "Grant"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "project_id",
          "grant"
        ],
        "title": "InboxGrantIn",
        "description": "A grant on one inbox as a caller gives it (inside ``AccessIn``): unknown fields are refused."
      },
      "InboxList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "inboxes": {
            "items": {
              "$ref": "#/components/schemas/InboxOut"
            },
            "type": "array",
            "title": "Inboxes"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "inboxes"
        ],
        "title": "InboxList",
        "description": "A page of inboxes."
      },
      "InboxOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "inbox_id": {
            "type": "string",
            "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Inbox Id"
          },
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          },
          "address": {
            "type": "string",
            "title": "Address",
            "x-untrusted": true
          },
          "is_catch_all": {
            "type": "boolean",
            "title": "Is Catch All"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "metadata": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "type": "object",
            "title": "Metadata",
            "x-untrusted": true
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable"
          },
          "labels_editable": {
            "type": "boolean",
            "title": "Labels Editable"
          },
          "labels_manageable": {
            "type": "boolean",
            "title": "Labels Manageable"
          },
          "mail_deletable": {
            "type": "boolean",
            "title": "Mail Deletable"
          },
          "mail_sendable": {
            "type": "boolean",
            "title": "Mail Sendable"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "version",
          "inbox_id",
          "project_id",
          "address",
          "is_catch_all",
          "display_name",
          "metadata",
          "client_id",
          "deletable",
          "labels_editable",
          "labels_manageable",
          "mail_deletable",
          "mail_sendable",
          "created_at"
        ],
        "title": "InboxOut",
        "description": "An inbox."
      },
      "InboxUpdate": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "InboxUpdate",
        "description": "Change an inbox; omitted fields stay as they are."
      },
      "InboxesDelete": {
        "properties": {
          "inbox_ids": {
            "items": {
              "type": "string",
              "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "maxItems": 200,
            "minItems": 1,
            "title": "Inbox Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "inbox_ids"
        ],
        "title": "InboxesDelete",
        "description": "Delete inboxes with all their mail: all of them or none."
      },
      "InvitationCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/Role",
            "default": "member"
          },
          "access": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccessIn"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email"
        ],
        "title": "InvitationCreate",
        "description": "Invite a person by email; only that address can accept (inviting again sends a new link). Our own test\naddresses cannot sign in, so they cannot be invited either."
      },
      "InvitationList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "invitations": {
            "items": {
              "$ref": "#/components/schemas/InvitationOut"
            },
            "type": "array",
            "title": "Invitations"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "invitations"
        ],
        "title": "InvitationList",
        "description": "A page of the organization's pending invitations, newest first (expired ones included until removed)."
      },
      "InvitationOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "invitation_id": {
            "type": "string",
            "pattern": "^inv_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Invitation Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "access": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Access"
              },
              {
                "type": "null"
              }
            ]
          },
          "names": {
            "$ref": "#/components/schemas/AccessNames"
          },
          "sent_at": {
            "type": "string",
            "format": "date-time",
            "title": "Sent At"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          },
          "revocable": {
            "type": "boolean",
            "title": "Revocable"
          },
          "resendable": {
            "type": "boolean",
            "title": "Resendable"
          }
        },
        "type": "object",
        "required": [
          "version",
          "invitation_id",
          "email",
          "role",
          "access",
          "names",
          "sent_at",
          "expires_at",
          "revocable",
          "resendable"
        ],
        "title": "InvitationOut",
        "description": "A pending invitation."
      },
      "InvitationPreview": {
        "properties": {
          "organization_name": {
            "type": "string",
            "title": "Organization Name"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "email_hint": {
            "type": "string",
            "title": "Email Hint"
          }
        },
        "type": "object",
        "required": [
          "organization_name",
          "role",
          "email_hint"
        ],
        "title": "InvitationPreview",
        "description": "What an invitation link offers, shown before accepting (and before signing in)."
      },
      "InvitationTokenIn": {
        "properties": {
          "token": {
            "type": "string",
            "maxLength": 128,
            "minLength": 20,
            "pattern": "^[A-Za-z0-9_-]+$",
            "title": "Token"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "token"
        ],
        "title": "InvitationTokenIn",
        "description": "The token from an invitation link."
      },
      "InvitationsRevoke": {
        "properties": {
          "invitation_ids": {
            "items": {
              "type": "string",
              "pattern": "^inv_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "maxItems": 200,
            "minItems": 1,
            "title": "Invitation Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "invitation_ids"
        ],
        "title": "InvitationsRevoke",
        "description": "Revoke pending invitations: all of them or none."
      },
      "JsonValue": {},
      "KeyAccess": {
        "properties": {
          "all": {
            "anyOf": [
              {
                "type": "string",
                "const": "full"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ApiPermission"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "All"
          },
          "projects": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "full"
                },
                {
                  "items": {
                    "$ref": "#/components/schemas/ApiPermission"
                  },
                  "type": "array"
                }
              ]
            },
            "propertyNames": {
              "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "object",
            "title": "Projects",
            "default": {}
          },
          "inboxes": {
            "additionalProperties": {
              "$ref": "#/components/schemas/InboxGrant"
            },
            "propertyNames": {
              "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "object",
            "title": "Inboxes",
            "default": {}
          },
          "organization": {
            "items": {
              "type": "string",
              "enum": [
                "project_create",
                "project_update",
                "project_delete"
              ]
            },
            "type": "array",
            "title": "Organization",
            "default": []
          }
        },
        "type": "object",
        "title": "KeyAccess",
        "description": "An API key's access as it is stored and shown."
      },
      "KeyAccessIn": {
        "properties": {
          "all": {
            "anyOf": [
              {
                "type": "string",
                "const": "full"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ApiPermission"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "All"
          },
          "projects": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "full"
                },
                {
                  "items": {
                    "$ref": "#/components/schemas/ApiPermission"
                  },
                  "type": "array"
                }
              ]
            },
            "propertyNames": {
              "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "object",
            "title": "Projects",
            "default": {}
          },
          "inboxes": {
            "additionalProperties": {
              "$ref": "#/components/schemas/InboxGrantIn"
            },
            "propertyNames": {
              "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "object",
            "title": "Inboxes",
            "default": {}
          },
          "organization": {
            "items": {
              "type": "string",
              "enum": [
                "project_create",
                "project_update",
                "project_delete"
              ]
            },
            "type": "array",
            "title": "Organization",
            "default": []
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "KeyAccessIn",
        "description": "An API key's access as a caller gives it: unknown fields are refused."
      },
      "LabelCount": {
        "properties": {
          "label_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^lbl_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Id"
          },
          "label": {
            "type": "string",
            "title": "Label",
            "x-untrusted": true
          },
          "system": {
            "type": "boolean",
            "title": "System"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "label_id",
          "label",
          "system",
          "count"
        ],
        "title": "LabelCount",
        "description": "A label and how many of the inbox's messages carry it: one of the project's own (``label_id``) or a system\nlabel (``system``, no id)."
      },
      "LabelCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[\\w.:-]+$",
            "title": "Name"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "inbox_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Inbox id (inb_…), address or *@domain (the catch-all)"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inbox Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "LabelCreate",
        "description": "Make a label of a project: of ``project_id``, or of the project of ``inbox_id`` (give one). The same name\nagain answers the label there is."
      },
      "LabelList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "labels": {
            "items": {
              "$ref": "#/components/schemas/LabelCount"
            },
            "type": "array",
            "title": "Labels"
          },
          "unread_received": {
            "type": "integer",
            "title": "Unread Received"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "labels",
          "unread_received"
        ],
        "title": "LabelList",
        "description": "A page of an inbox's labels with their counts: every own label of its project (0 when no message of the inbox\ncarries it) and the system labels its messages carry; ``unread_received`` — messages that came in and are not read\nyet (the Unread folder; Read is ``received`` less these)."
      },
      "LabelOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "label_id": {
            "type": "string",
            "pattern": "^lbl_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Label Id"
          },
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "x-untrusted": true
          }
        },
        "type": "object",
        "required": [
          "version",
          "label_id",
          "project_id",
          "name"
        ],
        "title": "LabelOut",
        "description": "A project's own label."
      },
      "LabelUpdate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[\\w.:-]+$",
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "LabelUpdate",
        "description": "Rename a label: every message and thread of its project that carries it carries the new name."
      },
      "LabelsDelete": {
        "properties": {
          "label_ids": {
            "items": {
              "type": "string",
              "pattern": "^lbl_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "maxItems": 200,
            "minItems": 1,
            "title": "Label Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "label_ids"
        ],
        "title": "LabelsDelete",
        "description": "Delete labels: they come off every message and thread of their projects. All of them or none."
      },
      "LabelsDeleted": {
        "properties": {
          "deleted": {
            "items": {
              "type": "string",
              "pattern": "^lbl_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "title": "Deleted"
          }
        },
        "type": "object",
        "required": [
          "deleted"
        ],
        "title": "LabelsDeleted",
        "description": "Labels were deleted."
      },
      "Link": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url",
            "x-untrusted": true
          },
          "text": {
            "type": "string",
            "title": "Text",
            "x-untrusted": true
          },
          "kind": {
            "$ref": "#/components/schemas/LinkKind"
          }
        },
        "type": "object",
        "required": [
          "url",
          "text",
          "kind"
        ],
        "title": "Link",
        "description": "A link found in a message (``mail.content.extract.links``): what intake stores and every answer shows."
      },
      "LinkKind": {
        "type": "string",
        "enum": [
          "verify",
          "reset",
          "unsubscribe",
          "other"
        ],
        "title": "LinkKind",
        "description": "What a link is for, guessed from its text and URL (``mail.content.extract``)."
      },
      "LinkList": {
        "properties": {
          "message_id": {
            "type": "string",
            "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Message Id"
          },
          "links": {
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "type": "array",
            "title": "Links"
          }
        },
        "type": "object",
        "required": [
          "message_id",
          "links"
        ],
        "title": "LinkList",
        "description": "Links of a message."
      },
      "Me": {
        "properties": {
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "organization": {
            "$ref": "#/components/schemas/OrganizationOut"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/OrganizationOut"
            },
            "type": "array",
            "title": "Organizations"
          },
          "access": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KeyAccess"
              },
              {
                "$ref": "#/components/schemas/Access"
              },
              {
                "type": "null"
              }
            ],
            "title": "Access"
          },
          "names": {
            "$ref": "#/components/schemas/AccessNames"
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "type": "array",
            "title": "Permissions"
          },
          "assignable_roles": {
            "items": {
              "$ref": "#/components/schemas/Role"
            },
            "type": "array",
            "title": "Assignable Roles"
          },
          "api_url": {
            "type": "string",
            "title": "Api Url"
          },
          "entitlements": {
            "$ref": "#/components/schemas/Entitlements"
          },
          "upgrades": {
            "additionalProperties": {
              "$ref": "#/components/schemas/Plan"
            },
            "propertyNames": {
              "enum": [
                "catch_all",
                "auto_create_inboxes",
                "plus_addresses",
                "custom_domain_sending",
                "new_recipients_without_ramp"
              ]
            },
            "type": "object",
            "title": "Upgrades"
          },
          "billing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "admin": {
            "type": "boolean",
            "title": "Admin"
          }
        },
        "type": "object",
        "required": [
          "user",
          "organization",
          "organizations",
          "access",
          "names",
          "permissions",
          "assignable_roles",
          "api_url",
          "entitlements",
          "upgrades",
          "billing",
          "admin"
        ],
        "title": "Me",
        "description": "Who is calling: the person (absent for API keys), the organization this request acts in, every organization\nthe person belongs to, and what the caller may do here."
      },
      "MemberList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/MemberOut"
            },
            "type": "array",
            "title": "Members"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "members"
        ],
        "title": "MemberList",
        "description": "A page of the organization's members, newest first."
      },
      "MemberOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "user_id": {
            "type": "string",
            "pattern": "^usr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "User Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "access": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Access"
              },
              {
                "type": "null"
              }
            ]
          },
          "names": {
            "$ref": "#/components/schemas/AccessNames"
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "title": "Joined At"
          },
          "editable": {
            "type": "boolean",
            "title": "Editable"
          },
          "role_editable": {
            "type": "boolean",
            "title": "Role Editable"
          },
          "removable": {
            "type": "boolean",
            "title": "Removable"
          }
        },
        "type": "object",
        "required": [
          "version",
          "user_id",
          "email",
          "name",
          "role",
          "access",
          "names",
          "joined_at",
          "editable",
          "role_editable",
          "removable"
        ],
        "title": "MemberOut",
        "description": "A person in the organization."
      },
      "MemberUpdate": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "access": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccessIn"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "role"
        ],
        "title": "MemberUpdate",
        "description": "Change a member's role and access (only an owner gives or takes ``owner``); access null: every project,\neverything — an owner's always (a narrowed one is refused). Their API keys do no more than the new access. An\naccess that reaches nothing may only be kept as it is (its projects were deleted), not newly given."
      },
      "MembersRemove": {
        "properties": {
          "user_ids": {
            "items": {
              "type": "string",
              "pattern": "^usr_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "maxItems": 200,
            "minItems": 1,
            "title": "User Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "user_ids"
        ],
        "title": "MembersRemove",
        "description": "Remove members, or leave with your own id among them: all of them or none (the last owner stays)."
      },
      "MessageBatch": {
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/MessageItem"
            },
            "type": "array",
            "title": "Messages"
          }
        },
        "type": "object",
        "required": [
          "messages"
        ],
        "title": "MessageBatch",
        "description": "The messages a batch changed, as list rows (their labels and ``version`` after it)."
      },
      "MessageForward": {
        "properties": {
          "text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10485760
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "html": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10485760
              },
              {
                "type": "null"
              }
            ],
            "title": "Html"
          },
          "labels": {
            "items": {
              "type": "string",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[\\w.:-]+$"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Labels",
            "default": []
          },
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/AttachmentIn"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Attachments",
            "default": []
          },
          "to": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "To",
            "default": []
          },
          "cc": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Cc",
            "default": []
          },
          "bcc": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Bcc",
            "default": []
          },
          "reply_to": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Reply To",
            "default": []
          },
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 998,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "MessageForward",
        "description": "A message of the inbox sent on to other recipients, attached whole (``message/rfc822``) under your text, in a\nnew thread; the subject is the parent's with ``Fwd:`` unless given."
      },
      "MessageItem": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "message_id": {
            "type": "string",
            "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Message Id"
          },
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          },
          "inbox_id": {
            "type": "string",
            "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Inbox Id"
          },
          "thread_id": {
            "type": "string",
            "pattern": "^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Thread Id"
          },
          "envelope_to": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Envelope To"
          },
          "envelope_from": {
            "type": "string",
            "title": "Envelope From",
            "x-untrusted": true
          },
          "plus_tag": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Plus Tag"
          },
          "from": {
            "items": {
              "$ref": "#/components/schemas/Party"
            },
            "type": "array",
            "title": "From"
          },
          "to": {
            "items": {
              "$ref": "#/components/schemas/Party"
            },
            "type": "array",
            "title": "To"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "preview": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Preview"
          },
          "labels": {
            "items": {
              "type": "string",
              "x-untrusted": true
            },
            "type": "array",
            "title": "Labels"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "received_at": {
            "type": "string",
            "format": "date-time",
            "title": "Received At"
          }
        },
        "type": "object",
        "required": [
          "version",
          "message_id",
          "project_id",
          "inbox_id",
          "thread_id",
          "envelope_to",
          "envelope_from",
          "plus_tag",
          "from",
          "to",
          "subject",
          "preview",
          "labels",
          "size",
          "received_at"
        ],
        "title": "MessageItem",
        "description": "A message in a list: no bodies."
      },
      "MessageList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/MessageItem"
            },
            "type": "array",
            "title": "Messages"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "messages"
        ],
        "title": "MessageList",
        "description": "A page of messages."
      },
      "MessageOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "message_id": {
            "type": "string",
            "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Message Id"
          },
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          },
          "inbox_id": {
            "type": "string",
            "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Inbox Id"
          },
          "thread_id": {
            "type": "string",
            "pattern": "^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Thread Id"
          },
          "envelope_to": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Envelope To"
          },
          "envelope_from": {
            "type": "string",
            "title": "Envelope From",
            "x-untrusted": true
          },
          "plus_tag": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Plus Tag"
          },
          "from": {
            "items": {
              "$ref": "#/components/schemas/Party"
            },
            "type": "array",
            "title": "From"
          },
          "to": {
            "items": {
              "$ref": "#/components/schemas/Party"
            },
            "type": "array",
            "title": "To"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "preview": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Preview"
          },
          "labels": {
            "items": {
              "type": "string",
              "x-untrusted": true
            },
            "type": "array",
            "title": "Labels"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "received_at": {
            "type": "string",
            "format": "date-time",
            "title": "Received At"
          },
          "cc": {
            "items": {
              "$ref": "#/components/schemas/Party"
            },
            "type": "array",
            "title": "Cc"
          },
          "bcc": {
            "items": {
              "$ref": "#/components/schemas/Party"
            },
            "type": "array",
            "title": "Bcc",
            "description": "Bcc of a message the inbox sent (only the sender's copy knows them); empty for mail that came in"
          },
          "reply_to": {
            "items": {
              "$ref": "#/components/schemas/Party"
            },
            "type": "array",
            "title": "Reply To"
          },
          "message_id_header": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Message Id Header"
          },
          "in_reply_to": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "In Reply To"
          },
          "references": {
            "items": {
              "type": "string",
              "x-untrusted": true
            },
            "type": "array",
            "title": "References"
          },
          "text": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "html": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Html"
          },
          "extracted_text": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Extracted Text"
          },
          "extracted_html": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Extracted Html"
          },
          "headers": {
            "items": {
              "items": {
                "type": "string",
                "x-untrusted": true
              },
              "type": "array"
            },
            "type": "array",
            "title": "Headers"
          },
          "links": {
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "type": "array",
            "title": "Links"
          },
          "codes": {
            "items": {
              "$ref": "#/components/schemas/Code"
            },
            "type": "array",
            "title": "Codes"
          },
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/AttachmentOut"
            },
            "type": "array",
            "title": "Attachments"
          },
          "truncated": {
            "items": {
              "$ref": "#/components/schemas/MessagePart"
            },
            "type": "array",
            "title": "Truncated",
            "description": "The fields this answer cut for size (empty: nothing was cut). The REST API never cuts (always empty); the mail-MCP's get_message cuts a body over its length limit (read it whole over REST). Fields an answer leaves out by choice (get_message's html, extracted_html and headers without include_html) are not listed."
          }
        },
        "type": "object",
        "required": [
          "version",
          "message_id",
          "project_id",
          "inbox_id",
          "thread_id",
          "envelope_to",
          "envelope_from",
          "plus_tag",
          "from",
          "to",
          "subject",
          "preview",
          "labels",
          "size",
          "received_at",
          "cc",
          "bcc",
          "reply_to",
          "message_id_header",
          "in_reply_to",
          "references",
          "text",
          "html",
          "extracted_text",
          "extracted_html",
          "headers",
          "links",
          "codes",
          "attachments",
          "truncated"
        ],
        "title": "MessageOut",
        "description": "A full message: bodies, links, codes, attachments."
      },
      "MessagePart": {
        "type": "string",
        "enum": [
          "text",
          "extracted_text",
          "html",
          "extracted_html",
          "links",
          "codes",
          "subject",
          "from",
          "to"
        ],
        "title": "MessagePart",
        "description": "A field of a message an answer may cut or empty for size (``truncated``)."
      },
      "MessageReceivedBody": {
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^evt_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Event Id"
          },
          "event_type": {
            "type": "string",
            "const": "message.received",
            "title": "Event Type"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "title": "Occurred At"
          },
          "message": {
            "$ref": "#/components/schemas/WebhookMessage"
          }
        },
        "type": "object",
        "required": [
          "event_id",
          "event_type",
          "occurred_at",
          "message"
        ],
        "title": "MessageReceivedBody",
        "description": "The body POSTed for ``message.received``: the message as it was stored, the same on every retry; signed per\nStandard Webhooks (``webhook-id`` = ``event_id``)."
      },
      "MessageRecipientBody": {
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^evt_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Event Id"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "message.delivered",
              "message.bounced",
              "message.complained",
              "message.rejected",
              "message.unsubscribed"
            ],
            "title": "Event Type"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "title": "Occurred At"
          },
          "message": {
            "$ref": "#/components/schemas/MessageItem"
          },
          "recipient": {
            "$ref": "#/components/schemas/RecipientOut"
          }
        },
        "type": "object",
        "required": [
          "event_id",
          "event_type",
          "occurred_at",
          "message",
          "recipient"
        ],
        "title": "MessageRecipientBody",
        "description": "The body POSTed when one recipient of a sent message was delivered to, bounced, complained, was rejected or\nunsubscribed: the message and that recipient."
      },
      "MessageReply": {
        "properties": {
          "text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10485760
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "html": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10485760
              },
              {
                "type": "null"
              }
            ],
            "title": "Html"
          },
          "labels": {
            "items": {
              "type": "string",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[\\w.:-]+$"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Labels",
            "default": []
          },
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/AttachmentIn"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Attachments",
            "default": []
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "MessageReply",
        "description": "A reply to a message of the inbox, in its thread: to its sender (``reply_to`` or ``from``), with ``reply-all``\nalso to its other recipients; the subject is the parent's with ``Re:``."
      },
      "MessageSend": {
        "properties": {
          "text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10485760
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "html": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10485760
              },
              {
                "type": "null"
              }
            ],
            "title": "Html"
          },
          "labels": {
            "items": {
              "type": "string",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[\\w.:-]+$"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Labels",
            "default": []
          },
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/AttachmentIn"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Attachments",
            "default": []
          },
          "to": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "To",
            "default": []
          },
          "cc": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Cc",
            "default": []
          },
          "bcc": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Bcc",
            "default": []
          },
          "reply_to": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Reply To",
            "default": []
          },
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 998,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "MessageSend",
        "description": "A new message from an inbox (a new thread)."
      },
      "MessageSent": {
        "properties": {
          "message_id": {
            "type": "string",
            "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Message Id"
          },
          "thread_id": {
            "type": "string",
            "pattern": "^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Thread Id"
          }
        },
        "type": "object",
        "required": [
          "message_id",
          "thread_id"
        ],
        "title": "MessageSent",
        "description": "A sent message: its copy in the inbox and its thread. Delivery goes on after the answer (``message.sent``,\n``message.delivered`` and the rest)."
      },
      "MessageSentBody": {
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^evt_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Event Id"
          },
          "event_type": {
            "type": "string",
            "const": "message.sent",
            "title": "Event Type"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "title": "Occurred At"
          },
          "message": {
            "$ref": "#/components/schemas/MessageItem"
          }
        },
        "type": "object",
        "required": [
          "event_id",
          "event_type",
          "occurred_at",
          "message"
        ],
        "title": "MessageSentBody",
        "description": "The body POSTed for ``message.sent``: the sent message, once the first of its recipients was handed on (SES\ntook it, or an inbox of ours got it)."
      },
      "MessageUpdate": {
        "properties": {
          "add_labels": {
            "items": {
              "type": "string",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[\\w.:-]+$"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Add Labels",
            "default": []
          },
          "remove_labels": {
            "items": {
              "type": "string",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[\\w.:-]+$"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Remove Labels",
            "default": []
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "MessageUpdate",
        "description": "Add or remove labels of a message."
      },
      "MessagesDelete": {
        "properties": {
          "message_ids": {
            "items": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "maxItems": 200,
            "minItems": 1,
            "title": "Message Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "message_ids"
        ],
        "title": "MessagesDelete",
        "description": "Delete messages for good: all of them or none."
      },
      "MessagesUpdate": {
        "properties": {
          "add_labels": {
            "items": {
              "type": "string",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[\\w.:-]+$"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Add Labels",
            "default": []
          },
          "remove_labels": {
            "items": {
              "type": "string",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[\\w.:-]+$"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Remove Labels",
            "default": []
          },
          "message_ids": {
            "items": {
              "type": "string",
              "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "maxItems": 200,
            "minItems": 1,
            "title": "Message Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "message_ids"
        ],
        "title": "MessagesUpdate",
        "description": "Add or remove labels of messages (read is removing ``unread``): all of them or none."
      },
      "Offer": {
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/Plan"
          },
          "amount": {
            "type": "integer",
            "title": "Amount"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "interval": {
            "type": "string",
            "title": "Interval"
          }
        },
        "type": "object",
        "required": [
          "plan",
          "amount",
          "currency",
          "interval"
        ],
        "title": "Offer",
        "description": "The paid plan on sale and its price (``organization.billing.catalog.default_price``)."
      },
      "OrganizationCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "OrganizationCreate",
        "description": "Create an organization; the caller becomes its owner and it gets a Default project."
      },
      "OrganizationOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "organization_id": {
            "type": "string",
            "pattern": "^org_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Organization Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "image": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^img_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "plan": {
            "$ref": "#/components/schemas/Plan"
          },
          "role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Role"
              },
              {
                "type": "null"
              }
            ]
          },
          "sending_suspended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sending Suspended At"
          },
          "sending_suspended_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sending Suspended Reason"
          },
          "history_kept_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "History Kept Until"
          }
        },
        "type": "object",
        "required": [
          "version",
          "organization_id",
          "name",
          "image",
          "slug",
          "plan",
          "role",
          "sending_suspended_at",
          "sending_suspended_reason",
          "history_kept_until"
        ],
        "title": "OrganizationOut",
        "description": "An organization and the caller's role in it (null for an API key)."
      },
      "OrganizationResumed": {
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/ResumeOutcome"
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          },
          "organization": {
            "$ref": "#/components/schemas/AdminOrganizationOut"
          }
        },
        "type": "object",
        "required": [
          "outcome",
          "detail",
          "organization"
        ],
        "title": "OrganizationResumed",
        "description": "What lifting an organization's pause came to, and the organization's row as it is now."
      },
      "OrganizationUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "image": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^img_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "OrganizationUpdate",
        "description": "Change the organization's own settings: only the fields sent (its slug, in the dashboard's addresses, stays)."
      },
      "Outcome": {
        "type": "string",
        "enum": [
          "ok",
          "refused",
          "failed"
        ],
        "title": "Outcome",
        "description": "How a call ended, as the dashboard groups it: done, refused (the caller's input, access, plan or limit), or\nfailed on our side."
      },
      "Party": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "x-untrusted": true
          },
          "address": {
            "type": "string",
            "title": "Address",
            "x-untrusted": true
          }
        },
        "type": "object",
        "required": [
          "name",
          "address"
        ],
        "title": "Party",
        "description": "A name and address from a header."
      },
      "Permission": {
        "type": "string",
        "enum": [
          "api_keys",
          "all_api_keys",
          "project_create",
          "project_update",
          "project_delete",
          "members",
          "organization"
        ],
        "title": "Permission",
        "description": "What the caller may do in the organization itself (the dashboard hides what it may not); what it may do inside\nprojects is its access (``organization.access.grants``)."
      },
      "Plan": {
        "type": "string",
        "enum": [
          "free",
          "pro"
        ],
        "title": "Plan",
        "description": "Billing plan of an organization."
      },
      "ProjectCount": {
        "properties": {
          "inboxes": {
            "type": "integer",
            "title": "Inboxes"
          },
          "unread": {
            "type": "integer",
            "title": "Unread"
          },
          "webhooks": {
            "type": "integer",
            "title": "Webhooks"
          },
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          }
        },
        "type": "object",
        "required": [
          "inboxes",
          "unread",
          "webhooks",
          "project_id"
        ],
        "title": "ProjectCount",
        "description": "The counts of one project."
      },
      "ProjectCounts": {
        "properties": {
          "total": {
            "$ref": "#/components/schemas/Counts"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/ProjectCount"
            },
            "type": "array",
            "title": "Projects"
          }
        },
        "type": "object",
        "required": [
          "total",
          "projects"
        ],
        "title": "ProjectCounts",
        "description": "The counts of every project the caller sees and their total (for the dashboard's projects pane); a project\nwith nothing to count is left out."
      },
      "ProjectCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ProjectCreate",
        "description": "Create a project: its own mail subdomain, ``test@`` and catch-all are made with it (the catch-all on when the\nplan has it)."
      },
      "ProjectList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/ProjectOut"
            },
            "type": "array",
            "title": "Projects"
          }
        },
        "type": "object",
        "required": [
          "count",
          "projects"
        ],
        "title": "ProjectList",
        "description": "The projects the caller sees, in their hand-made order."
      },
      "ProjectName": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          }
        },
        "type": "object",
        "required": [
          "name",
          "slug"
        ],
        "title": "ProjectName",
        "description": "A project as an access's names show it: its name and its slug (the dashboard's color for it)."
      },
      "ProjectOrder": {
        "properties": {
          "ids": {
            "items": {
              "type": "string",
              "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "maxItems": 1000,
            "minItems": 1,
            "title": "Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "ids"
        ],
        "title": "ProjectOrder",
        "description": "A new order of the projects the caller sees: each of their ids once, first to last (the others keep their\nplaces)."
      },
      "ProjectOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "image": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^img_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image"
          },
          "catch_all_enabled": {
            "type": "boolean",
            "title": "Catch All Enabled"
          },
          "auto_create_inboxes": {
            "type": "boolean",
            "title": "Auto Create Inboxes"
          },
          "plus_addresses_enabled": {
            "type": "boolean",
            "title": "Plus Addresses Enabled"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "subdomain": {
            "type": "string",
            "title": "Subdomain"
          },
          "grant": {
            "anyOf": [
              {
                "type": "string",
                "const": "full"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ApiPermission"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grant"
          },
          "inbox_grants": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "full"
                },
                {
                  "items": {
                    "type": "string",
                    "enum": [
                      "inbox_read",
                      "inbox_update",
                      "message_read",
                      "message_update",
                      "message_delete",
                      "message_send",
                      "domain_read"
                    ]
                  },
                  "type": "array"
                }
              ]
            },
            "propertyNames": {
              "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "object",
            "title": "Inbox Grants"
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable"
          },
          "only": {
            "type": "boolean",
            "title": "Only"
          },
          "position": {
            "type": "integer",
            "title": "Position"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "version",
          "project_id",
          "name",
          "description",
          "image",
          "catch_all_enabled",
          "auto_create_inboxes",
          "plus_addresses_enabled",
          "slug",
          "subdomain",
          "grant",
          "inbox_grants",
          "deletable",
          "only",
          "position",
          "created_at"
        ],
        "title": "ProjectOut",
        "description": "A project: its own mail subdomain (``<slug>.<shared domain>`` when it was made), inboxes and webhooks."
      },
      "ProjectUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "image": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^img_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image"
          },
          "catch_all_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Catch All Enabled"
          },
          "auto_create_inboxes": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Create Inboxes"
          },
          "plus_addresses_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plus Addresses Enabled"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ProjectUpdate",
        "description": "Change a project's settings: only the fields sent (its subdomain stays)."
      },
      "ProviderOut": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "label": {
            "type": "string",
            "title": "Label"
          }
        },
        "type": "object",
        "required": [
          "name",
          "label"
        ],
        "title": "ProviderOut",
        "description": "A sign-in provider the dashboard shows a button for (``name`` goes into its sign-in URL)."
      },
      "ReceivedMail": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "last_7_days": {
            "type": "integer",
            "title": "Last 7 Days"
          },
          "last_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last At"
          }
        },
        "type": "object",
        "required": [
          "total",
          "last_7_days",
          "last_at"
        ],
        "title": "ReceivedMail",
        "description": "Mail an organization's inboxes received."
      },
      "RecipientKind": {
        "type": "string",
        "enum": [
          "to",
          "cc",
          "bcc"
        ],
        "title": "RecipientKind",
        "description": "How a sent message names a recipient (``MessageDelivery.kind``): To and Cc are in its headers, Bcc is not."
      },
      "RecipientOut": {
        "properties": {
          "address": {
            "type": "string",
            "title": "Address"
          },
          "kind": {
            "$ref": "#/components/schemas/RecipientKind"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "bounced_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bounced At"
          },
          "complained_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Complained At"
          },
          "rejected_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rejected At"
          },
          "unsubscribed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unsubscribed At"
          }
        },
        "type": "object",
        "required": [
          "address",
          "kind",
          "reason",
          "sent_at",
          "delivered_at",
          "bounced_at",
          "complained_at",
          "rejected_at",
          "unsubscribed_at"
        ],
        "title": "RecipientOut",
        "description": "One recipient of a sent message and what became of it so far (each time is set once)."
      },
      "RecordKey": {
        "type": "string",
        "enum": [
          "verification",
          "mx",
          "dkim",
          "mail_from",
          "spf",
          "dmarc"
        ],
        "title": "RecordKey",
        "description": "Which DNS records of a custom domain (the keys of ``Domain.found``; the records: ``mail.domain_records``):\nreceiving's (``verification``, ``mx``: read by our check), sending's (``dkim``: three CNAMEs, as SES finds them)\nand the recommended ones (``mail_from``: the bounce domain's MX, as SES finds it; ``spf``: its TXT; ``dmarc``: the\ndomain's DMARC TXT — both read by our check: SES does not look for them)."
      },
      "ResumeOutcome": {
        "type": "string",
        "enum": [
          "lifted",
          "not_paused",
          "tenant_held"
        ],
        "title": "ResumeOutcome",
        "description": "What ``resume`` came to."
      },
      "Role": {
        "type": "string",
        "enum": [
          "owner",
          "admin",
          "member"
        ],
        "title": "Role",
        "description": "What a person may do in an organization (``organization.access.permissions.ROLE_PERMISSIONS``; rules in\naccess.md)."
      },
      "SendingStatus": {
        "type": "string",
        "enum": [
          "off",
          "pending",
          "verified",
          "failed"
        ],
        "title": "SendingStatus",
        "description": "Whether mail is sent from a custom domain (Pro, ``mail.outbound.identities``): ``off``, ``pending`` (its SES\nidentity waits for the DKIM records), ``verified`` (SES signs its mail), ``failed`` (SES did not find the DKIM\nrecords in time, or lost them)."
      },
      "SentMail": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "last_7_days": {
            "type": "integer",
            "title": "Last 7 Days"
          },
          "last_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last At"
          },
          "external_recipients": {
            "type": "integer",
            "title": "External Recipients"
          },
          "bounced": {
            "type": "integer",
            "title": "Bounced"
          },
          "complained": {
            "type": "integer",
            "title": "Complained"
          }
        },
        "type": "object",
        "required": [
          "total",
          "last_7_days",
          "last_at",
          "external_recipients",
          "bounced",
          "complained"
        ],
        "title": "SentMail",
        "description": "Mail an organization's inboxes sent — a message once at least one recipient got it, at its first recipient's\ntime; one not sent yet or rejected before it left is not counted — and its recipients outside our domains (by the\nstored mail)."
      },
      "SignedInPerson": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "name",
          "email"
        ],
        "title": "SignedInPerson",
        "description": "Who is signed in in this browser, as much as the public site's contact form fills in (``GET /auth/person``)."
      },
      "ThreadItem": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "thread_id": {
            "type": "string",
            "pattern": "^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Thread Id"
          },
          "inbox_id": {
            "type": "string",
            "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Inbox Id"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "labels": {
            "items": {
              "type": "string",
              "x-untrusted": true
            },
            "type": "array",
            "title": "Labels"
          },
          "message_count": {
            "type": "integer",
            "title": "Message Count"
          },
          "last_message_at": {
            "type": "string",
            "format": "date-time",
            "title": "Last Message At"
          }
        },
        "type": "object",
        "required": [
          "version",
          "thread_id",
          "inbox_id",
          "subject",
          "labels",
          "message_count",
          "last_message_at"
        ],
        "title": "ThreadItem",
        "description": "A thread in a list or after a change: no messages."
      },
      "ThreadList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "threads": {
            "items": {
              "$ref": "#/components/schemas/ThreadItem"
            },
            "type": "array",
            "title": "Threads"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "threads"
        ],
        "title": "ThreadList",
        "description": "A page of threads."
      },
      "ThreadOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "thread_id": {
            "type": "string",
            "pattern": "^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Thread Id"
          },
          "inbox_id": {
            "type": "string",
            "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Inbox Id"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "labels": {
            "items": {
              "type": "string",
              "x-untrusted": true
            },
            "type": "array",
            "title": "Labels"
          },
          "message_count": {
            "type": "integer",
            "title": "Message Count"
          },
          "last_message_at": {
            "type": "string",
            "format": "date-time",
            "title": "Last Message At"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/MessageItem"
            },
            "type": "array",
            "title": "Messages"
          }
        },
        "type": "object",
        "required": [
          "version",
          "thread_id",
          "inbox_id",
          "subject",
          "labels",
          "message_count",
          "last_message_at",
          "messages"
        ],
        "title": "ThreadOut",
        "description": "A thread fetched alone: with its messages, oldest first (no bodies)."
      },
      "ThreadUpdate": {
        "properties": {
          "add_labels": {
            "items": {
              "type": "string",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[\\w.:-]+$"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Add Labels",
            "default": []
          },
          "remove_labels": {
            "items": {
              "type": "string",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[\\w.:-]+$"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Remove Labels",
            "default": []
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ThreadUpdate",
        "description": "Add or remove labels of a thread."
      },
      "Transport": {
        "type": "string",
        "enum": [
          "mcp",
          "rest"
        ],
        "title": "Transport",
        "description": "How a call came in."
      },
      "TrialOut": {
        "properties": {
          "api_key": {
            "type": "string",
            "title": "Api Key"
          },
          "address": {
            "type": "string",
            "title": "Address"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "api_key",
          "address",
          "expires_at"
        ],
        "title": "TrialOut",
        "description": "An anonymous trial: an API key that reads one inbox's mail until ``expires_at``."
      },
      "TrialStart": {
        "properties": {
          "secret": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "title": "Secret"
          },
          "turnstile_token": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Turnstile Token"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "secret"
        ],
        "title": "TrialStart",
        "description": "Start an anonymous trial, or get back the one this browser started (``secret``)."
      },
      "Usage": {
        "properties": {
          "used": {
            "$ref": "#/components/schemas/Used"
          },
          "entitlements": {
            "$ref": "#/components/schemas/Entitlements"
          },
          "period_ends_at": {
            "type": "string",
            "format": "date-time",
            "title": "Period Ends At"
          },
          "day_ends_at": {
            "type": "string",
            "format": "date-time",
            "title": "Day Ends At"
          },
          "blocked": {
            "items": {
              "$ref": "#/components/schemas/Blocked"
            },
            "type": "array",
            "title": "Blocked"
          },
          "room_changes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Room Changes At"
          }
        },
        "type": "object",
        "required": [
          "used",
          "entitlements",
          "period_ends_at",
          "day_ends_at",
          "blocked",
          "room_changes_at"
        ],
        "title": "Usage",
        "description": "How much of its plan the organization has used: the counts with the limits they were read against (one\nsnapshot: a plan changed meanwhile never pairs a count with another plan's number) and when the quotas start\nagain."
      },
      "Used": {
        "properties": {
          "projects": {
            "type": "integer",
            "title": "Projects"
          },
          "inboxes": {
            "type": "integer",
            "title": "Inboxes"
          },
          "members": {
            "type": "integer",
            "title": "Members"
          },
          "webhooks": {
            "type": "integer",
            "title": "Webhooks"
          },
          "custom_domains": {
            "type": "integer",
            "title": "Custom Domains"
          },
          "messages_per_month": {
            "type": "integer",
            "title": "Messages Per Month"
          },
          "recipients_per_day": {
            "type": "integer",
            "title": "Recipients Per Day"
          },
          "received_per_day": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Received Per Day"
          }
        },
        "type": "object",
        "required": [
          "projects",
          "inboxes",
          "members",
          "webhooks",
          "custom_domains",
          "messages_per_month",
          "recipients_per_day",
          "received_per_day"
        ],
        "title": "Used",
        "description": "How many of each counted limit the organization has used, each field named for its limit; counted as the\nlimit's own check counts it."
      },
      "UserOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "user_id": {
            "type": "string",
            "pattern": "^usr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "User Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          }
        },
        "type": "object",
        "required": [
          "version",
          "user_id",
          "email",
          "name",
          "avatar_url"
        ],
        "title": "UserOut",
        "description": "The signed-in person."
      },
      "WaitResult": {
        "properties": {
          "message": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MessageOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "cursor": {
            "type": "string",
            "title": "Cursor",
            "description": "The cursor of the previous wait answer (opaque)"
          }
        },
        "type": "object",
        "required": [
          "message",
          "cursor"
        ],
        "title": "WaitResult",
        "description": "The answer of a wait: the message (null when nothing arrived in time) and the cursor to go on from."
      },
      "WebhookAttemptList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/WebhookAttemptOut"
            },
            "type": "array",
            "title": "Attempts"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "attempts"
        ],
        "title": "WebhookAttemptList",
        "description": "A page of a webhook's delivery log, newest first."
      },
      "WebhookAttemptOut": {
        "properties": {
          "attempt_id": {
            "type": "string",
            "pattern": "^wha_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Attempt Id"
          },
          "event_id": {
            "type": "string",
            "pattern": "^evt_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Event Id"
          },
          "event_type": {
            "type": "string",
            "enum": [
              "domain.verified",
              "message.bounced",
              "message.complained",
              "message.delivered",
              "message.received",
              "message.rejected",
              "message.sent",
              "message.unsubscribed"
            ],
            "title": "Event Type"
          },
          "subject_id": {
            "type": "string",
            "title": "Subject Id"
          },
          "attempt": {
            "type": "integer",
            "title": "Attempt"
          },
          "outcome": {
            "$ref": "#/components/schemas/AttemptOutcome"
          },
          "status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Code"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AttemptError"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "attempt_id",
          "event_id",
          "event_type",
          "subject_id",
          "attempt",
          "outcome",
          "status_code",
          "error",
          "duration_ms",
          "created_at"
        ],
        "title": "WebhookAttemptOut",
        "description": "One delivery attempt of an event to a webhook, or one skipped by the organization's per-minute limit."
      },
      "WebhookCreate": {
        "properties": {
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "url": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "format": "uri",
            "title": "Url"
          },
          "event_types": {
            "items": {
              "type": "string",
              "enum": [
                "domain.verified",
                "message.bounced",
                "message.complained",
                "message.delivered",
                "message.received",
                "message.rejected",
                "message.sent",
                "message.unsubscribed"
              ]
            },
            "type": "array",
            "minItems": 1,
            "title": "Event Types"
          },
          "scope": {
            "$ref": "#/components/schemas/WebhookScope",
            "default": "project"
          },
          "inbox_ids": {
            "items": {
              "type": "string",
              "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Inbox Ids",
            "default": []
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "url"
        ],
        "title": "WebhookCreate",
        "description": "Subscribe a URL to events of a project: of every inbox (``scope`` ``project``, the default), of chosen ones\n(``inboxes`` with ``inbox_ids``), or only mail that came through the catch-all (``catch_all``, a paid feature)."
      },
      "WebhookInboxOut": {
        "properties": {
          "inbox_id": {
            "type": "string",
            "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Inbox Id"
          },
          "address": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          }
        },
        "type": "object",
        "required": [
          "inbox_id",
          "address"
        ],
        "title": "WebhookInboxOut",
        "description": "An inbox a webhook is limited to."
      },
      "WebhookList": {
        "properties": {
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "next_page_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Page Token"
          },
          "webhooks": {
            "items": {
              "$ref": "#/components/schemas/WebhookOut"
            },
            "type": "array",
            "title": "Webhooks"
          }
        },
        "type": "object",
        "required": [
          "count",
          "next_page_token",
          "webhooks"
        ],
        "title": "WebhookList",
        "description": "A page of the organization's webhooks."
      },
      "WebhookMessage": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "message_id": {
            "type": "string",
            "pattern": "^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Message Id"
          },
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          },
          "inbox_id": {
            "type": "string",
            "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Inbox Id"
          },
          "thread_id": {
            "type": "string",
            "pattern": "^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Thread Id"
          },
          "envelope_to": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Envelope To"
          },
          "envelope_from": {
            "type": "string",
            "title": "Envelope From",
            "x-untrusted": true
          },
          "plus_tag": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Plus Tag"
          },
          "from": {
            "items": {
              "$ref": "#/components/schemas/Party"
            },
            "type": "array",
            "title": "From"
          },
          "to": {
            "items": {
              "$ref": "#/components/schemas/Party"
            },
            "type": "array",
            "title": "To"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "preview": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Preview"
          },
          "labels": {
            "items": {
              "type": "string",
              "x-untrusted": true
            },
            "type": "array",
            "title": "Labels"
          },
          "size": {
            "type": "integer",
            "title": "Size"
          },
          "received_at": {
            "type": "string",
            "format": "date-time",
            "title": "Received At"
          },
          "extracted_text": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Extracted Text"
          },
          "links": {
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "type": "array",
            "title": "Links"
          },
          "codes": {
            "items": {
              "$ref": "#/components/schemas/Code"
            },
            "type": "array",
            "title": "Codes"
          },
          "truncated": {
            "items": {
              "$ref": "#/components/schemas/MessagePart"
            },
            "type": "array",
            "title": "Truncated",
            "description": "The fields this body cut or emptied to stay under 256 KB (empty: nothing was cut; the API has them whole): first extracted_text (null), then links and codes (empty), then subject, from and to (shortened). HTML and headers are never in a webhook body and are not listed."
          }
        },
        "type": "object",
        "required": [
          "version",
          "message_id",
          "project_id",
          "inbox_id",
          "thread_id",
          "envelope_to",
          "envelope_from",
          "plus_tag",
          "from",
          "to",
          "subject",
          "preview",
          "labels",
          "size",
          "received_at",
          "extracted_text",
          "links",
          "codes",
          "truncated"
        ],
        "title": "WebhookMessage",
        "description": "The message in a webhook body: the list shape plus what a test needs right away (no HTML, no headers)."
      },
      "WebhookOut": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "webhook_id": {
            "type": "string",
            "pattern": "^whk_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Webhook Id"
          },
          "project_id": {
            "type": "string",
            "pattern": "^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$",
            "title": "Project Id"
          },
          "url": {
            "type": "string",
            "title": "Url",
            "x-untrusted": true
          },
          "event_types": {
            "items": {
              "type": "string",
              "enum": [
                "domain.verified",
                "message.bounced",
                "message.complained",
                "message.delivered",
                "message.received",
                "message.rejected",
                "message.sent",
                "message.unsubscribed"
              ]
            },
            "type": "array",
            "title": "Event Types"
          },
          "scope": {
            "$ref": "#/components/schemas/WebhookScope"
          },
          "inboxes": {
            "items": {
              "$ref": "#/components/schemas/WebhookInboxOut"
            },
            "type": "array",
            "title": "Inboxes"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DisabledReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string",
                "x-untrusted": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          },
          "editable": {
            "type": "boolean",
            "title": "Editable"
          },
          "deletable": {
            "type": "boolean",
            "title": "Deletable"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "version",
          "webhook_id",
          "project_id",
          "url",
          "event_types",
          "scope",
          "inboxes",
          "enabled",
          "disabled_reason",
          "client_id",
          "secret",
          "editable",
          "deletable",
          "created_at"
        ],
        "title": "WebhookOut",
        "description": "A webhook; ``secret`` verifies the ``webhook-signature`` header (Standard Webhooks)."
      },
      "WebhookScope": {
        "type": "string",
        "enum": [
          "project",
          "inboxes",
          "catch_all"
        ],
        "title": "WebhookScope",
        "description": "What mail of its project a webhook receives."
      },
      "WebhookUpdate": {
        "properties": {
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "event_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "domain.verified",
                    "message.bounced",
                    "message.complained",
                    "message.delivered",
                    "message.received",
                    "message.rejected",
                    "message.sent",
                    "message.unsubscribed"
                  ]
                },
                "type": "array",
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Types"
          },
          "inbox_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "pattern": "^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$"
                },
                "type": "array",
                "maxItems": 100,
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Inbox Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "WebhookUpdate",
        "description": "Change a webhook; omitted fields stay as they are. Its URL and scope never change: make another one."
      }
    }
  },
  "servers": [
    {
      "url": "https://api.yoagent.dev"
    }
  ]
}
