Skip to content

Instantly share code, notes, and snippets.

@brecert
Created August 21, 2022 01:27
Show Gist options
  • Save brecert/efab2408b79da01298b0f6439f9e78cd to your computer and use it in GitHub Desktop.
Save brecert/efab2408b79da01298b0f6439f9e78cd to your computer and use it in GitHub Desktop.
{
"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": "[email protected]"
},
"license": {
"name": "AGPLv3",
"url": "https://github.com/revoltchat/delta/blob/master/LICENSE"
},
"version": "0.5.5"
},
"servers": [
{
"url": "https://api.revolt.chat",
"description": "Revolt API"
},
{
"url": "http://local.revolt.chat:8000",
"description": "Local Revolt Environment"
}
],
"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_req",
"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": [
{
"SessionToken": []
}
]
},
"patch": {
"tags": [
"User Information"
],
"summary": "Edit User",
"description": "Edit currently authenticated user.",
"operationId": "edit_user_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/users/{target}": {
"get": {
"tags": [
"User Information"
],
"summary": "Fetch User",
"description": "Retrieve a user's information.",
"operationId": "fetch_user_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/users/@me/username": {
"patch": {
"tags": [
"User Information"
],
"summary": "Change Username",
"description": "Change your username.",
"operationId": "change_username_req",
"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": [
{
"SessionToken": []
},
{
"SessionToken": []
}
]
}
},
"/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_req",
"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_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/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_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/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_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/users/{target}/mutual": {
"get": {
"tags": [
"Relationships"
],
"summary": "Fetch Mutual Friends And Servers",
"description": "Retrieve a list of mutual friends and servers with another user.",
"operationId": "find_mutual_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/users/{target}/friend": {
"put": {
"tags": [
"Relationships"
],
"summary": "Accept Friend Request",
"description": "Accept another user's friend request.",
"operationId": "add_friend_req",
"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": [
{
"SessionToken": []
}
]
},
"delete": {
"tags": [
"Relationships"
],
"summary": "Deny Friend Request / Remove Friend",
"description": "Denies another user's friend request or removes an existing friend.",
"operationId": "remove_friend_req",
"parameters": [
{
"name": "target",
"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/User"
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
}
},
"/users/{target}/block": {
"put": {
"tags": [
"Relationships"
],
"summary": "Block User",
"description": "Block another user by their id.",
"operationId": "block_user_req",
"parameters": [
{
"name": "target",
"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/User"
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
},
"delete": {
"tags": [
"Relationships"
],
"summary": "Unblock User",
"description": "Unblock another user by their id.",
"operationId": "unblock_user_req",
"parameters": [
{
"name": "target",
"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/User"
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
}
},
"/users/friend": {
"post": {
"tags": [
"Relationships"
],
"summary": "Send Friend Request",
"description": "Send a friend request to another user.",
"operationId": "send_friend_request_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/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/Bot"
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
},
"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": [
{
"SessionToken": []
}
]
}
},
"/bots/{target}": {
"get": {
"tags": [
"Bots"
],
"summary": "Fetch Bot",
"description": "Fetch details of a bot you own by its id.",
"operationId": "fetch_fetch_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/BotResponse"
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
},
"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": [
{
"SessionToken": []
}
]
},
"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/Bot"
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
}
},
"/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_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/channels/{target}": {
"get": {
"tags": [
"Channel Information"
],
"summary": "Fetch Channel",
"description": "Fetch channel by its id.",
"operationId": "channel_fetch_req",
"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": [
{
"SessionToken": []
}
]
},
"delete": {
"tags": [
"Channel Information"
],
"summary": "Close Channel",
"description": "Deletes a server channel, leaves a group or closes a group.",
"operationId": "channel_delete_req",
"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": [
{
"SessionToken": []
}
]
},
"patch": {
"tags": [
"Channel Information"
],
"summary": "Edit Channel",
"description": "Edit a channel object by its id.",
"operationId": "channel_edit_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/channels/{target}/members": {
"get": {
"tags": [
"Groups"
],
"summary": "Fetch Group Members",
"description": "Retrieves all users who are part of this group.",
"operationId": "members_fetch_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/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_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/channels/{target}/messages": {
"get": {
"tags": [
"Messaging"
],
"summary": "Fetch Messages",
"description": "Fetch multiple messages.",
"operationId": "message_query_req",
"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 + 1)\\`.",
"schema": {
"description": "Maximum number of messages to fetch\n\nFor fetching nearby messages, this is \\`(limit + 1)\\`.",
"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": [
{
"SessionToken": []
}
]
},
"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": [
{
"SessionToken": []
}
]
}
},
"/channels/{target}/search": {
"post": {
"tags": [
"Messaging"
],
"summary": "Search for Messages",
"description": "This route searches for messages within the given parameters.",
"operationId": "message_search_req",
"parameters": [
{
"name": "target",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/Id"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OptionsMessageSearch"
}
}
},
"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": [
{
"SessionToken": []
}
]
}
},
"/channels/{_target}/messages/stale": {
"post": {
"tags": [
"Messaging"
],
"summary": "Poll Message Changes",
"description": "This route returns any changed message objects and tells you if any have been deleted.\n\nDon't actually poll this route, instead use this to update your local database.\n\n**DEPRECATED**",
"operationId": "message_query_stale_req",
"parameters": [
{
"name": "_target",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/Id"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OptionsQueryStale"
}
}
},
"required": true
},
"responses": {
"default": {
"description": "An error occurred.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"200": {
"description": ""
}
},
"security": [
{
"SessionToken": []
}
]
}
},
"/channels/{target}/messages/{msg}": {
"get": {
"tags": [
"Messaging"
],
"summary": "Fetch Message",
"description": "Retrieves a message by its id.",
"operationId": "message_fetch_req",
"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": [
{
"SessionToken": []
}
]
},
"delete": {
"tags": [
"Messaging"
],
"summary": "Delete Message",
"description": "Delete a message you've sent or one you have permission to delete.",
"operationId": "message_delete_req",
"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": [
{
"SessionToken": []
}
]
},
"patch": {
"tags": [
"Messaging"
],
"summary": "Edit Message",
"description": "Edits a message that you've previously sent.",
"operationId": "message_edit_req",
"parameters": [
{
"name": "target",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"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": [
{
"SessionToken": []
}
]
}
},
"/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_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/channels/create": {
"post": {
"tags": [
"Groups"
],
"summary": "Create Group",
"description": "Create a new group channel.",
"operationId": "group_create_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/channels/{target}/recipients/{member}": {
"put": {
"tags": [
"Groups"
],
"summary": "Add Member to Group",
"description": "Adds another user to the group.",
"operationId": "group_add_member_req",
"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": [
{
"SessionToken": []
}
]
},
"delete": {
"tags": [
"Groups"
],
"summary": "Remove Member from Group",
"description": "Removes a user from the group.",
"operationId": "group_remove_member_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/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_req",
"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/CreateVoiceUserResponse"
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
}
},
"/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` or `VoiceChannel`.",
"operationId": "permissions_set_req",
"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/Data"
}
}
},
"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": [
{
"SessionToken": []
}
]
}
},
"/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`, `TextChannel` or `VoiceChannel`.",
"operationId": "permissions_set_default_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
},
"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": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
}
},
"/servers/create": {
"post": {
"tags": [
"Server Information"
],
"summary": "Create Server",
"description": "Create a new server.",
"operationId": "server_create_req",
"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/CreateServerResponse"
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
}
},
"/servers/{target}": {
"get": {
"tags": [
"Server Information"
],
"summary": "Fetch Server",
"description": "Fetch a server by its id.",
"operationId": "server_fetch_req",
"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/Server"
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
},
"delete": {
"tags": [
"Server Information"
],
"summary": "Delete / Leave Server",
"description": "Deletes a server if owner otherwise leaves.",
"operationId": "server_delete_req",
"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": [
{
"SessionToken": []
}
]
},
"patch": {
"tags": [
"Server Information"
],
"summary": "Edit Server",
"description": "Edit a server by its id.",
"operationId": "server_edit_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/servers/{target}/ack": {
"put": {
"tags": [
"Server Information"
],
"summary": "Mark Server As Read",
"description": "Mark all channels in a server as read.",
"operationId": "server_ack_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/servers/{target}/channels": {
"post": {
"tags": [
"Server Information"
],
"summary": "Create Channel",
"description": "Create a new Text or Voice channel.",
"operationId": "channel_create_req",
"parameters": [
{
"name": "target",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/Id"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DataCreateChannel"
}
}
},
"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": [
{
"SessionToken": []
}
]
}
},
"/servers/{target}/members": {
"get": {
"tags": [
"Server Members"
],
"summary": "Fetch Members",
"description": "Fetch all server members.",
"operationId": "member_fetch_all_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/servers/{target}/members/{member}": {
"get": {
"tags": [
"Server Members"
],
"summary": "Fetch Member",
"description": "Retrieve a member.",
"operationId": "member_fetch_req",
"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"
}
}
}
},
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Member"
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
},
"delete": {
"tags": [
"Server Members"
],
"summary": "Kick Member",
"description": "Removes a member from the server.",
"operationId": "member_remove_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/servers/{server}/members/{target}": {
"patch": {
"tags": [
"Server Members"
],
"summary": "Edit Member",
"description": "Edit a member by their id.",
"operationId": "member_edit_req",
"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/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": [
{
"SessionToken": []
}
]
}
},
"/servers/{server}/bans/{target}": {
"put": {
"tags": [
"Server Members"
],
"summary": "Ban User",
"description": "Ban a user by their id.",
"operationId": "ban_create_req",
"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": [
{
"SessionToken": []
}
]
},
"delete": {
"tags": [
"Server Members"
],
"summary": "Unban user",
"description": "Remove a user's ban.",
"operationId": "ban_remove_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/servers/{target}/bans": {
"get": {
"tags": [
"Server Members"
],
"summary": "Fetch Bans",
"description": "Fetch all bans on a server.",
"operationId": "ban_list_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/servers/{target}/invites": {
"get": {
"tags": [
"Server Members"
],
"summary": "Fetch Invites",
"description": "Fetch all server invites.",
"operationId": "invites_fetch_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/servers/{target}/roles": {
"post": {
"tags": [
"Server Permissions"
],
"summary": "Create Role",
"description": "Creates a new server role.",
"operationId": "roles_create_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/servers/{target}/roles/{role_id}": {
"delete": {
"tags": [
"Server Permissions"
],
"summary": "Delete Role",
"description": "Delete a server role by its id.",
"operationId": "roles_delete_req",
"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": [
{
"SessionToken": []
}
]
},
"patch": {
"tags": [
"Server Permissions"
],
"summary": "Edit Role",
"description": "Edit a role by its id.",
"operationId": "roles_edit_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/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_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/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_req",
"parameters": [
{
"name": "target",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/Id"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DataSetServerDefaultPermission"
}
}
},
"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": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
}
},
"/invites/{target}": {
"get": {
"tags": [
"Invites"
],
"summary": "Fetch Invite",
"description": "Fetch an invite by its id.",
"operationId": "invite_fetch_req",
"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_req",
"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": [
{
"SessionToken": []
}
]
},
"delete": {
"tags": [
"Invites"
],
"summary": "Delete Invite",
"description": "Delete an invite by its id.",
"operationId": "invite_delete_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/custom/emoji/{id}": {
"get": {
"tags": [
"Emojis"
],
"summary": "Fetch Emoji",
"description": "Fetch an emoji by its id.",
"operationId": "emoji_fetch_fetch_emoji",
"parameters": [
{
"name": "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"
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
},
"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": [
{
"SessionToken": []
}
]
},
"delete": {
"tags": [
"Emojis"
],
"summary": "Delete Emoji",
"description": "Delete an emoji by its id.",
"operationId": "emoji_delete_delete_emoji",
"parameters": [
{
"name": "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": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"ValidMFATicket": []
},
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"ValidMFATicket": []
},
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
}
},
"/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"
}
}
}
},
"204": {
"description": "Success"
}
}
}
},
"/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": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
},
"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": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
},
"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": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
},
{
"UnvalidatedMFATicket": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"ValidMFATicket": []
},
{
"SessionToken": []
}
]
},
"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": [
{
"ValidMFATicket": []
},
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
}
},
"/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": [
{
"SessionToken": []
}
]
},
"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": [
{
"ValidMFATicket": []
},
{
"SessionToken": []
}
]
},
"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": [
{
"ValidMFATicket": []
},
{
"SessionToken": []
}
]
}
},
"/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_req",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DataHello"
}
}
}
}
},
"security": [
{
"SessionToken": []
},
{
"SessionToken": []
}
]
}
},
"/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_req",
"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"
}
}
}
},
"204": {
"description": "Success"
}
},
"security": [
{
"SessionToken": []
},
{
"SessionToken": []
}
]
}
},
"/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_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/push/unsubscribe": {
"post": {
"tags": [
"Web Push"
],
"summary": "Unsubscribe",
"description": "Remove the Web Push subscription associated with the current session.",
"operationId": "unsubscribe_req",
"responses": {
"default": {
"description": "An error occurred.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"204": {
"description": "Success"
}
},
"security": [
{
"SessionToken": []
}
]
}
},
"/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_req",
"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": {
"oneOf": [
{
"type": "integer",
"format": "int64"
},
{
"type": "string"
}
]
}
}
}
}
}
},
"security": [
{
"SessionToken": []
}
]
}
},
"/sync/settings/set": {
"post": {
"tags": [
"Sync"
],
"summary": "Set Settings",
"description": "Upload data to save to settings.",
"operationId": "set_settings_req",
"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": [
{
"SessionToken": []
}
]
}
},
"/sync/unreads": {
"get": {
"tags": [
"Sync"
],
"summary": "Fetch Unreads",
"description": "Fetch information about unread state on channels.",
"operationId": "get_unreads_req",
"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": [
{
"SessionToken": []
}
]
}
}
},
"components": {
"schemas": {
"RevoltConfig": {
"title": "Server Configuration",
"type": "object",
"required": [
"app",
"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"
}
}
},
"RevoltFeatures": {
"title": "Feature Configuration",
"type": "object",
"required": [
"autumn",
"captcha",
"email",
"invite_only",
"january",
"voso"
],
"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"
}
]
},
"voso": {
"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",
"url",
"ws"
],
"properties": {
"enabled": {
"description": "Whether voice is enabled",
"type": "boolean"
},
"url": {
"description": "URL pointing to the voice API",
"type": "string"
},
"ws": {
"description": "URL pointing to the voice WebSocket server",
"type": "string"
}
}
},
"Permission": {
"description": "Permission value on Revolt\n\nThis should be restricted to the lower 52 bits to prevent any potential issues with Javascript. Also leave empty spaces for future permission flags to be added.",
"type": "string",
"enum": [
"ManageChannel",
"ManageServer",
"ManagePermissions",
"ManageRole",
"ManageCustomisation",
"KickMembers",
"BanMembers",
"TimeoutMembers",
"AssignRoles",
"ChangeNickname",
"ManageNicknames",
"ChangeAvatar",
"RemoveAvatars",
"ViewChannel",
"ReadMessageHistory",
"SendMessage",
"ManageMessages",
"ManageWebhooks",
"InviteOthers",
"SendEmbeds",
"UploadFiles",
"Masquerade",
"React",
"Connect",
"Speak",
"Video",
"MuteMembers",
"DeafenMembers",
"MoveMembers",
"GrantAllSafe",
"GrantAll"
]
},
"UserPermission": {
"description": "User permission definitions",
"type": "string",
"enum": [
"Access",
"ViewProfile",
"SendMessage",
"Invite"
]
},
"Error": {
"title": "Error",
"description": "Possible API Errors",
"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": [
"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": [
"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": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"TooManyAttachments"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"TooManyReplies"
]
}
}
},
{
"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": [
"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": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"TooManyEmoji"
]
}
}
},
{
"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": [
"BotIsPrivate"
]
}
}
},
{
"type": "object",
"required": [
"permission",
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MissingPermission"
]
},
"permission": {
"$ref": "#/components/schemas/Permission"
}
}
},
{
"type": "object",
"required": [
"permission",
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MissingUserPermission"
]
},
"permission": {
"$ref": "#/components/schemas/UserPermission"
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"NotElevated"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"CannotGiveMissingPermissions"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"NotOwner"
]
}
}
},
{
"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": [
"InvalidOperation"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"InvalidCredentials"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"InvalidSession"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"DuplicateNonce"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"VosoUnavailable"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"NotFound"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"NoEffect"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"FailedValidation"
]
}
}
}
]
},
"User": {
"description": "Representiation of a User on Revolt.",
"type": "object",
"required": [
"_id",
"username"
],
"properties": {
"_id": {
"description": "Unique Id",
"type": "string"
},
"username": {
"description": "Username",
"type": "string"
},
"avatar": {
"description": "Avatar attachment",
"allOf": [
{
"$ref": "#/components/schemas/File"
}
],
"nullable": true
},
"relations": {
"description": "Relationships with other users",
"type": "array",
"items": {
"$ref": "#/components/schemas/Relationship"
},
"nullable": true
},
"badges": {
"description": "Bitfield of user badges",
"type": "integer",
"format": "int32",
"nullable": true
},
"status": {
"description": "User's current status",
"allOf": [
{
"$ref": "#/components/schemas/UserStatus"
}
],
"nullable": true
},
"profile": {
"description": "User's profile page",
"allOf": [
{
"$ref": "#/components/schemas/UserProfile"
}
],
"nullable": true
},
"flags": {
"description": "Enum of user flags",
"type": "integer",
"format": "int32",
"nullable": true
},
"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"
}
],
"nullable": true
},
"online": {
"description": "Whether this user is currently online",
"type": "boolean",
"nullable": true
}
}
},
"File": {
"description": "Representation of a File on Revolt Generated by Autumn",
"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 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": "int"
},
"height": {
"type": "integer",
"format": "int"
}
}
},
{
"description": "File is a video with specific dimensions",
"type": "object",
"required": [
"height",
"type",
"width"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Video"
]
},
"width": {
"type": "integer",
"format": "int"
},
"height": {
"type": "integer",
"format": "int"
}
}
},
{
"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": {
"type": "string"
},
"status": {
"$ref": "#/components/schemas/RelationshipStatus"
}
}
},
"RelationshipStatus": {
"description": "User's relationship with another user (or themselves)",
"type": "string",
"enum": [
"None",
"User",
"Friend",
"Outgoing",
"Incoming",
"Blocked",
"BlockedOther"
]
},
"UserStatus": {
"description": "User's active status",
"type": "object",
"properties": {
"text": {
"description": "Custom status text",
"type": "string",
"maxLength": 128,
"minLength": 1,
"nullable": true
},
"presence": {
"description": "Current presence option",
"allOf": [
{
"$ref": "#/components/schemas/Presence"
}
],
"nullable": true
}
}
},
"Presence": {
"description": "Presence status",
"type": "string",
"enum": [
"Online",
"Idle",
"Busy",
"Invisible"
]
},
"UserProfile": {
"description": "User's profile",
"type": "object",
"properties": {
"content": {
"description": "Text content on user's profile",
"type": "string",
"nullable": true
},
"background": {
"description": "Background visible on user's profile",
"allOf": [
{
"$ref": "#/components/schemas/File"
}
],
"nullable": true
}
}
},
"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"
},
"DataEditUser": {
"title": "User Data",
"type": "object",
"properties": {
"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/UserProfileData"
}
],
"nullable": true
},
"avatar": {
"description": "Attachment Id for avatar",
"type": "string",
"maxLength": 128,
"minLength": 1,
"nullable": true
},
"remove": {
"description": "Fields to remove from user object",
"type": "array",
"items": {
"$ref": "#/components/schemas/FieldsUser"
},
"minItems": 1,
"nullable": true
}
}
},
"UserProfileData": {
"title": "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",
"type": "string",
"enum": [
"Avatar",
"StatusText",
"StatusPresence",
"ProfileContent",
"ProfileBackground"
]
},
"DataChangeUsername": {
"title": "Username Information",
"type": "object",
"required": [
"password",
"username"
],
"properties": {
"username": {
"description": "New username",
"type": "string",
"maxLength": 32,
"minLength": 2,
"pattern": "^[^\\u200BА-Яа-яΑ-Ωα-ω@#:\\n\\r\\[\\]]+$"
},
"password": {
"description": "Current account password",
"type": "string",
"maxLength": 1024,
"minLength": 8
}
}
},
"Channel": {
"description": "Representation of a channel on Revolt",
"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"
}
}
},
{
"description": "Voice channel belonging to a server",
"type": "object",
"required": [
"_id",
"channel_type",
"name",
"server"
],
"properties": {
"channel_type": {
"type": "string",
"enum": [
"VoiceChannel"
]
},
"_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
},
"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"
}
}
}
]
},
"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"
}
}
},
"MutualResponse": {
"title": "Mutual Friends and Servers Response",
"type": "object",
"required": [
"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"
}
}
}
},
"DataSendFriendRequest": {
"title": "User Lookup Information",
"type": "object",
"required": [
"username"
],
"properties": {
"username": {
"type": "string"
}
}
},
"Bot": {
"description": "Representation of a bot on Revolt",
"type": "object",
"required": [
"_id",
"owner",
"public",
"token"
],
"properties": {
"_id": {
"description": "Bot Id\n\nThis equals the associated bot user's 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",
"nullable": true
},
"terms_of_service_url": {
"description": "URL for terms of service",
"type": "string",
"nullable": true
},
"privacy_policy_url": {
"description": "URL for privacy policy",
"type": "string",
"nullable": true
},
"flags": {
"description": "Enum of bot flags",
"type": "integer",
"format": "int32",
"nullable": true
}
}
},
"DataCreateBot": {
"title": "Bot Details",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"description": "Bot username",
"type": "string",
"maxLength": 32,
"minLength": 2,
"pattern": "^[^\\u200BА-Яа-яΑ-Ωα-ω@#:\\n\\r\\[\\]]+$"
}
}
},
"InviteBotDestination": {
"title": "Invite Destination",
"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": {
"title": "Public Bot",
"type": "object",
"required": [
"_id",
"username"
],
"properties": {
"_id": {
"description": "Bot Id",
"type": "string"
},
"username": {
"description": "Bot Username",
"type": "string"
},
"avatar": {
"description": "Profile Avatar",
"allOf": [
{
"$ref": "#/components/schemas/File"
}
],
"nullable": true
},
"description": {
"description": "Profile Description",
"type": "string",
"nullable": true
}
}
},
"BotResponse": {
"title": "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"
}
]
}
}
},
"OwnedBotsResponse": {
"title": "Owned Bots Response",
"description": "Both lists are sorted by their IDs.",
"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": {
"title": "Bot Details",
"type": "object",
"properties": {
"name": {
"description": "Bot username",
"type": "string",
"maxLength": 32,
"minLength": 2,
"pattern": "^[^\\u200BА-Яа-яΑ-Ωα-ω@#:\\n\\r\\[\\]]+$",
"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",
"type": "array",
"items": {
"$ref": "#/components/schemas/FieldsBot"
},
"minItems": 1,
"nullable": true
}
}
},
"FieldsBot": {
"description": "Optional fields on bot object",
"type": "string",
"enum": [
"Token",
"InteractionsURL"
]
},
"DataEditChannel": {
"title": "Channel Details",
"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
},
"remove": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FieldsChannel"
},
"minItems": 1,
"nullable": true
}
}
},
"FieldsChannel": {
"description": "Optional fields on channel object",
"type": "string",
"enum": [
"Description",
"Icon",
"DefaultPermissions"
]
},
"Invite": {
"description": "Representation of an invite to a channel on Revolt",
"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": "Representation of a Message on Revolt",
"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 that sent this message",
"type": "string"
},
"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/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
},
"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
}
}
},
"SystemMessage": {
"description": "Representation of a system event message",
"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"
}
}
}
]
},
"Timestamp": {
"description": "ISO8601 formatted timestamp",
"type": "string",
"format": "date-time",
"example": "1970-01-01T00:00:00Z"
},
"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": "int"
},
"height": {
"description": "Height of the image",
"type": "integer",
"format": "int"
},
"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": "int"
},
"height": {
"description": "Height of the video",
"type": "integer",
"format": "int"
}
}
},
{
"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"
}
}
}
]
},
"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": "int"
},
"height": {
"description": "Height of the image",
"type": "integer",
"format": "int"
},
"size": {
"description": "Positioning and size",
"allOf": [
{
"$ref": "#/components/schemas/ImageSize"
}
]
}
}
},
"ImageSize": {
"description": "Image positioning and size",
"type": "string",
"enum": [
"Large",
"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": "int"
},
"height": {
"description": "Height of the video",
"type": "integer",
"format": "int"
}
}
},
"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",
"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": 128,
"minLength": 1,
"nullable": true
},
"colour": {
"description": "Replace the display role colour shown on this message\n\nMust have `ManageRole` permission to use\n\nThis can be any valid CSS colour",
"type": "string",
"maxLength": 32,
"minLength": 1,
"nullable": true
}
}
},
"DataMessageSend": {
"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"
},
"maxItems": 128,
"minItems": 1,
"nullable": true
},
"replies": {
"description": "Messages to reply to",
"type": "array",
"items": {
"$ref": "#/components/schemas/Reply"
},
"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"
},
"maxItems": 10,
"minItems": 1,
"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
}
}
},
"Reply": {
"title": "Reply",
"description": "Representation of a message reply before it is sent.",
"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"
}
}
},
"SendableEmbed": {
"description": "Representation of a text embed before it is sent.",
"type": "object",
"properties": {
"icon_url": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"nullable": true
},
"url": {
"type": "string",
"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": {
"title": "Bulk Message Response",
"description": "Response used when multiple messages are fetched",
"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
}
}
}
]
},
"Member": {
"description": "Representation of a member of a server on Revolt",
"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/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/Timestamp"
}
],
"nullable": true
}
}
},
"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"
}
}
},
"MessageSort": {
"title": "Message Sort",
"description": "Sort used for retrieving messages",
"type": "string",
"enum": [
"Relevance",
"Latest",
"Oldest"
]
},
"OptionsMessageSearch": {
"title": "Search Parameters",
"type": "object",
"required": [
"query"
],
"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
},
"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 relevance.",
"default": "Relevance",
"allOf": [
{
"$ref": "#/components/schemas/MessageSort"
}
]
},
"include_users": {
"description": "Whether to include user (and member, if server channel) objects",
"type": "boolean",
"nullable": true
}
}
},
"OptionsQueryStale": {
"title": "Query Parameters",
"type": "object",
"required": [
"ids"
],
"properties": {
"ids": {
"description": "Array of message IDs",
"type": "array",
"items": {
"type": "string"
},
"maxItems": 150,
"minItems": 0
}
}
},
"DataEditMessage": {
"title": "Message Details",
"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": {
"title": "Search Parameters",
"type": "object",
"required": [
"ids"
],
"properties": {
"ids": {
"description": "Message IDs",
"type": "array",
"items": {
"type": "string"
},
"maxItems": 100,
"minItems": 1
}
}
},
"DataCreateGroup": {
"title": "Group Data",
"type": "object",
"required": [
"name",
"users"
],
"properties": {
"name": {
"description": "Group name",
"type": "string",
"maxLength": 32,
"minLength": 1
},
"description": {
"description": "Group description",
"type": "string",
"maxLength": 1024,
"minLength": 0,
"nullable": true
},
"users": {
"description": "Array of user IDs to add to the group\n\nMust be friends with these users.",
"type": "array",
"items": {
"type": "string"
},
"maxItems": 49,
"minItems": 0
},
"nsfw": {
"description": "Whether this group is age-restricted",
"type": "boolean",
"nullable": true
}
}
},
"CreateVoiceUserResponse": {
"title": "Voice Server Token Response",
"type": "object",
"required": [
"token"
],
"properties": {
"token": {
"description": "Token for authenticating with the voice server",
"type": "string"
}
}
},
"Data": {
"title": "Permission Value",
"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": {
"title": "Permission Value",
"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 `TextChannel` or `VoiceChannel`",
"allOf": [
{
"$ref": "#/components/schemas/Override"
}
]
}
}
}
]
},
"CreateServerResponse": {
"title": "Create Server Response",
"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": "Representation of a server on Revolt",
"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": "Enum of server flags",
"type": "integer",
"format": "int32",
"nullable": true
},
"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": "Representation of a server role",
"type": "object",
"required": [
"name",
"permissions"
],
"properties": {
"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": {
"title": "Server Data",
"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
}
}
},
"DataEditServer": {
"title": "Server Data",
"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
},
"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",
"type": "array",
"items": {
"$ref": "#/components/schemas/FieldsServer"
},
"minItems": 1,
"nullable": true
}
}
},
"FieldsServer": {
"description": "Optional fields on server object",
"type": "string",
"enum": [
"Description",
"Categories",
"SystemMessages",
"Icon",
"Banner"
]
},
"DataCreateChannel": {
"title": "Channel Data",
"type": "object",
"required": [
"name"
],
"properties": {
"type": {
"description": "Channel type",
"default": "Text",
"allOf": [
{
"$ref": "#/components/schemas/ChannelType"
}
]
},
"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
}
}
},
"ChannelType": {
"title": "Channel Type",
"type": "string",
"enum": [
"Text",
"Voice"
]
},
"AllMemberResponse": {
"title": "Member List",
"description": "Both lists are sorted by ID.",
"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"
}
}
}
},
"DataMemberEdit": {
"title": "Member Data",
"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/Timestamp"
}
],
"nullable": true
},
"remove": {
"description": "Fields to remove from channel object",
"type": "array",
"items": {
"$ref": "#/components/schemas/FieldsMember"
},
"minItems": 1,
"nullable": true
}
}
},
"FieldsMember": {
"description": "Optional fields on server member object",
"type": "string",
"enum": [
"Nickname",
"Avatar",
"Roles",
"Timeout"
]
},
"ServerBan": {
"description": "Representation of a server ban on Revolt",
"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": {
"title": "Ban Information",
"type": "object",
"properties": {
"reason": {
"description": "Ban reason",
"type": "string",
"maxLength": 1024,
"minLength": 1,
"nullable": true
}
}
},
"BanListResult": {
"title": "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": {
"title": "Banned User",
"description": "Just enoguh user information to list bans.",
"type": "object",
"required": [
"_id",
"username"
],
"properties": {
"_id": {
"description": "Id of the banned user",
"type": "string"
},
"username": {
"description": "Username of the banned user",
"type": "string"
},
"avatar": {
"description": "Avatar of the banned user",
"allOf": [
{
"$ref": "#/components/schemas/File"
}
],
"nullable": true
}
}
},
"NewRoleResponse": {
"title": "New Role Response",
"type": "object",
"required": [
"id",
"role"
],
"properties": {
"id": {
"description": "Id of the role",
"type": "string"
},
"role": {
"description": "New role",
"allOf": [
{
"$ref": "#/components/schemas/Role"
}
]
}
}
},
"DataCreateRole": {
"title": "Role Data",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"description": "Role name",
"type": "string",
"maxLength": 32,
"minLength": 1
},
"rank": {
"description": "Ranking position\n\nSmaller values take priority.",
"type": "integer",
"format": "int64",
"nullable": true
}
}
},
"DataEditRole": {
"title": "Role Data",
"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\nSmaller values take priority.",
"type": "integer",
"format": "int64",
"nullable": true
},
"remove": {
"description": "Fields to remove from role object",
"type": "array",
"items": {
"$ref": "#/components/schemas/FieldsRole"
},
"minItems": 1,
"nullable": true
}
}
},
"FieldsRole": {
"description": "Optional fields on server object",
"type": "string",
"enum": [
"Colour"
]
},
"DataSetServerRolePermission": {
"title": "Permission Value",
"type": "object",
"required": [
"permissions"
],
"properties": {
"permissions": {
"description": "Allow / deny values for the role in this server.",
"allOf": [
{
"$ref": "#/components/schemas/Override"
}
]
}
}
},
"DataSetServerDefaultPermission": {
"title": "Permission Value",
"type": "object",
"required": [
"permissions"
],
"properties": {
"permissions": {
"description": "Default member permission value",
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
},
"Emoji": {
"description": "Representation of an Emoji on Revolt",
"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": "Information about what owns this 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"
]
}
}
}
]
},
"InviteResponse": {
"title": "Invite",
"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
},
"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": {
"title": "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"
}
]
}
}
}
]
},
"DataCreateEmoji": {
"title": "Emoji Data",
"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"
}
}
},
"RAuthError": {
"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": [
"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": [
"DisabledAccount"
]
}
}
},
{
"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": [
"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"
}
}
},
"DataPasswordReset": {
"title": "Password Reset",
"type": "object",
"required": [
"password",
"token"
],
"properties": {
"token": {
"description": "Reset token",
"type": "string"
},
"password": {
"description": "New password",
"type": "string"
}
}
},
"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",
"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"
},
"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"
}
}
}
}
]
},
"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"
},
"captcha": {
"description": "Captcha verification code",
"type": "string",
"nullable": true
},
"friendly_name": {
"description": "Friendly name used for the session",
"type": "string",
"nullable": true
}
}
},
{
"type": "object",
"required": [
"mfa_response",
"mfa_ticket"
],
"properties": {
"mfa_ticket": {
"description": "Unvalidated 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"
}
]
},
"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"
}
}
},
"MFATicket": {
"description": "Multi-factor auth ticket",
"type": "object",
"required": [
"_id",
"account_id",
"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",
"type": "boolean"
}
}
},
"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": "^[^\\u200BА-Яа-яΑ-Ωα-ω@#:\\n\\r\\[\\]]+$"
}
}
},
"OptionsFetchSettings": {
"title": "Fetch Options",
"type": "object",
"required": [
"keys"
],
"properties": {
"keys": {
"description": "Keys to fetch",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"ChannelUnread": {
"description": "Representation of the state of a channel from the perspective of a user",
"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"
},
"nullable": true
}
}
},
"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"
}
}
}
},
"securitySchemes": {
"SessionToken": {
"description": "Used to authenticate as a user.",
"type": "apiKey",
"name": "x-session-token",
"in": "header"
},
"ValidMFATicket": {
"description": "Used to authorise a request.",
"type": "apiKey",
"name": "x-mfa-ticket",
"in": "header"
},
"UnvalidatedMFATicket": {
"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"
]
},
{
"name": "Servers",
"tags": [
"Server Information",
"Server Members",
"Server Permissions"
]
},
{
"name": "Invites",
"tags": [
"Invites"
]
},
{
"name": "Customisation",
"tags": [
"Emojis"
]
},
{
"name": "Authentication",
"tags": [
"Account",
"Session",
"Onboarding",
"MFA"
]
},
{
"name": "Miscellaneous",
"tags": [
"Sync",
"Web Push"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment