{
  "openapi": "3.1.0",
  "info": {
    "title": "SHADE API",
    "version": "1",
    "description": "The content API (for sites and other frontends, with a read token) and the account API (for browsers on the site). Breaking changes come as /api/v2."
  },
  "tags": [
    {
      "name": "Content",
      "description": "Read published content. Needs a read token: `Authorization: Bearer <token>`."
    },
    {
      "name": "Account",
      "description": "Called by visitors' browsers on the site; CORS allows the site's origin."
    },
    {
      "name": "Data",
      "description": "Manage collections from other systems (decision 0016). Needs a data token: `Authorization: Bearer <token>`; it reaches only the collections it was given, read or write."
    }
  ],
  "paths": {
    "/api/v1/content/site": {
      "get": {
        "summary": "The site: name, languages, settings, and what plugins add (navigation, footer, theme)",
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 10
            }
          }
        ],
        "security": [
          {
            "readToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/content/media": {
      "get": {
        "summary": "Media items by id, with their sizes and alt text",
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 10
            }
          },
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "readToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/content/data/{name}": {
      "get": {
        "summary": "Items of a data source for a loop on a page, and how to show their fields",
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2000,
              "pattern": "^\\/(?![/\\\\])"
            }
          },
          {
            "name": "parameters",
            "in": "query",
            "required": false,
            "schema": {
              "default": "{}",
              "type": "string",
              "maxLength": 4000
            }
          }
        ],
        "security": [
          {
            "readToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/content/module-sites": {
      "get": {
        "summary": "The site parts of server packages (their site and shared sources), for the site build",
        "tags": [
          "Content"
        ],
        "security": [
          {
            "readToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/content/search": {
      "get": {
        "summary": "Full-text search over published entries of collections with a public API, with highlights",
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 10
            }
          },
          {
            "name": "collections",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "security": [
          {
            "readToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/content/collections/{slug}": {
      "get": {
        "summary": "Published entries of a collection with a public API",
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 4000
            }
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 2
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 10
            }
          }
        ],
        "security": [
          {
            "readToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/content/collections/{slug}/{idOrSlug}": {
      "get": {
        "summary": "One published entry by id or slug",
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "idOrSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 10
            }
          }
        ],
        "security": [
          {
            "readToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/content/preview": {
      "get": {
        "summary": "What a preview link shows: an entry's draft or a version set, in the published shapes",
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000
            }
          }
        ],
        "security": [
          {
            "readToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/session": {
      "get": {
        "summary": "Who is signed in: a confirmed account's name and address, or null",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "email"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "account"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/sign-in": {
      "post": {
        "summary": "Signs an account in with their address and password, and sets the session cookie",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "email",
                  "password"
                ]
              }
            }
          }
        },
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "account": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "email"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "account"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/sign-up": {
      "post": {
        "summary": "Signs an account up and sends the confirmation email; the same answer whether the address has an account or not",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 320
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "back": {
                    "type": "string",
                    "maxLength": 2048
                  }
                },
                "required": [
                  "name",
                  "email",
                  "password"
                ]
              }
            }
          }
        },
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/sign-out": {
      "post": {
        "summary": "Ends the account's session",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/password-reset": {
      "post": {
        "summary": "Sends a link to choose a password; the same answer whether the address has an account or not",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320
                  },
                  "back": {
                    "type": "string",
                    "maxLength": 2048
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/password-reset/confirm": {
      "post": {
        "summary": "Chooses a new password with the token from the reset email; confirms the address and ends every session",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "token",
                  "password"
                ]
              }
            }
          }
        },
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/delete": {
      "post": {
        "summary": "Deletes the signed-in account's own account, with the password",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "password"
                ]
              }
            }
          }
        },
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/email/events/{token}": {
      "post": {
        "summary": "Brevo's webhook for bounces and complaints; a hint SHADE confirms with Brevo",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/errors": {
      "post": {
        "summary": "Reports a browser error from the site (no body, cookie or address is kept)",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "stack": {
                    "type": "string",
                    "maxLength": 8000
                  },
                  "path": {
                    "type": "string",
                    "maxLength": 500,
                    "pattern": "^\\/"
                  },
                  "release": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9._@+-]{0,99}$"
                  }
                },
                "required": [
                  "message",
                  "path"
                ]
              }
            }
          }
        },
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/confirm": {
      "post": {
        "summary": "Confirms an account's address with the token from the email and the account's password, and signs in",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "token",
                  "password"
                ]
              }
            }
          }
        },
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/consent-receipt": {
      "post": {
        "summary": "Keeps a consent choice as a receipt (a random id, the categories and whether each was allowed; no address or browser)",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiptId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "configuration": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "choices": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "version": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{16}$"
                        },
                        "granted": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "key",
                        "version",
                        "granted"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "receiptId",
                  "configuration",
                  "choices"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/data": {
      "get": {
        "summary": "An account's own data, as JSON",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/organisations": {
      "get": {
        "summary": "The organisations the signed-in account belongs to, with their Membership in each",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string"
                      },
                      "rank": {
                        "type": "string",
                        "enum": [
                          "owner",
                          "manager",
                          "member"
                        ]
                      },
                      "since": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "rank",
                      "since"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      },
      "post": {
        "summary": "Starts an organisation with the signed-in account as its owner, where the team allows it",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "since": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "accountId",
                          "name",
                          "email",
                          "rank",
                          "since"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "invites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "email": {
                            "type": "string"
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expired": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "id",
                          "email",
                          "rank",
                          "expiresAt",
                          "expired",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rank": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "manager",
                        "member"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "createdAt",
                    "members",
                    "invites",
                    "rank"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/organisations/{id}": {
      "get": {
        "summary": "One of the signed-in account's organisations: its members, and its invitations for owners and managers",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "since": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "accountId",
                          "name",
                          "email",
                          "rank",
                          "since"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "invites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "email": {
                            "type": "string"
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expired": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "id",
                          "email",
                          "rank",
                          "expiresAt",
                          "expired",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rank": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "manager",
                        "member"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "createdAt",
                    "members",
                    "invites",
                    "rank"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      },
      "patch": {
        "summary": "Renames the organisation (owners)",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "since": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "accountId",
                          "name",
                          "email",
                          "rank",
                          "since"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "invites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "email": {
                            "type": "string"
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expired": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "id",
                          "email",
                          "rank",
                          "expiresAt",
                          "expired",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rank": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "manager",
                        "member"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "createdAt",
                    "members",
                    "invites",
                    "rank"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      },
      "delete": {
        "summary": "Deletes the organisation for good, with what it owns (owners)",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/organisations/{id}/kept": {
      "get": {
        "summary": "What deleting the organisation takes with it, by kind (owners)",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kinds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "key",
                          "label",
                          "count"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "kinds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/organisations/{id}/invites": {
      "post": {
        "summary": "Invites an address by email for 7 days (owners any Membership, managers members); the same answer whether it has an account or not",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320
                  },
                  "rank": {
                    "default": "member",
                    "type": "string",
                    "enum": [
                      "owner",
                      "manager",
                      "member"
                    ]
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "since": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "accountId",
                          "name",
                          "email",
                          "rank",
                          "since"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "invites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "email": {
                            "type": "string"
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expired": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "id",
                          "email",
                          "rank",
                          "expiresAt",
                          "expired",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rank": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "manager",
                        "member"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "createdAt",
                    "members",
                    "invites",
                    "rank"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/organisations/{id}/invites/{invite}": {
      "delete": {
        "summary": "Withdraws an invitation",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invite",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "since": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "accountId",
                          "name",
                          "email",
                          "rank",
                          "since"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "invites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "email": {
                            "type": "string"
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expired": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "id",
                          "email",
                          "rank",
                          "expiresAt",
                          "expired",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rank": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "manager",
                        "member"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "createdAt",
                    "members",
                    "invites",
                    "rank"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/organisations/{id}/members/{account}": {
      "patch": {
        "summary": "Changes a member's Membership (owners); the last owner keeps theirs",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rank": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "manager",
                      "member"
                    ]
                  }
                },
                "required": [
                  "rank"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "since": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "accountId",
                          "name",
                          "email",
                          "rank",
                          "since"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "invites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "email": {
                            "type": "string"
                          },
                          "rank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager",
                              "member"
                            ]
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expired": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "id",
                          "email",
                          "rank",
                          "expiresAt",
                          "expired",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rank": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "manager",
                        "member"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "createdAt",
                    "members",
                    "invites",
                    "rank"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      },
      "delete": {
        "summary": "Removes a member (owners anyone, managers members), or leaves with one's own id; the last owner can't",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/organisations/{id}/roles": {
      "get": {
        "summary": "The roles per organisation an owner or manager may give there, and which members have them",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role": {
                            "type": "string"
                          },
                          "plugin": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "abilities": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "givenByRank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager"
                            ]
                          }
                        },
                        "required": [
                          "role",
                          "plugin",
                          "name",
                          "abilities",
                          "givenByRank"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "accountId",
                          "roles"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "options",
                    "members"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      },
      "post": {
        "summary": "Gives or takes a role per organisation to a member, as far as the Membership reaches (decision 0009)",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "take": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "account",
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "accountSession": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "role": {
                            "type": "string"
                          },
                          "plugin": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "abilities": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "givenByRank": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "manager"
                            ]
                          }
                        },
                        "required": [
                          "role",
                          "plugin",
                          "name",
                          "abilities",
                          "givenByRank"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "accountId",
                          "roles"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "options",
                    "members"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/links": {
      "get": {
        "summary": "The page SHADE shows for a signed link: what it is for, with a button while it works (text/html)",
        "tags": [
          "Account"
        ],
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      },
      "post": {
        "summary": "Uses a signed link from the page SHADE shows (its form), and shows the outcome (text/html)",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {}
            }
          }
        },
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/links/peek": {
      "post": {
        "summary": "What a signed link shows, without using it, for a page of a frontend",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "owner": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
                  },
                  "purpose": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9.-]{0,63}$"
                  },
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "owner",
                  "purpose",
                  "token"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/account/links/redeem": {
      "post": {
        "summary": "Uses a signed link from a page of a frontend, with the option chosen, and answers what it shows then",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "owner": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
                  },
                  "purpose": {
                    "type": "string",
                    "pattern": "^[a-z0-9][a-z0-9.-]{0,63}$"
                  },
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "choice": {
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "required": [
                  "owner",
                  "purpose",
                  "token"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/data/collections/{slug}": {
      "get": {
        "summary": "Entries of a collection, drafts included",
        "tags": [
          "Data"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 4000
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "default": "any",
              "type": "string",
              "enum": [
                "draft",
                "published",
                "any"
              ]
            }
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 2
            }
          },
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40000
            }
          }
        ],
        "security": [
          {
            "dataToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      },
      "post": {
        "summary": "Creates an entry (write)",
        "tags": [
          "Data"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "security": [
          {
            "dataToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/data/collections/{slug}/{id}": {
      "get": {
        "summary": "One entry with its latest version",
        "tags": [
          "Data"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "dataToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      },
      "put": {
        "summary": "Saves an entry (write)",
        "tags": [
          "Data"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "baseVersionId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "baseUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "locale": {
                    "type": "string",
                    "maxLength": 10
                  }
                },
                "required": [
                  "data",
                  "baseVersionId"
                ]
              }
            }
          }
        },
        "security": [
          {
            "dataToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      },
      "delete": {
        "summary": "Deletes an entry (write)",
        "tags": [
          "Data"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "dataToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/data/collections/{slug}/{id}/publish": {
      "post": {
        "summary": "Publishes an entry (write)",
        "tags": [
          "Data"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "versionId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "dataToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    },
    "/api/v1/data/collections/{slug}/{id}/unpublish": {
      "post": {
        "summary": "Unpublishes an entry (write)",
        "tags": [
          "Data"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "dataToken": []
          }
        ],
        "responses": {
          "500": {
            "description": "Failed in a way SHADE did not expect: `{ error: { code: INTERNAL, message } }`; recorded in its error log"
          },
          "503": {
            "description": "Not now: `{ error: { code: UNAVAILABLE, message } }` while starting, in maintenance mode, without Redis, too busy, or while an outside service it needs is failing. Try again after `Retry-After`",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "2XX": {
            "description": "Done; JSON unless said otherwise"
          },
          "4XX": {
            "description": "Refused: `{ error: { code, message, issues? } }` (VALIDATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, RATE_LIMITED)"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "readToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API token with read or build scope (Settings → API tokens). Reporting builds needs build scope."
      },
      "dataToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "A data token with its collections (Settings → API tokens)."
      },
      "accountSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "shade_account.session_token",
        "description": "A user's session (decision 0010)."
      }
    }
  }
}
