{
  "openapi": "3.0.0",
  "info": {
    "title": "Revolt API",
    "description": "Open source user-first chat platform.",
    "termsOfService": "https://revolt.chat/terms",
    "contact": {
      "name": "Revolt Support",
      "url": "https://revolt.chat",
      "email": "contact@revolt.chat"
    },
    "license": {
      "name": "AGPLv3",
      "url": "https://github.com/revoltchat/delta/blob/master/LICENSE"
    },
    "version": "0.11.5"
  },
  "servers": [
    {
      "url": "https://api.revolt.chat",
      "description": "Revolt Production"
    },
    {
      "url": "https://revolt.chat/api",
      "description": "Revolt Staging"
    },
    {
      "url": "http://local.revolt.chat:14702",
      "description": "Local Revolt Environment"
    },
    {
      "url": "http://local.revolt.chat:14702/0.8",
      "description": "Local Revolt Environment (v0.8)"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "tags": [
          "Core"
        ],
        "summary": "Query Node",
        "description": "Fetch the server configuration for this Revolt instance.",
        "operationId": "root_root",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevoltConfig"
                }
              }
            }
          }
        }
      }
    },
    "/users/@me": {
      "get": {
        "tags": [
          "User Information"
        ],
        "summary": "Fetch Self",
        "description": "Retrieve your user information.",
        "operationId": "fetch_self_fetch",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/users/{target}": {
      "get": {
        "tags": [
          "User Information"
        ],
        "summary": "Fetch User",
        "description": "Retrieve a user's information.",
        "operationId": "fetch_user_fetch",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "patch": {
        "tags": [
          "User Information"
        ],
        "summary": "Edit User",
        "description": "Edit currently authenticated user.",
        "operationId": "edit_user_edit",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataEditUser"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/users/{target}/flags": {
      "get": {
        "tags": [
          "User Information"
        ],
        "summary": "Fetch User Flags",
        "description": "Retrieve a user's flags.",
        "operationId": "fetch_user_flags_fetch_user_flags",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlagResponse"
                }
              }
            }
          }
        }
      }
    },
    "/users/@me/username": {
      "patch": {
        "tags": [
          "User Information"
        ],
        "summary": "Change Username",
        "description": "Change your username.",
        "operationId": "change_username_change_username",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataChangeUsername"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          },
          {
            "Session Token": []
          }
        ]
      }
    },
    "/users/{target}/default_avatar": {
      "get": {
        "tags": [
          "User Information"
        ],
        "summary": "Fetch Default Avatar",
        "description": "This returns a default avatar based on the given id.",
        "operationId": "get_default_avatar_default_avatar",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Default Avatar Picture",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        }
      }
    },
    "/users/{target}/profile": {
      "get": {
        "tags": [
          "User Information"
        ],
        "summary": "Fetch User Profile",
        "description": "Retrieve a user's profile data.\n\nWill fail if you do not have permission to access the other user's profile.",
        "operationId": "fetch_profile_profile",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/users/dms": {
      "get": {
        "tags": [
          "Direct Messaging"
        ],
        "summary": "Fetch Direct Message Channels",
        "description": "This fetches your direct messages, including any DM and group DM conversations.",
        "operationId": "fetch_dms_direct_messages",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Channel"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/users/{target}/dm": {
      "get": {
        "tags": [
          "Direct Messaging"
        ],
        "summary": "Open Direct Message",
        "description": "Open a DM with another user.\n\nIf the target is oneself, a saved messages channel is returned.",
        "operationId": "open_dm_open_dm",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/users/{target}/mutual": {
      "get": {
        "tags": [
          "Relationships"
        ],
        "summary": "Fetch Mutual Friends, Servers, Groups and DMs",
        "description": "Retrieve a list of mutual friends, servers, groups and DMs with another user.",
        "operationId": "find_mutual_mutual",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MutualResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/users/{target}/friend": {
      "put": {
        "tags": [
          "Relationships"
        ],
        "summary": "Accept Friend Request",
        "description": "Accept another user's friend request.",
        "operationId": "add_friend_add",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Relationships"
        ],
        "summary": "Deny Friend Request / Remove Friend",
        "description": "Denies another user's friend request or removes an existing friend.",
        "operationId": "remove_friend_remove",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/users/{target}/block": {
      "put": {
        "tags": [
          "Relationships"
        ],
        "summary": "Block User",
        "description": "Block another user by their id.",
        "operationId": "block_user_block",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Relationships"
        ],
        "summary": "Unblock User",
        "description": "Unblock another user by their id.",
        "operationId": "unblock_user_unblock",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/users/friend": {
      "post": {
        "tags": [
          "Relationships"
        ],
        "summary": "Send Friend Request",
        "description": "Send a friend request to another user.",
        "operationId": "send_friend_request_send_friend_request",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSendFriendRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/bots/create": {
      "post": {
        "tags": [
          "Bots"
        ],
        "summary": "Create Bot",
        "description": "Create a new Revolt bot.",
        "operationId": "create_create_bot",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataCreateBot"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotWithUserResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/bots/{target}/invite": {
      "get": {
        "tags": [
          "Bots"
        ],
        "summary": "Fetch Public Bot",
        "description": "Fetch details of a public (or owned) bot by its id.",
        "operationId": "fetch_public_fetch_public_bot",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBot"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "post": {
        "tags": [
          "Bots"
        ],
        "summary": "Invite Bot",
        "description": "Invite a bot to a server or group by its id.`",
        "operationId": "invite_invite_bot",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteBotDestination"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/bots/{bot}": {
      "get": {
        "tags": [
          "Bots"
        ],
        "summary": "Fetch Bot",
        "description": "Fetch details of a bot you own by its id.",
        "operationId": "fetch_fetch_bot",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchBotResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/bots/@me": {
      "get": {
        "tags": [
          "Bots"
        ],
        "summary": "Fetch Owned Bots",
        "description": "Fetch all of the bots that you have control over.",
        "operationId": "fetch_owned_fetch_owned_bots",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OwnedBotsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/bots/{target}": {
      "delete": {
        "tags": [
          "Bots"
        ],
        "summary": "Delete Bot",
        "description": "Delete a bot by its id.",
        "operationId": "delete_delete_bot",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Bots"
        ],
        "summary": "Edit Bot",
        "description": "Edit bot details by its id.",
        "operationId": "edit_edit_bot",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataEditBot"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotWithUserResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/ack/{message}": {
      "put": {
        "tags": [
          "Messaging"
        ],
        "summary": "Acknowledge Message",
        "description": "Lets the server and all other clients know that we've seen this message id in this channel.",
        "operationId": "channel_ack_ack",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "message",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}": {
      "get": {
        "tags": [
          "Channel Information"
        ],
        "summary": "Fetch Channel",
        "description": "Fetch channel by its id.",
        "operationId": "channel_fetch_fetch",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Channel Information"
        ],
        "summary": "Close Channel",
        "description": "Deletes a server channel, leaves a group or closes a group.",
        "operationId": "channel_delete_delete",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "leave_silently",
            "in": "query",
            "description": "Whether to not send a leave message",
            "schema": {
              "description": "Whether to not send a leave message",
              "type": "boolean",
              "nullable": true
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Channel Information"
        ],
        "summary": "Edit Channel",
        "description": "Edit a channel object by its id.",
        "operationId": "channel_edit_edit",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataEditChannel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/members": {
      "get": {
        "tags": [
          "Groups"
        ],
        "summary": "Fetch Group Members",
        "description": "Retrieves all users who are part of this group.\n\nThis may not return full user information if users are not friends but have mutual connections.",
        "operationId": "members_fetch_fetch_members",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/invites": {
      "post": {
        "tags": [
          "Channel Invites"
        ],
        "summary": "Create Invite",
        "description": "Creates an invite to this channel.\n\nChannel must be a `TextChannel`.",
        "operationId": "invite_create_create_invite",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invite"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/messages": {
      "get": {
        "tags": [
          "Messaging"
        ],
        "summary": "Fetch Messages",
        "description": "Fetch multiple messages.",
        "operationId": "message_query_query",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of messages to fetch\n\nFor fetching nearby messages, this is \\`(limit + 2)\\`.",
            "schema": {
              "description": "Maximum number of messages to fetch\n\nFor fetching nearby messages, this is \\`(limit + 2)\\`.",
              "type": "integer",
              "format": "int64",
              "maximum": 100.0,
              "minimum": 1.0,
              "nullable": true
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Message id before which messages should be fetched",
            "schema": {
              "description": "Message id before which messages should be fetched",
              "type": "string",
              "maxLength": 26,
              "minLength": 26,
              "nullable": true
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Message id after which messages should be fetched",
            "schema": {
              "description": "Message id after which messages should be fetched",
              "type": "string",
              "maxLength": 26,
              "minLength": 26,
              "nullable": true
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Message sort direction",
            "schema": {
              "description": "Message sort direction",
              "$ref": "#/components/schemas/MessageSort",
              "nullable": true
            }
          },
          {
            "name": "nearby",
            "in": "query",
            "description": "Message id to search around\n\nSpecifying 'nearby' ignores 'before', 'after' and 'sort'. It will also take half of limit rounded as the limits to each side. It also fetches the message ID specified.",
            "schema": {
              "description": "Message id to search around\n\nSpecifying 'nearby' ignores 'before', 'after' and 'sort'. It will also take half of limit rounded as the limits to each side. It also fetches the message ID specified.",
              "type": "string",
              "maxLength": 26,
              "minLength": 26,
              "nullable": true
            }
          },
          {
            "name": "include_users",
            "in": "query",
            "description": "Whether to include user (and member, if server channel) objects",
            "schema": {
              "description": "Whether to include user (and member, if server channel) objects",
              "type": "boolean",
              "nullable": true
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkMessageResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Send Message",
        "description": "Sends a message to the given channel.",
        "operationId": "message_send_message_send",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key to prevent duplicate requests",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataMessageSend"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/search": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Search for Messages",
        "description": "This route searches for messages within the given parameters.",
        "operationId": "message_search_search",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataMessageSearch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkMessageResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/messages/{msg}/pin": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Pins a message",
        "description": "Pins a message by its id.",
        "operationId": "message_pin_message_pin",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "msg",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Messaging"
        ],
        "summary": "Unpins a message",
        "description": "Unpins a message by its id.",
        "operationId": "message_unpin_message_unpin",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "msg",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/messages/{msg}": {
      "get": {
        "tags": [
          "Messaging"
        ],
        "summary": "Fetch Message",
        "description": "Retrieves a message by its id.",
        "operationId": "message_fetch_fetch",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "msg",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Messaging"
        ],
        "summary": "Delete Message",
        "description": "Delete a message you've sent or one you have permission to delete.",
        "operationId": "message_delete_delete",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "msg",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Messaging"
        ],
        "summary": "Edit Message",
        "description": "Edits a message that you've previously sent.",
        "operationId": "message_edit_edit",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "msg",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataEditMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/messages/bulk": {
      "delete": {
        "tags": [
          "Messaging"
        ],
        "summary": "Bulk Delete Messages",
        "description": "Delete multiple messages you've sent or one you have permission to delete.\n\nThis will always require `ManageMessages` permission regardless of whether you own the message or not.\n\nMessages must have been sent within the past 1 week.",
        "operationId": "message_bulk_delete_bulk_delete_messages",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionsBulkDelete"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/create": {
      "post": {
        "tags": [
          "Groups"
        ],
        "summary": "Create Group",
        "description": "Create a new group channel.",
        "operationId": "group_create_create_group",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataCreateGroup"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{group_id}/recipients/{member_id}": {
      "put": {
        "tags": [
          "Groups"
        ],
        "summary": "Add Member to Group",
        "description": "Adds another user to the group.",
        "operationId": "group_add_member_add_member",
        "parameters": [
          {
            "name": "group_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/recipients/{member}": {
      "delete": {
        "tags": [
          "Groups"
        ],
        "summary": "Remove Member from Group",
        "description": "Removes a user from the group.",
        "operationId": "group_remove_member_remove_member",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "member",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/join_call": {
      "post": {
        "tags": [
          "Voice"
        ],
        "summary": "Join Call",
        "description": "Asks the voice server for a token to join the call.",
        "operationId": "voice_join_call",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataJoinCall"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateVoiceUserResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/end_ring/{target_user}": {
      "put": {
        "tags": [
          "Voice"
        ],
        "summary": "Stop Ring",
        "description": "Stops ringing a specific user in a dm call. You must be in the call to use this endpoint, returns NotConnected otherwise. Only valid in DM/Group channels, will return NoEffect in servers. Returns NotFound if the user is not in the dm/group channel",
        "operationId": "voice_stop_ring_stop_ring",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "target_user",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/permissions/{role_id}": {
      "put": {
        "tags": [
          "Channel Permissions"
        ],
        "summary": "Set Role Permission",
        "description": "Sets permissions for the specified role in this channel.\n\nChannel must be a `TextChannel`.",
        "operationId": "permissions_set_set_role_permissions",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSetRolePermissions"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/permissions/default": {
      "put": {
        "tags": [
          "Channel Permissions"
        ],
        "summary": "Set Default Permission",
        "description": "Sets permissions for the default role in this channel.\n\nChannel must be a `Group` or `TextChannel`.",
        "operationId": "permissions_set_default_set_default_channel_permissions",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataDefaultChannelPermissions"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/messages/{msg}/reactions/{emoji}": {
      "put": {
        "tags": [
          "Interactions"
        ],
        "summary": "Add Reaction to Message",
        "description": "React to a given message.",
        "operationId": "message_react_react_message",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "msg",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "emoji",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Interactions"
        ],
        "summary": "Remove Reaction(s) to Message",
        "description": "Remove your own, someone else's or all of a given reaction.\n\nRequires `ManageMessages` if changing others' reactions.",
        "operationId": "message_unreact_unreact_message",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "msg",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "emoji",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "Remove a specific user's reaction",
            "schema": {
              "description": "Remove a specific user's reaction",
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "remove_all",
            "in": "query",
            "description": "Remove all reactions",
            "schema": {
              "description": "Remove all reactions",
              "type": "boolean",
              "nullable": true
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/messages/{msg}/reactions": {
      "delete": {
        "tags": [
          "Interactions"
        ],
        "summary": "Remove All Reactions from Message",
        "description": "Remove your own, someone else's or all of a given reaction.\n\nRequires `ManageMessages` permission.",
        "operationId": "message_clear_reactions_clear_reactions",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "msg",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{target}/webhooks": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Creates a webhook",
        "description": "Creates a webhook which 3rd party platforms can use to send messages",
        "operationId": "webhook_create_create_webhook",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/channels/{channel_id}/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Gets all webhooks",
        "description": "Gets all webhooks inside the channel",
        "operationId": "webhook_fetch_all_fetch_webhooks",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Webhook"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/create": {
      "post": {
        "tags": [
          "Server Information"
        ],
        "summary": "Create Server",
        "description": "Create a new server.",
        "operationId": "server_create_create_server",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataCreateServer"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateServerLegacyResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}": {
      "get": {
        "tags": [
          "Server Information"
        ],
        "summary": "Fetch Server",
        "description": "Fetch a server by its id.",
        "operationId": "server_fetch_fetch",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "include_channels",
            "in": "query",
            "description": "Whether to include channels",
            "schema": {
              "description": "Whether to include channels",
              "type": "boolean",
              "nullable": true
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchServerResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Server Information"
        ],
        "summary": "Delete / Leave Server",
        "description": "Deletes a server if owner otherwise leaves.",
        "operationId": "server_delete_delete",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "leave_silently",
            "in": "query",
            "description": "Whether to not send a leave message",
            "schema": {
              "description": "Whether to not send a leave message",
              "type": "boolean",
              "nullable": true
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Server Information"
        ],
        "summary": "Edit Server",
        "description": "Edit a server by its id.",
        "operationId": "server_edit_edit",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataEditServer"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Server"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/ack": {
      "put": {
        "tags": [
          "Server Information"
        ],
        "summary": "Mark Server As Read",
        "description": "Mark all channels in a server as read.",
        "operationId": "server_ack_ack",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{server}/channels": {
      "post": {
        "tags": [
          "Server Information"
        ],
        "summary": "Create Channel",
        "description": "Create a new Text or Voice channel.",
        "operationId": "channel_create_create_server_channel",
        "parameters": [
          {
            "name": "server",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataCreateServerChannel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/members": {
      "get": {
        "tags": [
          "Server Members"
        ],
        "summary": "Fetch Members",
        "description": "Fetch all server members.",
        "operationId": "member_fetch_all_fetch_all",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "exclude_offline",
            "in": "query",
            "description": "Whether to exclude offline users",
            "schema": {
              "description": "Whether to exclude offline users",
              "type": "boolean",
              "nullable": true
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllMemberResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/members/{member}": {
      "get": {
        "tags": [
          "Server Members"
        ],
        "summary": "Fetch Member",
        "description": "Retrieve a member.",
        "operationId": "member_fetch_fetch",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "member",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "roles",
            "in": "query",
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Server Members"
        ],
        "summary": "Kick Member",
        "description": "Removes a member from the server.",
        "operationId": "member_remove_kick",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "member",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{server}/members/{member}": {
      "patch": {
        "tags": [
          "Server Members"
        ],
        "summary": "Edit Member",
        "description": "Edit a member by their id.",
        "operationId": "member_edit_edit",
        "parameters": [
          {
            "name": "server",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "member",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataMemberEdit"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Member"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/members_experimental_query": {
      "get": {
        "tags": [
          "Server Members"
        ],
        "summary": "Query members by name",
        "description": "Query members by a given name, this API is not stable and will be removed in the future.",
        "operationId": "member_experimental_query_member_experimental_query",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "String to search for",
            "required": true,
            "schema": {
              "description": "String to search for",
              "type": "string"
            }
          },
          {
            "name": "experimental_api",
            "in": "query",
            "description": "Discourage use of this API",
            "required": true,
            "schema": {
              "description": "Discourage use of this API",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberQueryResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{server}/bans/{target}": {
      "put": {
        "tags": [
          "Server Members"
        ],
        "summary": "Ban User",
        "description": "Ban a user by their id.",
        "operationId": "ban_create_ban",
        "parameters": [
          {
            "name": "server",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataBanCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerBan"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Server Members"
        ],
        "summary": "Unban user",
        "description": "Remove a user's ban.",
        "operationId": "ban_remove_unban",
        "parameters": [
          {
            "name": "server",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/bans": {
      "get": {
        "tags": [
          "Server Members"
        ],
        "summary": "Fetch Bans",
        "description": "Fetch all bans on a server.",
        "operationId": "ban_list_list",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BanListResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/invites": {
      "get": {
        "tags": [
          "Server Members"
        ],
        "summary": "Fetch Invites",
        "description": "Fetch all server invites.",
        "operationId": "invites_fetch_invites",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Invite"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/roles": {
      "post": {
        "tags": [
          "Server Permissions"
        ],
        "summary": "Create Role",
        "description": "Creates a new server role.",
        "operationId": "roles_create_create",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataCreateRole"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewRoleResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/roles/{role_id}": {
      "get": {
        "tags": [
          "Server Permissions"
        ],
        "summary": "Fetch Role",
        "description": "Fetch a role by its id.",
        "operationId": "roles_fetch_fetch",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Server Permissions"
        ],
        "summary": "Delete Role",
        "description": "Delete a server role by its id.",
        "operationId": "roles_delete_delete",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Server Permissions"
        ],
        "summary": "Edit Role",
        "description": "Edit a role by its id.",
        "operationId": "roles_edit_edit",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataEditRole"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/permissions/{role_id}": {
      "put": {
        "tags": [
          "Server Permissions"
        ],
        "summary": "Set Role Permission",
        "description": "Sets permissions for the specified role in the server.",
        "operationId": "permissions_set_set_role_permission",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSetServerRolePermission"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Server"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/permissions/default": {
      "put": {
        "tags": [
          "Server Permissions"
        ],
        "summary": "Set Default Permission",
        "description": "Sets permissions for the default role in this server.",
        "operationId": "permissions_set_default_set_default_server_permissions",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataPermissionsValue"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Server"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/emojis": {
      "get": {
        "tags": [
          "Server Customisation"
        ],
        "summary": "Fetch Server Emoji",
        "description": "Fetch all emoji on a server.",
        "operationId": "emoji_list_list_emoji",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Emoji"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/servers/{target}/roles/ranks": {
      "patch": {
        "tags": [
          "Server Permissions"
        ],
        "summary": "Edits server roles ranks",
        "description": "Edit's server role's ranks.",
        "operationId": "roles_edit_positions_edit_role_ranks",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataEditRoleRanks"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Server"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/invites/{target}": {
      "get": {
        "tags": [
          "Invites"
        ],
        "summary": "Fetch Invite",
        "description": "Fetch an invite by its id.",
        "operationId": "invite_fetch_fetch",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Invites"
        ],
        "summary": "Join Invite",
        "description": "Join an invite by its ID",
        "operationId": "invite_join_join",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteJoinResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Invites"
        ],
        "summary": "Delete Invite",
        "description": "Delete an invite by its id.",
        "operationId": "invite_delete_delete",
        "parameters": [
          {
            "name": "target",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/custom/emoji/{id}": {
      "put": {
        "tags": [
          "Emojis"
        ],
        "summary": "Create New Emoji",
        "description": "Create an emoji by its Autumn upload id.",
        "operationId": "emoji_create_create_emoji",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataCreateEmoji"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Emoji"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/custom/emoji/{emoji_id}": {
      "get": {
        "tags": [
          "Emojis"
        ],
        "summary": "Fetch Emoji",
        "description": "Fetch an emoji by its id.",
        "operationId": "emoji_fetch_fetch_emoji",
        "parameters": [
          {
            "name": "emoji_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Emoji"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Emojis"
        ],
        "summary": "Delete Emoji",
        "description": "Delete an emoji by its id.",
        "operationId": "emoji_delete_delete_emoji",
        "parameters": [
          {
            "name": "emoji_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/safety/report": {
      "post": {
        "tags": [
          "User Safety"
        ],
        "summary": "Report Content",
        "description": "Report a piece of content to the moderation team.",
        "operationId": "report_content_report_content",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataReportContent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/account/create": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Create Account",
        "description": "Create a new account.",
        "operationId": "create_account_create_account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataCreateAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        }
      }
    },
    "/auth/account/reverify": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Resend Verification",
        "description": "Resend account creation verification email.",
        "operationId": "resend_verification_resend_verification",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataResendVerification"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        }
      }
    },
    "/auth/account/delete": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Confirm Account Deletion",
        "description": "Schedule an account for deletion by confirming the received token.",
        "operationId": "confirm_deletion_confirm_deletion",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataAccountDeletion"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        }
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Delete Account",
        "description": "Request to have an account deleted.",
        "operationId": "delete_account_delete_account",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Valid MFA Ticket": []
          },
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/account/": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Fetch Account",
        "description": "Fetch account information from the current session.",
        "operationId": "fetch_account_fetch_account",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountInfo"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/account/disable": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Disable Account",
        "description": "Disable an account.",
        "operationId": "disable_account_disable_account",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Valid MFA Ticket": []
          },
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/account/change/password": {
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Change Password",
        "description": "Change the current account password.",
        "operationId": "change_password_change_password",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataChangePassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/account/change/email": {
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Change Email",
        "description": "Change the associated account email.",
        "operationId": "change_email_change_email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataChangeEmail"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/account/verify/{code}": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Verify Email",
        "description": "Verify an email address.",
        "operationId": "verify_email_verify_email",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseVerify"
                }
              }
            }
          }
        }
      }
    },
    "/auth/account/reset_password": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Send Password Reset",
        "description": "Send an email to reset account password.",
        "operationId": "send_password_reset_send_password_reset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSendPasswordReset"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        }
      },
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Password Reset",
        "description": "Confirm password reset and change the password.",
        "operationId": "password_reset_password_reset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataPasswordReset"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        }
      }
    },
    "/auth/session/login": {
      "post": {
        "tags": [
          "Session"
        ],
        "summary": "Login",
        "description": "Login to an account.",
        "operationId": "login_login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataLogin"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseLogin"
                }
              }
            }
          }
        }
      }
    },
    "/auth/session/logout": {
      "post": {
        "tags": [
          "Session"
        ],
        "summary": "Logout",
        "description": "Delete current session.",
        "operationId": "logout_logout",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/session/all": {
      "get": {
        "tags": [
          "Session"
        ],
        "summary": "Fetch Sessions",
        "description": "Fetch all sessions associated with this account.",
        "operationId": "fetch_all_fetch_all",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SessionInfo"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Session"
        ],
        "summary": "Delete All Sessions",
        "description": "Delete all active sessions, optionally including current one.",
        "operationId": "revoke_all_revoke_all",
        "parameters": [
          {
            "name": "revoke_self",
            "in": "query",
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          },
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/session/{id}": {
      "delete": {
        "tags": [
          "Session"
        ],
        "summary": "Revoke Session",
        "description": "Delete a specific active session.",
        "operationId": "revoke_revoke",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Session"
        ],
        "summary": "Edit Session",
        "description": "Edit current session information.",
        "operationId": "edit_edit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataEditSession"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionInfo"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/mfa/ticket": {
      "put": {
        "tags": [
          "MFA"
        ],
        "summary": "Create MFA ticket",
        "description": "Create a new MFA ticket or validate an existing one.",
        "operationId": "create_ticket_create_ticket",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MFAResponse"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MFATicket"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          },
          {
            "Unvalidated MFA Ticket": []
          }
        ]
      }
    },
    "/auth/mfa/": {
      "get": {
        "tags": [
          "MFA"
        ],
        "summary": "MFA Status",
        "description": "Fetch MFA status of an account.",
        "operationId": "fetch_status_fetch_status",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MultiFactorStatus"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/mfa/recovery": {
      "post": {
        "tags": [
          "MFA"
        ],
        "summary": "Fetch Recovery Codes",
        "description": "Fetch recovery codes for an account.",
        "operationId": "fetch_recovery_fetch_recovery",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Valid MFA Ticket": []
          },
          {
            "Session Token": []
          }
        ]
      },
      "patch": {
        "tags": [
          "MFA"
        ],
        "summary": "Generate Recovery Codes",
        "description": "Re-generate recovery codes for an account.",
        "operationId": "generate_recovery_generate_recovery",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Valid MFA Ticket": []
          },
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/mfa/methods": {
      "get": {
        "tags": [
          "MFA"
        ],
        "summary": "Get MFA Methods",
        "description": "Fetch available MFA methods.",
        "operationId": "get_mfa_methods_get_mfa_methods",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MFAMethod"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/auth/mfa/totp": {
      "put": {
        "tags": [
          "MFA"
        ],
        "summary": "Enable TOTP 2FA",
        "description": "Generate a new secret for TOTP.",
        "operationId": "totp_enable_totp_enable",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MFAResponse"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "post": {
        "tags": [
          "MFA"
        ],
        "summary": "Generate TOTP Secret",
        "description": "Generate a new secret for TOTP.",
        "operationId": "totp_generate_secret_totp_generate_secret",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseTotpSecret"
                }
              }
            }
          }
        },
        "security": [
          {
            "Valid MFA Ticket": []
          },
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "MFA"
        ],
        "summary": "Disable TOTP 2FA",
        "description": "Disable TOTP 2FA for an account.",
        "operationId": "totp_disable_totp_disable",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Valid MFA Ticket": []
          },
          {
            "Session Token": []
          }
        ]
      }
    },
    "/onboard/hello": {
      "get": {
        "tags": [
          "Onboarding"
        ],
        "summary": "Check Onboarding Status",
        "description": "This will tell you whether the current account requires onboarding or whether you can continue to send requests as usual. You may skip calling this if you're restoring an existing session.",
        "operationId": "hello_hello",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataHello"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          },
          {
            "Session Token": []
          }
        ]
      }
    },
    "/onboard/complete": {
      "post": {
        "tags": [
          "Onboarding"
        ],
        "summary": "Complete Onboarding",
        "description": "This sets a new username, completes onboarding and allows a user to start using Revolt.",
        "operationId": "complete_complete",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataOnboard"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          },
          {
            "Session Token": []
          }
        ]
      }
    },
    "/policy/acknowledge": {
      "post": {
        "tags": [
          "Policy"
        ],
        "summary": "Acknowledge Policy Changes",
        "description": "Accept/acknowledge changes to platform policy.",
        "operationId": "acknowledge_policy_changes_acknowledge_policy_changes",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/push/subscribe": {
      "post": {
        "tags": [
          "Web Push"
        ],
        "summary": "Push Subscribe",
        "description": "Create a new Web Push subscription.\n\nIf an existing subscription exists on this session, it will be removed.",
        "operationId": "subscribe_subscribe",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebPushSubscription"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/push/unsubscribe": {
      "post": {
        "tags": [
          "Web Push"
        ],
        "summary": "Unsubscribe",
        "description": "Remove the Web Push subscription associated with the current session.",
        "operationId": "unsubscribe_unsubscribe",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/sync/settings/fetch": {
      "post": {
        "tags": [
          "Sync"
        ],
        "summary": "Fetch Settings",
        "description": "Fetch settings from server filtered by keys.\n\nThis will return an object with the requested keys, each value is a tuple of `(timestamp, value)`, the value is the previously uploaded data.",
        "operationId": "get_settings_fetch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionsFetchSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": [
                      {
                        "type": "integer",
                        "format": "int64"
                      },
                      {
                        "type": "string"
                      }
                    ],
                    "maxItems": 2,
                    "minItems": 2
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/sync/settings/set": {
      "post": {
        "tags": [
          "Sync"
        ],
        "summary": "Set Settings",
        "description": "Upload data to save to settings.",
        "operationId": "set_settings_set",
        "parameters": [
          {
            "name": "timestamp",
            "in": "query",
            "description": "Timestamp of settings change.\n\nUsed to avoid feedback loops.",
            "schema": {
              "description": "Timestamp of settings change.\n\nUsed to avoid feedback loops.",
              "type": "integer",
              "format": "int64",
              "nullable": true
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/sync/unreads": {
      "get": {
        "tags": [
          "Sync"
        ],
        "summary": "Fetch Unreads",
        "description": "Fetch information about unread state on channels.",
        "operationId": "get_unreads_unreads",
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChannelUnread"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/webhooks/{webhook_id}/{token}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Gets a webhook",
        "description": "Gets a webhook with a token",
        "operationId": "webhook_fetch_token_webhook_fetch_token",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Executes a webhook",
        "description": "Executes a webhook and sends a message",
        "operationId": "webhook_execute_webhook_execute",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key to prevent duplicate requests",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataMessageSend"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Deletes a webhook",
        "description": "Deletes a webhook with a token",
        "operationId": "webhook_delete_token_webhook_delete_token",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        }
      },
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Edits a webhook",
        "description": "Edits a webhook with a token",
        "operationId": "webhook_edit_token_webhook_edit_token",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataEditWebhook"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{webhook_id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Gets a webhook",
        "description": "Gets a webhook",
        "operationId": "webhook_fetch_webhook_fetch",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseWebhook"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Deletes a webhook",
        "description": "Deletes a webhook",
        "operationId": "webhook_delete_webhook_delete",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "204": {
            "description": "Success"
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Edits a webhook",
        "description": "Edits a webhook",
        "operationId": "webhook_edit_webhook_edit",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataEditWebhook"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          }
        },
        "security": [
          {
            "Session Token": []
          }
        ]
      }
    },
    "/webhooks/{webhook_id}/{token}/github": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Executes a webhook specific to github",
        "description": "Executes a webhook specific to github and sends a message containing the relevant info about the event",
        "operationId": "webhook_execute_github_webhook_execute_github",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Id"
            }
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Github-Event",
            "in": "header",
            "description": "The name of the github event",
            "required": true,
            "content": {
              "X-Github-Event": {
                "schema": {}
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "200": {
            "description": ""
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "RevoltConfig": {
        "title": "Server Configuration",
        "type": "object",
        "required": [
          "app",
          "build",
          "features",
          "revolt",
          "vapid",
          "ws"
        ],
        "properties": {
          "revolt": {
            "description": "Revolt API Version",
            "type": "string"
          },
          "features": {
            "description": "Features enabled on this Revolt node",
            "allOf": [
              {
                "$ref": "#/components/schemas/RevoltFeatures"
              }
            ]
          },
          "ws": {
            "description": "WebSocket URL",
            "type": "string"
          },
          "app": {
            "description": "URL pointing to the client serving this node",
            "type": "string"
          },
          "vapid": {
            "description": "Web Push VAPID public key",
            "type": "string"
          },
          "build": {
            "description": "Build information",
            "allOf": [
              {
                "$ref": "#/components/schemas/BuildInformation"
              }
            ]
          }
        }
      },
      "RevoltFeatures": {
        "title": "Feature Configuration",
        "type": "object",
        "required": [
          "autumn",
          "captcha",
          "email",
          "invite_only",
          "january",
          "livekit"
        ],
        "properties": {
          "captcha": {
            "description": "hCaptcha configuration",
            "allOf": [
              {
                "$ref": "#/components/schemas/CaptchaFeature"
              }
            ]
          },
          "email": {
            "description": "Whether email verification is enabled",
            "type": "boolean"
          },
          "invite_only": {
            "description": "Whether this server is invite only",
            "type": "boolean"
          },
          "autumn": {
            "description": "File server service configuration",
            "allOf": [
              {
                "$ref": "#/components/schemas/Feature"
              }
            ]
          },
          "january": {
            "description": "Proxy service configuration",
            "allOf": [
              {
                "$ref": "#/components/schemas/Feature"
              }
            ]
          },
          "livekit": {
            "description": "Voice server configuration",
            "allOf": [
              {
                "$ref": "#/components/schemas/VoiceFeature"
              }
            ]
          }
        }
      },
      "CaptchaFeature": {
        "title": "hCaptcha Configuration",
        "type": "object",
        "required": [
          "enabled",
          "key"
        ],
        "properties": {
          "enabled": {
            "description": "Whether captcha is enabled",
            "type": "boolean"
          },
          "key": {
            "description": "Client key used for solving captcha",
            "type": "string"
          }
        }
      },
      "Feature": {
        "title": "Generic Service Configuration",
        "type": "object",
        "required": [
          "enabled",
          "url"
        ],
        "properties": {
          "enabled": {
            "description": "Whether the service is enabled",
            "type": "boolean"
          },
          "url": {
            "description": "URL pointing to the service",
            "type": "string"
          }
        }
      },
      "VoiceFeature": {
        "title": "Voice Server Configuration",
        "type": "object",
        "required": [
          "enabled",
          "nodes"
        ],
        "properties": {
          "enabled": {
            "description": "Whether voice is enabled",
            "type": "boolean"
          },
          "nodes": {
            "description": "All livekit nodes",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoiceNode"
            }
          }
        }
      },
      "VoiceNode": {
        "title": "Information about a livekit node",
        "type": "object",
        "required": [
          "lat",
          "lon",
          "name",
          "public_url"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "lat": {
            "type": "number",
            "format": "double"
          },
          "lon": {
            "type": "number",
            "format": "double"
          },
          "public_url": {
            "type": "string"
          }
        }
      },
      "BuildInformation": {
        "title": "Build Information",
        "type": "object",
        "required": [
          "commit_sha",
          "commit_timestamp",
          "origin_url",
          "semver",
          "timestamp"
        ],
        "properties": {
          "commit_sha": {
            "description": "Commit Hash",
            "type": "string"
          },
          "commit_timestamp": {
            "description": "Commit Timestamp",
            "type": "string"
          },
          "semver": {
            "description": "Git Semver",
            "type": "string"
          },
          "origin_url": {
            "description": "Git Origin URL",
            "type": "string"
          },
          "timestamp": {
            "description": "Build Timestamp",
            "type": "string"
          }
        }
      },
      "Error": {
        "title": "Error",
        "description": "Error information",
        "type": "object",
        "oneOf": [
          {
            "description": "This error was not labeled :(",
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "LabelMe"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "AlreadyOnboarded"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "UsernameTaken"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InvalidUsername"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "DiscriminatorChangeRatelimited"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "UnknownUser"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "AlreadyFriends"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "AlreadySentRequest"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Blocked"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "BlockedByOther"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NotFriends"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "TooManyPendingFriendRequests"
                ]
              },
              "max": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "UnknownChannel"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "UnknownAttachment"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "UnknownMessage"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "CannotEditMessage"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "CannotJoinCall"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "TooManyAttachments"
                ]
              },
              "max": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "TooManyEmbeds"
                ]
              },
              "max": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "TooManyReplies"
                ]
              },
              "max": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "TooManyChannels"
                ]
              },
              "max": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "EmptyMessage"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "PayloadTooLarge"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "CannotRemoveYourself"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "GroupTooLarge"
                ]
              },
              "max": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "AlreadyInGroup"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NotInGroup"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "AlreadyPinned"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NotPinned"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "UnknownServer"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InvalidRole"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Banned"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "TooManyServers"
                ]
              },
              "max": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "TooManyEmoji"
                ]
              },
              "max": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "TooManyRoles"
                ]
              },
              "max": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "AlreadyInServer"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "CannotTimeoutYourself"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "ReachedMaximumBots"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "IsBot"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "IsNotBot"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "BotIsPrivate"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "CannotReportYourself"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "permission",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "MissingPermission"
                ]
              },
              "permission": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "permission",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "MissingUserPermission"
                ]
              },
              "permission": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NotElevated"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NotPrivileged"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "CannotGiveMissingPermissions"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NotOwner"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "IsElevated"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "collection",
              "operation",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "DatabaseError"
                ]
              },
              "operation": {
                "type": "string"
              },
              "collection": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InternalError"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InvalidOperation"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InvalidCredentials"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InvalidProperty"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InvalidSession"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InvalidFlagValue"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NotAuthenticated"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "DuplicateNonce"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NotFound"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NoEffect"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "error",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "FailedValidation"
                ]
              },
              "error": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "LiveKitUnavailable"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NotAVoiceChannel"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "AlreadyConnected"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NotConnected"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "UnknownNode"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "ProxyError"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "FileTooSmall"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "max",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "FileTooLarge"
                ]
              },
              "max": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "FileTypeNotAllowed"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "ImageProcessingFailed"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "NoEmbedData"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "VosoUnavailable"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "feature",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "FeatureDisabled"
                ]
              },
              "feature": {
                "type": "string"
              }
            }
          }
        ],
        "required": [
          "location"
        ],
        "properties": {
          "location": {
            "description": "Where this error occurred",
            "type": "string"
          }
        }
      },
      "User": {
        "description": "User",
        "type": "object",
        "required": [
          "_id",
          "discriminator",
          "online",
          "relationship",
          "username"
        ],
        "properties": {
          "_id": {
            "description": "Unique Id",
            "type": "string"
          },
          "username": {
            "description": "Username",
            "type": "string"
          },
          "discriminator": {
            "description": "Discriminator",
            "type": "string"
          },
          "display_name": {
            "description": "Display name",
            "type": "string",
            "nullable": true
          },
          "avatar": {
            "description": "Avatar attachment",
            "allOf": [
              {
                "$ref": "#/components/schemas/File"
              }
            ],
            "nullable": true
          },
          "relations": {
            "description": "Relationships with other users",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Relationship"
            }
          },
          "badges": {
            "description": "Bitfield of user badges\n\nhttps://docs.rs/revolt-models/latest/revolt_models/v0/enum.UserBadges.html",
            "type": "integer",
            "format": "uint32",
            "minimum": 0.0
          },
          "status": {
            "description": "User's current status",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserStatus"
              }
            ],
            "nullable": true
          },
          "flags": {
            "description": "Enum of user flags\n\nhttps://docs.rs/revolt-models/latest/revolt_models/v0/enum.UserFlags.html",
            "type": "integer",
            "format": "uint32",
            "minimum": 0.0
          },
          "privileged": {
            "description": "Whether this user is privileged",
            "type": "boolean"
          },
          "bot": {
            "description": "Bot information",
            "allOf": [
              {
                "$ref": "#/components/schemas/BotInformation"
              }
            ],
            "nullable": true
          },
          "relationship": {
            "description": "Current session user's relationship with this user",
            "allOf": [
              {
                "$ref": "#/components/schemas/RelationshipStatus"
              }
            ]
          },
          "online": {
            "description": "Whether this user is currently online",
            "type": "boolean"
          }
        }
      },
      "File": {
        "description": "File",
        "type": "object",
        "required": [
          "_id",
          "content_type",
          "filename",
          "metadata",
          "size",
          "tag"
        ],
        "properties": {
          "_id": {
            "description": "Unique Id",
            "type": "string"
          },
          "tag": {
            "description": "Tag / bucket this file was uploaded to",
            "type": "string"
          },
          "filename": {
            "description": "Original filename",
            "type": "string"
          },
          "metadata": {
            "description": "Parsed metadata of this file",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          "content_type": {
            "description": "Raw content type of this file",
            "type": "string"
          },
          "size": {
            "description": "Size of this file (in bytes)",
            "type": "integer",
            "format": "int"
          },
          "deleted": {
            "description": "Whether this file was deleted",
            "type": "boolean",
            "nullable": true
          },
          "reported": {
            "description": "Whether this file was reported",
            "type": "boolean",
            "nullable": true
          },
          "message_id": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "string",
            "nullable": true
          },
          "server_id": {
            "type": "string",
            "nullable": true
          },
          "object_id": {
            "description": "Id of the object this file is associated with",
            "type": "string",
            "nullable": true
          }
        }
      },
      "Metadata": {
        "description": "Metadata associated with a file",
        "oneOf": [
          {
            "description": "File is just a generic uncategorised file",
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "File"
                ]
              }
            }
          },
          {
            "description": "File contains textual data and should be displayed as such",
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Text"
                ]
              }
            }
          },
          {
            "description": "File is an image with specific dimensions",
            "type": "object",
            "required": [
              "height",
              "type",
              "width"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Image"
                ]
              },
              "width": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              },
              "height": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "description": "File is a video with specific dimensions",
            "type": "object",
            "required": [
              "height",
              "type",
              "width"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Video"
                ]
              },
              "width": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              },
              "height": {
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "description": "File is audio",
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Audio"
                ]
              }
            }
          }
        ]
      },
      "Relationship": {
        "description": "Relationship entry indicating current status with other user",
        "type": "object",
        "required": [
          "_id",
          "status"
        ],
        "properties": {
          "_id": {
            "description": "Other user's Id",
            "type": "string"
          },
          "status": {
            "description": "Relationship status with them",
            "allOf": [
              {
                "$ref": "#/components/schemas/RelationshipStatus"
              }
            ]
          }
        }
      },
      "RelationshipStatus": {
        "description": "User's relationship with another user (or themselves)",
        "oneOf": [
          {
            "description": "No relationship with other user",
            "type": "string",
            "enum": [
              "None"
            ]
          },
          {
            "description": "Other user is us",
            "type": "string",
            "enum": [
              "User"
            ]
          },
          {
            "description": "Friends with the other user",
            "type": "string",
            "enum": [
              "Friend"
            ]
          },
          {
            "description": "Pending friend request to user",
            "type": "string",
            "enum": [
              "Outgoing"
            ]
          },
          {
            "description": "Incoming friend request from user",
            "type": "string",
            "enum": [
              "Incoming"
            ]
          },
          {
            "description": "Blocked this user",
            "type": "string",
            "enum": [
              "Blocked"
            ]
          },
          {
            "description": "Blocked by this user",
            "type": "string",
            "enum": [
              "BlockedOther"
            ]
          }
        ]
      },
      "UserStatus": {
        "description": "User's active status",
        "type": "object",
        "properties": {
          "text": {
            "description": "Custom status text",
            "type": "string",
            "maxLength": 128,
            "minLength": 0,
            "nullable": true
          },
          "presence": {
            "description": "Current presence option",
            "allOf": [
              {
                "$ref": "#/components/schemas/Presence"
              }
            ],
            "nullable": true
          }
        }
      },
      "Presence": {
        "description": "Presence status",
        "oneOf": [
          {
            "description": "User is online",
            "type": "string",
            "enum": [
              "Online"
            ]
          },
          {
            "description": "User is not currently available",
            "type": "string",
            "enum": [
              "Idle"
            ]
          },
          {
            "description": "User is focusing / will only receive mentions",
            "type": "string",
            "enum": [
              "Focus"
            ]
          },
          {
            "description": "User is busy / will not receive any notifications",
            "type": "string",
            "enum": [
              "Busy"
            ]
          },
          {
            "description": "User appears to be offline",
            "type": "string",
            "enum": [
              "Invisible"
            ]
          }
        ]
      },
      "BotInformation": {
        "description": "Bot information for if the user is a bot",
        "type": "object",
        "required": [
          "owner"
        ],
        "properties": {
          "owner": {
            "description": "Id of the owner of this bot",
            "type": "string"
          }
        }
      },
      "Id": {
        "type": "string"
      },
      "FlagResponse": {
        "description": "User flag reponse",
        "type": "object",
        "required": [
          "flags"
        ],
        "properties": {
          "flags": {
            "description": "Flags",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DataEditUser": {
        "description": "New user information",
        "type": "object",
        "properties": {
          "display_name": {
            "description": "New display name",
            "type": "string",
            "maxLength": 32,
            "minLength": 2,
            "pattern": "^[^\\u200B\\n\\r]+$",
            "nullable": true
          },
          "avatar": {
            "description": "Attachment Id for avatar",
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "nullable": true
          },
          "status": {
            "description": "New user status",
            "allOf": [
              {
                "$ref": "#/components/schemas/UserStatus"
              }
            ],
            "nullable": true
          },
          "profile": {
            "description": "New user profile data\n\nThis is applied as a partial.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DataUserProfile"
              }
            ],
            "nullable": true
          },
          "badges": {
            "description": "Bitfield of user badges",
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "flags": {
            "description": "Enum of user flags",
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "remove": {
            "description": "Fields to remove from user object",
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldsUser"
            }
          }
        }
      },
      "DataUserProfile": {
        "description": "New user profile data",
        "type": "object",
        "properties": {
          "content": {
            "description": "Text to set as user profile description",
            "type": "string",
            "maxLength": 2000,
            "minLength": 0,
            "nullable": true
          },
          "background": {
            "description": "Attachment Id for background",
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "nullable": true
          }
        }
      },
      "FieldsUser": {
        "description": "Optional fields on user object",
        "oneOf": [
          {
            "type": "string",
            "enum": [
              "Avatar",
              "StatusText",
              "StatusPresence",
              "ProfileContent",
              "ProfileBackground",
              "DisplayName"
            ]
          },
          {
            "description": "Internal field, ignore this.",
            "type": "string",
            "enum": [
              "Internal"
            ]
          }
        ]
      },
      "DataChangeUsername": {
        "title": "Username Information",
        "type": "object",
        "required": [
          "password",
          "username"
        ],
        "properties": {
          "username": {
            "description": "New username",
            "type": "string",
            "maxLength": 32,
            "minLength": 2,
            "pattern": "^(\\p{L}|[\\d_.-])+$"
          },
          "password": {
            "description": "Current account password",
            "type": "string",
            "maxLength": 1024,
            "minLength": 8
          }
        }
      },
      "UserProfile": {
        "description": "User's profile",
        "type": "object",
        "properties": {
          "content": {
            "description": "Text content on user's profile",
            "type": "string",
            "maxLength": 2000,
            "minLength": 0,
            "nullable": true
          },
          "background": {
            "description": "Background visible on user's profile",
            "allOf": [
              {
                "$ref": "#/components/schemas/File"
              }
            ],
            "nullable": true
          }
        }
      },
      "Channel": {
        "description": "Channel",
        "oneOf": [
          {
            "description": "Personal \"Saved Notes\" channel which allows users to save messages",
            "type": "object",
            "required": [
              "_id",
              "channel_type",
              "user"
            ],
            "properties": {
              "channel_type": {
                "type": "string",
                "enum": [
                  "SavedMessages"
                ]
              },
              "_id": {
                "description": "Unique Id",
                "type": "string"
              },
              "user": {
                "description": "Id of the user this channel belongs to",
                "type": "string"
              }
            }
          },
          {
            "description": "Direct message channel between two users",
            "type": "object",
            "required": [
              "_id",
              "active",
              "channel_type",
              "recipients"
            ],
            "properties": {
              "channel_type": {
                "type": "string",
                "enum": [
                  "DirectMessage"
                ]
              },
              "_id": {
                "description": "Unique Id",
                "type": "string"
              },
              "active": {
                "description": "Whether this direct message channel is currently open on both sides",
                "type": "boolean"
              },
              "recipients": {
                "description": "2-tuple of user ids participating in direct message",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "last_message_id": {
                "description": "Id of the last message sent in this channel",
                "type": "string",
                "nullable": true
              }
            }
          },
          {
            "description": "Group channel between 1 or more participants",
            "type": "object",
            "required": [
              "_id",
              "channel_type",
              "name",
              "owner",
              "recipients"
            ],
            "properties": {
              "channel_type": {
                "type": "string",
                "enum": [
                  "Group"
                ]
              },
              "_id": {
                "description": "Unique Id",
                "type": "string"
              },
              "name": {
                "description": "Display name of the channel",
                "type": "string"
              },
              "owner": {
                "description": "User id of the owner of the group",
                "type": "string"
              },
              "description": {
                "description": "Channel description",
                "type": "string",
                "nullable": true
              },
              "recipients": {
                "description": "Array of user ids participating in channel",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "icon": {
                "description": "Custom icon attachment",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/File"
                  }
                ],
                "nullable": true
              },
              "last_message_id": {
                "description": "Id of the last message sent in this channel",
                "type": "string",
                "nullable": true
              },
              "permissions": {
                "description": "Permissions assigned to members of this group (does not apply to the owner of the group)",
                "type": "integer",
                "format": "int64",
                "nullable": true
              },
              "nsfw": {
                "description": "Whether this group is marked as not safe for work",
                "type": "boolean"
              }
            }
          },
          {
            "description": "Text channel belonging to a server",
            "type": "object",
            "required": [
              "_id",
              "channel_type",
              "name",
              "server"
            ],
            "properties": {
              "channel_type": {
                "type": "string",
                "enum": [
                  "TextChannel"
                ]
              },
              "_id": {
                "description": "Unique Id",
                "type": "string"
              },
              "server": {
                "description": "Id of the server this channel belongs to",
                "type": "string"
              },
              "name": {
                "description": "Display name of the channel",
                "type": "string"
              },
              "description": {
                "description": "Channel description",
                "type": "string",
                "nullable": true
              },
              "icon": {
                "description": "Custom icon attachment",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/File"
                  }
                ],
                "nullable": true
              },
              "last_message_id": {
                "description": "Id of the last message sent in this channel",
                "type": "string",
                "nullable": true
              },
              "default_permissions": {
                "description": "Default permissions assigned to users in this channel",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/OverrideField"
                  }
                ],
                "nullable": true
              },
              "role_permissions": {
                "description": "Permissions assigned based on role to this channel",
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/OverrideField"
                }
              },
              "nsfw": {
                "description": "Whether this channel is marked as not safe for work",
                "type": "boolean"
              },
              "voice": {
                "description": "Voice Information for when this channel is also a voice channel",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/VoiceInformation"
                  }
                ],
                "nullable": true
              }
            }
          }
        ]
      },
      "OverrideField": {
        "description": "Representation of a single permission override as it appears on models and in the database",
        "type": "object",
        "required": [
          "a",
          "d"
        ],
        "properties": {
          "a": {
            "description": "Allow bit flags",
            "type": "integer",
            "format": "int64"
          },
          "d": {
            "description": "Disallow bit flags",
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "VoiceInformation": {
        "description": "Voice information for a channel",
        "type": "object",
        "properties": {
          "max_users": {
            "description": "Maximium amount of users allowed in the voice channel at once",
            "type": "integer",
            "format": "uint",
            "minimum": 1.0,
            "nullable": true
          }
        }
      },
      "MutualResponse": {
        "description": "Mutual friends, servers, groups and DMs response",
        "type": "object",
        "required": [
          "channels",
          "servers",
          "users"
        ],
        "properties": {
          "users": {
            "description": "Array of mutual user IDs that both users are friends with",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "servers": {
            "description": "Array of mutual server IDs that both users are in",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "description": "Array of mutual group and dm IDs that both users are in",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DataSendFriendRequest": {
        "description": "User lookup information",
        "type": "object",
        "required": [
          "username"
        ],
        "properties": {
          "username": {
            "description": "Username and discriminator combo separated by #",
            "type": "string"
          }
        }
      },
      "BotWithUserResponse": {
        "description": "Bot with user response",
        "type": "object",
        "required": [
          "_id",
          "owner",
          "public",
          "token",
          "user"
        ],
        "properties": {
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "_id": {
            "description": "Bot Id",
            "type": "string"
          },
          "owner": {
            "description": "User Id of the bot owner",
            "type": "string"
          },
          "token": {
            "description": "Token used to authenticate requests for this bot",
            "type": "string"
          },
          "public": {
            "description": "Whether the bot is public (may be invited by anyone)",
            "type": "boolean"
          },
          "analytics": {
            "description": "Whether to enable analytics",
            "type": "boolean"
          },
          "discoverable": {
            "description": "Whether this bot should be publicly discoverable",
            "type": "boolean"
          },
          "interactions_url": {
            "description": "Reserved; URL for handling interactions",
            "type": "string"
          },
          "terms_of_service_url": {
            "description": "URL for terms of service",
            "type": "string"
          },
          "privacy_policy_url": {
            "description": "URL for privacy policy",
            "type": "string"
          },
          "flags": {
            "description": "Enum of bot flags",
            "type": "integer",
            "format": "uint32",
            "minimum": 0.0
          }
        }
      },
      "DataCreateBot": {
        "description": "Bot Details",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "Bot username",
            "type": "string",
            "maxLength": 32,
            "minLength": 2,
            "pattern": "^(\\p{L}|[\\d_.-])+$"
          }
        }
      },
      "InviteBotDestination": {
        "description": "Where we are inviting a bot to",
        "anyOf": [
          {
            "description": "Invite to a server",
            "type": "object",
            "required": [
              "server"
            ],
            "properties": {
              "server": {
                "description": "Server Id",
                "type": "string"
              }
            }
          },
          {
            "description": "Invite to a group",
            "type": "object",
            "required": [
              "group"
            ],
            "properties": {
              "group": {
                "description": "Group Id",
                "type": "string"
              }
            }
          }
        ]
      },
      "PublicBot": {
        "description": "Public Bot",
        "type": "object",
        "required": [
          "_id",
          "username"
        ],
        "properties": {
          "_id": {
            "description": "Bot Id",
            "type": "string"
          },
          "username": {
            "description": "Bot Username",
            "type": "string"
          },
          "avatar": {
            "description": "Profile Avatar",
            "type": "string"
          },
          "description": {
            "description": "Profile Description",
            "type": "string"
          }
        }
      },
      "FetchBotResponse": {
        "description": "Bot Response",
        "type": "object",
        "required": [
          "bot",
          "user"
        ],
        "properties": {
          "bot": {
            "description": "Bot object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Bot"
              }
            ]
          },
          "user": {
            "description": "User object",
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ]
          }
        }
      },
      "Bot": {
        "description": "Bot",
        "type": "object",
        "required": [
          "_id",
          "owner",
          "public",
          "token"
        ],
        "properties": {
          "_id": {
            "description": "Bot Id",
            "type": "string"
          },
          "owner": {
            "description": "User Id of the bot owner",
            "type": "string"
          },
          "token": {
            "description": "Token used to authenticate requests for this bot",
            "type": "string"
          },
          "public": {
            "description": "Whether the bot is public (may be invited by anyone)",
            "type": "boolean"
          },
          "analytics": {
            "description": "Whether to enable analytics",
            "type": "boolean"
          },
          "discoverable": {
            "description": "Whether this bot should be publicly discoverable",
            "type": "boolean"
          },
          "interactions_url": {
            "description": "Reserved; URL for handling interactions",
            "type": "string"
          },
          "terms_of_service_url": {
            "description": "URL for terms of service",
            "type": "string"
          },
          "privacy_policy_url": {
            "description": "URL for privacy policy",
            "type": "string"
          },
          "flags": {
            "description": "Enum of bot flags",
            "type": "integer",
            "format": "uint32",
            "minimum": 0.0
          }
        }
      },
      "OwnedBotsResponse": {
        "description": "Owned Bots Response\n\nBoth lists are sorted by their IDs.\n\nTODO: user should be in bot object",
        "type": "object",
        "required": [
          "bots",
          "users"
        ],
        "properties": {
          "bots": {
            "description": "Bot objects",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Bot"
            }
          },
          "users": {
            "description": "User objects",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          }
        }
      },
      "DataEditBot": {
        "description": "New Bot Details",
        "type": "object",
        "properties": {
          "name": {
            "description": "Bot username",
            "type": "string",
            "maxLength": 32,
            "minLength": 2,
            "pattern": "^(\\p{L}|[\\d_.-])+$",
            "nullable": true
          },
          "public": {
            "description": "Whether the bot can be added by anyone",
            "type": "boolean",
            "nullable": true
          },
          "analytics": {
            "description": "Whether analytics should be gathered for this bot\n\nMust be enabled in order to show up on [Revolt Discover](https://rvlt.gg).",
            "type": "boolean",
            "nullable": true
          },
          "interactions_url": {
            "description": "Interactions URL",
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "nullable": true
          },
          "remove": {
            "description": "Fields to remove from bot object",
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldsBot"
            }
          }
        }
      },
      "FieldsBot": {
        "description": "Optional fields on bot object",
        "type": "string",
        "enum": [
          "Token",
          "InteractionsURL"
        ]
      },
      "DataEditChannel": {
        "description": "New webhook information",
        "type": "object",
        "properties": {
          "name": {
            "description": "Channel name",
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "nullable": true
          },
          "description": {
            "description": "Channel description",
            "type": "string",
            "maxLength": 1024,
            "minLength": 0,
            "nullable": true
          },
          "owner": {
            "description": "Group owner",
            "type": "string",
            "nullable": true
          },
          "icon": {
            "description": "Icon\n\nProvide an Autumn attachment Id.",
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "nullable": true
          },
          "nsfw": {
            "description": "Whether this channel is age-restricted",
            "type": "boolean",
            "nullable": true
          },
          "archived": {
            "description": "Whether this channel is archived",
            "type": "boolean",
            "nullable": true
          },
          "voice": {
            "description": "Voice Information for voice channels",
            "allOf": [
              {
                "$ref": "#/components/schemas/VoiceInformation"
              }
            ],
            "nullable": true
          },
          "remove": {
            "description": "Fields to remove from channel",
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldsChannel"
            }
          }
        }
      },
      "FieldsChannel": {
        "description": "Optional fields on channel object",
        "type": "string",
        "enum": [
          "Description",
          "Icon",
          "DefaultPermissions",
          "Voice"
        ]
      },
      "Invite": {
        "description": "Invite",
        "oneOf": [
          {
            "description": "Invite to a specific server channel",
            "type": "object",
            "required": [
              "_id",
              "channel",
              "creator",
              "server",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Server"
                ]
              },
              "_id": {
                "description": "Invite code",
                "type": "string"
              },
              "server": {
                "description": "Id of the server this invite points to",
                "type": "string"
              },
              "creator": {
                "description": "Id of user who created this invite",
                "type": "string"
              },
              "channel": {
                "description": "Id of the server channel this invite points to",
                "type": "string"
              }
            }
          },
          {
            "description": "Invite to a group channel",
            "type": "object",
            "required": [
              "_id",
              "channel",
              "creator",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Group"
                ]
              },
              "_id": {
                "description": "Invite code",
                "type": "string"
              },
              "creator": {
                "description": "Id of user who created this invite",
                "type": "string"
              },
              "channel": {
                "description": "Id of the group channel this invite points to",
                "type": "string"
              }
            }
          }
        ]
      },
      "Message": {
        "description": "Message",
        "type": "object",
        "required": [
          "_id",
          "author",
          "channel"
        ],
        "properties": {
          "_id": {
            "description": "Unique Id",
            "type": "string"
          },
          "nonce": {
            "description": "Unique value generated by client sending this message",
            "type": "string",
            "nullable": true
          },
          "channel": {
            "description": "Id of the channel this message was sent in",
            "type": "string"
          },
          "author": {
            "description": "Id of the user or webhook that sent this message",
            "type": "string"
          },
          "user": {
            "description": "The user that sent this message",
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ],
            "nullable": true
          },
          "member": {
            "description": "The member that sent this message",
            "allOf": [
              {
                "$ref": "#/components/schemas/Member"
              }
            ],
            "nullable": true
          },
          "webhook": {
            "description": "The webhook that sent this message",
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageWebhook"
              }
            ],
            "nullable": true
          },
          "content": {
            "description": "Message content",
            "type": "string",
            "nullable": true
          },
          "system": {
            "description": "System message",
            "allOf": [
              {
                "$ref": "#/components/schemas/SystemMessage"
              }
            ],
            "nullable": true
          },
          "attachments": {
            "description": "Array of attachments",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/File"
            },
            "nullable": true
          },
          "edited": {
            "description": "Time at which this message was last edited",
            "allOf": [
              {
                "$ref": "#/components/schemas/ISO8601 Timestamp"
              }
            ],
            "nullable": true
          },
          "embeds": {
            "description": "Attached embeds to this message",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Embed"
            },
            "nullable": true
          },
          "mentions": {
            "description": "Array of user ids mentioned in this message",
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "role_mentions": {
            "description": "Array of role ids mentioned in this message",
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "replies": {
            "description": "Array of message ids this message is replying to",
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "reactions": {
            "description": "Hashmap of emoji IDs to array of user IDs",
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "uniqueItems": true
            }
          },
          "interactions": {
            "description": "Information about how this message should be interacted with",
            "allOf": [
              {
                "$ref": "#/components/schemas/Interactions"
              }
            ]
          },
          "masquerade": {
            "description": "Name and / or avatar overrides for this message",
            "allOf": [
              {
                "$ref": "#/components/schemas/Masquerade"
              }
            ],
            "nullable": true
          },
          "pinned": {
            "description": "Whether or not the message in pinned",
            "type": "boolean",
            "nullable": true
          },
          "flags": {
            "description": "Bitfield of message flags\n\nhttps://docs.rs/revolt-models/latest/revolt_models/v0/enum.MessageFlags.html",
            "type": "integer",
            "format": "uint32",
            "minimum": 0.0
          }
        }
      },
      "Member": {
        "description": "Server Member",
        "type": "object",
        "required": [
          "_id",
          "joined_at"
        ],
        "properties": {
          "_id": {
            "description": "Unique member id",
            "allOf": [
              {
                "$ref": "#/components/schemas/MemberCompositeKey"
              }
            ]
          },
          "joined_at": {
            "description": "Time at which this user joined the server",
            "allOf": [
              {
                "$ref": "#/components/schemas/ISO8601 Timestamp"
              }
            ]
          },
          "nickname": {
            "description": "Member's nickname",
            "type": "string",
            "nullable": true
          },
          "avatar": {
            "description": "Avatar attachment",
            "allOf": [
              {
                "$ref": "#/components/schemas/File"
              }
            ],
            "nullable": true
          },
          "roles": {
            "description": "Member's roles",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "timeout": {
            "description": "Timestamp this member is timed out until",
            "allOf": [
              {
                "$ref": "#/components/schemas/ISO8601 Timestamp"
              }
            ],
            "nullable": true
          },
          "can_publish": {
            "description": "Whether the member is server-wide voice muted",
            "type": "boolean"
          },
          "can_receive": {
            "description": "Whether the member is server-wide voice deafened",
            "type": "boolean"
          }
        }
      },
      "MemberCompositeKey": {
        "description": "Composite primary key consisting of server and user id",
        "type": "object",
        "required": [
          "server",
          "user"
        ],
        "properties": {
          "server": {
            "description": "Server Id",
            "type": "string"
          },
          "user": {
            "description": "User Id",
            "type": "string"
          }
        }
      },
      "ISO8601 Timestamp": {
        "description": "ISO8601 formatted timestamp",
        "type": "string",
        "format": "date-time",
        "example": "1970-01-01T00:00:00Z"
      },
      "MessageWebhook": {
        "description": "Information about the webhook bundled with Message",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "avatar": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "SystemMessage": {
        "description": "System Event",
        "oneOf": [
          {
            "type": "object",
            "required": [
              "content",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "text"
                ]
              },
              "content": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "by",
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user_added"
                ]
              },
              "id": {
                "type": "string"
              },
              "by": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "by",
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user_remove"
                ]
              },
              "id": {
                "type": "string"
              },
              "by": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user_joined"
                ]
              },
              "id": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user_left"
                ]
              },
              "id": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user_kicked"
                ]
              },
              "id": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user_banned"
                ]
              },
              "id": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "by",
              "name",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "channel_renamed"
                ]
              },
              "name": {
                "type": "string"
              },
              "by": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "by",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "channel_description_changed"
                ]
              },
              "by": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "by",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "channel_icon_changed"
                ]
              },
              "by": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "from",
              "to",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "channel_ownership_changed"
                ]
              },
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "by",
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "message_pinned"
                ]
              },
              "id": {
                "type": "string"
              },
              "by": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "by",
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "message_unpinned"
                ]
              },
              "id": {
                "type": "string"
              },
              "by": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "by",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "call_started"
                ]
              },
              "by": {
                "type": "string"
              },
              "finished_at": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ISO8601 Timestamp"
                  }
                ],
                "nullable": true
              }
            }
          }
        ]
      },
      "Embed": {
        "description": "Embed",
        "oneOf": [
          {
            "description": "Website metadata",
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Website"
                ]
              },
              "url": {
                "description": "Direct URL to web page",
                "type": "string",
                "nullable": true
              },
              "original_url": {
                "description": "Original direct URL",
                "type": "string",
                "nullable": true
              },
              "special": {
                "description": "Remote content",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Special"
                  }
                ],
                "nullable": true
              },
              "title": {
                "description": "Title of website",
                "type": "string",
                "nullable": true
              },
              "description": {
                "description": "Description of website",
                "type": "string",
                "nullable": true
              },
              "image": {
                "description": "Embedded image",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Image"
                  }
                ],
                "nullable": true
              },
              "video": {
                "description": "Embedded video",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Video"
                  }
                ],
                "nullable": true
              },
              "site_name": {
                "description": "Site name",
                "type": "string",
                "nullable": true
              },
              "icon_url": {
                "description": "URL to site icon",
                "type": "string",
                "nullable": true
              },
              "colour": {
                "description": "CSS Colour",
                "type": "string",
                "nullable": true
              }
            }
          },
          {
            "description": "Image",
            "type": "object",
            "required": [
              "height",
              "size",
              "type",
              "url",
              "width"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Image"
                ]
              },
              "url": {
                "description": "URL to the original image",
                "type": "string"
              },
              "width": {
                "description": "Width of the image",
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              },
              "height": {
                "description": "Height of the image",
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              },
              "size": {
                "description": "Positioning and size",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ImageSize"
                  }
                ]
              }
            }
          },
          {
            "description": "Video",
            "type": "object",
            "required": [
              "height",
              "type",
              "url",
              "width"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Video"
                ]
              },
              "url": {
                "description": "URL to the original video",
                "type": "string"
              },
              "width": {
                "description": "Width of the video",
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              },
              "height": {
                "description": "Height of the video",
                "type": "integer",
                "format": "uint",
                "minimum": 0.0
              }
            }
          },
          {
            "description": "Text Embed",
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Text"
                ]
              },
              "icon_url": {
                "description": "URL to icon",
                "type": "string",
                "nullable": true
              },
              "url": {
                "description": "URL for title",
                "type": "string",
                "nullable": true
              },
              "title": {
                "description": "Title of text embed",
                "type": "string",
                "nullable": true
              },
              "description": {
                "description": "Description of text embed",
                "type": "string",
                "nullable": true
              },
              "media": {
                "description": "ID of uploaded autumn file",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/File"
                  }
                ],
                "nullable": true
              },
              "colour": {
                "description": "CSS Colour",
                "type": "string",
                "nullable": true
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "None"
                ]
              }
            }
          }
        ]
      },
      "Special": {
        "description": "Information about special remote content",
        "oneOf": [
          {
            "description": "No remote content",
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "None"
                ]
              }
            }
          },
          {
            "description": "Content hint that this contains a GIF\n\nUse metadata to find video or image to play",
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "GIF"
                ]
              }
            }
          },
          {
            "description": "YouTube video",
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "YouTube"
                ]
              },
              "id": {
                "type": "string"
              },
              "timestamp": {
                "type": "string",
                "nullable": true
              }
            }
          },
          {
            "description": "Lightspeed.tv stream",
            "type": "object",
            "required": [
              "content_type",
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Lightspeed"
                ]
              },
              "content_type": {
                "$ref": "#/components/schemas/LightspeedType"
              },
              "id": {
                "type": "string"
              }
            }
          },
          {
            "description": "Twitch stream or clip",
            "type": "object",
            "required": [
              "content_type",
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Twitch"
                ]
              },
              "content_type": {
                "$ref": "#/components/schemas/TwitchType"
              },
              "id": {
                "type": "string"
              }
            }
          },
          {
            "description": "Spotify track",
            "type": "object",
            "required": [
              "content_type",
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Spotify"
                ]
              },
              "content_type": {
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            }
          },
          {
            "description": "Soundcloud track",
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Soundcloud"
                ]
              }
            }
          },
          {
            "description": "Bandcamp track",
            "type": "object",
            "required": [
              "content_type",
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Bandcamp"
                ]
              },
              "content_type": {
                "$ref": "#/components/schemas/BandcampType"
              },
              "id": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "album_id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "AppleMusic"
                ]
              },
              "album_id": {
                "type": "string"
              },
              "track_id": {
                "type": "string",
                "nullable": true
              }
            }
          },
          {
            "description": "Streamable Video",
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Streamable"
                ]
              },
              "id": {
                "type": "string"
              }
            }
          }
        ]
      },
      "LightspeedType": {
        "description": "Type of remote Lightspeed.tv content",
        "type": "string",
        "enum": [
          "Channel"
        ]
      },
      "TwitchType": {
        "description": "Type of remote Twitch content",
        "type": "string",
        "enum": [
          "Channel",
          "Video",
          "Clip"
        ]
      },
      "BandcampType": {
        "description": "Type of remote Bandcamp content",
        "type": "string",
        "enum": [
          "Album",
          "Track"
        ]
      },
      "Image": {
        "description": "Image",
        "type": "object",
        "required": [
          "height",
          "size",
          "url",
          "width"
        ],
        "properties": {
          "url": {
            "description": "URL to the original image",
            "type": "string"
          },
          "width": {
            "description": "Width of the image",
            "type": "integer",
            "format": "uint",
            "minimum": 0.0
          },
          "height": {
            "description": "Height of the image",
            "type": "integer",
            "format": "uint",
            "minimum": 0.0
          },
          "size": {
            "description": "Positioning and size",
            "allOf": [
              {
                "$ref": "#/components/schemas/ImageSize"
              }
            ]
          }
        }
      },
      "ImageSize": {
        "description": "Image positioning and size",
        "oneOf": [
          {
            "description": "Show large preview at the bottom of the embed",
            "type": "string",
            "enum": [
              "Large"
            ]
          },
          {
            "description": "Show small preview to the side of the embed",
            "type": "string",
            "enum": [
              "Preview"
            ]
          }
        ]
      },
      "Video": {
        "description": "Video",
        "type": "object",
        "required": [
          "height",
          "url",
          "width"
        ],
        "properties": {
          "url": {
            "description": "URL to the original video",
            "type": "string"
          },
          "width": {
            "description": "Width of the video",
            "type": "integer",
            "format": "uint",
            "minimum": 0.0
          },
          "height": {
            "description": "Height of the video",
            "type": "integer",
            "format": "uint",
            "minimum": 0.0
          }
        }
      },
      "Interactions": {
        "description": "Information to guide interactions on this message",
        "type": "object",
        "properties": {
          "reactions": {
            "description": "Reactions which should always appear and be distinct",
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true,
            "nullable": true
          },
          "restrict_reactions": {
            "description": "Whether reactions should be restricted to the given list\n\nCan only be set to true if reactions list is of at least length 1",
            "type": "boolean"
          }
        }
      },
      "Masquerade": {
        "description": "Name and / or avatar override information",
        "type": "object",
        "properties": {
          "name": {
            "description": "Replace the display name shown on this message",
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "nullable": true
          },
          "avatar": {
            "description": "Replace the avatar shown on this message (URL to image file)",
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "nullable": true
          },
          "colour": {
            "description": "Replace the display role colour shown on this message\n\nMust have `ManageRole` permission to use",
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "(?i)^(?:[a-z ]+|var\\(--[a-z\\d-]+\\)|rgba?\\([\\d, ]+\\)|#[a-f0-9]+|(repeating-)?(linear|conic|radial)-gradient\\(([a-z ]+|var\\(--[a-z\\d-]+\\)|rgba?\\([\\d, ]+\\)|#[a-f0-9]+|\\d+deg)([ ]+(\\d{1,3}%|0))?(,[ ]*([a-z ]+|var\\(--[a-z\\d-]+\\)|rgba?\\([\\d, ]+\\)|#[a-f0-9]+)([ ]+(\\d{1,3}%|0))?)+\\))$",
            "nullable": true
          }
        }
      },
      "DataMessageSend": {
        "description": "Message to send",
        "type": "object",
        "properties": {
          "nonce": {
            "description": "Unique token to prevent duplicate message sending\n\n**This is deprecated and replaced by `Idempotency-Key`!**",
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "nullable": true
          },
          "content": {
            "description": "Message content to send",
            "type": "string",
            "maxLength": 2000,
            "minLength": 0,
            "nullable": true
          },
          "attachments": {
            "description": "Attachments to include in message",
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "replies": {
            "description": "Messages to reply to",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReplyIntent"
            },
            "nullable": true
          },
          "embeds": {
            "description": "Embeds to include in message\n\nText embed content contributes to the content length cap",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SendableEmbed"
            },
            "nullable": true
          },
          "masquerade": {
            "description": "Masquerade to apply to this message",
            "allOf": [
              {
                "$ref": "#/components/schemas/Masquerade"
              }
            ],
            "nullable": true
          },
          "interactions": {
            "description": "Information about how this message should be interacted with",
            "allOf": [
              {
                "$ref": "#/components/schemas/Interactions"
              }
            ],
            "nullable": true
          },
          "flags": {
            "description": "Bitfield of message flags\n\nhttps://docs.rs/revolt-models/latest/revolt_models/v0/enum.MessageFlags.html",
            "type": "integer",
            "format": "uint32",
            "minimum": 0.0,
            "nullable": true
          }
        }
      },
      "ReplyIntent": {
        "description": "What this message should reply to and how",
        "type": "object",
        "required": [
          "id",
          "mention"
        ],
        "properties": {
          "id": {
            "description": "Message Id",
            "type": "string"
          },
          "mention": {
            "description": "Whether this reply should mention the message's author",
            "type": "boolean"
          },
          "fail_if_not_exists": {
            "description": "Whether to error if the referenced message doesn't exist. Otherwise, send a message without this reply. Default is true.",
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "SendableEmbed": {
        "description": "Representation of a text embed before it is sent.",
        "type": "object",
        "properties": {
          "icon_url": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "nullable": true
          },
          "url": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "nullable": true
          },
          "title": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "nullable": true
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "nullable": true
          },
          "media": {
            "type": "string",
            "nullable": true
          },
          "colour": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "(?i)^(?:[a-z ]+|var\\(--[a-z\\d-]+\\)|rgba?\\([\\d, ]+\\)|#[a-f0-9]+|(repeating-)?(linear|conic|radial)-gradient\\(([a-z ]+|var\\(--[a-z\\d-]+\\)|rgba?\\([\\d, ]+\\)|#[a-f0-9]+|\\d+deg)([ ]+(\\d{1,3}%|0))?(,[ ]*([a-z ]+|var\\(--[a-z\\d-]+\\)|rgba?\\([\\d, ]+\\)|#[a-f0-9]+)([ ]+(\\d{1,3}%|0))?)+\\))$",
            "nullable": true
          }
        }
      },
      "BulkMessageResponse": {
        "description": "Bulk Message Response",
        "anyOf": [
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          {
            "type": "object",
            "required": [
              "messages",
              "users"
            ],
            "properties": {
              "messages": {
                "description": "List of messages",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Message"
                }
              },
              "users": {
                "description": "List of users",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/User"
                }
              },
              "members": {
                "description": "List of members",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Member"
                },
                "nullable": true
              }
            }
          }
        ]
      },
      "MessageSort": {
        "description": "Message Sort\n\nSort used for retrieving messages",
        "oneOf": [
          {
            "description": "Sort by the most relevant messages",
            "type": "string",
            "enum": [
              "Relevance"
            ]
          },
          {
            "description": "Sort by the newest messages first",
            "type": "string",
            "enum": [
              "Latest"
            ]
          },
          {
            "description": "Sort by the oldest messages first",
            "type": "string",
            "enum": [
              "Oldest"
            ]
          }
        ]
      },
      "DataMessageSearch": {
        "description": "Options for searching for messages",
        "type": "object",
        "properties": {
          "query": {
            "description": "Full-text search query\n\nSee [MongoDB documentation](https://docs.mongodb.com/manual/text-search/#-text-operator) for more information.",
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "nullable": true
          },
          "pinned": {
            "description": "Whether to only search for pinned messages, cannot be sent with `query`.",
            "type": "boolean",
            "nullable": true
          },
          "limit": {
            "description": "Maximum number of messages to fetch",
            "type": "integer",
            "format": "int64",
            "maximum": 100.0,
            "minimum": 1.0,
            "nullable": true
          },
          "before": {
            "description": "Message id before which messages should be fetched",
            "type": "string",
            "maxLength": 26,
            "minLength": 26,
            "nullable": true
          },
          "after": {
            "description": "Message id after which messages should be fetched",
            "type": "string",
            "maxLength": 26,
            "minLength": 26,
            "nullable": true
          },
          "sort": {
            "description": "Message sort direction\n\nBy default, it will be sorted by latest.",
            "default": "Relevance",
            "allOf": [
              {
                "$ref": "#/components/schemas/MessageSort"
              }
            ]
          },
          "include_users": {
            "description": "Whether to include user (and member, if server channel) objects",
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "DataEditMessage": {
        "description": "Changes to make to message",
        "type": "object",
        "properties": {
          "content": {
            "description": "New message content",
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "nullable": true
          },
          "embeds": {
            "description": "Embeds to include in the message",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SendableEmbed"
            },
            "maxItems": 10,
            "minItems": 0,
            "nullable": true
          }
        }
      },
      "OptionsBulkDelete": {
        "description": "Options for bulk deleting messages",
        "type": "object",
        "required": [
          "ids"
        ],
        "properties": {
          "ids": {
            "description": "Message IDs",
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 1
          }
        }
      },
      "DataCreateGroup": {
        "description": "Create new group",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "Group name",
            "type": "string",
            "maxLength": 32,
            "minLength": 1
          },
          "description": {
            "description": "Group description",
            "type": "string",
            "maxLength": 1024,
            "minLength": 0,
            "nullable": true
          },
          "icon": {
            "description": "Group icon",
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "nullable": true
          },
          "users": {
            "description": "Array of user IDs to add to the group\n\nMust be friends with these users.",
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 49,
            "minItems": 0,
            "uniqueItems": true
          },
          "nsfw": {
            "description": "Whether this group is age-restricted",
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "CreateVoiceUserResponse": {
        "description": "Voice server token response",
        "type": "object",
        "required": [
          "token",
          "url"
        ],
        "properties": {
          "token": {
            "description": "Token for authenticating with the voice server",
            "type": "string"
          },
          "url": {
            "description": "Url of the livekit server to connect to",
            "type": "string"
          }
        }
      },
      "DataJoinCall": {
        "description": "Join a voice channel",
        "type": "object",
        "properties": {
          "node": {
            "description": "Name of the node to join",
            "type": "string",
            "nullable": true
          },
          "force_disconnect": {
            "description": "Whether to force disconnect any other existing voice connections\n\nUseful for disconnecting on another device and joining on a new.",
            "type": "boolean",
            "nullable": true
          },
          "recipients": {
            "description": "Users which should be notified of the call starting\n\nOnly used when the user is the first one connected.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        }
      },
      "DataSetRolePermissions": {
        "description": "New role permissions",
        "type": "object",
        "required": [
          "permissions"
        ],
        "properties": {
          "permissions": {
            "description": "Allow / deny values to set for this role",
            "allOf": [
              {
                "$ref": "#/components/schemas/Override"
              }
            ]
          }
        }
      },
      "Override": {
        "description": "Representation of a single permission override",
        "type": "object",
        "required": [
          "allow",
          "deny"
        ],
        "properties": {
          "allow": {
            "description": "Allow bit flags",
            "type": "integer",
            "format": "uint64",
            "minimum": 0.0
          },
          "deny": {
            "description": "Disallow bit flags",
            "type": "integer",
            "format": "uint64",
            "minimum": 0.0
          }
        }
      },
      "DataDefaultChannelPermissions": {
        "description": "New default permissions",
        "anyOf": [
          {
            "type": "object",
            "required": [
              "permissions"
            ],
            "properties": {
              "permissions": {
                "description": "Permission values to set for members in a `Group`",
                "type": "integer",
                "format": "uint64",
                "minimum": 0.0
              }
            }
          },
          {
            "type": "object",
            "required": [
              "permissions"
            ],
            "properties": {
              "permissions": {
                "description": "Allow / deny values to set for members in this server channel",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Override"
                  }
                ]
              }
            }
          }
        ]
      },
      "Webhook": {
        "description": "Webhook",
        "type": "object",
        "required": [
          "channel_id",
          "creator_id",
          "id",
          "name",
          "permissions"
        ],
        "properties": {
          "id": {
            "description": "Webhook Id",
            "type": "string"
          },
          "name": {
            "description": "The name of the webhook",
            "type": "string"
          },
          "avatar": {
            "description": "The avatar of the webhook",
            "allOf": [
              {
                "$ref": "#/components/schemas/File"
              }
            ],
            "nullable": true
          },
          "creator_id": {
            "description": "User that created this webhook",
            "type": "string"
          },
          "channel_id": {
            "description": "The channel this webhook belongs to",
            "type": "string"
          },
          "permissions": {
            "description": "The permissions for the webhook",
            "type": "integer",
            "format": "uint64",
            "minimum": 0.0
          },
          "token": {
            "description": "The private token for the webhook",
            "type": "string",
            "nullable": true
          }
        }
      },
      "CreateWebhookBody": {
        "description": "Information for the webhook",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 32,
            "minLength": 1
          },
          "avatar": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "nullable": true
          }
        }
      },
      "CreateServerLegacyResponse": {
        "description": "Information returned when creating server",
        "type": "object",
        "required": [
          "channels",
          "server"
        ],
        "properties": {
          "server": {
            "description": "Server object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Server"
              }
            ]
          },
          "channels": {
            "description": "Default channels",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Channel"
            }
          }
        }
      },
      "Server": {
        "description": "Server",
        "type": "object",
        "required": [
          "_id",
          "channels",
          "default_permissions",
          "name",
          "owner"
        ],
        "properties": {
          "_id": {
            "description": "Unique Id",
            "type": "string"
          },
          "owner": {
            "description": "User id of the owner",
            "type": "string"
          },
          "name": {
            "description": "Name of the server",
            "type": "string"
          },
          "description": {
            "description": "Description for the server",
            "type": "string",
            "nullable": true
          },
          "channels": {
            "description": "Channels within this server",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "description": "Categories for this server",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            },
            "nullable": true
          },
          "system_messages": {
            "description": "Configuration for sending system event messages",
            "allOf": [
              {
                "$ref": "#/components/schemas/SystemMessageChannels"
              }
            ],
            "nullable": true
          },
          "roles": {
            "description": "Roles for this server",
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Role"
            }
          },
          "default_permissions": {
            "description": "Default set of server and channel permissions",
            "type": "integer",
            "format": "int64"
          },
          "icon": {
            "description": "Icon attachment",
            "allOf": [
              {
                "$ref": "#/components/schemas/File"
              }
            ],
            "nullable": true
          },
          "banner": {
            "description": "Banner attachment",
            "allOf": [
              {
                "$ref": "#/components/schemas/File"
              }
            ],
            "nullable": true
          },
          "flags": {
            "description": "Bitfield of server flags",
            "type": "integer",
            "format": "uint32",
            "minimum": 0.0
          },
          "nsfw": {
            "description": "Whether this server is flagged as not safe for work",
            "type": "boolean"
          },
          "analytics": {
            "description": "Whether to enable analytics",
            "type": "boolean"
          },
          "discoverable": {
            "description": "Whether this server should be publicly discoverable",
            "type": "boolean"
          }
        }
      },
      "Category": {
        "description": "Channel category",
        "type": "object",
        "required": [
          "channels",
          "id",
          "title"
        ],
        "properties": {
          "id": {
            "description": "Unique ID for this category",
            "type": "string",
            "maxLength": 32,
            "minLength": 1
          },
          "title": {
            "description": "Title for this category",
            "type": "string",
            "maxLength": 32,
            "minLength": 1
          },
          "channels": {
            "description": "Channels in this category",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SystemMessageChannels": {
        "description": "System message channel assignments",
        "type": "object",
        "properties": {
          "user_joined": {
            "description": "ID of channel to send user join messages in",
            "type": "string",
            "nullable": true
          },
          "user_left": {
            "description": "ID of channel to send user left messages in",
            "type": "string",
            "nullable": true
          },
          "user_kicked": {
            "description": "ID of channel to send user kicked messages in",
            "type": "string",
            "nullable": true
          },
          "user_banned": {
            "description": "ID of channel to send user banned messages in",
            "type": "string",
            "nullable": true
          }
        }
      },
      "Role": {
        "description": "Role",
        "type": "object",
        "required": [
          "_id",
          "name",
          "permissions"
        ],
        "properties": {
          "_id": {
            "description": "Unique Id",
            "type": "string"
          },
          "name": {
            "description": "Role name",
            "type": "string"
          },
          "permissions": {
            "description": "Permissions available to this role",
            "allOf": [
              {
                "$ref": "#/components/schemas/OverrideField"
              }
            ]
          },
          "colour": {
            "description": "Colour used for this role\n\nThis can be any valid CSS colour",
            "type": "string",
            "nullable": true
          },
          "hoist": {
            "description": "Whether this role should be shown separately on the member sidebar",
            "type": "boolean"
          },
          "rank": {
            "description": "Ranking of this role",
            "default": 0,
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "DataCreateServer": {
        "description": "Information about new server to create",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "Server name",
            "type": "string",
            "maxLength": 32,
            "minLength": 1
          },
          "description": {
            "description": "Server description",
            "type": "string",
            "maxLength": 1024,
            "minLength": 0,
            "nullable": true
          },
          "nsfw": {
            "description": "Whether this server is age-restricted",
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "FetchServerResponse": {
        "description": "Fetch server information",
        "anyOf": [
          {
            "$ref": "#/components/schemas/Server"
          },
          {
            "description": "Server",
            "type": "object",
            "required": [
              "_id",
              "channels",
              "default_permissions",
              "name",
              "owner"
            ],
            "properties": {
              "channels": {
                "description": "Channels within this server",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "_id": {
                "description": "Unique Id",
                "type": "string"
              },
              "owner": {
                "description": "User id of the owner",
                "type": "string"
              },
              "name": {
                "description": "Name of the server",
                "type": "string"
              },
              "description": {
                "description": "Description for the server",
                "type": "string",
                "nullable": true
              },
              "categories": {
                "description": "Categories for this server",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Category"
                },
                "nullable": true
              },
              "system_messages": {
                "description": "Configuration for sending system event messages",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SystemMessageChannels"
                  }
                ],
                "nullable": true
              },
              "roles": {
                "description": "Roles for this server",
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/Role"
                }
              },
              "default_permissions": {
                "description": "Default set of server and channel permissions",
                "type": "integer",
                "format": "int64"
              },
              "icon": {
                "description": "Icon attachment",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/File"
                  }
                ],
                "nullable": true
              },
              "banner": {
                "description": "Banner attachment",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/File"
                  }
                ],
                "nullable": true
              },
              "flags": {
                "description": "Bitfield of server flags",
                "type": "integer",
                "format": "uint32",
                "minimum": 0.0
              },
              "nsfw": {
                "description": "Whether this server is flagged as not safe for work",
                "type": "boolean"
              },
              "analytics": {
                "description": "Whether to enable analytics",
                "type": "boolean"
              },
              "discoverable": {
                "description": "Whether this server should be publicly discoverable",
                "type": "boolean"
              }
            }
          }
        ]
      },
      "DataEditServer": {
        "description": "New server information",
        "type": "object",
        "properties": {
          "name": {
            "description": "Server name",
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "nullable": true
          },
          "description": {
            "description": "Server description",
            "type": "string",
            "maxLength": 1024,
            "minLength": 0,
            "nullable": true
          },
          "icon": {
            "description": "Attachment Id for icon",
            "type": "string",
            "nullable": true
          },
          "banner": {
            "description": "Attachment Id for banner",
            "type": "string",
            "nullable": true
          },
          "categories": {
            "description": "Category structure for server",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            },
            "nullable": true
          },
          "system_messages": {
            "description": "System message configuration",
            "allOf": [
              {
                "$ref": "#/components/schemas/SystemMessageChannels"
              }
            ],
            "nullable": true
          },
          "flags": {
            "description": "Bitfield of server flags",
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "discoverable": {
            "description": "Whether this server is public and should show up on [Revolt Discover](https://rvlt.gg)",
            "type": "boolean",
            "nullable": true
          },
          "analytics": {
            "description": "Whether analytics should be collected for this server\n\nMust be enabled in order to show up on [Revolt Discover](https://rvlt.gg).",
            "type": "boolean",
            "nullable": true
          },
          "remove": {
            "description": "Fields to remove from server object",
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldsServer"
            }
          }
        }
      },
      "FieldsServer": {
        "description": "Optional fields on server object",
        "type": "string",
        "enum": [
          "Description",
          "Categories",
          "SystemMessages",
          "Icon",
          "Banner"
        ]
      },
      "DataCreateServerChannel": {
        "description": "Create new server channel",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "type": {
            "description": "Channel type",
            "default": "Text",
            "allOf": [
              {
                "$ref": "#/components/schemas/LegacyServerChannelType"
              }
            ]
          },
          "name": {
            "description": "Channel name",
            "type": "string",
            "maxLength": 32,
            "minLength": 1
          },
          "description": {
            "description": "Channel description",
            "type": "string",
            "maxLength": 1024,
            "minLength": 0,
            "nullable": true
          },
          "nsfw": {
            "description": "Whether this channel is age restricted",
            "type": "boolean",
            "nullable": true
          },
          "voice": {
            "description": "Voice Information for when this channel is also a voice channel",
            "allOf": [
              {
                "$ref": "#/components/schemas/VoiceInformation"
              }
            ],
            "nullable": true
          }
        }
      },
      "LegacyServerChannelType": {
        "description": "Server Channel Type",
        "oneOf": [
          {
            "description": "Text Channel",
            "type": "string",
            "enum": [
              "Text"
            ]
          },
          {
            "description": "Voice Channel",
            "type": "string",
            "enum": [
              "Voice"
            ]
          }
        ]
      },
      "AllMemberResponse": {
        "description": "Response with all members",
        "type": "object",
        "required": [
          "members",
          "users"
        ],
        "properties": {
          "members": {
            "description": "List of members",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            }
          },
          "users": {
            "description": "List of users",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          }
        }
      },
      "MemberResponse": {
        "description": "Member response",
        "anyOf": [
          {
            "$ref": "#/components/schemas/Member"
          },
          {
            "type": "object",
            "required": [
              "member",
              "roles"
            ],
            "properties": {
              "member": {
                "$ref": "#/components/schemas/Member"
              },
              "roles": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          }
        ]
      },
      "DataMemberEdit": {
        "description": "New member information",
        "type": "object",
        "properties": {
          "nickname": {
            "description": "Member nickname",
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "nullable": true
          },
          "avatar": {
            "description": "Attachment Id to set for avatar",
            "type": "string",
            "nullable": true
          },
          "roles": {
            "description": "Array of role ids",
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timeout": {
            "description": "Timestamp this member is timed out until",
            "allOf": [
              {
                "$ref": "#/components/schemas/ISO8601 Timestamp"
              }
            ],
            "nullable": true
          },
          "can_publish": {
            "description": "server-wide voice muted",
            "type": "boolean",
            "nullable": true
          },
          "can_receive": {
            "description": "server-wide voice deafened",
            "type": "boolean",
            "nullable": true
          },
          "voice_channel": {
            "description": "voice channel to move to if already in a voice channel",
            "type": "string",
            "nullable": true
          },
          "remove": {
            "description": "Fields to remove from channel object",
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldsMember"
            }
          }
        }
      },
      "FieldsMember": {
        "description": "Optional fields on server member object",
        "type": "string",
        "enum": [
          "Nickname",
          "Avatar",
          "Roles",
          "Timeout",
          "CanReceive",
          "CanPublish",
          "JoinedAt",
          "VoiceChannel"
        ]
      },
      "MemberQueryResponse": {
        "title": "Query members by name",
        "type": "object",
        "required": [
          "members",
          "users"
        ],
        "properties": {
          "members": {
            "description": "List of members",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            }
          },
          "users": {
            "description": "List of users",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          }
        }
      },
      "ServerBan": {
        "description": "Server Ban",
        "type": "object",
        "required": [
          "_id"
        ],
        "properties": {
          "_id": {
            "description": "Unique member id",
            "allOf": [
              {
                "$ref": "#/components/schemas/MemberCompositeKey"
              }
            ]
          },
          "reason": {
            "description": "Reason for ban creation",
            "type": "string",
            "nullable": true
          }
        }
      },
      "DataBanCreate": {
        "description": "Information for new server ban",
        "type": "object",
        "properties": {
          "reason": {
            "description": "Ban reason",
            "type": "string",
            "maxLength": 1024,
            "minLength": 0,
            "nullable": true
          }
        }
      },
      "BanListResult": {
        "description": "Ban list result",
        "type": "object",
        "required": [
          "bans",
          "users"
        ],
        "properties": {
          "users": {
            "description": "Users objects",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BannedUser"
            }
          },
          "bans": {
            "description": "Ban objects",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServerBan"
            }
          }
        }
      },
      "BannedUser": {
        "description": "Just enough information to list a ban",
        "type": "object",
        "required": [
          "_id",
          "discriminator",
          "username"
        ],
        "properties": {
          "_id": {
            "description": "Id of the banned user",
            "type": "string"
          },
          "username": {
            "description": "Username of the banned user",
            "type": "string"
          },
          "discriminator": {
            "description": "Discriminator of the banned user",
            "type": "string"
          },
          "avatar": {
            "description": "Avatar of the banned user",
            "allOf": [
              {
                "$ref": "#/components/schemas/File"
              }
            ],
            "nullable": true
          }
        }
      },
      "NewRoleResponse": {
        "description": "Response after creating new role",
        "type": "object",
        "required": [
          "id",
          "role"
        ],
        "properties": {
          "id": {
            "description": "Id of the role",
            "type": "string"
          },
          "role": {
            "description": "New role",
            "allOf": [
              {
                "$ref": "#/components/schemas/Role"
              }
            ]
          }
        }
      },
      "DataCreateRole": {
        "description": "Information about new role to create",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "Role name",
            "type": "string",
            "maxLength": 32,
            "minLength": 1
          },
          "rank": {
            "description": "Ranking position\n\nSmaller values take priority.\n\n**Removed** - no effect, use the edit server role positions route",
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "DataEditRole": {
        "description": "New role information",
        "type": "object",
        "properties": {
          "name": {
            "description": "Role name",
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "nullable": true
          },
          "colour": {
            "description": "Role colour",
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "(?i)^(?:[a-z ]+|var\\(--[a-z\\d-]+\\)|rgba?\\([\\d, ]+\\)|#[a-f0-9]+|(repeating-)?(linear|conic|radial)-gradient\\(([a-z ]+|var\\(--[a-z\\d-]+\\)|rgba?\\([\\d, ]+\\)|#[a-f0-9]+|\\d+deg)([ ]+(\\d{1,3}%|0))?(,[ ]*([a-z ]+|var\\(--[a-z\\d-]+\\)|rgba?\\([\\d, ]+\\)|#[a-f0-9]+)([ ]+(\\d{1,3}%|0))?)+\\))$",
            "nullable": true
          },
          "hoist": {
            "description": "Whether this role should be displayed separately",
            "type": "boolean",
            "nullable": true
          },
          "rank": {
            "description": "Ranking position\n\n**Removed** - no effect, use the edit server role positions route",
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "remove": {
            "description": "Fields to remove from role object",
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldsRole"
            }
          }
        }
      },
      "FieldsRole": {
        "description": "Optional fields on server object",
        "type": "string",
        "enum": [
          "Colour"
        ]
      },
      "DataSetServerRolePermission": {
        "description": "New role permissions",
        "type": "object",
        "required": [
          "permissions"
        ],
        "properties": {
          "permissions": {
            "description": "Allow / deny values for the role in this server.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Override"
              }
            ]
          }
        }
      },
      "DataPermissionsValue": {
        "description": "Data permissions Value - contains allow",
        "type": "object",
        "required": [
          "permissions"
        ],
        "properties": {
          "permissions": {
            "type": "integer",
            "format": "uint64",
            "minimum": 0.0
          }
        }
      },
      "Emoji": {
        "description": "Emoji",
        "type": "object",
        "required": [
          "_id",
          "creator_id",
          "name",
          "parent"
        ],
        "properties": {
          "_id": {
            "description": "Unique Id",
            "type": "string"
          },
          "parent": {
            "description": "What owns this emoji",
            "allOf": [
              {
                "$ref": "#/components/schemas/EmojiParent"
              }
            ]
          },
          "creator_id": {
            "description": "Uploader user id",
            "type": "string"
          },
          "name": {
            "description": "Emoji name",
            "type": "string"
          },
          "animated": {
            "description": "Whether the emoji is animated",
            "type": "boolean"
          },
          "nsfw": {
            "description": "Whether the emoji is marked as nsfw",
            "type": "boolean"
          }
        }
      },
      "EmojiParent": {
        "description": "Parent Id of the emoji",
        "oneOf": [
          {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Server"
                ]
              },
              "id": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Detached"
                ]
              }
            }
          }
        ]
      },
      "DataEditRoleRanks": {
        "description": "New role positions",
        "type": "object",
        "required": [
          "ranks"
        ],
        "properties": {
          "ranks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "InviteResponse": {
        "description": "Public invite response",
        "oneOf": [
          {
            "description": "Server channel invite",
            "type": "object",
            "required": [
              "channel_id",
              "channel_name",
              "code",
              "member_count",
              "server_id",
              "server_name",
              "type",
              "user_name"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Server"
                ]
              },
              "code": {
                "description": "Invite code",
                "type": "string"
              },
              "server_id": {
                "description": "Id of the server",
                "type": "string"
              },
              "server_name": {
                "description": "Name of the server",
                "type": "string"
              },
              "server_icon": {
                "description": "Attachment for server icon",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/File"
                  }
                ],
                "nullable": true
              },
              "server_banner": {
                "description": "Attachment for server banner",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/File"
                  }
                ],
                "nullable": true
              },
              "server_flags": {
                "description": "Enum of server flags",
                "type": "integer",
                "format": "int32",
                "nullable": true
              },
              "channel_id": {
                "description": "Id of server channel",
                "type": "string"
              },
              "channel_name": {
                "description": "Name of server channel",
                "type": "string"
              },
              "channel_description": {
                "description": "Description of server channel",
                "type": "string",
                "nullable": true
              },
              "user_name": {
                "description": "Name of user who created the invite",
                "type": "string"
              },
              "user_avatar": {
                "description": "Avatar of the user who created the invite",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/File"
                  }
                ],
                "nullable": true
              },
              "member_count": {
                "description": "Number of members in this server",
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "description": "Group channel invite",
            "type": "object",
            "required": [
              "channel_id",
              "channel_name",
              "code",
              "type",
              "user_name"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Group"
                ]
              },
              "code": {
                "description": "Invite code",
                "type": "string"
              },
              "channel_id": {
                "description": "Id of group channel",
                "type": "string"
              },
              "channel_name": {
                "description": "Name of group channel",
                "type": "string"
              },
              "channel_description": {
                "description": "Description of group channel",
                "type": "string",
                "nullable": true
              },
              "user_name": {
                "description": "Name of user who created the invite",
                "type": "string"
              },
              "user_avatar": {
                "description": "Avatar of the user who created the invite",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/File"
                  }
                ],
                "nullable": true
              }
            }
          }
        ]
      },
      "InviteJoinResponse": {
        "description": "Invite join response",
        "oneOf": [
          {
            "type": "object",
            "required": [
              "channels",
              "server",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Server"
                ]
              },
              "channels": {
                "description": "Channels in the server",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Channel"
                }
              },
              "server": {
                "description": "Server we are joining",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Server"
                  }
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "channel",
              "type",
              "users"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Group"
                ]
              },
              "channel": {
                "description": "Group channel we are joining",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Channel"
                  }
                ]
              },
              "users": {
                "description": "Members of this group",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        ]
      },
      "DataCreateEmoji": {
        "description": "Create a new emoji",
        "type": "object",
        "required": [
          "name",
          "parent"
        ],
        "properties": {
          "name": {
            "description": "Server name",
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "pattern": "^[a-z0-9_]+$"
          },
          "parent": {
            "description": "Parent information",
            "allOf": [
              {
                "$ref": "#/components/schemas/EmojiParent"
              }
            ]
          },
          "nsfw": {
            "description": "Whether the emoji is mature",
            "default": false,
            "type": "boolean"
          }
        }
      },
      "DataReportContent": {
        "title": "Report Data",
        "type": "object",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "description": "Content being reported",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportedContent"
              }
            ]
          },
          "additional_context": {
            "description": "Additional report description",
            "default": "",
            "type": "string",
            "maxLength": 1000,
            "minLength": 0
          }
        }
      },
      "ReportedContent": {
        "description": "The content being reported",
        "oneOf": [
          {
            "description": "Report a message",
            "type": "object",
            "required": [
              "id",
              "report_reason",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Message"
                ]
              },
              "id": {
                "description": "ID of the message",
                "type": "string"
              },
              "report_reason": {
                "description": "Reason for reporting message",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ContentReportReason"
                  }
                ]
              }
            }
          },
          {
            "description": "Report a server",
            "type": "object",
            "required": [
              "id",
              "report_reason",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Server"
                ]
              },
              "id": {
                "description": "ID of the server",
                "type": "string"
              },
              "report_reason": {
                "description": "Reason for reporting server",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ContentReportReason"
                  }
                ]
              }
            }
          },
          {
            "description": "Report a user",
            "type": "object",
            "required": [
              "id",
              "report_reason",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "User"
                ]
              },
              "id": {
                "description": "ID of the user",
                "type": "string"
              },
              "report_reason": {
                "description": "Reason for reporting a user",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/UserReportReason"
                  }
                ]
              },
              "message_id": {
                "description": "Message context",
                "type": "string",
                "nullable": true
              }
            }
          }
        ]
      },
      "ContentReportReason": {
        "description": "Reason for reporting content (message or server)",
        "oneOf": [
          {
            "description": "No reason has been specified",
            "type": "string",
            "enum": [
              "NoneSpecified"
            ]
          },
          {
            "description": "Illegal content catch-all reason",
            "type": "string",
            "enum": [
              "Illegal"
            ]
          },
          {
            "description": "Selling or facilitating use of drugs or other illegal goods",
            "type": "string",
            "enum": [
              "IllegalGoods"
            ]
          },
          {
            "description": "Extortion or blackmail",
            "type": "string",
            "enum": [
              "IllegalExtortion"
            ]
          },
          {
            "description": "Revenge or child pornography",
            "type": "string",
            "enum": [
              "IllegalPornography"
            ]
          },
          {
            "description": "Illegal hacking activity",
            "type": "string",
            "enum": [
              "IllegalHacking"
            ]
          },
          {
            "description": "Extreme violence, gore, or animal cruelty With exception to violence potrayed in media / creative arts",
            "type": "string",
            "enum": [
              "ExtremeViolence"
            ]
          },
          {
            "description": "Content that promotes harm to others / self",
            "type": "string",
            "enum": [
              "PromotesHarm"
            ]
          },
          {
            "description": "Unsolicited advertisements",
            "type": "string",
            "enum": [
              "UnsolicitedSpam"
            ]
          },
          {
            "description": "This is a raid",
            "type": "string",
            "enum": [
              "Raid"
            ]
          },
          {
            "description": "Spam or platform abuse",
            "type": "string",
            "enum": [
              "SpamAbuse"
            ]
          },
          {
            "description": "Scams or fraud",
            "type": "string",
            "enum": [
              "ScamsFraud"
            ]
          },
          {
            "description": "Distribution of malware or malicious links",
            "type": "string",
            "enum": [
              "Malware"
            ]
          },
          {
            "description": "Harassment or abuse targeted at another user",
            "type": "string",
            "enum": [
              "Harassment"
            ]
          }
        ]
      },
      "UserReportReason": {
        "description": "Reason for reporting a user",
        "oneOf": [
          {
            "description": "No reason has been specified",
            "type": "string",
            "enum": [
              "NoneSpecified"
            ]
          },
          {
            "description": "Unsolicited advertisements",
            "type": "string",
            "enum": [
              "UnsolicitedSpam"
            ]
          },
          {
            "description": "User is sending spam or otherwise abusing the platform",
            "type": "string",
            "enum": [
              "SpamAbuse"
            ]
          },
          {
            "description": "User's profile contains inappropriate content for a general audience",
            "type": "string",
            "enum": [
              "InappropriateProfile"
            ]
          },
          {
            "description": "User is impersonating another user",
            "type": "string",
            "enum": [
              "Impersonation"
            ]
          },
          {
            "description": "User is evading a ban",
            "type": "string",
            "enum": [
              "BanEvasion"
            ]
          },
          {
            "description": "User is not of minimum age to use the platform",
            "type": "string",
            "enum": [
              "Underage"
            ]
          }
        ]
      },
      "Authifier Error": {
        "title": "Error",
        "oneOf": [
          {
            "type": "object",
            "required": [
              "type",
              "with"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "IncorrectData"
                ]
              },
              "with": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "operation",
              "type",
              "with"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "DatabaseError"
                ]
              },
              "operation": {
                "type": "string"
              },
              "with": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InternalError"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "OperationFailed"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "RenderFail"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "MissingHeaders"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "CaptchaFailed"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "BlockedByShield"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InvalidSession"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "UnverifiedAccount"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "UnknownUser"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "EmailFailed"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InvalidToken"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "MissingInvite"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InvalidInvite"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "InvalidCredentials"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "CompromisedPassword"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "ShortPassword"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Blacklisted"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "LockedOut"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "TotpAlreadyEnabled"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "DisallowedMFAMethod"
                ]
              }
            }
          }
        ]
      },
      "DataCreateAccount": {
        "title": "Account Data",
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "properties": {
          "email": {
            "description": "Valid email address",
            "type": "string"
          },
          "password": {
            "description": "Password",
            "type": "string"
          },
          "invite": {
            "description": "Invite code",
            "type": "string",
            "nullable": true
          },
          "captcha": {
            "description": "Captcha verification code",
            "type": "string",
            "nullable": true
          }
        }
      },
      "DataResendVerification": {
        "title": "Resend Information",
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "description": "Email associated with the account",
            "type": "string"
          },
          "captcha": {
            "description": "Captcha verification code",
            "type": "string",
            "nullable": true
          }
        }
      },
      "DataAccountDeletion": {
        "title": "Account Deletion Token",
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "description": "Deletion token",
            "type": "string"
          }
        }
      },
      "AccountInfo": {
        "type": "object",
        "required": [
          "_id",
          "email"
        ],
        "properties": {
          "_id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "DataChangePassword": {
        "title": "Change Data",
        "type": "object",
        "required": [
          "current_password",
          "password"
        ],
        "properties": {
          "password": {
            "description": "New password",
            "type": "string"
          },
          "current_password": {
            "description": "Current password",
            "type": "string"
          }
        }
      },
      "DataChangeEmail": {
        "title": "Change Data",
        "type": "object",
        "required": [
          "current_password",
          "email"
        ],
        "properties": {
          "email": {
            "description": "Valid email address",
            "type": "string"
          },
          "current_password": {
            "description": "Current password",
            "type": "string"
          }
        }
      },
      "ResponseVerify": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "object",
            "required": [
              "ticket"
            ],
            "properties": {
              "ticket": {
                "description": "Authorised MFA ticket, can be used to log in",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MFATicket"
                  }
                ]
              }
            }
          }
        ]
      },
      "MFATicket": {
        "description": "Multi-factor auth ticket",
        "type": "object",
        "required": [
          "_id",
          "account_id",
          "authorised",
          "token",
          "validated"
        ],
        "properties": {
          "_id": {
            "description": "Unique Id",
            "type": "string"
          },
          "account_id": {
            "description": "Account Id",
            "type": "string"
          },
          "token": {
            "description": "Unique Token",
            "type": "string"
          },
          "validated": {
            "description": "Whether this ticket has been validated (can be used for account actions)",
            "type": "boolean"
          },
          "authorised": {
            "description": "Whether this ticket is authorised (can be used to log a user in)",
            "type": "boolean"
          },
          "last_totp_code": {
            "description": "TOTP code at time of ticket creation",
            "type": "string",
            "nullable": true
          }
        }
      },
      "DataPasswordReset": {
        "title": "Password Reset",
        "type": "object",
        "required": [
          "password",
          "token"
        ],
        "properties": {
          "token": {
            "description": "Reset token",
            "type": "string"
          },
          "password": {
            "description": "New password",
            "type": "string"
          },
          "remove_sessions": {
            "description": "Whether to logout all sessions",
            "default": false,
            "type": "boolean"
          }
        }
      },
      "DataSendPasswordReset": {
        "title": "Reset Information",
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "description": "Email associated with the account",
            "type": "string"
          },
          "captcha": {
            "description": "Captcha verification code",
            "type": "string",
            "nullable": true
          }
        }
      },
      "ResponseLogin": {
        "oneOf": [
          {
            "description": "Session information",
            "type": "object",
            "required": [
              "_id",
              "last_seen",
              "name",
              "result",
              "token",
              "user_id"
            ],
            "properties": {
              "result": {
                "type": "string",
                "enum": [
                  "Success"
                ]
              },
              "_id": {
                "description": "Unique Id",
                "type": "string"
              },
              "user_id": {
                "description": "User Id",
                "type": "string"
              },
              "token": {
                "description": "Session token",
                "type": "string"
              },
              "name": {
                "description": "Display name",
                "type": "string"
              },
              "last_seen": {
                "description": "When the session was last logged in (iso8601 timestamp)",
                "type": "string"
              },
              "origin": {
                "description": "What is the session origin? This could be used to differentiate sessions that come from staging/test vs prod, etc. Authifier will set this to None by default. The application must fill it in.",
                "type": "string",
                "nullable": true
              },
              "subscription": {
                "description": "Web Push subscription",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebPushSubscription"
                  }
                ],
                "nullable": true
              }
            }
          },
          {
            "type": "object",
            "required": [
              "allowed_methods",
              "result",
              "ticket"
            ],
            "properties": {
              "result": {
                "type": "string",
                "enum": [
                  "MFA"
                ]
              },
              "ticket": {
                "type": "string"
              },
              "allowed_methods": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MFAMethod"
                }
              }
            }
          },
          {
            "type": "object",
            "required": [
              "result",
              "user_id"
            ],
            "properties": {
              "result": {
                "type": "string",
                "enum": [
                  "Disabled"
                ]
              },
              "user_id": {
                "type": "string"
              }
            }
          }
        ]
      },
      "WebPushSubscription": {
        "description": "Web Push subscription",
        "type": "object",
        "required": [
          "auth",
          "endpoint",
          "p256dh"
        ],
        "properties": {
          "endpoint": {
            "type": "string"
          },
          "p256dh": {
            "type": "string"
          },
          "auth": {
            "type": "string"
          }
        }
      },
      "MFAMethod": {
        "description": "MFA method",
        "type": "string",
        "enum": [
          "Password",
          "Recovery",
          "Totp"
        ]
      },
      "DataLogin": {
        "title": "Login Data",
        "anyOf": [
          {
            "type": "object",
            "required": [
              "email",
              "password"
            ],
            "properties": {
              "email": {
                "description": "Email",
                "type": "string"
              },
              "password": {
                "description": "Password",
                "type": "string"
              },
              "friendly_name": {
                "description": "Friendly name used for the session",
                "type": "string",
                "nullable": true
              }
            }
          },
          {
            "type": "object",
            "required": [
              "mfa_ticket"
            ],
            "properties": {
              "mfa_ticket": {
                "description": "Unvalidated or authorised MFA ticket\n\nUsed to resolve the correct account",
                "type": "string"
              },
              "mfa_response": {
                "description": "Valid MFA response\n\nThis will take precedence over the `password` field where applicable",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MFAResponse"
                  }
                ],
                "nullable": true
              },
              "friendly_name": {
                "description": "Friendly name used for the session",
                "type": "string",
                "nullable": true
              }
            }
          }
        ]
      },
      "MFAResponse": {
        "description": "MFA response",
        "anyOf": [
          {
            "type": "object",
            "required": [
              "password"
            ],
            "properties": {
              "password": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "recovery_code"
            ],
            "properties": {
              "recovery_code": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "totp_code"
            ],
            "properties": {
              "totp_code": {
                "type": "string"
              }
            }
          }
        ]
      },
      "SessionInfo": {
        "type": "object",
        "required": [
          "_id",
          "name"
        ],
        "properties": {
          "_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "DataEditSession": {
        "title": "Edit Data",
        "type": "object",
        "required": [
          "friendly_name"
        ],
        "properties": {
          "friendly_name": {
            "description": "Session friendly name",
            "type": "string"
          }
        }
      },
      "MultiFactorStatus": {
        "type": "object",
        "required": [
          "email_mfa",
          "email_otp",
          "recovery_active",
          "security_key_mfa",
          "totp_mfa",
          "trusted_handover"
        ],
        "properties": {
          "email_otp": {
            "type": "boolean"
          },
          "trusted_handover": {
            "type": "boolean"
          },
          "email_mfa": {
            "type": "boolean"
          },
          "totp_mfa": {
            "type": "boolean"
          },
          "security_key_mfa": {
            "type": "boolean"
          },
          "recovery_active": {
            "type": "boolean"
          }
        }
      },
      "ResponseTotpSecret": {
        "title": "Totp Secret",
        "type": "object",
        "required": [
          "secret"
        ],
        "properties": {
          "secret": {
            "type": "string"
          }
        }
      },
      "DataHello": {
        "title": "Onboarding Status",
        "type": "object",
        "required": [
          "onboarding"
        ],
        "properties": {
          "onboarding": {
            "description": "Whether onboarding is required",
            "type": "boolean"
          }
        }
      },
      "DataOnboard": {
        "title": "New User Data",
        "type": "object",
        "required": [
          "username"
        ],
        "properties": {
          "username": {
            "description": "New username which will be used to identify the user on the platform",
            "type": "string",
            "maxLength": 32,
            "minLength": 2,
            "pattern": "^(\\p{L}|[\\d_.-])+$"
          }
        }
      },
      "OptionsFetchSettings": {
        "description": "Options for fetching settings",
        "type": "object",
        "required": [
          "keys"
        ],
        "properties": {
          "keys": {
            "description": "Keys to fetch",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ChannelUnread": {
        "description": "Channel Unread",
        "type": "object",
        "required": [
          "_id"
        ],
        "properties": {
          "_id": {
            "description": "Composite key pointing to a user's view of a channel",
            "allOf": [
              {
                "$ref": "#/components/schemas/ChannelCompositeKey"
              }
            ]
          },
          "last_id": {
            "description": "Id of the last message read in this channel by a user",
            "type": "string",
            "nullable": true
          },
          "mentions": {
            "description": "Array of message ids that mention the user",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ChannelCompositeKey": {
        "description": "Composite primary key consisting of channel and user id",
        "type": "object",
        "required": [
          "channel",
          "user"
        ],
        "properties": {
          "channel": {
            "description": "Channel Id",
            "type": "string"
          },
          "user": {
            "description": "User Id",
            "type": "string"
          }
        }
      },
      "DataEditWebhook": {
        "description": "New webhook information",
        "type": "object",
        "properties": {
          "name": {
            "description": "Webhook name",
            "type": "string",
            "maxLength": 32,
            "minLength": 1,
            "nullable": true
          },
          "avatar": {
            "description": "Avatar ID",
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "nullable": true
          },
          "permissions": {
            "description": "Webhook permissions",
            "type": "integer",
            "format": "uint64",
            "minimum": 0.0,
            "nullable": true
          },
          "remove": {
            "description": "Fields to remove from webhook",
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldsWebhook"
            }
          }
        }
      },
      "FieldsWebhook": {
        "description": "Optional fields on webhook object",
        "type": "string",
        "enum": [
          "Avatar"
        ]
      },
      "ResponseWebhook": {
        "description": "Webhook information",
        "type": "object",
        "required": [
          "channel_id",
          "id",
          "name",
          "permissions"
        ],
        "properties": {
          "id": {
            "description": "Webhook Id",
            "type": "string"
          },
          "name": {
            "description": "Webhook name",
            "type": "string"
          },
          "avatar": {
            "description": "Avatar ID",
            "type": "string",
            "nullable": true
          },
          "channel_id": {
            "description": "The channel this webhook belongs to",
            "type": "string"
          },
          "permissions": {
            "description": "The permissions for the webhook",
            "type": "integer",
            "format": "uint64",
            "minimum": 0.0
          }
        }
      }
    },
    "securitySchemes": {
      "Session Token": {
        "description": "Used to authenticate as a user.",
        "type": "apiKey",
        "name": "x-session-token",
        "in": "header"
      },
      "Valid MFA Ticket": {
        "description": "Used to authorise a request.",
        "type": "apiKey",
        "name": "x-mfa-ticket",
        "in": "header"
      },
      "Unvalidated MFA Ticket": {
        "description": "Used to authorise a request.",
        "type": "apiKey",
        "name": "x-mfa-ticket",
        "in": "header"
      }
    }
  },
  "externalDocs": {
    "description": "Revolt Developer Documentation",
    "url": "https://developers.revolt.chat"
  },
  "x-logo": {
    "url": "https://revolt.chat/header.png",
    "altText": "Revolt Header"
  },
  "x-tagGroups": [
    {
      "name": "Revolt",
      "tags": [
        "Core"
      ]
    },
    {
      "name": "Users",
      "tags": [
        "User Information",
        "Direct Messaging",
        "Relationships"
      ]
    },
    {
      "name": "Bots",
      "tags": [
        "Bots"
      ]
    },
    {
      "name": "Channels",
      "tags": [
        "Channel Information",
        "Channel Invites",
        "Channel Permissions",
        "Messaging",
        "Interactions",
        "Groups",
        "Voice",
        "Webhooks"
      ]
    },
    {
      "name": "Servers",
      "tags": [
        "Server Information",
        "Server Members",
        "Server Permissions"
      ]
    },
    {
      "name": "Invites",
      "tags": [
        "Invites"
      ]
    },
    {
      "name": "Customisation",
      "tags": [
        "Emojis"
      ]
    },
    {
      "name": "Platform Administration",
      "tags": [
        "Admin",
        "User Safety"
      ]
    },
    {
      "name": "Authentication",
      "tags": [
        "Account",
        "Session",
        "Onboarding",
        "MFA"
      ]
    },
    {
      "name": "Miscellaneous",
      "tags": [
        "Sync",
        "Web Push"
      ]
    }
  ]
}