{ "openapi": "3.0.3", "security": [], "info": { "title": "Fluxer API", "version": "1.0.0", "description": "API for Fluxer, a free and open source instant messaging and VoIP chat app built for friends, groups, and communities.", "contact": {"name": "Fluxer Platform AB", "email": "support@fluxer.app"}, "license": {"name": "AGPL-3.0", "url": "https://www.gnu.org/licenses/agpl-3.0.html"} }, "servers": [{"url": "https://api.fluxer.app/v1", "description": "Production API"}], "paths": { "/admin/acls": { "get": { "operationId": "list_admin_acls", "summary": "List admin permissions", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminAclListResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Returns every access control permission the admin API recognises. This is the registry admin accounts and admin API keys draw their permissions from. Requires AUTHENTICATE permission.", "security": [{"adminApiKey": []}] } }, "/admin/api-keys": { "post": { "operationId": "create_admin_api_key", "summary": "Create admin API key", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateAdminApiKeyResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Generates a new API key for administrative operations. The key is returned only once at creation time. Includes expiration settings and access control lists (ACLs) to limit the key's permissions.", "security": [{"adminApiKey": []}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateAdminApiKeyRequest"}}} } }, "get": { "operationId": "list_admin_api_keys", "summary": "List admin API keys", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminApiKeyListResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieve all API keys created by the authenticated admin. Returns metadata including creation time, last used time, and assigned permissions. The actual key material is not returned.", "security": [{"adminApiKey": []}] } }, "/admin/api-keys/{key_id}": { "get": { "operationId": "get_admin_api_key", "summary": "Get admin API key", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListAdminApiKeyResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieves a single API key created by the authenticated admin. Returns metadata including creation time, last used time, and assigned permissions. The actual key material is never returned.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": {"description": "The ID of the key", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the key" } ] }, "patch": { "operationId": "update_admin_api_key", "summary": "Update admin API key", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListAdminApiKeyResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Renames an API key or replaces the access control lists (ACLs) it carries. The key may only carry permissions the acting admin already holds. Omitted fields are left unchanged and the key material is never rotated or returned.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": {"description": "The ID of the key", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the key" } ], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateAdminApiKeyRequest"}}} } }, "delete": { "operationId": "delete_admin_api_key", "summary": "Revoke admin API key", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeleteApiKeyResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Revokes an API key, immediately invalidating it for all future operations. This action cannot be undone.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": {"description": "The ID of the key", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the key" } ] } }, "/admin/applications": { "get": { "operationId": "list_admin_applications", "summary": "List applications", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListApplicationsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Lists OAuth2 applications and bots. Pass owner_id to list the applications a user owns, or guild_id to list the applications whose bot users are members of a guild. Exactly one of the two is required. owner_id requires APPLICATION_LIST_BY_OWNER permission, guild_id requires APPLICATION_LOOKUP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "owner_id", "in": "query", "required": false, "schema": { "description": "Restrict the results to the applications owned by this user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Restrict the results to the applications owned by this user" }, { "name": "guild_id", "in": "query", "required": false, "schema": { "description": "Restrict the results to the applications whose bot users are members of this guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Restrict the results to the applications whose bot users are members of this guild" } ] } }, "/admin/applications/{application_id}": { "get": { "operationId": "get_admin_application", "summary": "Get application", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LookupApplicationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieves complete application details including ownership, bot user, OAuth2 redirect URIs, and credential status. Requires APPLICATION_LOOKUP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "description": "The ID of the OAuth2 application", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the OAuth2 application" } ] }, "patch": { "operationId": "update_admin_application", "summary": "Update application", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApplicationUpdateResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Updates an application. Transfers ownership to the user given by new_owner_id, which is used when the owner is inactive or for administrative recovery. Logged to audit log. Requires APPLICATION_TRANSFER_OWNERSHIP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "application_id", "in": "path", "required": true, "schema": { "description": "The ID of the OAuth2 application", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the OAuth2 application" } ], "requestBody": { "required": true, "content": { "application/json": {"schema": {"$ref": "#/components/schemas/TransferApplicationOwnershipRequest"}} } } } }, "/admin/archives": { "get": { "operationId": "list_admin_archives", "summary": "List archives", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListArchivesResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Query and filter created archives by type (user or guild), subject ID, requestor, and expiration status. Admins with limited ACLs see only archives matching their permissions.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "subject_type", "in": "query", "required": false, "schema": { "default": "all", "description": "Type of archives to list", "x-enumNames": ["user", "guild", "all"], "x-enumDescriptions": ["List user archives", "List guild archives", "List all archives"], "enum": ["user", "guild", "all"], "type": "string" }, "description": "Type of archives to list" }, { "name": "subject_id", "in": "query", "required": false, "schema": { "description": "Filter by specific subject ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Filter by specific subject ID" }, { "name": "requested_by", "in": "query", "required": false, "schema": { "description": "Filter by user who requested the archive", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Filter by user who requested the archive" }, { "name": "limit", "in": "query", "required": false, "schema": { "description": "Maximum number of archives to return (1-200, default 50)", "default": "50", "type": "string" }, "description": "Maximum number of archives to return (1-200, default 50)" }, { "name": "include_expired", "in": "query", "required": false, "schema": { "description": "Whether to include archives past their expires_at", "default": "false", "type": "string" }, "description": "Whether to include archives past their expires_at" } ] } }, "/admin/archives/{subject_type}/{subject_id}/{archive_id}": { "get": { "operationId": "get_admin_archive", "summary": "Get archive details", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetArchiveResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieve metadata for a specific archive including its status, creation time, expiration, and file location. Does not return the archive contents themselves.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "subject_type", "in": "path", "required": true, "schema": { "description": "The type of subject (user or guild)", "allOf": [{"$ref": "#/components/schemas/ArchiveSubjectTypeSchema"}] }, "description": "The type of subject (user or guild)" }, { "name": "subject_id", "in": "path", "required": true, "schema": { "description": "The ID of the subject", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the subject" }, { "name": "archive_id", "in": "path", "required": true, "schema": { "description": "The ID of the archive", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the archive" } ] } }, "/admin/archives/{subject_type}/{subject_id}/{archive_id}/download": { "get": { "operationId": "get_admin_archive_download", "summary": "Get archive download URL", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DownloadUrlResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Generate a time-limited download link to the archive file. The URL provides direct access to download the compressed archive contents.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "subject_type", "in": "path", "required": true, "schema": { "description": "The type of subject (user or guild)", "allOf": [{"$ref": "#/components/schemas/ArchiveSubjectTypeSchema"}] }, "description": "The type of subject (user or guild)" }, { "name": "subject_id", "in": "path", "required": true, "schema": { "description": "The ID of the subject", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the subject" }, { "name": "archive_id", "in": "path", "required": true, "schema": { "description": "The ID of the archive", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the archive" } ] } }, "/admin/audit-logs": { "get": { "operationId": "list_admin_audit_logs", "summary": "List admin audit logs", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AuditLogsListResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieve a paginated page of audit logs with optional filtering by acting admin, target type, or target ID. Passing q runs a full-text search across the audit log index instead of paging through the log in order, and sort_by with sort_order then order the matches. Used for tracking administrative operations, compliance auditing, and incident response.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "q", "in": "query", "required": false, "schema": {"description": "Free-text query run against the audit log search index", "type": "string"}, "description": "Free-text query run against the audit log search index" }, { "name": "admin_user_id", "in": "query", "required": false, "schema": { "description": "Filter by admin user who performed the action", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Filter by admin user who performed the action" }, { "name": "target_type", "in": "query", "required": false, "schema": {"description": "Filter by target entity type", "type": "string"}, "description": "Filter by target entity type" }, { "name": "target_id", "in": "query", "required": false, "schema": { "description": "Filter by target entity ID (user, channel, role, invite code, etc.)", "type": "string" }, "description": "Filter by target entity ID (user, channel, role, invite code, etc.)" }, { "name": "sort_by", "in": "query", "required": false, "schema": { "default": "createdAt", "description": "Field to sort audit logs by", "x-enumNames": ["createdAt", "relevance"], "x-enumDescriptions": ["Sort by creation timestamp", "Sort by search relevance score"], "enum": ["createdAt", "relevance"], "type": "string" }, "description": "Field to sort audit logs by" }, { "name": "sort_order", "in": "query", "required": false, "schema": { "default": "desc", "description": "Sort order direction", "x-enumNames": ["asc", "desc"], "x-enumDescriptions": ["Ascending order (oldest first)", "Descending order (newest first)"], "enum": ["asc", "desc"], "type": "string" }, "description": "Sort order direction" }, { "name": "limit", "in": "query", "required": false, "schema": {"description": "Maximum number of entries to return", "default": "50", "type": "string"}, "description": "Maximum number of entries to return" }, { "name": "offset", "in": "query", "required": false, "schema": {"description": "Number of entries to skip", "default": "0", "type": "string"}, "description": "Number of entries to skip" } ] } }, "/admin/audit-logs/{log_id}": { "get": { "operationId": "get_admin_audit_log", "summary": "Get admin audit log entry", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminAuditLogResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieve a single admin audit log entry by ID, with the same resolved user, guild, and channel summaries the listing returns. Used to inspect one administrative operation during compliance investigations or incident response.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "log_id", "in": "path", "required": true, "schema": { "description": "The ID of the audit log entry", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the audit log entry" } ] } }, "/admin/blocklists": { "get": { "operationId": "list_admin_blocklist_types", "summary": "List blocklists", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminBlocklistTypeListResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "List every blocklist this instance maintains, the request field that carries an entry value, the extra fields its entries accept, and which of the bulk and update operations it supports.", "security": [{"adminApiKey": []}] } }, "/admin/blocklists/{list_type}/entries": { "get": { "operationId": "list_admin_blocklist_entries", "summary": "List blocklist entries", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": { "application/json": {"schema": {"$ref": "#/components/schemas/AdminBlocklistEntryListResponse"}} } }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Page through the entries of a blocklist, ordered by value. Pass the next_after cursor of the previous page as after to fetch the next page. The profile-substring blocklist requires a scope.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "list_type", "in": "path", "required": true, "schema": { "description": "The blocklist to operate on", "allOf": [{"$ref": "#/components/schemas/AdminBlocklistListType"}] }, "description": "The blocklist to operate on" }, { "name": "limit", "in": "query", "required": false, "schema": {"description": "Maximum number of entries to return", "default": "50", "type": "string"}, "description": "Maximum number of entries to return" }, { "name": "after", "in": "query", "required": false, "schema": { "description": "Return entries ordered after this value, taken from the next_after cursor of the previous page", "type": "string" }, "description": "Return entries ordered after this value, taken from the next_after cursor of the previous page" }, { "name": "scope", "in": "query", "required": false, "schema": { "description": "Profile field to list. Required on the profile-substring blocklist and rejected on every other blocklist.", "type": "string", "enum": ["username", "global_name", "nickname", "bio", "pronouns"] }, "description": "Profile field to list. Required on the profile-substring blocklist and rejected on every other blocklist." } ] }, "post": { "operationId": "create_admin_blocklist_entry", "summary": "Add blocklist entry", "tags": ["Admin"], "responses": { "204": {"description": "No Content"}, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Add a value to a blocklist. The request body is the shape the blocklist named by list_type accepts, and the value is validated and canonicalized for that blocklist. Adding an IP address that is on the instance exemption list, or that IPInfo reports as a high blast-radius carrier NAT, is refused with 400 IP_BAN_DECLINED and recorded in the audit log.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "list_type", "in": "path", "required": true, "schema": { "description": "The blocklist to operate on", "allOf": [{"$ref": "#/components/schemas/AdminBlocklistListType"}] }, "description": "The blocklist to operate on" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminBlocklistEntryCreateRequest"}}} } }, "put": { "operationId": "bulk_create_admin_blocklist_entries", "summary": "Bulk-add blocklist entries", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkJobResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Enqueue a background job that adds many entries to a blocklist at once. Returns a job_id immediately; observe progress at /admin/jobs/:job_id. Only the file-sha blocklist accepts this operation, reported as supports_bulk_create by GET /admin/blocklists.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "list_type", "in": "path", "required": true, "schema": { "description": "The blocklist to operate on", "allOf": [{"$ref": "#/components/schemas/AdminBlocklistListType"}] }, "description": "The blocklist to operate on" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkBanFileShasRequest"}}} } }, "delete": { "operationId": "bulk_delete_admin_blocklist_entries", "summary": "Bulk-remove blocklist entries", "tags": ["Admin"], "responses": { "204": {"description": "No Content"}, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Remove several entries from a blocklist in one request. The request body is the shape the blocklist named by list_type accepts. Only the avatar-hash and profile-substring blocklists accept this operation, reported as supports_bulk_delete by GET /admin/blocklists.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "list_type", "in": "path", "required": true, "schema": { "description": "The blocklist to operate on", "allOf": [{"$ref": "#/components/schemas/AdminBlocklistListType"}] }, "description": "The blocklist to operate on" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminBlocklistBulkDeleteRequest"}}} } } }, "/admin/blocklists/{list_type}/entries/{entry_value}": { "get": { "operationId": "get_admin_blocklist_entry", "summary": "Check blocklist entry", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BanCheckResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Report whether a value is currently blocked by a blocklist. The value is percent-encoded in the path. An IP address can still match a broader stored CIDR entry, and a URL can match a banned domain. The profile-substring blocklist requires a scope.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "list_type", "in": "path", "required": true, "schema": { "description": "The blocklist the entry belongs to", "allOf": [{"$ref": "#/components/schemas/AdminBlocklistListType"}] }, "description": "The blocklist the entry belongs to" }, { "name": "entry_value", "in": "path", "required": true, "schema": {"description": "The percent-encoded value of the blocklist entry", "type": "string"}, "description": "The percent-encoded value of the blocklist entry" }, { "name": "scope", "in": "query", "required": false, "schema": { "description": "Profile field the entry is scoped to. Required on the profile-substring blocklist and rejected on every other blocklist.", "type": "string", "enum": ["username", "global_name", "nickname", "bio", "pronouns"] }, "description": "Profile field the entry is scoped to. Required on the profile-substring blocklist and rejected on every other blocklist." } ] }, "patch": { "operationId": "update_admin_blocklist_entry", "summary": "Update blocklist entry", "tags": ["Admin"], "responses": { "204": {"description": "No Content"}, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Rewrite the stored fields of a blocklist entry without removing and re-adding it. The stored metadata is replaced by the supplied fields, so fields left out fall back to their defaults. Only blocklists whose entries carry fields accept this operation, reported as supports_update by GET /admin/blocklists.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "list_type", "in": "path", "required": true, "schema": { "description": "The blocklist the entry belongs to", "allOf": [{"$ref": "#/components/schemas/AdminBlocklistListType"}] }, "description": "The blocklist the entry belongs to" }, { "name": "entry_value", "in": "path", "required": true, "schema": {"description": "The percent-encoded value of the blocklist entry", "type": "string"}, "description": "The percent-encoded value of the blocklist entry" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminBlocklistEntryUpdateRequest"}}} } }, "delete": { "operationId": "delete_admin_blocklist_entry", "summary": "Remove blocklist entry", "tags": ["Admin"], "responses": { "204": {"description": "No Content"}, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Remove an entry from a blocklist. The value is percent-encoded in the path and is canonicalized the same way it was on add, so an IP covered only by a broader CIDR entry cannot be removed through the narrower address. The profile-substring blocklist requires a scope.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "list_type", "in": "path", "required": true, "schema": { "description": "The blocklist the entry belongs to", "allOf": [{"$ref": "#/components/schemas/AdminBlocklistListType"}] }, "description": "The blocklist the entry belongs to" }, { "name": "entry_value", "in": "path", "required": true, "schema": {"description": "The percent-encoded value of the blocklist entry", "type": "string"}, "description": "The percent-encoded value of the blocklist entry" }, { "name": "scope", "in": "query", "required": false, "schema": { "description": "Profile field the entry is scoped to. Required on the profile-substring blocklist and rejected on every other blocklist.", "type": "string", "enum": ["username", "global_name", "nickname", "bio", "pronouns"] }, "description": "Profile field the entry is scoped to. Required on the profile-substring blocklist and rejected on every other blocklist." } ] } }, "/admin/bulk-jobs": { "post": { "operationId": "create_admin_bulk_job", "summary": "Queue a bulk job", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkJobResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Enqueue one background administrative job. The `task` discriminator selects both the body variant and the ACL evaluated for the request: `update_user_flags` needs bulk:update:user_flags, `update_suspicious_activity_flags` needs bulk:update:suspicious_activity, `update_guild_features` needs bulk:update:guild_features, `add_guild_members` needs bulk:add:guild_members, `schedule_user_deletion` needs bulk:delete:users, and `delete_user_messages` needs bulk:delete:user_messages. Returns a job_id immediately; observe progress at /admin/jobs/:job_id.", "security": [{"adminApiKey": []}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminBulkJobCreateRequest"}}} } } }, "/admin/channels/{channel_id}/messages": { "get": { "operationId": "list_admin_channel_messages", "summary": "List channel messages", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrowseChannelResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Pages through the messages of a channel, newest first, with cursor-based pagination. Requires MESSAGE_LOOKUP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "description": "The ID of the channel", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the channel" }, { "name": "limit", "in": "query", "required": false, "schema": { "description": "Number of messages to return (1-100, default 50)", "default": "50", "type": "string" }, "description": "Number of messages to return (1-100, default 50)" }, { "name": "before", "in": "query", "required": false, "schema": { "description": "Return messages older than this message ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Return messages older than this message ID" }, { "name": "after", "in": "query", "required": false, "schema": { "description": "Return messages newer than this message ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Return messages newer than this message ID" } ] } }, "/admin/channels/{channel_id}/messages/{message_id}": { "get": { "operationId": "get_admin_message", "summary": "Get message", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LookupMessageResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieves complete message details including content, attachments, edits, and metadata, together with the messages surrounding it. Requires MESSAGE_LOOKUP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "description": "The ID of the channel", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the channel" }, { "name": "message_id", "in": "path", "required": true, "schema": { "description": "The ID of the message", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the message" }, { "name": "context_limit", "in": "query", "required": false, "schema": { "description": "How many messages surrounding the requested message to return as context (1-100, default 50)", "default": "50", "type": "string" }, "description": "How many messages surrounding the requested message to return as context (1-100, default 50)" } ] }, "delete": { "operationId": "delete_admin_message", "summary": "Delete message", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeleteMessageResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Deletes a single message permanently and purges its attachments. Used for removing inappropriate or harmful content. Logged to audit log. Requires MESSAGE_DELETE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "description": "The ID of the channel", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the channel" }, { "name": "message_id", "in": "path", "required": true, "schema": { "description": "The ID of the message", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the message" } ] } }, "/admin/discovery/applications": { "get": { "operationId": "list_admin_discovery_applications", "summary": "List discovery applications", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": {"$ref": "#/components/schemas/DiscoveryAdminPendingApplicationListResponse"} } } }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Returns every pending discovery application, enriched with guild metadata. No pagination. Requires DISCOVERY_REVIEW permission.", "security": [{"adminApiKey": []}] } }, "/admin/discovery/applications/{guild_id}": { "patch": { "operationId": "update_admin_discovery_application", "summary": "Review discovery application", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DiscoveryApplicationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Approve or reject a pending discovery application. Requires DISCOVERY_REVIEW permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ], "requestBody": { "required": true, "content": { "application/json": {"schema": {"$ref": "#/components/schemas/DiscoveryAdminApplicationUpdateRequest"}} } } } }, "/admin/discovery/categories": { "get": { "operationId": "list_admin_discovery_categories", "summary": "List discovery categories", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DiscoveryCategoryListResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Returns every discovery category a listing can be filed under. Requires DISCOVERY_REVIEW permission.", "security": [{"adminApiKey": []}] } }, "/admin/discovery/categories/{category_id}/listings": { "get": { "operationId": "list_admin_discovery_category_listings", "summary": "List guilds in a discovery category", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": { "application/json": {"schema": {"$ref": "#/components/schemas/DiscoveryAdminListedGuildListResponse"}} } }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Returns an offset page of the guilds listed under one discovery category, most members first, enriched with guild metadata. Requires DISCOVERY_REVIEW permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "category_id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 0, "maximum": 8, "description": "The ID of the discovery category" }, "description": "The ID of the discovery category" }, { "name": "limit", "in": "query", "required": false, "schema": { "default": 50, "description": "Number of listings to return", "type": "integer", "minimum": 1, "maximum": 100 }, "description": "Number of listings to return" }, { "name": "offset", "in": "query", "required": false, "schema": { "default": 0, "description": "Pagination offset", "type": "integer", "minimum": 0, "maximum": 10000 }, "description": "Pagination offset" } ] } }, "/admin/discovery/listings": { "get": { "operationId": "list_admin_discovery_listings", "summary": "List discovery listings", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": { "application/json": {"schema": {"$ref": "#/components/schemas/DiscoveryAdminListedGuildListResponse"}} } }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Returns every approved/listed discovery guild, enriched with guild metadata. No pagination. Requires DISCOVERY_REVIEW permission.", "security": [{"adminApiKey": []}] }, "patch": { "operationId": "bulk_update_admin_discovery_listing_category", "summary": "Move discovery listings to a category", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": { "application/json": {"schema": {"$ref": "#/components/schemas/DiscoveryAdminListingBulkCategoryResponse"}} } }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Files every named discovery listing under one category. Every guild is attempted and the ones that could not be moved are reported. Requires DISCOVERY_REVIEW permission.", "security": [{"adminApiKey": []}], "requestBody": { "required": true, "content": { "application/json": {"schema": {"$ref": "#/components/schemas/DiscoveryAdminListingBulkCategoryRequest"}} } } } }, "/admin/discovery/listings/{guild_id}": { "patch": { "operationId": "update_admin_discovery_listing", "summary": "Update discovery listing", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DiscoveryApplicationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Edit the description, category, language, or tags of a discovery listing without delisting the guild. Requires DISCOVERY_REVIEW permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DiscoveryApplicationPatchRequest"}}} } }, "delete": { "operationId": "delete_admin_discovery_listing", "summary": "Remove discovery listing", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DiscoveryApplicationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Remove an approved guild from discovery. Requires DISCOVERY_REMOVE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DiscoveryAdminRemoveRequest"}}} } } }, "/admin/gateway/memory-stats": { "get": { "operationId": "get_admin_gateway_memory_stats", "summary": "Get guild memory statistics", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GuildMemoryStatsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Returns heap and resident memory usage per guild. Requires GATEWAY_MEMORY_STATS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "description": "Maximum number of guild processes to return (100-1000, default 100)", "default": "100", "type": "string" }, "description": "Maximum number of guild processes to return (100-1000, default 100)" } ] } }, "/admin/gateway/reloads": { "post": { "operationId": "create_admin_gateway_reload", "summary": "Reload gateway guilds", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReloadAllGuildsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Reconnects to the database and re-syncs guild state. Used for recovery after data inconsistencies. Requires GATEWAY_RELOAD_ALL permission.", "security": [{"adminApiKey": []}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReloadGuildsRequest"}}} } } }, "/admin/gateway/stats": { "get": { "operationId": "get_admin_gateway_stats", "summary": "Get gateway node statistics", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NodeStatsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Returns uptime, process memory, and guild count. Used to monitor gateway health and performance. Requires GATEWAY_MEMORY_STATS permission.", "security": [{"adminApiKey": []}] } }, "/admin/gateway/voice-state-counts": { "get": { "operationId": "get_admin_gateway_voice_state_counts", "summary": "Get gateway voice state counts", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": { "application/json": {"schema": {"$ref": "#/components/schemas/GatewayVoiceStateCountsResponse"}} } }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Returns active voice state counts grouped by voice region and voice server. Requires GATEWAY_MEMORY_STATS permission.", "security": [{"adminApiKey": []}] } }, "/admin/gift-codes": { "post": { "operationId": "create_admin_gift_codes", "summary": "Issue gift codes", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CodesResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Create one-use Plutonium gift codes with an explicit positive duration and return their complete redemption links. Lifetime gifts are not supported. Not available on self-hosted instances. Requires GIFT_CODES_GENERATE permission.", "security": [{"adminApiKey": []}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GenerateGiftCodesRequest"}}} } } }, "/admin/guilds": { "get": { "operationId": "list_admin_guilds", "summary": "List guilds", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SearchGuildsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Searches guilds by name, ID, and other criteria. Supports full-text search and pagination through limit and offset. Requires GUILD_LOOKUP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "description": "Free-text query matched against the guild name and vanity URL code", "type": "string" }, "description": "Free-text query matched against the guild name and vanity URL code" }, { "name": "limit", "in": "query", "required": false, "schema": { "description": "Maximum guilds to return (1-200, default 50)", "default": "50", "type": "string" }, "description": "Maximum guilds to return (1-200, default 50)" }, { "name": "offset", "in": "query", "required": false, "schema": { "description": "Guilds to skip before returning results (default 0)", "default": "0", "type": "string" }, "description": "Guilds to skip before returning results (default 0)" } ] } }, "/admin/guilds/{guild_id}": { "get": { "operationId": "get_admin_guild", "summary": "Get guild", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LookupGuildResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieves complete guild details including metadata, settings, channels, roles, and statistics. Requires GUILD_LOOKUP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ] }, "patch": { "operationId": "update_admin_guild", "summary": "Update guild", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GuildUpdateResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Partially updates a guild. The permissions required are selected by the fields present in the body and are evaluated with all-of semantics: name requires GUILD_UPDATE_NAME, vanity_url_code requires GUILD_UPDATE_VANITY, new_owner_id requires GUILD_TRANSFER_OWNERSHIP, add_features and remove_features require GUILD_UPDATE_FEATURES, and fields together with every other setting requires GUILD_UPDATE_SETTINGS. A body with no fields applies no change. Every applied change is logged to the audit log.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateGuildRequest"}}} } }, "delete": { "operationId": "delete_admin_guild", "summary": "Delete guild", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Permanently deletes a guild. Deletes all channels, messages, and settings. Irreversible operation with no recovery window. Logged to audit log. Requires GUILD_DELETE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ] } }, "/admin/guilds/{guild_id}/archives": { "post": { "operationId": "create_admin_guild_archive", "summary": "Create guild archive", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminArchiveResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Initiates a data export for a guild (server). Creates an archive containing all guild data including channels, messages, members, roles, and settings.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminArchiveCreateRequest"}}} } } }, "/admin/guilds/{guild_id}/assets": { "delete": { "operationId": "purge_admin_guild_assets", "summary": "Purge guild assets", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PurgeGuildAssetsResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Delete and clean up emoji and sticker assets belonging to a guild, including their stored media. An ID owned by another guild is reported in errors and left untouched, and an ID with no record still queues its media for removal. This is a destructive operation used for cleanup during guild management or compliance actions.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PurgeGuildAssetsRequest"}}} } } }, "/admin/guilds/{guild_id}/audit-logs": { "get": { "operationId": "list_admin_guild_audit_logs", "summary": "List guild audit logs", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListGuildAuditLogsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Returns in-app guild audit log entries for a guild without requiring VIEW_AUDIT_LOG membership permission. Supports pagination via before/after log IDs and filtering by user_id or action_type. Requires GUILD_AUDIT_LOG_VIEW permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" }, { "name": "limit", "in": "query", "required": false, "schema": { "description": "Maximum number of audit log entries to return (1-100)", "maximum": 100, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "description": "Maximum number of audit log entries to return (1-100)" }, { "name": "before", "in": "query", "required": false, "schema": { "description": "Get entries before this audit log entry ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Get entries before this audit log entry ID" }, { "name": "after", "in": "query", "required": false, "schema": { "description": "Get entries after this audit log entry ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Get entries after this audit log entry ID" }, { "name": "user_id", "in": "query", "required": false, "schema": { "description": "Filter entries by the user who performed the action", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Filter entries by the user who performed the action" }, { "name": "action_type", "in": "query", "required": false, "schema": { "description": "Filter entries by the type of action", "allOf": [{"$ref": "#/components/schemas/AuditLogActionTypeInput"}] }, "description": "Filter entries by the type of action" } ] } }, "/admin/guilds/{guild_id}/bans/{user_id}": { "put": { "operationId": "ban_admin_guild_member", "summary": "Ban guild member", "tags": ["Admin"], "responses": { "204": {"description": "No Content"}, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Bans a user from a guild, optionally deleting their recent messages. Prevents the user from joining until the ban expires or is removed. Logged to audit log. Requires GUILD_BAN_MEMBER permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" }, { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BanGuildMemberBody"}}} } } }, "/admin/guilds/{guild_id}/emojis": { "get": { "operationId": "list_admin_guild_emojis", "summary": "List guild emojis", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListGuildEmojisResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Lists all custom emojis in a guild. Returns ID, name, and creation date. Used for asset inventory and purge operations. Requires ASSET_PURGE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ] } }, "/admin/guilds/{guild_id}/members": { "get": { "operationId": "list_admin_guild_members", "summary": "List guild members", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListGuildMembersResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Lists all guild members with pagination. Returns member IDs, join dates, and roles. Requires GUILD_LIST_MEMBERS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" }, { "name": "limit", "in": "query", "required": false, "schema": { "description": "Maximum members to return (1-200, default 50)", "default": "50", "type": "string" }, "description": "Maximum members to return (1-200, default 50)" }, { "name": "offset", "in": "query", "required": false, "schema": { "description": "Members to skip before returning results (default 0)", "default": "0", "type": "string" }, "description": "Members to skip before returning results (default 0)" } ] } }, "/admin/guilds/{guild_id}/members/{user_id}": { "put": { "operationId": "add_admin_guild_member", "summary": "Add guild member", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Forcefully adds a user to a guild. Bypasses normal invite flow for administrative account recovery. Logged to audit log. Requires GUILD_FORCE_ADD_MEMBER permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" }, { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] }, "delete": { "operationId": "kick_admin_guild_member", "summary": "Remove guild member", "tags": ["Admin"], "responses": { "204": {"description": "No Content"}, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Temporarily removes a user from a guild. User can rejoin. Logged to audit log. Requires GUILD_KICK_MEMBER permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" }, { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/guilds/{guild_id}/reloads": { "post": { "operationId": "create_admin_guild_reload", "summary": "Reload guild", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Reloads a single guild state from database. Used to recover from corruption or sync issues. Logged to audit log. Requires GUILD_RELOAD permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ] } }, "/admin/guilds/{guild_id}/shutdowns": { "post": { "operationId": "create_admin_guild_shutdown", "summary": "Shut down guild", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Shuts down and unloads a guild from the gateway. Guild data remains in database. Used for emergency resource cleanup. Logged to audit log. Requires GUILD_SHUTDOWN permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ] } }, "/admin/guilds/{guild_id}/stickers": { "get": { "operationId": "list_admin_guild_stickers", "summary": "List guild stickers", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListGuildStickersResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Lists all stickers in a guild. Returns ID, name, and asset information. Used for asset inventory and purge operations. Requires ASSET_PURGE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "guild_id", "in": "path", "required": true, "schema": {"description": "The ID of the guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the guild" } ] } }, "/admin/instance/config": { "get": { "operationId": "get_admin_instance_config", "summary": "Get instance configuration", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InstanceConfigResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieves instance-wide configuration including webhooks and SSO configuration. Requires INSTANCE_CONFIG_VIEW permission.", "security": [{"adminApiKey": []}] }, "patch": { "operationId": "update_admin_instance_config", "summary": "Update instance configuration", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InstanceConfigResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Updates instance configuration settings including webhook URLs and SSO parameters. Changes apply immediately. Requires INSTANCE_CONFIG_UPDATE permission.", "security": [{"adminApiKey": []}], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InstanceConfigUpdateRequest"}}} } } }, "/admin/instance/config/branding-assets": { "post": { "operationId": "create_admin_instance_branding_asset", "summary": "Upload an instance branding asset", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InstanceConfigResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Uploads a branding image served by the media proxy and stores its URL, or clears it when no image is provided. Requires INSTANCE_CONFIG_UPDATE permission.", "security": [{"adminApiKey": []}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrandingAssetUploadRequest"}}} } } }, "/admin/instance/config/smtp-tests": { "post": { "operationId": "create_admin_instance_smtp_test", "summary": "Run an SMTP configuration test", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InstanceEmailSmtpTestResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Validates that an SMTP configuration can authenticate and accept a connection. Requires INSTANCE_CONFIG_UPDATE permission.", "security": [{"adminApiKey": []}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InstanceEmailSmtpTestRequest"}}} } } }, "/admin/instance/pending-registrations/{user_id}": { "patch": { "operationId": "update_admin_pending_registration", "summary": "Approve or reject a pending registration", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InstanceConfigResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Decides a registration waiting for manual review. Approving removes its pending registration trait, rejecting also prevents the account from logging in. Requires INSTANCE_CONFIG_UPDATE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PendingRegistrationActionRequest"}}} } } }, "/admin/instance/registration-urls": { "post": { "operationId": "create_admin_registration_url", "summary": "Create an admin-issued registration URL", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateRegistrationUrlResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Creates a one-time-display registration URL that can be sent manually by an administrator. Requires INSTANCE_CONFIG_UPDATE permission.", "security": [{"adminApiKey": []}], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateRegistrationUrlRequest"}}} } } }, "/admin/instance/registration-urls/{registration_url_id}": { "delete": { "operationId": "revoke_admin_registration_url", "summary": "Revoke an admin-issued registration URL", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InstanceConfigResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Revokes an admin-issued registration URL so it can no longer be used. Requires INSTANCE_CONFIG_UPDATE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "registration_url_id", "in": "path", "required": true, "schema": {"description": "The ID of the registration URL", "type": "string"}, "description": "The ID of the registration URL" } ] } }, "/admin/jobs": { "get": { "operationId": "list_admin_jobs", "summary": "List jobs", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListJobsResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Paginated, filterable list of background jobs from the human-facing ledger. Walks back through day-buckets and applies status / task-type / requester filters in-process. The three cursor query parameters come from the previous page `next_cursor` and must be supplied together.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "description": "Maximum number of jobs to return (1-200, default 50)", "default": "50", "type": "string" }, "description": "Maximum number of jobs to return (1-200, default 50)" }, { "name": "cursor_bucket_day", "in": "query", "required": false, "schema": { "description": "Day bucket to resume from as a YYYY-MM-DD UTC date, taken from next_cursor.bucket_day", "type": "string" }, "description": "Day bucket to resume from as a YYYY-MM-DD UTC date, taken from next_cursor.bucket_day" }, { "name": "cursor_created_at", "in": "query", "required": false, "schema": { "description": "Creation time to resume before as an ISO 8601 timestamp, taken from next_cursor.created_at", "type": "string" }, "description": "Creation time to resume before as an ISO 8601 timestamp, taken from next_cursor.created_at" }, { "name": "cursor_job_id", "in": "query", "required": false, "schema": { "description": "Job to resume from, taken from next_cursor.job_id", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "description": "Job to resume from, taken from next_cursor.job_id" }, { "name": "max_lookback_days", "in": "query", "required": false, "schema": { "description": "How many day buckets to scan back through (1-60, default 14)", "default": "14", "type": "string" }, "description": "How many day buckets to scan back through (1-60, default 14)" }, { "name": "status", "in": "query", "required": false, "schema": { "description": "Filter by job status", "type": "string", "enum": ["queued", "running", "succeeded", "cancelled", "deadletter"] }, "description": "Filter by job status" }, { "name": "task_type", "in": "query", "required": false, "schema": {"description": "Filter by task type", "type": "string"}, "description": "Filter by task type" }, { "name": "requested_by_user_id", "in": "query", "required": false, "schema": { "description": "Filter by admin user who scheduled the job", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Filter by admin user who scheduled the job" } ] } }, "/admin/jobs/active": { "get": { "operationId": "list_admin_active_jobs", "summary": "List active jobs", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ActiveJobsResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Polling endpoint for the Jobs page. Returns only currently-active jobs (queued or running) from their own index, so the UI can refresh progress without scanning historical day-buckets.", "security": [{"adminApiKey": []}] } }, "/admin/jobs/{job_id}": { "get": { "operationId": "get_admin_job", "summary": "Get job detail", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetJobResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Fetch a single job ledger entry with full payload, result, and progress.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": {"description": "The ID of the job", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the job" } ] } }, "/admin/jobs/{job_id}/cancellation": { "put": { "operationId": "create_admin_job_cancellation", "summary": "Request cancellation of a running job", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CancelJobResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Mark a job as cancel-requested. The handler must be cooperatively cancellable — it will see the flag at its next `helpers.shouldCancel()` check. Returns `{cancelled: false}` for already-terminal jobs.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": {"description": "The ID of the job", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the job" } ] } }, "/admin/limit-config": { "get": { "operationId": "get_admin_limit_config", "summary": "Get limit configuration", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitConfigGetResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieves rate limit configuration including message limits, upload limits, and request throttles. Shows defaults, metadata, and any modifications from defaults. Requires INSTANCE_LIMIT_CONFIG_VIEW permission.", "security": [{"adminApiKey": []}] }, "put": { "operationId": "replace_admin_limit_config", "summary": "Replace limit configuration", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitConfigGetResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Replaces the stored limit configuration, which covers message throughput, upload sizes, and request throttles, with the supplied document. Changes apply immediately to all new operations. Requires INSTANCE_LIMIT_CONFIG_UPDATE permission.", "security": [{"adminApiKey": []}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LimitConfigUpdateRequest"}}} } } }, "/admin/messages": { "get": { "operationId": "search_admin_messages", "summary": "Search messages", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminMessageSearchResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Searches the messages of a channel by content, or resolves a single message by its ID or by one of its attachments. Passing message_id returns that message with the messages surrounding it; passing attachment_id together with filename returns the message carrying that attachment with its surrounding context. Requires MESSAGE_LOOKUP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "channel_id", "in": "query", "required": true, "schema": { "description": "Return messages sent in this channel", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Return messages sent in this channel" }, { "name": "q", "in": "query", "required": false, "schema": {"description": "Free-text query matched against message content", "type": "string"}, "description": "Free-text query matched against message content" }, { "name": "message_id", "in": "query", "required": false, "schema": { "description": "Return the single message with this ID together with its surrounding context; ignores every other filter", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Return the single message with this ID together with its surrounding context; ignores every other filter" }, { "name": "attachment_id", "in": "query", "required": false, "schema": { "description": "Return the single message carrying this attachment together with its surrounding context; requires filename", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Return the single message carrying this attachment together with its surrounding context; requires filename" }, { "name": "filename", "in": "query", "required": false, "schema": { "description": "The filename of the attachment named by attachment_id", "type": "string", "minLength": 1, "maxLength": 255 }, "description": "The filename of the attachment named by attachment_id" }, { "name": "context_limit", "in": "query", "required": false, "schema": { "description": "How many messages surrounding a message resolved by message_id or attachment_id to return as context (1-100, default 50)", "default": "50", "type": "string" }, "description": "How many messages surrounding a message resolved by message_id or attachment_id to return as context (1-100, default 50)" }, { "name": "limit", "in": "query", "required": false, "schema": { "description": "Maximum number of messages to return when searching (1-100, default 25)", "default": "25", "type": "string" }, "description": "Maximum number of messages to return when searching (1-100, default 25)" } ] } }, "/admin/messages/ncmec-reports": { "post": { "operationId": "create_admin_ncmec_report", "summary": "Report an attachment to NCMEC", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": { "application/json": {"schema": {"$ref": "#/components/schemas/NcmecAttachmentSubmitResultResponse"}} } }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Submits a specific image attachment to NCMEC, creates an audit log entry, silently disables the user, triggers one archive for the user, and schedules content deletion after the archive completes.", "security": [{"adminApiKey": []}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReportAttachmentToNcmecRequest"}}} } } }, "/admin/messages/shreds/{job_id}": { "get": { "operationId": "get_admin_message_shred", "summary": "Get message shred job", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageShredStatusResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Returns the progress of a queued message shred job, including whether it is complete. Requires MESSAGE_SHRED permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "description": "The ID of the message shred job", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the message shred job" } ] } }, "/admin/reports": { "get": { "operationId": "list_admin_reports", "summary": "List reports", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminReportListResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Lists user and content reports with pagination. Filtering by status alone reads them straight from the database; supplying a free-text query or any of the entity, category and resolver filters searches the report index instead and adds the total, offset and limit of the page to the response. Reporter contact details are redacted unless the caller also holds REPORT_VIEW_REPORTER_PII. Requires REPORT_VIEW permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "q", "in": "query", "required": false, "schema": {"description": "Free-text query matched against the searchable report fields", "type": "string"}, "description": "Free-text query matched against the searchable report fields" }, { "name": "status", "in": "query", "required": false, "schema": { "description": "Only return reports with this status", "x-enumNames": ["pending", "resolved"], "x-enumDescriptions": [ "Only reports that are waiting to be reviewed", "Only reports that have been resolved" ], "enum": ["pending", "resolved"], "type": "string" }, "description": "Only return reports with this status" }, { "name": "report_type", "in": "query", "required": false, "schema": { "description": "Only return reports about this kind of entity", "x-enumNames": ["message", "user", "guild"], "x-enumDescriptions": [ "Only reports about a message", "Only reports about a user", "Only reports about a community" ], "enum": ["message", "user", "guild"], "type": "string" }, "description": "Only return reports about this kind of entity" }, { "name": "category", "in": "query", "required": false, "schema": {"description": "Only return reports filed under this category", "type": "string"}, "description": "Only return reports filed under this category" }, { "name": "reporter_id", "in": "query", "required": false, "schema": { "description": "Only return reports submitted by this user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Only return reports submitted by this user" }, { "name": "reported_user_id", "in": "query", "required": false, "schema": { "description": "Only return reports about this user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Only return reports about this user" }, { "name": "reported_guild_id", "in": "query", "required": false, "schema": { "description": "Only return reports about this community", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Only return reports about this community" }, { "name": "reported_channel_id", "in": "query", "required": false, "schema": { "description": "Only return reports about content in this channel", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Only return reports about content in this channel" }, { "name": "guild_context_id", "in": "query", "required": false, "schema": { "description": "Only return reports filed from within this community", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Only return reports filed from within this community" }, { "name": "resolved_by_admin_id", "in": "query", "required": false, "schema": { "description": "Only return reports resolved by this admin", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Only return reports resolved by this admin" }, { "name": "sort_by", "in": "query", "required": false, "schema": { "default": "reported_at", "description": "The field to sort the reports by", "x-enumNames": ["created_at", "reported_at", "resolved_at"], "x-enumDescriptions": [ "Sort by the time the report was created", "Sort by the time the report was submitted", "Sort by the time the report was resolved" ], "enum": ["created_at", "reported_at", "resolved_at"], "type": "string" }, "description": "The field to sort the reports by" }, { "name": "sort_order", "in": "query", "required": false, "schema": { "default": "desc", "description": "The direction to sort the reports in", "x-enumNames": ["asc", "desc"], "x-enumDescriptions": ["Ascending order (oldest first)", "Descending order (newest first)"], "enum": ["asc", "desc"], "type": "string" }, "description": "The direction to sort the reports in" }, { "name": "limit", "in": "query", "required": false, "schema": { "description": "Maximum number of reports to return (1-200, default 50)", "default": "50", "type": "string" }, "description": "Maximum number of reports to return (1-200, default 50)" }, { "name": "offset", "in": "query", "required": false, "schema": {"description": "Number of reports to skip", "default": "0", "type": "string"}, "description": "Number of reports to skip" } ] } }, "/admin/reports/{report_id}": { "get": { "operationId": "get_admin_report", "summary": "Get report", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReportAdminResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieves detailed information about a specific report including content, reporter, reason, and the message context captured when it was filed. Requires REPORT_VIEW permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "report_id", "in": "path", "required": true, "schema": { "description": "The ID of the report", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the report" } ] }, "patch": { "operationId": "update_admin_report", "summary": "Update report", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResolveReportResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Moves a report to the resolved status with an optional public comment shown to the reporter. Marks the report as handled, notifies the reporter, and creates an audit log entry. Requires REPORT_RESOLVE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "report_id", "in": "path", "required": true, "schema": { "description": "The ID of the report", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the report" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateReportRequest"}}} } } }, "/admin/search/index-refreshes/{job_id}": { "get": { "operationId": "get_admin_search_index_refresh", "summary": "Get search index refresh", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IndexRefreshStatusResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Reads the progress of a queued search index refresh. Returns the completion counts and current phase, or a not_found status once the record has expired. Requires GUILD_LOOKUP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": {"description": "ID of the index refresh to read", "type": "string"}, "description": "ID of the index refresh to read" } ] } }, "/admin/search/indexes/{index_name}/refreshes": { "post": { "operationId": "create_admin_search_index_refresh", "summary": "Refresh a search index", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RefreshSearchIndexResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Trigger a full or partial rebuild of the named search index. Creates a background job and returns its refresh ID for status tracking. The channel_messages and guild_members indexes are rebuilt one guild at a time and require guild_id, and favorite_memes requires user_id. Requires GUILD_LOOKUP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "index_name", "in": "path", "required": true, "schema": { "description": "The name of the search index", "x-enumNames": [ "guilds", "users", "reports", "audit_logs", "channel_messages", "guild_members", "favorite_memes", "discovery" ], "x-enumDescriptions": [ "Guild search index", "User search index", "Report search index", "Audit log search index", "Channel message search index", "Guild member search index", "Favourite meme search index", "Discovery guild search index" ], "enum": [ "guilds", "users", "reports", "audit_logs", "channel_messages", "guild_members", "favorite_memes", "discovery" ], "type": "string" }, "description": "The name of the search index" } ], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RefreshSearchIndexRequest"}}} } } }, "/admin/system-dms": { "post": { "operationId": "create_admin_system_dm", "summary": "Send a system direct message", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SendSystemDmResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Queue a worker job that delivers the same content to every listed user as a direct message from the system account. Progress is observable through the Jobs admin resource (task_type=sendSystemDm), and an in-flight broadcast is stopped by cancelling that job. Requires SYSTEM_DM_SEND permission.", "security": [{"adminApiKey": []}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SendSystemDmRequest"}}} } } }, "/admin/system/heap-snapshots": { "post": { "operationId": "create_admin_system_heap_snapshot", "summary": "Create a V8 heap snapshot", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/octet-stream": {"schema": {"$ref": "#/components/schemas/HeapSnapshotResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Writes a V8 heap snapshot of the current process and returns the snapshot file. Used for diagnosing memory leaks. Requires SYSTEM_HEAP_SNAPSHOT permission.", "security": [{"adminApiKey": []}] } }, "/admin/users": { "get": { "operationId": "list_admin_users", "summary": "List users", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SearchUsersResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Lists and searches users. Exactly one selector is honoured, in this precedence order: user_id, resolve, email, last_active_ip, then the indexed q search. The resolve selector takes one exact identifier, which may be a username#discriminator tag, a user ID, an email address, or a Stripe subscription ID. The email and user_id selectors ignore limit and offset. Requires USER_LOOKUP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "description": "Restrict the results to the users matching this free-text query", "type": "string" }, "description": "Restrict the results to the users matching this free-text query" }, { "name": "user_id", "in": "query", "required": false, "schema": { "description": "Restrict the results to these users. Repeat the parameter to pass more than one.", "anyOf": [ {"$ref": "#/components/schemas/SnowflakeStringType"}, {"maxItems": 100, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"}} ] }, "description": "Restrict the results to these users. Repeat the parameter to pass more than one." }, { "name": "resolve", "in": "query", "required": false, "schema": { "description": "Resolve one exact identifier: a username#discriminator tag, a user ID, an email address, or a Stripe subscription ID", "type": "string" }, "description": "Resolve one exact identifier: a username#discriminator tag, a user ID, an email address, or a Stripe subscription ID" }, { "name": "email", "in": "query", "required": false, "schema": { "description": "Restrict the results to the user with this exact email address", "type": "string" }, "description": "Restrict the results to the user with this exact email address" }, { "name": "last_active_ip", "in": "query", "required": false, "schema": { "description": "Restrict the results to the users whose last active IP address matches this one exactly", "type": "string" }, "description": "Restrict the results to the users whose last active IP address matches this one exactly" }, { "name": "limit", "in": "query", "required": false, "schema": {"description": "Maximum number of users to return", "default": "50", "type": "string"}, "description": "Maximum number of users to return" }, { "name": "offset", "in": "query", "required": false, "schema": { "description": "Number of users to skip before returning results", "default": "0", "type": "string" }, "description": "Number of users to skip before returning results" } ] } }, "/admin/users/@me": { "get": { "operationId": "get_current_admin_user", "summary": "Get current admin", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUsersMeResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Return the admin the request was authenticated as, with the admin permissions, roles, and metadata of the account. Requires AUTHENTICATE permission.", "security": [{"adminApiKey": []}] } }, "/admin/users/{user_id}": { "get": { "operationId": "get_admin_user", "summary": "Get user", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LookupUserResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Look up one detailed user profile by ID. Returns account status, permissions, and metadata. The email address, date of birth, and IP address are redacted without the matching view permissions. Requires USER_LOOKUP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/users/{user_id}/acls": { "put": { "operationId": "set_admin_user_acls", "summary": "Set user admin permissions", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Replace the admin ACL permissions granted to a user. Controls admin capabilities and panel access. The permissions accepted are the ones listed by GET /admin/acls. Creates audit log entry. Requires ACL_SET_USER permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserAclsRequest"}}} } } }, "/admin/users/{user_id}/applications": { "get": { "operationId": "list_admin_user_applications", "summary": "List user applications", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListApplicationsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Lists the OAuth2 applications and bots a user owns. Requires APPLICATION_LIST_BY_OWNER permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/users/{user_id}/archives": { "post": { "operationId": "create_admin_user_archive", "summary": "Create user archive", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminArchiveResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Initiates a data export for a user. Creates an archive containing all the user's data (messages, server memberships, preferences, etc.) for export or compliance purposes.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminArchiveCreateRequest"}}} } } }, "/admin/users/{user_id}/avatar-block": { "post": { "operationId": "ban_admin_user_avatar", "summary": "Ban this user's current avatar", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BanUserAvatarResponseSchema"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Reads the user's current avatar_hash, strips any animation prefix, and adds the 8-char hash to the avatar-hash blocklist. Returns the banned hash.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BanUserAvatarRequest"}}} } } }, "/admin/users/{user_id}/ban": { "put": { "operationId": "ban_admin_user", "summary": "Ban user", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Apply temporary ban to user account for specified duration, or permanently with a duration of zero. Prevents login and guild operations. Automatically lifts after expiry. Creates audit log entry. Requires USER_TEMP_BAN permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserBanRequest"}}} } }, "delete": { "operationId": "unban_admin_user", "summary": "Unban user", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Immediately remove temporary ban from user account. User can log in and access guilds again. Creates audit log entry. Requires USER_TEMP_BAN permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/users/{user_id}/bot-status": { "put": { "operationId": "set_admin_user_bot_status", "summary": "Set user bot status", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Mark or unmark a user account as a bot. Controls bot badge visibility and API permissions. Creates audit log entry. Requires USER_UPDATE_BOT_STATUS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserBotStatusRequest"}}} } } }, "/admin/users/{user_id}/change-log": { "get": { "operationId": "list_admin_user_change_log", "summary": "List user contact change log", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": { "application/json": {"schema": {"$ref": "#/components/schemas/ListUserChangeLogResponseSchema"}} } }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Retrieve the identity and contact change log history for a user. Shows all profile modifications, admin actions, and account changes with timestamps. Email values are redacted without USER_VIEW_EMAIL. Requires USER_VIEW_CONTACT_LOG permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" }, { "name": "limit", "in": "query", "required": false, "schema": {"description": "Maximum number of entries to return", "default": "50", "type": "string"}, "description": "Maximum number of entries to return" }, { "name": "page_token", "in": "query", "required": false, "schema": {"description": "Pagination token for the next page of results", "type": "string"}, "description": "Pagination token for the next page of results" } ] } }, "/admin/users/{user_id}/date-of-birth": { "patch": { "operationId": "update_admin_user_date_of_birth", "summary": "Change user date of birth", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Update user date of birth. May affect age-restricted content access. Creates audit log entry. Requires USER_UPDATE_DOB permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserDobUpdateRequest"}}} } } }, "/admin/users/{user_id}/deletion": { "put": { "operationId": "schedule_admin_user_deletion", "summary": "Schedule user deletion", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Schedule user account for deletion after grace period. Account will be fully deleted with all content unless cancellation is executed. Creates audit log entry. Requires USER_DELETE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserDeletionScheduleRequest"}}} } }, "delete": { "operationId": "cancel_admin_user_deletion", "summary": "Cancel user deletion", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Cancel a scheduled account deletion. User account restoration prevents data loss. Creates audit log entry. Requires USER_DELETE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/users/{user_id}/dm-channels": { "get": { "operationId": "list_admin_user_dm_channels", "summary": "List user direct message channels", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserDmChannelListResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "List the historical one-to-one direct message channels of a user with cursor pagination, or the group direct message channels they are a recipient of when type is group_dm. Requires USER_LIST_DM_CHANNELS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" }, { "name": "type", "in": "query", "required": false, "schema": { "default": "dm", "description": "The kind of direct message channel to list. Defaults to the one-to-one direct message channels.", "allOf": [{"$ref": "#/components/schemas/AdminUserDmChannelType"}] }, "description": "The kind of direct message channel to list. Defaults to the one-to-one direct message channels." }, { "name": "before", "in": "query", "required": false, "schema": { "description": "Return channels with IDs lower than this channel ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Return channels with IDs lower than this channel ID" }, { "name": "after", "in": "query", "required": false, "schema": { "description": "Return channels with IDs higher than this channel ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Return channels with IDs higher than this channel ID" }, { "name": "limit", "in": "query", "required": false, "schema": {"description": "Maximum number of DM channels to return", "default": "50", "type": "string"}, "description": "Maximum number of DM channels to return" } ] } }, "/admin/users/{user_id}/email": { "patch": { "operationId": "update_admin_user_email", "summary": "Change user email", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Change user email address. New email must be valid and unique. Marks email as verified. Creates audit log entry. Requires USER_UPDATE_EMAIL permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserEmailUpdateRequest"}}} } } }, "/admin/users/{user_id}/email-verification": { "put": { "operationId": "verify_admin_user_email", "summary": "Verify user email", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Manually verify user email address without requiring confirmation link. Bypasses email verification requirement. Creates audit log entry. Requires USER_UPDATE_EMAIL permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/users/{user_id}/flags": { "patch": { "operationId": "update_admin_user_flags", "summary": "Update user flags", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Add or remove user flags to control account features and restrictions. Flags determine verification status and special properties. Creates audit log entry. Requires USER_UPDATE_FLAGS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserFlagsUpdateRequest"}}} } } }, "/admin/users/{user_id}/guilds": { "get": { "operationId": "list_admin_user_guilds", "summary": "List user communities", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListUserGuildsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "List all guilds a user is a member of, optionally with approximate member and presence counts. Shows roles and join dates. Requires USER_LIST_GUILDS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" }, { "name": "before", "in": "query", "required": false, "schema": { "description": "Return guilds with IDs lower than this guild ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Return guilds with IDs lower than this guild ID" }, { "name": "after", "in": "query", "required": false, "schema": { "description": "Return guilds with IDs higher than this guild ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "Return guilds with IDs higher than this guild ID" }, { "name": "limit", "in": "query", "required": false, "schema": {"description": "Maximum number of guilds to return", "default": "200", "type": "string"}, "description": "Maximum number of guilds to return" }, { "name": "with_counts", "in": "query", "required": false, "schema": { "description": "Whether to resolve live member and presence counts from the gateway", "default": "false", "type": "string" }, "description": "Whether to resolve live member and presence counts from the gateway" } ] } }, "/admin/users/{user_id}/message-deletion": { "delete": { "operationId": "cancel_admin_user_message_deletion", "summary": "Cancel bulk message deletion", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Cancel a scheduled bulk message deletion job for a user. Prevents deletion of user messages across guilds. Creates audit log entry. Requires USER_CANCEL_BULK_MESSAGE_DELETION permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/users/{user_id}/message-shreds": { "post": { "operationId": "shred_admin_user_messages", "summary": "Shred user messages", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageShredResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Queues bulk shredding of the given messages of a user, with attachment deletion. Returns a job ID to track progress asynchronously. Used for large-scale content removal. Requires MESSAGE_SHRED permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserMessageShredRequest"}}} } } }, "/admin/users/{user_id}/messages": { "delete": { "operationId": "delete_admin_user_messages", "summary": "Delete all user messages", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeleteAllUserMessagesResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Deletes all messages from a specific user across all channels. Permanent operation used for account suspension or policy violation. Pass dry_run=false to delete; the default counts without deleting. Requires MESSAGE_DELETE_ALL permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" }, { "name": "dry_run", "in": "query", "required": false, "schema": { "description": "Count the messages that would be deleted without deleting anything (default true)", "default": "true", "type": "string" }, "description": "Count the messages that would be deleted without deleting anything (default true)" } ] } }, "/admin/users/{user_id}/mfa": { "delete": { "operationId": "disable_admin_user_mfa", "summary": "Disable user MFA", "tags": ["Admin"], "responses": { "204": {"description": "No Content"}, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Disable two-factor authentication for user account. Removes all authenticators. Creates audit log entry. Requires USER_UPDATE_MFA permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/users/{user_id}/password-reset": { "post": { "operationId": "send_admin_user_password_reset", "summary": "Send user password reset", "tags": ["Admin"], "responses": { "204": {"description": "No Content"}, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Send password reset email to user with reset link. User must use link within expiry window. Creates audit log entry. Requires USER_UPDATE_EMAIL permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/users/{user_id}/phone-verification": { "put": { "operationId": "update_admin_user_phone_verification", "summary": "Update user phone verification flag", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Set whether a user is treated as having completed phone verification. This is the only supported path for clearing the irreversible user-facing phone verification flag. Requires USER_UPDATE_PHONE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": { "application/json": {"schema": {"$ref": "#/components/schemas/AdminUserPhoneVerificationRequest"}} } } } }, "/admin/users/{user_id}/premium-flags": { "patch": { "operationId": "update_admin_user_premium_flags", "summary": "Update user premium flags", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Add or remove premium-related flags on a user account (badge visibility, override, purchase block, etc). Creates audit log entry. Requires USER_UPDATE_FLAGS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": false, "content": { "application/json": {"schema": {"$ref": "#/components/schemas/AdminUserPremiumFlagsUpdateRequest"}} } } } }, "/admin/users/{user_id}/profile-fields": { "delete": { "operationId": "clear_admin_user_profile_fields", "summary": "Clear user profile fields", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Clear or reset user profile fields such as bio, avatar, or status. Creates audit log entry. Requires USER_UPDATE_PROFILE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserClearFieldsRequest"}}} } } }, "/admin/users/{user_id}/relationships": { "get": { "operationId": "list_admin_user_relationships", "summary": "List user relationships", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListUserRelationshipsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "List a user's friends, incoming and outgoing friend requests, and blocked users. Requires USER_LIST_RELATIONSHIPS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] }, "delete": { "operationId": "clear_admin_user_relationships", "summary": "Clear user relationships", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": { "application/json": {"schema": {"$ref": "#/components/schemas/RemoveUserRelationshipsResponse"}} } }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Bulk-remove every relationship of the chosen category (friend, incoming_request, outgoing_request, blocked) for a user. Mirror entries on the other party are removed for friend, incoming_request, and outgoing_request. Requires USER_REMOVE_RELATIONSHIP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" }, { "name": "category", "in": "query", "required": true, "schema": { "description": "Category of relationships the operation applies to", "allOf": [{"$ref": "#/components/schemas/RelationshipCategoryEnum"}] }, "description": "Category of relationships the operation applies to" } ] } }, "/admin/users/{user_id}/relationships/{target_user_id}": { "delete": { "operationId": "remove_admin_user_relationship", "summary": "Remove user relationship", "tags": ["Admin"], "responses": { "204": {"description": "No Content"}, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Remove a single relationship row for a user. For friend and outgoing_request, the mirror entry on the other user is also removed. Dispatches RELATIONSHIP_REMOVE gateway events. Requires USER_REMOVE_RELATIONSHIP permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" }, { "name": "target_user_id", "in": "path", "required": true, "schema": { "description": "The ID of the target user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "description": "The ID of the target user" }, { "name": "category", "in": "query", "required": true, "schema": { "description": "Category of relationships the operation applies to", "allOf": [{"$ref": "#/components/schemas/RelationshipCategoryEnum"}] }, "description": "Category of relationships the operation applies to" } ] } }, "/admin/users/{user_id}/sessions": { "get": { "operationId": "list_admin_user_sessions", "summary": "List user sessions", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListUserSessionsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "List all active user sessions across devices. Shows device info, IP, last activity, and creation time. Requires USER_LIST_SESSIONS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] }, "delete": { "operationId": "terminate_admin_user_sessions", "summary": "Terminate user sessions", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TerminateSessionsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Terminate all active user sessions across devices. Forces user to re-authenticate on next connection. Creates audit log entry. Requires USER_UPDATE_FLAGS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/users/{user_id}/suspicious-activity-disablement": { "put": { "operationId": "disable_admin_user_suspicious", "summary": "Disable user for suspicious activity", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Disable user account due to suspicious activity or abuse. Account is locked pending review. User cannot access services. Creates audit log entry. Requires USER_DISABLE_SUSPICIOUS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": { "application/json": {"schema": {"$ref": "#/components/schemas/AdminUserSuspiciousDisableRequest"}} } } } }, "/admin/users/{user_id}/suspicious-activity-flags": { "put": { "operationId": "update_admin_user_suspicious_activity_flags", "summary": "Update suspicious activity flags", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Flag user as suspicious for account abuse, fraud, or policy violations. Enables enforcement actions and rate limiting. Creates audit log entry. Requires USER_UPDATE_SUSPICIOUS_ACTIVITY permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": { "application/json": {"schema": {"$ref": "#/components/schemas/AdminUserSuspiciousActivityFlagsRequest"}} } } } }, "/admin/users/{user_id}/system-status": { "put": { "operationId": "set_admin_user_system_status", "summary": "Set user system status", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Mark or unmark a user as a system account. System accounts have special permissions for automated operations. Creates audit log entry. Requires USER_UPDATE_BOT_STATUS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserSystemStatusRequest"}}} } } }, "/admin/users/{user_id}/traits": { "put": { "operationId": "set_admin_user_traits", "summary": "Set user traits", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Set or update user trait attributes and profile metadata. Traits customize user display and features. Creates audit log entry. Requires USER_UPDATE_TRAITS permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserTraitsRequest"}}} } } }, "/admin/users/{user_id}/username": { "patch": { "operationId": "update_admin_user_username", "summary": "Change user username", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserMutationResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Change user username. New username must meet requirements and be unique. Creates audit log entry. Requires USER_UPDATE_USERNAME permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserUsernameUpdateRequest"}}} } } }, "/admin/users/{user_id}/verification-email": { "post": { "operationId": "resend_admin_user_verification_email", "summary": "Resend user verification email", "tags": ["Admin"], "responses": { "204": {"description": "No Content"}, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Resend the account verification email for a user. Creates audit log entry and honours email verification resend limits. Requires USER_UPDATE_EMAIL permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/users/{user_id}/webauthn-credentials": { "get": { "operationId": "list_admin_user_webauthn_credentials", "summary": "List user WebAuthn credentials", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebAuthnCredentialListResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "List all WebAuthn credentials (passkeys/security keys) registered for a user. Returns credential names, creation dates, and last usage. Creates audit log entry. Requires USER_UPDATE_MFA permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" } ] } }, "/admin/users/{user_id}/webauthn-credentials/{credential_id}": { "delete": { "operationId": "delete_admin_user_webauthn_credential", "summary": "Delete user WebAuthn credential", "tags": ["Admin"], "responses": { "204": {"description": "No Content"}, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Delete a specific WebAuthn credential (passkey/security key) from a user account. Creates audit log entry. Requires USER_UPDATE_MFA permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": {"description": "The ID of the user", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "description": "The ID of the user" }, { "name": "credential_id", "in": "path", "required": true, "schema": {"description": "The ID of the WebAuthn credential", "type": "string"}, "description": "The ID of the WebAuthn credential" } ] } }, "/admin/voice/regions": { "get": { "operationId": "list_admin_voice_regions", "summary": "List voice regions", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListVoiceRegionsResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Lists all configured voice server regions with status and server count. Shows region names, latency info, and availability. Requires VOICE_REGION_LIST permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "include_servers", "in": "query", "required": false, "schema": { "description": "Whether to include voice servers in the response", "default": "false", "type": "string" }, "description": "Whether to include voice servers in the response" } ] }, "post": { "operationId": "create_admin_voice_region", "summary": "Create voice region", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateVoiceRegionResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Creates a new voice server region. Defines geographic location and performance characteristics for voice routing. Creates audit log entry. Requires VOICE_REGION_CREATE permission.", "security": [{"adminApiKey": []}], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateVoiceRegionRequest"}}} } } }, "/admin/voice/regions/{region_id}": { "get": { "operationId": "get_admin_voice_region", "summary": "Get voice region", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetVoiceRegionResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Gets detailed information about a voice region including assigned servers, capacity, and server details. Requires VOICE_REGION_LIST permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "region_id", "in": "path", "required": true, "schema": {"description": "ID of the voice region", "type": "string"}, "description": "ID of the voice region" }, { "name": "include_servers", "in": "query", "required": false, "schema": { "description": "Whether to include voice servers in the response", "default": "false", "type": "string" }, "description": "Whether to include voice servers in the response" } ] }, "patch": { "operationId": "update_admin_voice_region", "summary": "Update voice region", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateVoiceRegionResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Updates voice region settings such as latency thresholds or priority. Changes affect voice routing for new sessions. Creates audit log entry. Requires VOICE_REGION_UPDATE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "region_id", "in": "path", "required": true, "schema": {"description": "ID of the voice region", "type": "string"}, "description": "ID of the voice region" } ], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateVoiceRegionRequestBody"}}} } }, "delete": { "operationId": "delete_admin_voice_region", "summary": "Delete voice region", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeleteVoiceResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Deletes a voice region. Removes region from routing and reassigns active connections. Creates audit log entry. Requires VOICE_REGION_DELETE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "region_id", "in": "path", "required": true, "schema": {"description": "ID of the voice region", "type": "string"}, "description": "ID of the voice region" } ] } }, "/admin/voice/regions/{region_id}/servers": { "get": { "operationId": "list_admin_voice_servers", "summary": "List voice servers", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListVoiceServersResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Lists all voice servers in a region with connection counts and capacity. Shows server status, region assignment, and load information. Requires VOICE_SERVER_LIST permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "region_id", "in": "path", "required": true, "schema": {"description": "ID of the voice region", "type": "string"}, "description": "ID of the voice region" } ] }, "post": { "operationId": "create_admin_voice_server", "summary": "Create voice server", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateVoiceServerResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Creates and provisions a new voice server instance in a region. Configures capacity, codecs, and encryption. Creates audit log entry. Requires VOICE_SERVER_CREATE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "region_id", "in": "path", "required": true, "schema": {"description": "ID of the voice region", "type": "string"}, "description": "ID of the voice region" } ], "requestBody": { "required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateVoiceServerRequestBody"}}} } } }, "/admin/voice/regions/{region_id}/servers/{server_id}": { "get": { "operationId": "get_admin_voice_server", "summary": "Get voice server", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetVoiceServerResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Gets detailed voice server information including active connections and configuration. Requires VOICE_SERVER_LIST permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "region_id", "in": "path", "required": true, "schema": {"description": "ID of the region the server belongs to", "type": "string"}, "description": "ID of the region the server belongs to" }, { "name": "server_id", "in": "path", "required": true, "schema": {"description": "ID of the voice server", "type": "string"}, "description": "ID of the voice server" } ] }, "patch": { "operationId": "update_admin_voice_server", "summary": "Update voice server", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateVoiceServerResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Updates voice server configuration including capacity, region assignment, and quality settings. Changes apply to new connections. Creates audit log entry. Requires VOICE_SERVER_UPDATE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "region_id", "in": "path", "required": true, "schema": {"description": "ID of the region the server belongs to", "type": "string"}, "description": "ID of the region the server belongs to" }, { "name": "server_id", "in": "path", "required": true, "schema": {"description": "ID of the voice server", "type": "string"}, "description": "ID of the voice server" } ], "requestBody": { "required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateVoiceServerRequestBody"}}} } }, "delete": { "operationId": "delete_admin_voice_server", "summary": "Delete voice server", "tags": ["Admin"], "responses": { "200": { "description": "Success", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeleteVoiceResponse"}}} }, "400": { "description": "Bad Request - The request was malformed or contained invalid data", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "401": { "description": "Unauthorized - Authentication is required or the token is invalid", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "403": { "description": "Forbidden - You do not have permission to perform this action", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} }, "429": { "description": "Too Many Requests - You are being rate limited", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ThrottledError"}}}, "headers": { "Retry-After": { "description": "Number of seconds to wait before retrying (only on 429)", "schema": {"type": "integer"} }, "X-RateLimit-Limit": { "description": "The number of requests that can be made in the current window", "schema": {"type": "integer"} }, "X-RateLimit-Remaining": { "description": "The number of remaining requests that can be made", "schema": {"type": "integer"} }, "X-RateLimit-Reset": { "description": "Unix timestamp when the rate limit resets", "schema": {"type": "integer"} } } }, "500": { "description": "Internal Server Error - An unexpected error occurred", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}} } }, "description": "Decommissions and removes a voice server instance. Disconnects active sessions and migrates to other servers. Creates audit log entry. Requires VOICE_SERVER_DELETE permission.", "security": [{"adminApiKey": []}], "parameters": [ { "name": "region_id", "in": "path", "required": true, "schema": {"description": "ID of the region the server belongs to", "type": "string"}, "description": "ID of the region the server belongs to" }, { "name": "server_id", "in": "path", "required": true, "schema": {"description": "ID of the voice server", "type": "string"}, "description": "ID of the voice server" } ] } } }, "components": { "schemas": { "Error": { "type": "object", "properties": { "code": {"type": "string", "description": "Machine-readable error code"}, "message": {"type": "string", "description": "Human-readable error message"}, "errors": { "description": "Field-specific validation errors", "type": "array", "items": { "type": "object", "properties": { "path": {"type": "string", "description": "Field path that failed validation"}, "code": {"description": "Machine-readable validation error code", "type": "string"}, "message": {"type": "string", "description": "Human-readable validation error message"} }, "required": ["path", "message"], "additionalProperties": false } } }, "required": ["code", "message"], "additionalProperties": {} }, "ThrottledError": { "type": "object", "properties": { "code": {"type": "string", "description": "Machine-readable error code"}, "message": {"type": "string", "description": "Human-readable error message"}, "errors": { "description": "Field-specific validation errors", "type": "array", "items": { "type": "object", "properties": { "path": {"type": "string", "description": "Field path that failed validation"}, "code": {"description": "Machine-readable validation error code", "type": "string"}, "message": {"type": "string", "description": "Human-readable validation error message"} }, "required": ["path", "message"], "additionalProperties": false } }, "retry_after": {"type": "number", "description": "Seconds to wait before retrying"}, "global": {"type": "boolean", "description": "Whether this is a global rate limit"} }, "required": ["code", "message"], "additionalProperties": {} }, "DeleteVoiceResponse": { "type": "object", "properties": {"success": {"type": "boolean", "description": "Whether the deletion was successful"}}, "required": ["success"], "additionalProperties": false }, "UpdateVoiceServerRequestBody": { "type": "object", "properties": { "endpoint": { "description": "Client signal WebSocket endpoint URL for the voice server", "type": "string", "format": "uri" }, "api_key": {"description": "API key for authenticating with the voice server", "type": "string"}, "api_secret": {"description": "API secret for authenticating with the voice server", "type": "string"}, "latitude": { "description": "Optional geographic latitude override for this server", "nullable": true, "type": "number" }, "longitude": { "description": "Optional geographic longitude override for this server", "nullable": true, "type": "number" }, "is_active": {"description": "Whether the server is currently active", "type": "boolean"}, "soft_connection_limit": { "description": "Connection count above which placement prefers another server, or null for no limit", "nullable": true, "type": "integer", "minimum": 1, "maximum": 2147483647 }, "vip_only": {"description": "Whether this server is restricted to VIP users", "type": "boolean"}, "required_guild_features": { "description": "Guild features required to use this server", "maxItems": 100, "type": "array", "items": {"type": "string"} }, "allowed_guild_ids": { "description": "Guild IDs explicitly allowed to use this server", "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"} }, "allowed_user_ids": { "description": "User IDs explicitly allowed to use this server", "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"} } } }, "UpdateVoiceServerResponse": { "type": "object", "properties": { "server": { "description": "Updated voice server", "allOf": [{"$ref": "#/components/schemas/VoiceServerAdminResponse"}] } }, "required": ["server"], "additionalProperties": false }, "GetVoiceServerResponse": { "type": "object", "properties": { "server": { "nullable": true, "description": "Voice server details or null if not found", "allOf": [{"$ref": "#/components/schemas/VoiceServerAdminResponse"}] } }, "required": ["server"], "additionalProperties": false }, "CreateVoiceServerRequestBody": { "type": "object", "properties": { "server_id": {"description": "Unique identifier for the voice server", "type": "string"}, "endpoint": { "type": "string", "format": "uri", "description": "Client signal WebSocket endpoint URL for the voice server" }, "api_key": {"description": "API key for authenticating with the voice server", "type": "string"}, "api_secret": {"description": "API secret for authenticating with the voice server", "type": "string"}, "latitude": { "description": "Optional geographic latitude override for this server", "nullable": true, "type": "number" }, "longitude": { "description": "Optional geographic longitude override for this server", "nullable": true, "type": "number" }, "is_active": {"default": true, "description": "Whether the server is currently active", "type": "boolean"}, "soft_connection_limit": { "default": null, "description": "Connection count above which placement prefers another server, or null for no limit", "nullable": true, "type": "integer", "minimum": 1, "maximum": 2147483647 }, "vip_only": { "default": false, "description": "Whether this server is restricted to VIP users", "type": "boolean" }, "required_guild_features": { "default": [], "description": "Guild features required to use this server", "maxItems": 100, "type": "array", "items": {"type": "string"} }, "allowed_guild_ids": { "description": "Guild IDs explicitly allowed to use this server", "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"} }, "allowed_user_ids": { "description": "User IDs explicitly allowed to use this server", "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"} } }, "required": ["server_id", "endpoint", "api_key", "api_secret"] }, "CreateVoiceServerResponse": { "type": "object", "properties": { "server": { "description": "Created voice server", "allOf": [{"$ref": "#/components/schemas/VoiceServerAdminResponse"}] } }, "required": ["server"], "additionalProperties": false }, "ListVoiceServersResponse": { "type": "object", "properties": { "servers": { "type": "array", "items": {"$ref": "#/components/schemas/VoiceServerAdminResponse"}, "description": "List of voice servers" } }, "required": ["servers"], "additionalProperties": false }, "UpdateVoiceRegionRequestBody": { "type": "object", "properties": { "name": {"description": "Display name of the voice region", "type": "string"}, "emoji": {"description": "Emoji representing the region", "type": "string"}, "latitude": {"description": "Geographic latitude coordinate", "type": "number"}, "longitude": {"description": "Geographic longitude coordinate", "type": "number"}, "is_default": {"description": "Whether this is the default region", "type": "boolean"}, "vip_only": {"description": "Whether this region is restricted to VIP users", "type": "boolean"}, "required_guild_features": { "description": "Guild features required to use this region", "maxItems": 100, "type": "array", "items": {"type": "string"} }, "allowed_guild_ids": { "description": "Guild IDs explicitly allowed to use this region", "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"} }, "allowed_user_ids": { "description": "User IDs explicitly allowed to use this region", "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"} } } }, "UpdateVoiceRegionResponse": { "type": "object", "properties": { "region": { "description": "Updated voice region", "allOf": [{"$ref": "#/components/schemas/VoiceRegionAdminResponse"}] } }, "required": ["region"], "additionalProperties": false }, "GetVoiceRegionResponse": { "type": "object", "properties": { "region": { "nullable": true, "description": "Voice region details or null if not found", "type": "object", "properties": { "id": {"type": "string", "description": "Unique identifier for the voice region"}, "name": {"type": "string", "description": "Display name of the voice region"}, "emoji": {"type": "string", "description": "Emoji representing the region"}, "latitude": {"type": "number", "description": "Geographic latitude coordinate"}, "longitude": {"type": "number", "description": "Geographic longitude coordinate"}, "is_default": {"type": "boolean", "description": "Whether this is the default region"}, "vip_only": {"type": "boolean", "description": "Whether this region is restricted to VIP users"}, "required_guild_features": { "maxItems": 100, "type": "array", "items": {"type": "string"}, "description": "Guild features required to use this region" }, "allowed_guild_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"}, "description": "Guild IDs explicitly allowed to use this region" }, "allowed_user_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"}, "description": "User IDs explicitly allowed to use this region" }, "created_at": { "nullable": true, "description": "ISO 8601 timestamp when the region was created", "type": "string" }, "updated_at": { "nullable": true, "description": "ISO 8601 timestamp when the region was last updated", "type": "string" }, "servers": { "description": "Voice servers in this region", "type": "array", "items": {"$ref": "#/components/schemas/VoiceServerAdminResponse"} } }, "required": [ "id", "name", "emoji", "latitude", "longitude", "is_default", "vip_only", "required_guild_features", "allowed_guild_ids", "allowed_user_ids", "created_at", "updated_at" ], "additionalProperties": false } }, "required": ["region"], "additionalProperties": false }, "CreateVoiceRegionRequest": { "type": "object", "properties": { "id": {"description": "Unique identifier for the voice region", "type": "string"}, "name": {"description": "Display name of the voice region", "type": "string"}, "emoji": {"description": "Emoji representing the region", "type": "string"}, "latitude": {"type": "number", "description": "Geographic latitude coordinate"}, "longitude": {"type": "number", "description": "Geographic longitude coordinate"}, "is_default": {"default": false, "description": "Whether this is the default region", "type": "boolean"}, "vip_only": { "default": false, "description": "Whether this region is restricted to VIP users", "type": "boolean" }, "required_guild_features": { "default": [], "description": "Guild features required to use this region", "maxItems": 100, "type": "array", "items": {"type": "string"} }, "allowed_guild_ids": { "description": "Guild IDs explicitly allowed to use this region", "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"} }, "allowed_user_ids": { "description": "User IDs explicitly allowed to use this region", "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"} } }, "required": ["id", "name", "emoji", "latitude", "longitude"] }, "CreateVoiceRegionResponse": { "type": "object", "properties": { "region": { "description": "Created voice region", "allOf": [{"$ref": "#/components/schemas/VoiceRegionAdminResponse"}] } }, "required": ["region"], "additionalProperties": false }, "ListVoiceRegionsResponse": { "type": "object", "properties": { "regions": { "type": "array", "items": { "type": "object", "properties": { "id": {"type": "string", "description": "Unique identifier for the voice region"}, "name": {"type": "string", "description": "Display name of the voice region"}, "emoji": {"type": "string", "description": "Emoji representing the region"}, "latitude": {"type": "number", "description": "Geographic latitude coordinate"}, "longitude": {"type": "number", "description": "Geographic longitude coordinate"}, "is_default": {"type": "boolean", "description": "Whether this is the default region"}, "vip_only": {"type": "boolean", "description": "Whether this region is restricted to VIP users"}, "required_guild_features": { "maxItems": 100, "type": "array", "items": {"type": "string"}, "description": "Guild features required to use this region" }, "allowed_guild_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"}, "description": "Guild IDs explicitly allowed to use this region" }, "allowed_user_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"}, "description": "User IDs explicitly allowed to use this region" }, "created_at": { "nullable": true, "description": "ISO 8601 timestamp when the region was created", "type": "string" }, "updated_at": { "nullable": true, "description": "ISO 8601 timestamp when the region was last updated", "type": "string" }, "servers": { "description": "Voice servers in this region", "type": "array", "items": {"$ref": "#/components/schemas/VoiceServerAdminResponse"} } }, "required": [ "id", "name", "emoji", "latitude", "longitude", "is_default", "vip_only", "required_guild_features", "allowed_guild_ids", "allowed_user_ids", "created_at", "updated_at" ], "additionalProperties": false }, "description": "List of voice regions" } }, "required": ["regions"], "additionalProperties": false }, "SnowflakeType": { "anyOf": [{"type": "string"}, {"type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991}], "format": "snowflake" }, "WebAuthnCredentialListResponse": { "type": "array", "items": {"$ref": "#/components/schemas/WebAuthnCredentialResponse"} }, "AdminUserUsernameUpdateRequest": { "type": "object", "properties": { "username": { "description": "New username for the user", "allOf": [{"$ref": "#/components/schemas/UsernameType"}] }, "discriminator": { "description": "Legacy discriminator value", "allOf": [{"$ref": "#/components/schemas/DiscriminatorType"}] } }, "required": ["username"] }, "UserMutationResponse": { "type": "object", "properties": {"user": {"$ref": "#/components/schemas/UserAdminResponseSchema"}}, "required": ["user"], "additionalProperties": false }, "AdminUserTraitsRequest": { "type": "object", "properties": { "traits": { "maxItems": 100, "type": "array", "items": {"type": "string"}, "description": "List of traits to assign to the user" } }, "required": ["traits"] }, "AdminUserSystemStatusRequest": { "type": "object", "properties": { "system": {"type": "boolean", "description": "Whether the user should be marked as a system user"} }, "required": ["system"] }, "AdminUserSuspiciousActivityFlagsRequest": { "type": "object", "properties": { "flags": { "description": "Bitmask of suspicious activity flags", "allOf": [{"$ref": "#/components/schemas/SuspiciousActivityFlags"}] } }, "required": ["flags"] }, "AdminUserSuspiciousDisableRequest": { "type": "object", "properties": { "flags": { "description": "Bitmask of suspicious activity flags that triggered the disable", "allOf": [{"$ref": "#/components/schemas/SuspiciousActivityFlags"}] } }, "required": ["flags"] }, "TerminateSessionsResponse": { "type": "object", "properties": {"terminated_count": {"$ref": "#/components/schemas/Int32Type"}}, "required": ["terminated_count"], "additionalProperties": false }, "ListUserSessionsResponse": { "type": "object", "properties": { "sessions": { "type": "array", "items": { "type": "object", "properties": { "session_id_hash": { "description": "Hashed session identifier (base64url)", "type": "string", "minLength": 8, "maxLength": 256 }, "created_at": {"type": "string", "description": "ISO timestamp when the session was created"}, "approx_last_used_at": { "type": "string", "description": "ISO timestamp of the session last usage (approximate)" }, "client_ip": {"description": "Client IP address", "type": "string", "minLength": 1, "maxLength": 64}, "client_ip_reverse": { "nullable": true, "description": "Reverse DNS hostname for the client IP (PTR), if available", "type": "string" }, "client_os": { "nullable": true, "description": "Client operating system, if detected", "type": "string" }, "client_platform": {"nullable": true, "description": "Client platform, if detected", "type": "string"}, "client_location": { "nullable": true, "description": "Approximate geo location label for the client IP, if available", "type": "string" }, "deleted_at": { "nullable": true, "description": "ISO timestamp when the session was terminated, or null if still active", "type": "string" } }, "required": [ "session_id_hash", "created_at", "approx_last_used_at", "client_ip", "client_ip_reverse", "client_os", "client_platform", "client_location", "deleted_at" ], "additionalProperties": false } } }, "required": ["sessions"], "additionalProperties": false }, "RelationshipCategoryEnum": { "type": "string", "enum": ["friend", "incoming_request", "outgoing_request", "blocked"] }, "RemoveUserRelationshipsResponse": { "type": "object", "properties": {"removed_count": {"$ref": "#/components/schemas/Int32Type"}}, "required": ["removed_count"], "additionalProperties": false }, "ListUserRelationshipsResponse": { "type": "object", "properties": { "friends": {"type": "array", "items": {"$ref": "#/components/schemas/AdminRelationshipEntrySchema"}}, "incoming_requests": { "type": "array", "items": {"$ref": "#/components/schemas/AdminRelationshipEntrySchema"} }, "outgoing_requests": { "type": "array", "items": {"$ref": "#/components/schemas/AdminRelationshipEntrySchema"} }, "blocked": {"type": "array", "items": {"$ref": "#/components/schemas/AdminRelationshipEntrySchema"}} }, "required": ["friends", "incoming_requests", "outgoing_requests", "blocked"], "additionalProperties": false }, "AdminUserClearFieldsRequest": { "type": "object", "properties": { "fields": { "maxItems": 10, "type": "array", "items": { "description": "User profile field that can be cleared", "x-enumNames": ["avatar", "banner", "bio", "pronouns", "global_name"], "x-enumDescriptions": [ "User profile avatar image", "User profile banner image", "User biography text", "User pronouns", "User display name" ], "enum": ["avatar", "banner", "bio", "pronouns", "global_name"], "type": "string" }, "description": "List of profile fields to clear" } }, "required": ["fields"] }, "AdminUserPremiumFlagsUpdateRequest": { "type": "object", "properties": { "add_flags": { "default": [], "description": "Premium flags to add", "maxItems": 64, "type": "array", "items": { "description": "A single premium flag value to add or remove", "allOf": [{"$ref": "#/components/schemas/PremiumFlags"}] } }, "remove_flags": { "default": [], "description": "Premium flags to remove", "maxItems": 64, "type": "array", "items": { "description": "A single premium flag value to add or remove", "allOf": [{"$ref": "#/components/schemas/PremiumFlags"}] } } } }, "AdminUserPhoneVerificationRequest": { "type": "object", "properties": { "has_verified_phone": { "type": "boolean", "description": "Whether the user should be treated as having completed phone verification" } }, "required": ["has_verified_phone"] }, "DeleteAllUserMessagesResponse": { "type": "object", "properties": { "success": {"type": "boolean", "enum": [true]}, "dry_run": {"type": "boolean"}, "channel_count": {"$ref": "#/components/schemas/Int32Type"}, "message_count": {"$ref": "#/components/schemas/Int32Type"}, "job_id": {"type": "string"} }, "required": ["success", "dry_run", "channel_count", "message_count"], "additionalProperties": false }, "AdminUserMessageShredRequest": { "type": "object", "properties": { "entries": { "minItems": 1, "maxItems": 1000, "type": "array", "items": { "type": "object", "properties": { "channel_id": {"$ref": "#/components/schemas/SnowflakeType"}, "message_id": {"$ref": "#/components/schemas/SnowflakeType"} }, "required": ["channel_id", "message_id"] } } }, "required": ["entries"] }, "MessageShredResponse": { "type": "object", "properties": { "success": {"type": "boolean", "enum": [true]}, "job_id": {"type": "string"}, "requested": {"type": "integer", "minimum": 0, "maximum": 9007199254740991} }, "required": ["success", "job_id"], "additionalProperties": false }, "ListUserGuildsResponse": { "type": "object", "properties": {"guilds": {"type": "array", "items": {"$ref": "#/components/schemas/GuildAdminResponse"}}}, "required": ["guilds"], "additionalProperties": false }, "AdminUserFlagsUpdateRequest": { "type": "object", "properties": { "add_flags": { "default": [], "description": "User flags to add", "maxItems": 64, "type": "array", "items": { "description": "A single user flag value to add or remove", "allOf": [{"$ref": "#/components/schemas/UserFlags"}] } }, "remove_flags": { "default": [], "description": "User flags to remove", "maxItems": 64, "type": "array", "items": { "description": "A single user flag value to add or remove", "allOf": [{"$ref": "#/components/schemas/UserFlags"}] } } } }, "AdminUserEmailUpdateRequest": { "type": "object", "properties": { "email": { "description": "New email address for the user", "allOf": [{"$ref": "#/components/schemas/EmailType"}] } }, "required": ["email"] }, "AdminUserDmChannelType": { "description": "Kind of direct message channel to list", "x-enumNames": ["DM", "GROUP_DM"], "x-enumDescriptions": ["One-to-one direct message channels", "Group direct message channels"], "enum": ["dm", "group_dm"], "type": "string" }, "AdminUserDmChannelListResponse": { "anyOf": [ { "type": "object", "properties": { "channels": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "channel_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "channel_type": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}]}, "channel_nsfw": {"nullable": true, "type": "boolean"}, "guild_nsfw_level": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/NSFWLevel"}]}, "recipient_ids": { "maxItems": 100, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"} }, "recipients": { "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "username": {"type": "string"}, "discriminator": {"type": "string"}, "global_name": {"nullable": true, "type": "string"}, "avatar": {"nullable": true, "type": "string"} }, "required": ["id", "username", "discriminator", "global_name", "avatar"], "additionalProperties": false } }, "last_message_id": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "is_open": {"type": "boolean"}, "name": {"nullable": true, "type": "string"}, "icon": {"nullable": true, "type": "string"}, "owner_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]} }, "required": [ "channel_id", "channel_type", "channel_nsfw", "guild_nsfw_level", "recipient_ids", "recipients", "last_message_id", "is_open", "name", "icon", "owner_id" ], "additionalProperties": false } } }, "required": ["channels"], "additionalProperties": false }, { "type": "object", "properties": { "channels": { "maxItems": 500, "type": "array", "items": { "type": "object", "properties": { "channel_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "channel_type": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}]}, "channel_nsfw": {"nullable": true, "type": "boolean"}, "guild_nsfw_level": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/NSFWLevel"}]}, "recipient_ids": { "maxItems": 100, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"} }, "recipients": { "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "username": {"type": "string"}, "discriminator": {"type": "string"}, "global_name": {"nullable": true, "type": "string"}, "avatar": {"nullable": true, "type": "string"} }, "required": ["id", "username", "discriminator", "global_name", "avatar"], "additionalProperties": false } }, "last_message_id": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "is_open": {"type": "boolean"}, "name": {"nullable": true, "type": "string"}, "icon": {"nullable": true, "type": "string"}, "owner_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]} }, "required": [ "channel_id", "channel_type", "channel_nsfw", "guild_nsfw_level", "recipient_ids", "recipients", "last_message_id", "is_open", "name", "icon", "owner_id" ], "additionalProperties": false } } }, "required": ["channels"], "additionalProperties": false } ] }, "AdminUserDeletionScheduleRequest": { "type": "object", "properties": { "reason_code": { "description": "Code indicating the reason for deletion", "allOf": [{"$ref": "#/components/schemas/DeletionReasonCode"}] }, "public_reason": {"description": "Public-facing reason for the deletion", "type": "string"}, "days_until_deletion": { "default": 60, "description": "Number of days until the account is deleted", "type": "integer", "minimum": 1, "maximum": 365 } }, "required": ["reason_code"] }, "AdminUserDobUpdateRequest": { "type": "object", "properties": {"date_of_birth": {"description": "New date of birth in YYYY-MM-DD format", "type": "string"}}, "required": ["date_of_birth"] }, "ListUserChangeLogResponseSchema": { "type": "object", "properties": { "entries": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "event_id": {"type": "string"}, "field": {"type": "string"}, "old_value": {"nullable": true, "type": "string"}, "new_value": {"nullable": true, "type": "string"}, "reason": {"nullable": true, "type": "string"}, "actor_user_id": {"nullable": true, "type": "string"}, "event_at": {"type": "string"} }, "required": ["event_id", "field", "old_value", "new_value", "reason", "actor_user_id", "event_at"], "additionalProperties": false } }, "next_page_token": {"nullable": true, "type": "string"} }, "required": ["entries", "next_page_token"], "additionalProperties": false }, "AdminUserBotStatusRequest": { "type": "object", "properties": {"bot": {"type": "boolean", "description": "Whether the user should be marked as a bot"}}, "required": ["bot"] }, "AdminUserBanRequest": { "type": "object", "properties": { "duration_hours": { "type": "integer", "minimum": 0, "maximum": 8760, "description": "Duration of the ban in hours. Use 0 for a permanent ban (until manually unbanned)." }, "reason": {"description": "Reason for the temporary ban", "type": "string"} }, "required": ["duration_hours"] }, "BanUserAvatarRequest": { "type": "object", "properties": {"reason": {"type": "string"}, "notes": {"type": "string"}} }, "BanUserAvatarResponseSchema": { "type": "object", "properties": {"hash_short": {"type": "string", "minLength": 1, "maxLength": 16}}, "required": ["hash_short"], "additionalProperties": false }, "AdminArchiveCreateRequest": { "type": "object", "properties": { "include_attachments": { "default": false, "description": "Whether to include attachment binaries in the archive", "type": "boolean" } } }, "AdminArchiveResponseSchema": { "type": "object", "properties": { "archive_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "subject_type": {"allOf": [{"$ref": "#/components/schemas/ArchiveSubjectTypeSchema"}]}, "subject_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "requested_by": {"$ref": "#/components/schemas/SnowflakeStringType"}, "requested_at": {"type": "string"}, "started_at": {"nullable": true, "type": "string"}, "completed_at": {"nullable": true, "type": "string"}, "failed_at": {"nullable": true, "type": "string"}, "file_size": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 64}, "progress_percent": {"type": "number"}, "progress_step": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 256}, "error_message": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 4000}, "download_url_expires_at": {"nullable": true, "type": "string"}, "expires_at": {"nullable": true, "type": "string"} }, "required": [ "archive_id", "subject_type", "subject_id", "requested_by", "requested_at", "started_at", "completed_at", "failed_at", "file_size", "progress_percent", "progress_step", "error_message", "download_url_expires_at", "expires_at" ], "additionalProperties": false }, "ListApplicationsResponse": { "type": "object", "properties": { "applications": {"type": "array", "items": {"$ref": "#/components/schemas/ApplicationAdminResponse"}} }, "required": ["applications"], "additionalProperties": false }, "AdminUserAclsRequest": { "type": "object", "properties": { "acls": { "maxItems": 112, "type": "array", "items": {"$ref": "#/components/schemas/AdminAclType"}, "description": "List of access control permissions to assign" } }, "required": ["acls"] }, "LookupUserResponse": { "type": "object", "properties": {"users": {"type": "array", "items": {"$ref": "#/components/schemas/UserAdminResponseSchema"}}}, "required": ["users"], "additionalProperties": false }, "AdminUsersMeResponse": { "type": "object", "properties": {"user": {"$ref": "#/components/schemas/UserAdminResponseSchema"}}, "required": ["user"], "additionalProperties": false }, "SnowflakeStringType": {"type": "string", "pattern": "^(0|[1-9][0-9]*)$", "format": "snowflake"}, "SearchUsersResponse": { "type": "object", "properties": { "users": {"type": "array", "items": {"$ref": "#/components/schemas/UserAdminResponseSchema"}}, "total": {"type": "number"} }, "required": ["users", "total"], "additionalProperties": false }, "HeapSnapshotResponse": {"type": "string", "format": "binary", "description": "V8 heap snapshot file"}, "SendSystemDmRequest": { "type": "object", "properties": { "content": { "type": "string", "minLength": 1, "maxLength": 4000, "description": "Message content to send to each recipient" }, "user_ids": { "minItems": 1, "maxItems": 10000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"}, "description": "Recipient user IDs. Each receives the same content as a system DM." } }, "required": ["content", "user_ids"] }, "SendSystemDmResponse": { "type": "object", "properties": { "recipient_count": { "description": "Number of recipients the worker job was queued to deliver to", "allOf": [{"$ref": "#/components/schemas/Int32Type"}] } }, "required": ["recipient_count"], "additionalProperties": false }, "RefreshSearchIndexRequest": { "type": "object", "properties": { "guild_id": { "description": "Specific guild ID to reindex", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "user_id": { "description": "Specific user ID to reindex", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] } } }, "RefreshSearchIndexResponse": { "type": "object", "properties": {"success": {"type": "boolean", "enum": [true]}, "job_id": {"type": "string"}}, "required": ["success", "job_id"], "additionalProperties": false }, "IndexRefreshStatusResponse": { "anyOf": [ { "type": "object", "properties": {"status": {"type": "string", "enum": ["not_found"], "description": "Job was not found"}}, "required": ["status"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "description": "Current status of the index refresh job", "x-enumNames": ["in_progress", "completed", "failed"], "x-enumDescriptions": [ "Index refresh is currently in progress", "Index refresh completed successfully", "Index refresh failed" ], "enum": ["in_progress", "completed", "failed"], "type": "string" }, "index_type": {"type": "string", "description": "Type of index being refreshed"}, "total": {"description": "Total number of items to index", "type": "number"}, "indexed": {"description": "Number of items indexed so far", "type": "number"}, "started_at": {"description": "ISO 8601 timestamp when the job started", "type": "string"}, "completed_at": {"description": "ISO 8601 timestamp when the job completed", "type": "string"}, "failed_at": {"description": "ISO 8601 timestamp when the job failed", "type": "string"}, "error": {"description": "Error message if the job failed", "type": "string"} }, "required": ["status", "index_type"], "additionalProperties": false } ] }, "UpdateReportRequest": { "type": "object", "properties": { "status": {"type": "string", "enum": ["resolved"], "description": "The status to move the report to"}, "public_comment": {"description": "Public comment to include with the resolution", "type": "string"} }, "required": ["status"] }, "ResolveReportResponse": { "type": "object", "properties": { "report_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "status": {"allOf": [{"$ref": "#/components/schemas/ReportStatus"}]}, "resolved_at": {"nullable": true, "type": "string"}, "public_comment": {"nullable": true, "type": "string"} }, "required": ["report_id", "status", "resolved_at", "public_comment"], "additionalProperties": false }, "ReportAdminResponseSchema": { "type": "object", "properties": { "report_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "reporter_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "reporter_tag": {"nullable": true, "type": "string"}, "reporter_username": {"nullable": true, "type": "string"}, "reporter_global_name": {"nullable": true, "type": "string"}, "reporter_discriminator": {"nullable": true, "type": "string"}, "reporter_email": {"nullable": true, "type": "string"}, "reporter_full_legal_name": {"nullable": true, "type": "string"}, "reporter_country_of_residence": {"nullable": true, "type": "string"}, "reported_at": {"type": "string"}, "status": {"allOf": [{"$ref": "#/components/schemas/ReportStatus"}]}, "report_type": {"allOf": [{"$ref": "#/components/schemas/ReportType"}]}, "category": {"nullable": true, "type": "string"}, "additional_info": {"nullable": true, "type": "string"}, "reported_user_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "reported_user_tag": {"nullable": true, "type": "string"}, "reported_user_username": {"nullable": true, "type": "string"}, "reported_user_global_name": {"nullable": true, "type": "string"}, "reported_user_discriminator": {"nullable": true, "type": "string"}, "reported_user_avatar_hash": {"nullable": true, "type": "string"}, "reported_guild_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "reported_guild_name": {"nullable": true, "type": "string"}, "reported_guild_icon_hash": {"nullable": true, "type": "string"}, "reported_message_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "reported_channel_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "reported_channel_name": {"nullable": true, "type": "string"}, "reported_channel_nsfw": {"nullable": true, "type": "boolean"}, "reported_guild_invite_code": {"nullable": true, "type": "string"}, "reported_guild_nsfw_level": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/NSFWLevel"}]}, "reported_guild_nsfw": {"nullable": true, "type": "boolean"}, "reported_guild_content_warning_level": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/ContentWarningLevel"}] }, "reported_guild_content_warning_text": {"nullable": true, "type": "string", "maxLength": 200}, "reported_channel_nsfw_override": {"nullable": true, "type": "boolean"}, "reported_channel_content_warning_level": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/ContentWarningLevel"}] }, "reported_channel_content_warning_text": {"nullable": true, "type": "string", "maxLength": 200}, "reported_channel_effective_nsfw": {"nullable": true, "type": "boolean"}, "reported_channel_effective_content_warning_level": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/ContentWarningLevel"}] }, "reported_channel_effective_content_warning_text": {"nullable": true, "type": "string", "maxLength": 200}, "resolved_at": {"nullable": true, "type": "string"}, "resolved_by_admin_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "public_comment": {"nullable": true, "type": "string"}, "mutual_dm_channel_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "message_context": { "type": "array", "items": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "channel_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "channel_nsfw": {"nullable": true, "type": "boolean"}, "channel_content_warning_level": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/ContentWarningLevel"}] }, "channel_content_warning_text": {"nullable": true, "type": "string", "maxLength": 200}, "guild_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "guild_nsfw_level": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/NSFWLevel"}]}, "guild_nsfw": {"nullable": true, "type": "boolean"}, "guild_content_warning_level": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/ContentWarningLevel"}] }, "guild_content_warning_text": {"nullable": true, "type": "string", "maxLength": 200}, "content": {"type": "string"}, "timestamp": {"type": "string"}, "attachments": { "type": "array", "items": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "filename": {"type": "string", "minLength": 1, "maxLength": 256}, "url": {"type": "string", "minLength": 1, "maxLength": 2048}, "nsfw": {"nullable": true, "type": "boolean"}, "content_type": {"nullable": true, "type": "string"}, "width": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}]}, "height": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}]}, "size": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/NonNegativeSafeIntegerType"}] }, "ncmec_status": { "description": "NCMEC submission status", "x-enumNames": ["not_submitted", "submitting", "submitted", "failed"], "x-enumDescriptions": [ "Report has not been submitted to NCMEC", "Report submission to NCMEC is in progress", "Report has been submitted to NCMEC", "Report submission to NCMEC failed" ], "enum": ["not_submitted", "submitting", "submitted", "failed"], "type": "string" }, "ncmec_report_id": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 256}, "ncmec_failure_reason": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 4000} }, "required": [ "id", "filename", "url", "nsfw", "content_type", "width", "height", "ncmec_status", "ncmec_report_id", "ncmec_failure_reason" ], "additionalProperties": false } }, "author_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "author_username": {"type": "string"}, "author_global_name": {"nullable": true, "type": "string"}, "author_discriminator": {"type": "string"}, "author_avatar": {"nullable": true, "type": "string"}, "user_prior_ncmec_report_ids": { "maxItems": 100, "type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 256} } }, "required": [ "id", "channel_id", "channel_nsfw", "guild_id", "guild_nsfw_level", "content", "timestamp", "attachments", "author_id", "author_username", "author_global_name", "author_discriminator", "author_avatar" ], "additionalProperties": false } }, "message_responses": {"type": "array", "items": {"$ref": "#/components/schemas/MessageResponseSchema"}} }, "required": [ "report_id", "reporter_id", "reporter_tag", "reporter_username", "reporter_global_name", "reporter_discriminator", "reporter_email", "reporter_full_legal_name", "reporter_country_of_residence", "reported_at", "status", "report_type", "category", "additional_info", "reported_user_id", "reported_user_tag", "reported_user_username", "reported_user_global_name", "reported_user_discriminator", "reported_user_avatar_hash", "reported_guild_id", "reported_guild_name", "reported_guild_icon_hash", "reported_message_id", "reported_channel_id", "reported_channel_name", "reported_channel_nsfw", "reported_guild_invite_code", "reported_guild_nsfw_level", "resolved_at", "resolved_by_admin_id", "public_comment" ], "additionalProperties": false }, "AdminReportListResponse": { "type": "object", "properties": { "reports": {"type": "array", "items": {"$ref": "#/components/schemas/ReportAdminResponseSchema"}}, "total": {"type": "number"}, "offset": {"type": "number"}, "limit": {"type": "number"} }, "required": ["reports", "total", "offset", "limit"], "additionalProperties": false }, "MessageShredStatusResponse": { "anyOf": [ { "type": "object", "properties": {"status": {"type": "string", "enum": ["not_found"]}}, "required": ["status"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "description": "Current message shred job status", "x-enumNames": ["in_progress", "completed", "failed"], "x-enumDescriptions": [ "Shredding is currently running", "Shredding completed successfully", "Shredding failed" ], "enum": ["in_progress", "completed", "failed"], "type": "string" }, "requested": {"$ref": "#/components/schemas/Int32Type"}, "total": {"$ref": "#/components/schemas/Int32Type"}, "processed": {"$ref": "#/components/schemas/Int32Type"}, "skipped": {"$ref": "#/components/schemas/Int32Type"}, "started_at": {"type": "string"}, "completed_at": {"type": "string"}, "failed_at": {"type": "string"}, "error": {"type": "string", "minLength": 1, "maxLength": 4000} }, "required": ["status", "requested", "total", "processed", "skipped"], "additionalProperties": false } ] }, "ReportAttachmentToNcmecRequest": { "type": "object", "properties": { "channel_id": {"$ref": "#/components/schemas/SnowflakeType"}, "message_id": {"$ref": "#/components/schemas/SnowflakeType"}, "attachment_id": {"$ref": "#/components/schemas/SnowflakeType"}, "filename": {"type": "string", "minLength": 1, "maxLength": 255}, "source_report_id": {"allOf": [{"$ref": "#/components/schemas/SnowflakeType"}]}, "reporter_full_name": {"type": "string", "minLength": 1, "maxLength": 200}, "confirmed_viewed": {"type": "boolean", "enum": [true]} }, "required": ["channel_id", "message_id", "attachment_id", "filename", "reporter_full_name", "confirmed_viewed"] }, "NcmecAttachmentSubmitResultResponse": { "type": "object", "properties": { "success": {"type": "boolean", "enum": [true]}, "ncmec_report_id": {"type": "string", "minLength": 1, "maxLength": 256}, "audit_log_reason": {"type": "string", "minLength": 1, "maxLength": 4000} }, "required": ["success", "ncmec_report_id", "audit_log_reason"], "additionalProperties": false }, "AdminMessageSearchResponse": { "anyOf": [ { "type": "object", "properties": { "messages": { "maxItems": 100, "type": "array", "items": {"$ref": "#/components/schemas/AdminMessageSchema"} }, "message_responses": { "maxItems": 100, "type": "array", "items": {"$ref": "#/components/schemas/MessageResponseSchema"} }, "total": {"type": "integer", "minimum": 0, "maximum": 9007199254740991} }, "required": ["messages", "total"], "additionalProperties": false }, {"$ref": "#/components/schemas/LookupMessageResponse"} ] }, "LimitConfigUpdateRequest": { "type": "object", "properties": { "limit_config": { "type": "object", "properties": { "traitDefinitions": { "description": "Trait definitions used by rules", "type": "array", "items": {"type": "string"} }, "rules": { "type": "array", "items": { "type": "object", "properties": { "id": {"type": "string", "minLength": 1, "description": "Unique rule identifier"}, "filters": { "description": "Optional filters that scope the rule", "type": "object", "properties": { "traits": { "description": "Trait filters that must match for the rule to apply", "type": "array", "items": {"type": "string"} }, "guildFeatures": { "description": "Guild feature flags required for the rule to apply", "type": "array", "items": {"type": "string"} } } }, "limits": { "type": "object", "additionalProperties": {"$ref": "#/components/schemas/NonNegativeSafeIntegerType"}, "description": "Per-limit key values" } }, "required": ["id", "limits"] }, "description": "Limit rules" } }, "required": ["rules"], "description": "New limit configuration snapshot" } }, "required": ["limit_config"] }, "LimitConfigGetResponse": { "type": "object", "properties": { "limit_config": { "type": "object", "properties": { "traitDefinitions": {"type": "array", "items": {"type": "string"}}, "rules": { "type": "array", "items": { "type": "object", "properties": { "id": {"type": "string", "minLength": 1, "description": "Unique rule identifier"}, "filters": { "description": "Optional filters that scope the rule", "type": "object", "properties": { "traits": { "description": "Trait filters that must match for the rule to apply", "type": "array", "items": {"type": "string"} }, "guildFeatures": { "description": "Guild feature flags required for the rule to apply", "type": "array", "items": {"type": "string"} } }, "additionalProperties": false }, "limits": { "type": "object", "additionalProperties": {"$ref": "#/components/schemas/NonNegativeSafeIntegerType"}, "description": "Per-limit key values" }, "modifiedFields": {"type": "array", "items": {"type": "string"}} }, "required": ["id", "limits"], "additionalProperties": false } } }, "required": ["traitDefinitions", "rules"], "additionalProperties": false }, "limit_config_json": {"type": "string"}, "self_hosted": {"type": "boolean"}, "defaults": { "type": "object", "additionalProperties": {"type": "object", "additionalProperties": {"type": "number"}} }, "metadata": { "type": "object", "additionalProperties": { "type": "object", "properties": { "key": {"type": "string"}, "label": {"type": "string"}, "description": {"type": "string"}, "category": {"type": "string"}, "scope": {"type": "string"}, "isToggle": {"type": "boolean"}, "unit": {"type": "string", "enum": ["bytes", "count"]}, "min": {"type": "number"}, "max": {"type": "number"} }, "required": ["key", "label", "description", "category", "scope", "isToggle"], "additionalProperties": false }, "required": [ "avatar_max_size", "emoji_max_size", "feature_animated_avatar", "feature_animated_banner", "feature_custom_discriminator", "feature_custom_notification_sounds", "feature_early_access", "feature_global_expressions", "feature_higher_video_quality", "feature_per_guild_profiles", "feature_voice_entrance_sounds", "max_attachments_per_message", "max_bio_length", "max_bookmarks", "max_channels_per_category", "max_custom_backgrounds", "max_embeds_per_message", "max_favorite_meme_tags", "max_favorite_memes", "max_group_dm_recipients", "max_group_dms_per_user", "max_guild_channels", "max_guild_emojis", "max_guild_emojis_animated_more", "max_guild_emojis_animated", "max_guild_emojis_static_more", "max_guild_emojis_static", "max_guild_invites", "max_guild_members", "max_guild_roles", "max_guild_stickers_more", "max_guild_stickers", "max_guilds", "max_attachment_file_size", "max_message_length", "max_private_channels_per_user", "max_reactions_per_message", "max_relationships", "max_users_per_message_reaction", "max_voice_message_duration", "max_webhooks_per_channel", "max_webhooks_per_guild", "sticker_max_size" ] }, "categories": {"type": "object", "additionalProperties": {"type": "string"}}, "limit_keys": {"type": "array", "items": {"type": "string"}}, "bounds": { "type": "object", "additionalProperties": { "type": "object", "properties": {"min": {"type": "number"}, "max": {"type": "number"}}, "required": ["min", "max"], "additionalProperties": false } } }, "required": [ "limit_config", "limit_config_json", "self_hosted", "defaults", "metadata", "categories", "limit_keys" ], "additionalProperties": false }, "CancelJobResponseSchema": { "type": "object", "properties": { "cancelled": { "type": "boolean", "description": "True if a cancel request was recorded; false if the job was already terminal." } }, "required": ["cancelled"], "additionalProperties": false }, "GetJobResponseSchema": { "type": "object", "properties": {"job": {"$ref": "#/components/schemas/JobLedgerEntrySchema"}}, "required": ["job"], "additionalProperties": false }, "ActiveJobsResponseSchema": { "type": "object", "properties": {"jobs": {"type": "array", "items": {"$ref": "#/components/schemas/JobLedgerEntrySchema"}}}, "required": ["jobs"], "additionalProperties": false }, "ListJobsResponseSchema": { "type": "object", "properties": { "jobs": {"type": "array", "items": {"$ref": "#/components/schemas/JobLedgerEntrySchema"}}, "next_cursor": { "nullable": true, "type": "object", "properties": { "bucket_day": {"type": "string"}, "created_at": {"type": "string"}, "job_id": {"$ref": "#/components/schemas/SnowflakeStringType"} }, "required": ["bucket_day", "created_at", "job_id"], "additionalProperties": false } }, "required": ["jobs", "next_cursor"], "additionalProperties": false }, "InstanceConfigResponse": { "type": "object", "properties": { "sso": { "type": "object", "properties": { "enabled": {"type": "boolean"}, "enforced": {"type": "boolean"}, "display_name": {"nullable": true, "type": "string"}, "issuer": {"nullable": true, "type": "string"}, "authorization_url": {"nullable": true, "type": "string"}, "token_url": {"nullable": true, "type": "string"}, "userinfo_url": {"nullable": true, "type": "string"}, "jwks_url": {"nullable": true, "type": "string"}, "client_id": {"nullable": true, "type": "string"}, "client_secret_set": {"type": "boolean"}, "scope": {"nullable": true, "type": "string"}, "allowed_domains": {"maxItems": 100, "type": "array", "items": {"type": "string"}}, "auto_provision": {"type": "boolean"}, "redirect_uri": {"nullable": true, "type": "string"} }, "required": [ "enabled", "enforced", "display_name", "issuer", "authorization_url", "token_url", "userinfo_url", "jwks_url", "client_id", "client_secret_set", "scope", "allowed_domains", "auto_provision", "redirect_uri" ], "additionalProperties": false }, "gateway_rollout": {"$ref": "#/components/schemas/GatewayRolloutConfigResponse"}, "voice_noise_suppression": {"$ref": "#/components/schemas/VoiceNoiseSuppressionConfigResponse"}, "experiment_delivery": {"$ref": "#/components/schemas/ExperimentDeliveryConfigResponse"}, "message_hover_tracking": {"$ref": "#/components/schemas/MessageHoverTrackingConfigResponse"}, "message_keyboard_focus": {"$ref": "#/components/schemas/MessageKeyboardFocusConfigResponse"}, "registration": { "type": "object", "properties": { "mode": {"allOf": [{"$ref": "#/components/schemas/InstanceRegistrationModeSchema"}]}, "admin_registration_urls_enabled": {"type": "boolean"}, "urls": { "type": "array", "items": { "type": "object", "properties": { "id": {"type": "string", "minLength": 1, "maxLength": 128}, "label": {"nullable": true, "type": "string"}, "created_by_user_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "expires_at": { "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "max_uses": {"nullable": true, "type": "integer", "minimum": 1, "maximum": 9007199254740991}, "use_count": {"type": "integer", "minimum": 0, "maximum": 9007199254740991}, "revoked_at": { "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "approval_required": {"type": "boolean"}, "last_used_at": { "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "last_used_by_user_id": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] } }, "required": [ "id", "label", "created_by_user_id", "created_at", "expires_at", "max_uses", "use_count", "revoked_at", "approval_required", "last_used_at", "last_used_by_user_id" ], "additionalProperties": false } }, "pending_registrations": { "type": "array", "items": { "type": "object", "properties": { "user_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "username": {"type": "string"}, "discriminator": {"type": "integer", "minimum": 0, "maximum": 9999}, "global_name": {"nullable": true, "type": "string"}, "email": {"nullable": true, "type": "string"}, "requested_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "registration_url_id": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 128}, "client_ip": {"nullable": true, "type": "string"} }, "required": [ "user_id", "username", "discriminator", "global_name", "email", "requested_at", "registration_url_id", "client_ip" ], "additionalProperties": false } } }, "required": ["mode", "admin_registration_urls_enabled", "urls", "pending_registrations"], "additionalProperties": false }, "self_hosted": {"type": "boolean"}, "app_public": { "type": "object", "properties": { "branding": { "type": "object", "properties": { "product_name": {"type": "string"}, "icon_url": {"nullable": true, "type": "string"}, "symbol_url": {"nullable": true, "type": "string"}, "logo_url": {"nullable": true, "type": "string"}, "wordmark_url": {"nullable": true, "type": "string"}, "favicon_url": {"nullable": true, "type": "string"}, "theme_color": {"nullable": true, "type": "string"} }, "required": [ "product_name", "icon_url", "symbol_url", "logo_url", "wordmark_url", "favicon_url", "theme_color" ], "additionalProperties": false }, "setup": { "type": "object", "properties": {"configured": {"type": "boolean"}}, "required": ["configured"], "additionalProperties": false }, "legal": { "type": "object", "properties": { "terms_url": {"nullable": true, "type": "string"}, "privacy_url": {"nullable": true, "type": "string"} }, "required": ["terms_url", "privacy_url"], "additionalProperties": false }, "registration": { "type": "object", "properties": {"collect_date_of_birth": {"type": "boolean"}}, "required": ["collect_date_of_birth"], "additionalProperties": false } }, "required": ["branding", "setup", "legal", "registration"], "additionalProperties": false }, "policy": { "type": "object", "properties": { "single_community_enabled": {"type": "boolean"}, "single_community_guild_id": {"nullable": true, "type": "string"}, "direct_messages_disabled": {"type": "boolean"}, "direct_messages_locked": {"type": "boolean"}, "premium_mode": {"type": "string", "enum": ["mirror", "everyone"]}, "services": { "type": "object", "properties": { "gif_enabled": {"nullable": true, "type": "boolean"}, "youtube_enabled": {"nullable": true, "type": "boolean"}, "bluesky_enabled": {"nullable": true, "type": "boolean"} }, "required": ["gif_enabled", "youtube_enabled", "bluesky_enabled"], "additionalProperties": false }, "services_resolved": { "type": "object", "properties": { "gif_enabled": {"type": "boolean"}, "youtube_enabled": {"type": "boolean"}, "bluesky_enabled": {"type": "boolean"} }, "required": ["gif_enabled", "youtube_enabled", "bluesky_enabled"], "additionalProperties": false }, "services_available": { "type": "object", "properties": { "gif": {"type": "boolean"}, "youtube": {"type": "boolean"}, "bluesky": {"type": "boolean"} }, "required": ["gif", "youtube", "bluesky"], "additionalProperties": false }, "deferred_phone_gate": { "type": "object", "properties": { "enabled": {"type": "boolean"}, "window_hours": {"type": "number"}, "member_threshold": {"type": "number"} }, "required": ["enabled", "window_hours", "member_threshold"], "additionalProperties": false } }, "required": [ "single_community_enabled", "single_community_guild_id", "direct_messages_disabled", "direct_messages_locked", "premium_mode", "services", "services_resolved", "services_available", "deferred_phone_gate" ], "additionalProperties": false }, "integrations": { "type": "object", "properties": { "gif": { "type": "object", "properties": {"klipy_api_key_set": {"type": "boolean"}, "effective_available": {"type": "boolean"}}, "required": ["klipy_api_key_set", "effective_available"], "additionalProperties": false }, "youtube": { "type": "object", "properties": {"api_key_set": {"type": "boolean"}, "effective_available": {"type": "boolean"}}, "required": ["api_key_set", "effective_available"], "additionalProperties": false }, "captcha": { "type": "object", "properties": { "provider": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/InstanceCaptchaProviderSchema"}] }, "effective_provider": {"$ref": "#/components/schemas/InstanceCaptchaProviderSchema"}, "hcaptcha_site_key": {"nullable": true, "type": "string"}, "hcaptcha_secret_key_set": {"type": "boolean"}, "turnstile_site_key": {"nullable": true, "type": "string"}, "turnstile_secret_key_set": {"type": "boolean"}, "effective_enabled": {"type": "boolean"} }, "required": [ "provider", "effective_provider", "hcaptcha_site_key", "hcaptcha_secret_key_set", "turnstile_site_key", "turnstile_secret_key_set", "effective_enabled" ], "additionalProperties": false }, "email": { "type": "object", "properties": { "enabled": {"nullable": true, "type": "boolean"}, "effective_enabled": {"type": "boolean"}, "provider": {"nullable": true, "type": "string", "enum": ["smtp", "none"]}, "effective_provider": {"type": "string", "enum": ["smtp", "none"]}, "from_email": {"nullable": true, "type": "string"}, "from_name": {"nullable": true, "type": "string"}, "smtp": { "type": "object", "properties": { "host": {"nullable": true, "type": "string"}, "port": {"nullable": true, "type": "integer", "minimum": 1, "maximum": 65535}, "username": {"nullable": true, "type": "string"}, "password_set": {"type": "boolean"}, "secure": {"nullable": true, "type": "boolean"} }, "required": ["host", "port", "username", "password_set", "secure"], "additionalProperties": false }, "disable_new_ip_authorization": {"type": "boolean"}, "effective_disable_new_ip_authorization": {"type": "boolean"} }, "required": [ "enabled", "effective_enabled", "provider", "effective_provider", "from_email", "from_name", "smtp", "disable_new_ip_authorization", "effective_disable_new_ip_authorization" ], "additionalProperties": false }, "bluesky": { "type": "object", "properties": { "enabled": {"nullable": true, "type": "boolean"}, "effective_enabled": {"type": "boolean"}, "client_name": {"nullable": true, "type": "string"}, "client_uri": {"nullable": true, "type": "string"}, "logo_uri": {"nullable": true, "type": "string"}, "tos_uri": {"nullable": true, "type": "string"}, "policy_uri": {"nullable": true, "type": "string"}, "key_count": {"type": "integer", "minimum": 0, "maximum": 9007199254740991} }, "required": [ "enabled", "effective_enabled", "client_name", "client_uri", "logo_uri", "tos_uri", "policy_uri", "key_count" ], "additionalProperties": false } }, "required": ["gif", "youtube", "captcha", "email", "bluesky"], "additionalProperties": false }, "media": { "type": "object", "properties": { "attachment_decay": { "type": "object", "properties": { "enabled": {"nullable": true, "type": "boolean"}, "min_size_mb": {"nullable": true, "type": "number", "minimum": 0, "exclusiveMinimum": true}, "max_size_mb": {"nullable": true, "type": "number", "minimum": 0, "exclusiveMinimum": true}, "max_eligible_size_mb": {"nullable": true, "type": "number", "minimum": 0, "exclusiveMinimum": true}, "min_lifetime_days": { "nullable": true, "type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991 }, "max_lifetime_days": { "nullable": true, "type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991 }, "curve": {"nullable": true, "type": "number", "minimum": 0, "maximum": 1}, "renew_threshold_days": { "nullable": true, "type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991 }, "renew_window_days": { "nullable": true, "type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991 }, "effective": { "type": "object", "properties": { "enabled": {"type": "boolean"}, "min_size_mb": {"type": "number", "minimum": 0, "exclusiveMinimum": true}, "max_size_mb": {"type": "number", "minimum": 0, "exclusiveMinimum": true}, "max_eligible_size_mb": {"type": "number", "minimum": 0, "exclusiveMinimum": true}, "min_lifetime_days": {"type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991}, "max_lifetime_days": {"type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991}, "curve": {"type": "number", "minimum": 0, "maximum": 1}, "renew_threshold_days": { "type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991 }, "renew_window_days": {"type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991} }, "required": [ "enabled", "min_size_mb", "max_size_mb", "max_eligible_size_mb", "min_lifetime_days", "max_lifetime_days", "curve", "renew_threshold_days", "renew_window_days" ], "additionalProperties": false } }, "required": [ "enabled", "min_size_mb", "max_size_mb", "max_eligible_size_mb", "min_lifetime_days", "max_lifetime_days", "curve", "renew_threshold_days", "renew_window_days", "effective" ], "additionalProperties": false } }, "required": ["attachment_decay"], "additionalProperties": false } }, "required": [ "sso", "gateway_rollout", "voice_noise_suppression", "experiment_delivery", "message_hover_tracking", "message_keyboard_focus", "registration", "self_hosted", "app_public", "policy", "integrations", "media" ], "additionalProperties": false }, "CreateRegistrationUrlRequest": { "type": "object", "properties": { "label": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 120}, "expires_at": { "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "max_uses": {"nullable": true, "type": "integer", "minimum": 1, "maximum": 1000000}, "approval_required": {"default": false, "type": "boolean"} } }, "CreateRegistrationUrlResponse": { "type": "object", "properties": { "registration_url": { "type": "object", "properties": { "id": {"type": "string", "minLength": 1, "maxLength": 128}, "label": {"nullable": true, "type": "string"}, "created_by_user_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "expires_at": { "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "max_uses": {"nullable": true, "type": "integer", "minimum": 1, "maximum": 9007199254740991}, "use_count": {"type": "integer", "minimum": 0, "maximum": 9007199254740991}, "revoked_at": { "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "approval_required": {"type": "boolean"}, "last_used_at": { "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "last_used_by_user_id": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] } }, "required": [ "id", "label", "created_by_user_id", "created_at", "expires_at", "max_uses", "use_count", "revoked_at", "approval_required", "last_used_at", "last_used_by_user_id" ], "additionalProperties": false }, "code": {"type": "string", "minLength": 1, "maxLength": 256}, "url": {"type": "string"} }, "required": ["registration_url", "code", "url"], "additionalProperties": false }, "PendingRegistrationActionRequest": { "type": "object", "properties": { "status": { "description": "Pending registration decision", "x-enumNames": ["approved", "rejected"], "x-enumDescriptions": ["The account may log in", "The account is blocked from logging in"], "enum": ["approved", "rejected"], "type": "string" } }, "required": ["status"] }, "InstanceEmailSmtpTestRequest": { "type": "object", "properties": { "host": {"type": "string", "minLength": 1, "maxLength": 255}, "port": {"type": "integer", "minimum": 1, "maximum": 65535}, "username": {"type": "string", "minLength": 1, "maxLength": 320}, "password": {"type": "string", "minLength": 1, "maxLength": 4096}, "secure": {"default": true, "type": "boolean"} }, "required": ["host", "port", "username", "password"] }, "InstanceEmailSmtpTestResponse": { "type": "object", "properties": {"ok": {"type": "boolean"}, "error": {"nullable": true, "type": "string"}}, "required": ["ok", "error"], "additionalProperties": false }, "BrandingAssetUploadRequest": { "type": "object", "properties": { "kind": {"type": "string", "enum": ["icon", "symbol", "logo", "wordmark", "favicon"]}, "image": {"nullable": true, "type": "string", "maxLength": 16000000} }, "required": ["kind"] }, "InstanceConfigUpdateRequest": { "type": "object", "properties": { "gateway_rollout": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/GatewayRolloutConfigUpdateRequest"}] }, "voice_noise_suppression": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/VoiceNoiseSuppressionConfigUpdateRequest"}] }, "experiment_delivery": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/ExperimentDeliveryConfigUpdateRequest"}] }, "message_hover_tracking": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/MessageHoverTrackingConfigUpdateRequest"}] }, "message_keyboard_focus": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/MessageKeyboardFocusConfigUpdateRequest"}] }, "registration": { "nullable": true, "type": "object", "properties": { "mode": {"allOf": [{"$ref": "#/components/schemas/InstanceRegistrationModeSchema"}]}, "admin_registration_urls_enabled": {"type": "boolean"} } }, "sso": { "nullable": true, "type": "object", "properties": { "enabled": {"type": "boolean"}, "enforced": {"type": "boolean"}, "display_name": {"nullable": true, "type": "string"}, "issuer": {"nullable": true, "type": "string"}, "authorization_url": {"nullable": true, "type": "string"}, "token_url": {"nullable": true, "type": "string"}, "userinfo_url": {"nullable": true, "type": "string"}, "jwks_url": {"nullable": true, "type": "string"}, "client_id": {"nullable": true, "type": "string"}, "client_secret": {"nullable": true, "type": "string"}, "scope": {"nullable": true, "type": "string"}, "allowed_domains": {"maxItems": 100, "type": "array", "items": {"type": "string"}}, "auto_provision": {"type": "boolean"} } }, "app_public": { "nullable": true, "type": "object", "properties": { "branding": { "nullable": true, "type": "object", "properties": { "product_name": {"type": "string", "minLength": 1, "maxLength": 80}, "icon_url": {"nullable": true, "type": "string", "maxLength": 2048}, "symbol_url": {"nullable": true, "type": "string", "maxLength": 2048}, "logo_url": {"nullable": true, "type": "string", "maxLength": 2048}, "wordmark_url": {"nullable": true, "type": "string", "maxLength": 2048}, "favicon_url": {"nullable": true, "type": "string", "maxLength": 2048}, "theme_color": {"nullable": true, "type": "string", "maxLength": 64} } }, "setup": {"nullable": true, "type": "object", "properties": {"configured": {"type": "boolean"}}}, "legal": { "nullable": true, "type": "object", "properties": { "terms_url": {"nullable": true, "type": "string", "maxLength": 2048}, "privacy_url": {"nullable": true, "type": "string", "maxLength": 2048} } }, "registration": { "nullable": true, "type": "object", "properties": {"collect_date_of_birth": {"type": "boolean"}} } } }, "integrations": { "nullable": true, "type": "object", "properties": { "gif": { "nullable": true, "type": "object", "properties": {"klipy_api_key": {"nullable": true, "type": "string", "maxLength": 4096}} }, "youtube": { "nullable": true, "type": "object", "properties": {"api_key": {"nullable": true, "type": "string", "maxLength": 4096}} }, "captcha": { "nullable": true, "type": "object", "properties": { "provider": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/InstanceCaptchaProviderSchema"}] }, "hcaptcha_site_key": {"nullable": true, "type": "string", "maxLength": 4096}, "hcaptcha_secret_key": {"nullable": true, "type": "string", "maxLength": 4096}, "turnstile_site_key": {"nullable": true, "type": "string", "maxLength": 4096}, "turnstile_secret_key": {"nullable": true, "type": "string", "maxLength": 4096} } }, "email": { "nullable": true, "type": "object", "properties": { "enabled": {"nullable": true, "type": "boolean"}, "provider": {"nullable": true, "type": "string", "enum": ["smtp", "none"]}, "from_email": {"nullable": true, "type": "string", "maxLength": 320}, "from_name": {"nullable": true, "type": "string", "maxLength": 120}, "smtp": { "nullable": true, "type": "object", "properties": { "host": {"nullable": true, "type": "string", "maxLength": 255}, "port": {"nullable": true, "type": "integer", "minimum": 1, "maximum": 65535}, "username": {"nullable": true, "type": "string", "maxLength": 320}, "password": {"nullable": true, "type": "string", "maxLength": 4096}, "secure": {"nullable": true, "type": "boolean"} } }, "disable_new_ip_authorization": {"nullable": true, "type": "boolean"} } }, "bluesky": { "nullable": true, "type": "object", "properties": { "enabled": {"nullable": true, "type": "boolean"}, "client_name": {"nullable": true, "type": "string", "maxLength": 120}, "client_uri": {"nullable": true, "type": "string", "maxLength": 2048}, "logo_uri": {"nullable": true, "type": "string", "maxLength": 2048}, "tos_uri": {"nullable": true, "type": "string", "maxLength": 2048}, "policy_uri": {"nullable": true, "type": "string", "maxLength": 2048}, "keys": { "maxItems": 8, "type": "array", "items": { "type": "object", "properties": { "kid": {"type": "string", "minLength": 1, "maxLength": 255}, "private_key": {"nullable": true, "type": "string", "maxLength": 10000} }, "required": ["kid"] } } } } } }, "media": { "nullable": true, "type": "object", "properties": { "attachment_decay": { "nullable": true, "type": "object", "properties": { "enabled": {"nullable": true, "type": "boolean"}, "min_size_mb": {"nullable": true, "type": "number", "minimum": 0, "exclusiveMinimum": true}, "max_size_mb": {"nullable": true, "type": "number", "minimum": 0, "exclusiveMinimum": true}, "max_eligible_size_mb": {"nullable": true, "type": "number", "minimum": 0, "exclusiveMinimum": true}, "min_lifetime_days": { "nullable": true, "type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991 }, "max_lifetime_days": { "nullable": true, "type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991 }, "curve": {"nullable": true, "type": "number", "minimum": 0, "maximum": 1}, "renew_threshold_days": { "nullable": true, "type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991 }, "renew_window_days": { "nullable": true, "type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991 } } } } }, "policy": { "nullable": true, "type": "object", "properties": { "single_community_enabled": {"type": "boolean"}, "single_community_name": {"type": "string", "minLength": 1, "maxLength": 100}, "direct_messages_disabled": {"type": "boolean"}, "direct_messages_locked": {"type": "boolean", "enum": [false]}, "premium_mode": {"type": "string", "enum": ["mirror", "everyone"]}, "services": { "nullable": true, "type": "object", "properties": { "gif_enabled": {"nullable": true, "type": "boolean"}, "youtube_enabled": {"nullable": true, "type": "boolean"}, "bluesky_enabled": {"nullable": true, "type": "boolean"} } }, "deferred_phone_gate": { "nullable": true, "type": "object", "properties": { "enabled": {"type": "boolean"}, "window_hours": {"type": "number", "minimum": 0, "exclusiveMinimum": true, "maximum": 8760}, "member_threshold": {"type": "integer", "exclusiveMinimum": true, "maximum": 1000000} } } } } } }, "ListGuildStickersResponse": { "type": "object", "properties": { "guild_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "stickers": { "type": "array", "items": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "name": {"type": "string", "minLength": 1, "maxLength": 100}, "animated": {"type": "boolean"}, "creator_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "media_url": {"type": "string", "minLength": 1, "maxLength": 2048} }, "required": ["id", "name", "animated", "creator_id", "media_url"], "additionalProperties": false } } }, "required": ["guild_id", "stickers"], "additionalProperties": false }, "SuccessResponse": { "type": "object", "properties": { "success": {"type": "boolean", "enum": [true], "description": "Whether the operation succeeded"} }, "required": ["success"], "additionalProperties": false }, "ListGuildMembersResponse": { "type": "object", "properties": { "members": {"type": "array", "items": {"allOf": [{"$ref": "#/components/schemas/GuildMemberResponse"}]}}, "total": {"$ref": "#/components/schemas/Int32Type"}, "limit": {"$ref": "#/components/schemas/Int32Type"}, "offset": {"$ref": "#/components/schemas/Int32Type"} }, "required": ["members", "total", "limit", "offset"], "additionalProperties": false }, "ListGuildEmojisResponse": { "type": "object", "properties": { "guild_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "emojis": { "type": "array", "items": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "name": {"type": "string", "minLength": 1, "maxLength": 100}, "animated": {"type": "boolean"}, "creator_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "media_url": {"type": "string", "minLength": 1, "maxLength": 2048} }, "required": ["id", "name", "animated", "creator_id", "media_url"], "additionalProperties": false } } }, "required": ["guild_id", "emojis"], "additionalProperties": false }, "BanGuildMemberBody": { "type": "object", "properties": { "delete_message_days": { "default": 0, "description": "Number of days of messages to delete from the banned user (0-7). Deprecated in favor of delete_message_seconds.", "type": "integer", "minimum": 0, "maximum": 7 }, "delete_message_seconds": { "description": "Number of seconds of messages to delete for the banned user (0-604800, default 0)", "type": "integer", "minimum": 0, "maximum": 604800 }, "reason": {"description": "The reason for the ban (max 512 characters)", "nullable": true, "type": "string"}, "ban_duration_seconds": { "description": "Duration of the ban in seconds (0 for permanent, or between 60 and 63072000 seconds for a temporary ban)", "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } } }, "AuditLogActionTypeInput": { "description": "The type of action that occurred", "type": "integer", "minimum": 0, "maximum": 2147483647, "format": "int32", "x-enumNames": [ "GUILD_UPDATE", "CHANNEL_CREATE", "CHANNEL_UPDATE", "CHANNEL_DELETE", "CHANNEL_OVERWRITE_CREATE", "CHANNEL_OVERWRITE_UPDATE", "CHANNEL_OVERWRITE_DELETE", "MEMBER_KICK", "MEMBER_PRUNE", "MEMBER_BAN_ADD", "MEMBER_BAN_REMOVE", "MEMBER_UPDATE", "MEMBER_ROLE_UPDATE", "MEMBER_MOVE", "MEMBER_DISCONNECT", "BOT_ADD", "ROLE_CREATE", "ROLE_UPDATE", "ROLE_DELETE", "INVITE_CREATE", "INVITE_UPDATE", "INVITE_DELETE", "WEBHOOK_CREATE", "WEBHOOK_UPDATE", "WEBHOOK_DELETE", "EMOJI_CREATE", "EMOJI_UPDATE", "EMOJI_DELETE", "STICKER_CREATE", "STICKER_UPDATE", "STICKER_DELETE", "MESSAGE_DELETE", "MESSAGE_BULK_DELETE", "MESSAGE_PIN", "MESSAGE_UNPIN" ], "x-enumDescriptions": [ "Guild settings were updated", "Channel was created", "Channel was updated", "Channel was deleted", "Permission overwrite was created", "Permission overwrite was updated", "Permission overwrite was deleted", "Member was kicked", "Members were pruned", "Member was banned", "Member ban was removed", "Member was updated", "Member roles were updated", "Member was moved to a different voice channel", "Member was disconnected from a voice channel", "Bot was added to the guild", "Role was created", "Role was updated", "Role was deleted", "Invite was created", "Invite was updated", "Invite was deleted", "Webhook was created", "Webhook was updated", "Webhook was deleted", "Emoji was created", "Emoji was updated", "Emoji was deleted", "Sticker was created", "Sticker was updated", "Sticker was deleted", "Message was deleted", "Messages were bulk deleted", "Message was pinned", "Message was unpinned" ], "enum": [ 1, 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 40, 41, 42, 50, 51, 52, 60, 61, 62, 90, 91, 92, 72, 73, 74, 75 ] }, "Int32Type": {"type": "integer", "minimum": 0, "maximum": 2147483647, "format": "int32"}, "ListGuildAuditLogsResponse": { "type": "object", "properties": { "audit_log_entries": { "type": "array", "items": {"$ref": "#/components/schemas/GuildAuditLogEntryResponse"}, "description": "Array of audit log entries" }, "users": { "type": "array", "items": {"$ref": "#/components/schemas/UserPartialResponse"}, "description": "Users referenced in the audit log entries" }, "webhooks": { "type": "array", "items": {"$ref": "#/components/schemas/AuditLogWebhookResponse"}, "description": "Webhooks referenced in the audit log entries" } }, "required": ["audit_log_entries", "users", "webhooks"], "additionalProperties": false }, "PurgeGuildAssetsRequest": { "type": "object", "properties": { "ids": { "maxItems": 100, "type": "array", "items": {"type": "string"}, "description": "List of asset IDs to purge" } }, "required": ["ids"] }, "PurgeGuildAssetsResponseSchema": { "type": "object", "properties": { "processed": {"type": "array", "items": {"$ref": "#/components/schemas/PurgeGuildAssetResultSchema"}}, "errors": {"type": "array", "items": {"$ref": "#/components/schemas/PurgeGuildAssetErrorSchema"}} }, "required": ["processed", "errors"], "additionalProperties": false }, "UpdateGuildRequest": { "type": "object", "properties": { "verification_level": { "description": "Required verification level for guild members", "allOf": [{"$ref": "#/components/schemas/GuildVerificationLevelInput"}] }, "mfa_level": { "description": "Required MFA level for moderators", "allOf": [{"$ref": "#/components/schemas/GuildMFALevelInput"}] }, "nsfw_level": { "description": "NSFW content level for the guild", "allOf": [{"$ref": "#/components/schemas/NSFWLevelInput"}] }, "nsfw": {"description": "Whether the guild is flagged as adult content", "type": "boolean"}, "content_warning_level": { "description": "Content warning level for the guild", "allOf": [{"$ref": "#/components/schemas/ContentWarningLevelInput"}] }, "content_warning_text": { "description": "Custom content warning text shown before entry", "nullable": true, "type": "string" }, "explicit_content_filter": { "description": "Explicit content filter level", "allOf": [{"$ref": "#/components/schemas/GuildExplicitContentFilterInput"}] }, "default_message_notifications": { "description": "Default notification setting for new members", "allOf": [{"$ref": "#/components/schemas/DefaultMessageNotificationsInput"}] }, "disabled_operations": {"allOf": [{"$ref": "#/components/schemas/GuildOperations"}]}, "name": {"description": "New name for the guild", "type": "string"}, "vanity_url_code": { "nullable": true, "description": "New vanity URL code, or null to remove", "type": "string" }, "new_owner_id": { "description": "ID of the user to transfer ownership to", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "add_features": { "maxItems": 100, "type": "array", "items": {"allOf": [{"$ref": "#/components/schemas/GuildFeatureSchema"}]} }, "remove_features": { "maxItems": 100, "type": "array", "items": {"allOf": [{"$ref": "#/components/schemas/GuildFeatureSchema"}]} }, "fields": { "maxItems": 10, "type": "array", "items": { "description": "Guild image field that can be cleared", "x-enumNames": ["icon", "banner", "splash", "embed_splash"], "x-enumDescriptions": [ "Guild icon image", "Guild banner image", "Guild invite splash image", "Guild embedded invite splash image" ], "enum": ["icon", "banner", "splash", "embed_splash"], "type": "string" }, "description": "List of guild image fields to clear" } } }, "GuildUpdateResponse": { "type": "object", "properties": { "guild": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "name": {"type": "string", "minLength": 1, "maxLength": 100}, "features": { "maxItems": 100, "type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 256} }, "owner_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "icon": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 256}, "banner": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 256}, "member_count": {"$ref": "#/components/schemas/Int32Type"}, "nsfw_level": {"allOf": [{"$ref": "#/components/schemas/NSFWLevel"}]}, "nsfw": {"type": "boolean"}, "content_warning_level": {"allOf": [{"$ref": "#/components/schemas/ContentWarningLevel"}]}, "content_warning_text": {"nullable": true, "type": "string", "maxLength": 200} }, "required": ["id", "name", "features", "owner_id", "icon", "banner", "member_count"], "additionalProperties": false } }, "required": ["guild"], "additionalProperties": false }, "LookupGuildResponse": { "type": "object", "properties": { "guild": { "nullable": true, "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "owner_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "owner_username": {"nullable": true, "type": "string"}, "owner_global_name": {"nullable": true, "type": "string"}, "owner_discriminator": {"nullable": true, "type": "string"}, "name": {"type": "string", "minLength": 1, "maxLength": 100}, "vanity_url_code": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 256}, "icon": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 256}, "banner": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 256}, "splash": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 256}, "embed_splash": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 256}, "features": { "maxItems": 100, "type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 256} }, "verification_level": {"allOf": [{"$ref": "#/components/schemas/GuildVerificationLevel"}]}, "mfa_level": {"allOf": [{"$ref": "#/components/schemas/GuildMFALevel"}]}, "nsfw_level": {"allOf": [{"$ref": "#/components/schemas/NSFWLevel"}]}, "nsfw": {"type": "boolean"}, "content_warning_level": {"allOf": [{"$ref": "#/components/schemas/ContentWarningLevel"}]}, "content_warning_text": {"nullable": true, "type": "string", "maxLength": 200}, "explicit_content_filter": {"allOf": [{"$ref": "#/components/schemas/GuildExplicitContentFilter"}]}, "default_message_notifications": { "allOf": [{"$ref": "#/components/schemas/DefaultMessageNotifications"}] }, "afk_channel_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "afk_timeout": {"$ref": "#/components/schemas/Int32Type"}, "system_channel_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "system_channel_flags": {"allOf": [{"$ref": "#/components/schemas/SystemChannelFlags"}]}, "rules_channel_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "disabled_operations": {"$ref": "#/components/schemas/Int32Type"}, "member_count": {"$ref": "#/components/schemas/Int32Type"}, "channels": { "type": "array", "items": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "name": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 100}, "type": {"allOf": [{"$ref": "#/components/schemas/ChannelType"}]}, "position": {"$ref": "#/components/schemas/Int32Type"}, "parent_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "nsfw": {"nullable": true, "type": "boolean"}, "nsfw_override": {"nullable": true, "type": "boolean"}, "content_warning_level": {"allOf": [{"$ref": "#/components/schemas/ContentWarningLevel"}]}, "content_warning_text": {"nullable": true, "type": "string", "maxLength": 200}, "url": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 2048} }, "required": ["id", "name", "type", "position", "parent_id", "nsfw", "url"], "additionalProperties": false } }, "roles": { "type": "array", "items": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "name": {"type": "string", "minLength": 1, "maxLength": 100}, "color": {"$ref": "#/components/schemas/Int32Type"}, "position": {"$ref": "#/components/schemas/Int32Type"}, "permissions": { "description": "The role permissions bitfield", "allOf": [{"$ref": "#/components/schemas/Permissions"}] }, "hoist": {"type": "boolean"}, "mentionable": {"type": "boolean"} }, "required": ["id", "name", "color", "position", "permissions", "hoist", "mentionable"], "additionalProperties": false } } }, "required": [ "id", "owner_id", "owner_username", "owner_global_name", "owner_discriminator", "name", "vanity_url_code", "icon", "banner", "splash", "embed_splash", "features", "verification_level", "mfa_level", "nsfw_level", "explicit_content_filter", "default_message_notifications", "afk_channel_id", "afk_timeout", "system_channel_id", "system_channel_flags", "rules_channel_id", "disabled_operations", "member_count", "channels", "roles" ], "additionalProperties": false } }, "required": ["guild"], "additionalProperties": false }, "SearchGuildsResponse": { "type": "object", "properties": { "guilds": {"type": "array", "items": {"$ref": "#/components/schemas/GuildAdminResponse"}}, "total": {"type": "number"} }, "required": ["guilds", "total"], "additionalProperties": false }, "GenerateGiftCodesRequest": { "type": "object", "properties": { "count": {"type": "integer", "minimum": 1, "maximum": 100, "description": "Number of gift codes to generate"}, "duration_type": { "description": "Duration unit for the generated gift codes", "allOf": [{"$ref": "#/components/schemas/GiftCodeDurationTypeSchema"}] }, "duration_quantity": { "type": "integer", "minimum": 1, "maximum": 3650, "description": "Duration quantity for the selected unit. Lifetime gifts are not supported." } }, "required": ["count", "duration_type", "duration_quantity"] }, "CodesResponse": { "type": "object", "properties": {"codes": {"type": "array", "items": {"type": "string"}}}, "required": ["codes"], "additionalProperties": false }, "GatewayVoiceStateCountsResponse": { "type": "object", "properties": { "total_voice_states": {"$ref": "#/components/schemas/Int32Type"}, "regions": { "maxItems": 1000, "type": "array", "items": { "type": "object", "properties": { "region_id": {"type": "string", "minLength": 1, "maxLength": 64}, "voice_state_count": {"$ref": "#/components/schemas/Int32Type"} }, "required": ["region_id", "voice_state_count"], "additionalProperties": false } }, "servers": { "maxItems": 5000, "type": "array", "items": { "type": "object", "properties": { "server_id": {"type": "string", "minLength": 1, "maxLength": 128}, "voice_state_count": {"$ref": "#/components/schemas/Int32Type"} }, "required": ["server_id", "voice_state_count"], "additionalProperties": false } } }, "required": ["total_voice_states", "regions", "servers"], "additionalProperties": false }, "NodeStatsResponse": { "type": "object", "properties": { "status": {"type": "string", "minLength": 1, "maxLength": 256}, "sessions": {"$ref": "#/components/schemas/Int32Type"}, "guilds": {"$ref": "#/components/schemas/Int32Type"}, "presences": {"$ref": "#/components/schemas/Int32Type"}, "calls": {"$ref": "#/components/schemas/Int32Type"}, "memory": { "type": "object", "properties": { "total": {"$ref": "#/components/schemas/Int64StringType"}, "processes": {"$ref": "#/components/schemas/Int64StringType"}, "system": {"$ref": "#/components/schemas/Int64StringType"} }, "required": ["total", "processes", "system"], "additionalProperties": false }, "process_count": {"$ref": "#/components/schemas/Int32Type"}, "process_limit": {"$ref": "#/components/schemas/Int32Type"}, "uptime_seconds": {"$ref": "#/components/schemas/Int32Type"}, "node_count": {"$ref": "#/components/schemas/Int32Type"}, "nodes": { "maxItems": 1000, "type": "array", "items": { "type": "object", "properties": { "node_id": {"type": "string", "minLength": 1, "maxLength": 256}, "status": {"type": "string", "minLength": 1, "maxLength": 256}, "sessions": {"$ref": "#/components/schemas/Int32Type"}, "guilds": {"$ref": "#/components/schemas/Int32Type"}, "presences": {"$ref": "#/components/schemas/Int32Type"}, "calls": {"$ref": "#/components/schemas/Int32Type"}, "memory": { "type": "object", "properties": { "total": {"$ref": "#/components/schemas/Int64StringType"}, "processes": {"$ref": "#/components/schemas/Int64StringType"}, "system": {"$ref": "#/components/schemas/Int64StringType"} }, "required": ["total", "processes", "system"], "additionalProperties": false }, "process_count": {"$ref": "#/components/schemas/Int32Type"}, "process_limit": {"$ref": "#/components/schemas/Int32Type"}, "uptime_seconds": {"$ref": "#/components/schemas/Int32Type"}, "cluster_metrics": { "type": "object", "properties": { "gateway_cluster_member_count": {"$ref": "#/components/schemas/Int32Type"}, "gateway_cluster_discovery_resolve_failures_total": {"$ref": "#/components/schemas/Int32Type"}, "gateway_cluster_membership_transitions_total": { "type": "object", "properties": { "up": {"$ref": "#/components/schemas/Int32Type"}, "down": {"$ref": "#/components/schemas/Int32Type"} }, "required": ["up", "down"], "additionalProperties": false }, "gateway_node_router_owner_resolutions_total": { "type": "object", "properties": { "self": {"$ref": "#/components/schemas/Int32Type"}, "peer": {"$ref": "#/components/schemas/Int32Type"} }, "required": ["self", "peer"], "additionalProperties": false } }, "required": [ "gateway_cluster_member_count", "gateway_cluster_discovery_resolve_failures_total", "gateway_cluster_membership_transitions_total", "gateway_node_router_owner_resolutions_total" ], "additionalProperties": false } }, "required": [ "node_id", "status", "sessions", "guilds", "presences", "calls", "memory", "process_count", "process_limit", "uptime_seconds" ], "additionalProperties": false } } }, "required": [ "status", "sessions", "guilds", "presences", "calls", "memory", "process_count", "process_limit", "uptime_seconds", "node_count", "nodes" ], "additionalProperties": false }, "ReloadGuildsRequest": { "type": "object", "properties": { "guild_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"}, "description": "List of guild IDs to reload" } }, "required": ["guild_ids"] }, "ReloadAllGuildsResponse": { "type": "object", "properties": {"count": {"$ref": "#/components/schemas/Int32Type"}}, "required": ["count"], "additionalProperties": false }, "GuildMemoryStatsResponse": { "type": "object", "properties": { "guilds": { "maxItems": 1000, "type": "array", "items": { "type": "object", "properties": { "node_id": {"type": "string", "minLength": 1, "maxLength": 256}, "guild_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "guild_name": {"type": "string", "minLength": 1, "maxLength": 100}, "guild_icon": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 256}, "nsfw_level": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/NSFWLevel"}]}, "memory": {"$ref": "#/components/schemas/Int64StringType"}, "member_count": {"$ref": "#/components/schemas/Int32Type"}, "session_count": {"$ref": "#/components/schemas/Int32Type"}, "presence_count": {"$ref": "#/components/schemas/Int32Type"} }, "required": [ "node_id", "guild_id", "guild_name", "guild_icon", "nsfw_level", "memory", "member_count", "session_count", "presence_count" ], "additionalProperties": false } } }, "required": ["guilds"], "additionalProperties": false }, "DiscoveryAdminRemoveRequest": { "type": "object", "properties": {"reason": {"type": "string", "minLength": 1, "maxLength": 500, "description": "Removal reason"}}, "required": ["reason"] }, "DiscoveryApplicationResponse": { "type": "object", "properties": { "guild_id": {"description": "Guild ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "guild_nsfw_level": { "description": "NSFW level of the guild", "nullable": true, "allOf": [{"$ref": "#/components/schemas/NSFWLevel"}] }, "status": {"type": "string", "description": "Application status"}, "description": {"type": "string", "description": "Discovery description"}, "category_type": {"type": "number", "description": "Discovery category type"}, "primary_language": {"description": "Primary community language", "nullable": true, "type": "string"}, "custom_tags": {"type": "array", "items": {"type": "string"}, "description": "Custom discovery tags"}, "applied_at": {"type": "string", "description": "Application timestamp"}, "reviewed_at": {"description": "Review timestamp", "nullable": true, "type": "string"}, "review_reason": {"description": "Review reason (approval/rejection)", "nullable": true, "type": "string"}, "removed_at": {"description": "Removal timestamp", "nullable": true, "type": "string"}, "removal_reason": {"description": "Removal reason", "nullable": true, "type": "string"} }, "required": ["guild_id", "status", "description", "category_type", "custom_tags", "applied_at"], "additionalProperties": false }, "DiscoveryApplicationPatchRequest": { "type": "object", "properties": { "description": { "description": "Updated description for discovery listing", "type": "string", "minLength": 10, "maxLength": 300 }, "category_type": { "description": "Updated discovery category type", "type": "integer", "minimum": 0, "maximum": 8 }, "primary_language": {"type": "string", "description": "Primary community language (BCP-47 code)"}, "custom_tags": { "maxItems": 10, "type": "array", "items": {"type": "string", "minLength": 2, "maxLength": 30}, "description": "Up to 10 custom discovery tags" } } }, "DiscoveryAdminListingBulkCategoryRequest": { "type": "object", "properties": { "guild_ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"}, "description": "Listed guilds to move" }, "category_type": { "type": "integer", "minimum": 0, "maximum": 8, "description": "Discovery category to file every named guild under" } }, "required": ["guild_ids", "category_type"] }, "DiscoveryAdminListingBulkCategoryResponse": { "type": "object", "properties": { "updated": {"type": "number", "description": "Number of listings moved"}, "failed_guild_ids": { "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"}, "description": "Guilds that could not be moved" } }, "required": ["updated", "failed_guild_ids"], "additionalProperties": false }, "DiscoveryAdminListedGuildListResponse": { "type": "array", "items": {"$ref": "#/components/schemas/DiscoveryAdminListedGuildResponse"} }, "DiscoveryCategoryListResponse": { "type": "array", "items": {"$ref": "#/components/schemas/DiscoveryCategoryResponse"} }, "DiscoveryAdminApplicationUpdateRequest": { "oneOf": [ { "type": "object", "properties": { "reason": {"allOf": [{"$ref": "#/components/schemas/DiscoveryReviewReason"}]}, "status": {"type": "string", "enum": ["approved"], "description": "Approve the pending application"} }, "required": ["status"] }, { "type": "object", "properties": { "reason": {"allOf": [{"$ref": "#/components/schemas/DiscoveryRejectionReason"}]}, "status": {"type": "string", "enum": ["rejected"], "description": "Reject the pending application"} }, "required": ["reason", "status"] } ] }, "DiscoveryAdminPendingApplicationListResponse": { "type": "array", "items": {"$ref": "#/components/schemas/DiscoveryAdminPendingApplicationResponse"} }, "DeleteMessageResponse": { "type": "object", "properties": {"success": {"type": "boolean", "enum": [true]}}, "required": ["success"], "additionalProperties": false }, "LookupMessageResponse": { "type": "object", "properties": { "messages": {"maxItems": 100, "type": "array", "items": {"$ref": "#/components/schemas/AdminMessageSchema"}}, "message_responses": { "maxItems": 100, "type": "array", "items": {"$ref": "#/components/schemas/MessageResponseSchema"} }, "message_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]} }, "required": ["messages", "message_id"], "additionalProperties": false }, "BrowseChannelResponse": { "type": "object", "properties": { "messages": {"maxItems": 100, "type": "array", "items": {"$ref": "#/components/schemas/AdminMessageSchema"}}, "message_responses": { "maxItems": 100, "type": "array", "items": {"$ref": "#/components/schemas/MessageResponseSchema"} }, "has_more": {"type": "boolean"} }, "required": ["messages", "has_more"], "additionalProperties": false }, "AdminBulkJobCreateRequest": { "oneOf": [ { "type": "object", "properties": { "user_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"}, "description": "List of user IDs to update" }, "add_flags": { "default": [], "description": "User flags to add to all specified users", "maxItems": 64, "type": "array", "items": { "description": "A single user flag value to add or remove", "allOf": [{"$ref": "#/components/schemas/UserFlags"}] } }, "remove_flags": { "default": [], "description": "User flags to remove from all specified users", "maxItems": 64, "type": "array", "items": { "description": "A single user flag value to add or remove", "allOf": [{"$ref": "#/components/schemas/UserFlags"}] } }, "task": { "type": "string", "enum": ["update_user_flags"], "description": "Adds and removes account flags on every targeted user" } }, "required": ["user_ids", "task"] }, { "type": "object", "properties": { "user_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"}, "description": "List of user IDs to update" }, "add_flags": { "default": [], "description": "Suspicious activity flag names to add to all specified users", "maxItems": 32, "type": "array", "items": {"type": "string"} }, "remove_flags": { "default": [], "description": "Suspicious activity flag names to remove from all specified users", "maxItems": 32, "type": "array", "items": {"type": "string"} }, "task": { "type": "string", "enum": ["update_suspicious_activity_flags"], "description": "Adds and removes verification requirements on every targeted user" } }, "required": ["user_ids", "task"] }, { "type": "object", "properties": { "guild_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"}, "description": "List of guild IDs to update" }, "add_features": { "default": [], "description": "Guild features to add to all specified guilds", "maxItems": 100, "type": "array", "items": {"allOf": [{"$ref": "#/components/schemas/GuildFeatureSchema"}]} }, "remove_features": { "default": [], "description": "Guild features to remove from all specified guilds", "maxItems": 100, "type": "array", "items": {"allOf": [{"$ref": "#/components/schemas/GuildFeatureSchema"}]} }, "task": { "type": "string", "enum": ["update_guild_features"], "description": "Adds and removes features on every targeted guild" } }, "required": ["guild_ids", "task"] }, { "type": "object", "properties": { "guild_id": { "description": "ID of the guild to add members to", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] }, "user_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"}, "description": "List of user IDs to add as members" }, "task": { "type": "string", "enum": ["add_guild_members"], "description": "Adds every targeted user to one guild" } }, "required": ["guild_id", "user_ids", "task"] }, { "type": "object", "properties": { "reason_code": { "description": "Code indicating the reason for deletion", "allOf": [{"$ref": "#/components/schemas/DeletionReasonCode"}] }, "public_reason": {"description": "Public-facing reason for the deletion", "type": "string"}, "days_until_deletion": { "default": 60, "description": "Number of days until the accounts are deleted", "type": "integer", "minimum": 1, "maximum": 365 }, "user_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"}, "description": "List of user IDs to schedule deletion for" }, "task": { "type": "string", "enum": ["schedule_user_deletion"], "description": "Schedules account deletion for every targeted user" } }, "required": ["reason_code", "user_ids", "task"] }, { "type": "object", "properties": { "user_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeType"}, "description": "List of user IDs whose messages will be deleted" }, "task": { "type": "string", "enum": ["delete_user_messages"], "description": "Deletes every message authored by each targeted user, across all channels" } }, "required": ["user_ids", "task"] } ] }, "BulkJobResponse": { "type": "object", "properties": {"job_id": {"$ref": "#/components/schemas/SnowflakeStringType"}}, "required": ["job_id"], "additionalProperties": false }, "AdminBlocklistListType": { "type": "string", "enum": [ "ip", "email", "email-domain-suspicious", "phrase", "url", "url-domain", "file-sha", "avatar-hash", "profile-substring" ], "description": "The blocklist an entry belongs to" }, "AdminBlocklistEntryUpdateRequest": { "anyOf": [ {"$ref": "#/components/schemas/AdminBlocklistUrlUpdateRequest"}, {"$ref": "#/components/schemas/AdminBlocklistUrlDomainUpdateRequest"}, {"$ref": "#/components/schemas/AdminBlocklistFileShaUpdateRequest"}, {"$ref": "#/components/schemas/AdminBlocklistAvatarHashUpdateRequest"}, {"$ref": "#/components/schemas/AdminBlocklistProfileSubstringUpdateRequest"} ], "description": "The stored fields to write, in the shape the blocklist named by list_type accepts" }, "BanCheckResponseSchema": { "type": "object", "properties": {"banned": {"type": "boolean"}}, "required": ["banned"], "additionalProperties": false }, "AdminBlocklistBulkDeleteRequest": { "anyOf": [ {"$ref": "#/components/schemas/CheckAvatarHashRequest"}, {"$ref": "#/components/schemas/BanProfileSubstringRequest"} ], "description": "The entries to remove, in the shape the blocklist named by list_type accepts" }, "BulkBanFileShasRequest": { "type": "object", "properties": { "sha256_list": { "minItems": 1, "maxItems": 10000, "type": "array", "items": {"type": "string"}, "description": "Array of SHA-256 hex strings to ban" } }, "required": ["sha256_list"] }, "AdminBlocklistEntryCreateRequest": { "anyOf": [ {"$ref": "#/components/schemas/BanIpRequest"}, {"$ref": "#/components/schemas/BanEmailRequest"}, {"$ref": "#/components/schemas/SuspiciousEmailDomainRequest"}, {"$ref": "#/components/schemas/BanPhraseRequest"}, {"$ref": "#/components/schemas/BanUrlRequest"}, {"$ref": "#/components/schemas/BanUrlDomainRequest"}, {"$ref": "#/components/schemas/BanFileShaRequest"}, {"$ref": "#/components/schemas/BanAvatarHashRequest"}, {"$ref": "#/components/schemas/BanProfileSubstringRequest"} ], "description": "The entry to add, in the shape the blocklist named by list_type accepts" }, "AdminBlocklistEntryListResponse": { "type": "object", "properties": { "items": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "list_type": {"allOf": [{"$ref": "#/components/schemas/AdminBlocklistListType"}]}, "value": { "description": "The canonical stored value of the entry", "type": "string", "minLength": 1, "maxLength": 2048 }, "scope": { "nullable": true, "description": "The profile field the entry is scoped to, or null when the blocklist is unscoped", "type": "string" }, "category": { "nullable": true, "description": "The category slug stored alongside the entry, or null", "type": "string" }, "severity": { "nullable": true, "description": "The stored severity, or null when the blocklist has no severity", "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "source_url": { "nullable": true, "description": "The upstream source the entry was imported from, or null", "type": "string" }, "notes": { "nullable": true, "description": "The internal notes stored alongside the entry, or null", "type": "string" }, "content_type": { "nullable": true, "description": "The MIME type hint stored alongside the entry, or null", "type": "string" }, "match_subdomains": { "nullable": true, "description": "Whether subdomains are covered by the entry, or null when the blocklist has no such flag", "type": "boolean" }, "reason": { "nullable": true, "description": "The stored reason for the entry, or null", "type": "string" }, "expires_at": { "nullable": true, "description": "ISO 8601 timestamp when the entry expires, or null", "type": "string" }, "created_at": { "nullable": true, "description": "ISO 8601 timestamp when the entry was added, or null", "type": "string" }, "created_by_user_id": { "nullable": true, "description": "The admin who added the entry, or null when unknown", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] } }, "required": [ "list_type", "value", "scope", "category", "severity", "source_url", "notes", "content_type", "match_subdomains", "reason", "expires_at", "created_at", "created_by_user_id" ], "additionalProperties": false }, "description": "The blocklist entries in this page, ordered by value" }, "has_more": { "type": "boolean", "description": "Whether another page can be fetched with the next_after cursor" }, "next_after": { "nullable": true, "description": "Cursor to send as after on the next request, or null when this is the last page", "type": "string" } }, "required": ["items", "has_more", "next_after"], "additionalProperties": false }, "AdminBlocklistTypeListResponse": { "type": "object", "properties": { "items": { "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "list_type": {"allOf": [{"$ref": "#/components/schemas/AdminBlocklistListType"}]}, "description": { "type": "string", "description": "What the blocklist matches and how matching is performed" }, "value_field": { "type": "string", "description": "The request body field that carries the entry value when adding to this blocklist" }, "fields": { "maxItems": 8, "type": "array", "items": {"type": "string"}, "description": "Fields entries of this blocklist accept beyond the value itself" }, "scoped": { "type": "boolean", "description": "Whether entries are scoped to a profile field and a scope must be supplied" }, "supports_bulk_create": { "type": "boolean", "description": "Whether PUT on the entry collection is accepted" }, "supports_bulk_delete": { "type": "boolean", "description": "Whether DELETE on the entry collection is accepted" }, "supports_update": {"type": "boolean", "description": "Whether PATCH on a single entry is accepted"} }, "required": [ "list_type", "description", "value_field", "fields", "scoped", "supports_bulk_create", "supports_bulk_delete", "supports_update" ], "additionalProperties": false }, "description": "Every blocklist exposed by this instance" } }, "required": ["items"], "additionalProperties": false }, "AdminAuditLogResponseSchema": { "type": "object", "properties": { "log_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "admin_user_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "admin_user": { "nullable": true, "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "username": {"type": "string"}, "discriminator": {"type": "string"}, "global_name": {"nullable": true, "type": "string"} }, "required": ["id", "username", "discriminator", "global_name"], "additionalProperties": false }, "target_type": {"type": "string", "minLength": 1, "maxLength": 256}, "target_id": { "type": "string", "description": "The ID of the affected entity (user, channel, role, invite code, etc.)" }, "target_user": { "nullable": true, "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "username": {"type": "string"}, "discriminator": {"type": "string"}, "global_name": {"nullable": true, "type": "string"} }, "required": ["id", "username", "discriminator", "global_name"], "additionalProperties": false }, "target_guild": { "nullable": true, "type": "object", "properties": {"id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "name": {"type": "string"}}, "required": ["id", "name"], "additionalProperties": false }, "target_channel": { "nullable": true, "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "name": {"nullable": true, "type": "string"}, "type": {"allOf": [{"$ref": "#/components/schemas/ChannelType"}]}, "guild_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]} }, "required": ["id", "name", "type", "guild_id"], "additionalProperties": false }, "related_users": { "type": "object", "additionalProperties": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "username": {"type": "string"}, "discriminator": {"type": "string"}, "global_name": {"nullable": true, "type": "string"} }, "required": ["id", "username", "discriminator", "global_name"], "additionalProperties": false } }, "related_guilds": { "type": "object", "additionalProperties": { "type": "object", "properties": {"id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "name": {"type": "string"}}, "required": ["id", "name"], "additionalProperties": false } }, "related_channels": { "type": "object", "additionalProperties": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "name": {"nullable": true, "type": "string"}, "type": {"allOf": [{"$ref": "#/components/schemas/ChannelType"}]}, "guild_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]} }, "required": ["id", "name", "type", "guild_id"], "additionalProperties": false } }, "action": {"type": "string", "minLength": 1, "maxLength": 256}, "audit_log_reason": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 4000}, "metadata": {"type": "object", "additionalProperties": {"type": "string", "maxLength": 4000}}, "created_at": {"type": "string"} }, "required": [ "log_id", "admin_user_id", "admin_user", "target_type", "target_id", "target_user", "target_guild", "target_channel", "related_users", "related_guilds", "related_channels", "action", "audit_log_reason", "metadata", "created_at" ], "additionalProperties": false }, "AuditLogsListResponseSchema": { "type": "object", "properties": { "logs": {"type": "array", "items": {"$ref": "#/components/schemas/AdminAuditLogResponseSchema"}}, "total": {"type": "number"} }, "required": ["logs", "total"], "additionalProperties": false }, "ArchiveSubjectTypeSchema": { "description": "Type of subject being archived", "x-enumNames": ["user", "guild"], "x-enumDescriptions": ["User data archive", "Guild data archive"], "enum": ["user", "guild"], "type": "string" }, "DownloadUrlResponseSchema": { "type": "object", "properties": { "downloadUrl": {"type": "string", "minLength": 1, "maxLength": 2048}, "expiresAt": {"type": "string"} }, "required": ["downloadUrl", "expiresAt"], "additionalProperties": false }, "GetArchiveResponseSchema": { "type": "object", "properties": { "archive": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/AdminArchiveResponseSchema"}]} }, "required": ["archive"], "additionalProperties": false }, "ListArchivesResponseSchema": { "type": "object", "properties": { "archives": {"type": "array", "items": {"$ref": "#/components/schemas/AdminArchiveResponseSchema"}} }, "required": ["archives"], "additionalProperties": false }, "TransferApplicationOwnershipRequest": { "type": "object", "properties": { "new_owner_id": { "description": "ID of the user to transfer ownership to", "allOf": [{"$ref": "#/components/schemas/SnowflakeType"}] } }, "required": ["new_owner_id"] }, "ApplicationUpdateResponse": { "type": "object", "properties": {"application": {"$ref": "#/components/schemas/ApplicationAdminResponse"}}, "required": ["application"], "additionalProperties": false }, "LookupApplicationResponse": { "type": "object", "properties": { "application": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/ApplicationAdminResponse"}]} }, "required": ["application"], "additionalProperties": false }, "DeleteApiKeyResponse": { "type": "object", "properties": {"success": {"type": "boolean", "enum": [true]}}, "required": ["success"], "additionalProperties": false }, "UpdateAdminApiKeyRequest": { "type": "object", "properties": { "name": { "description": "New display name for the API key", "type": "string", "minLength": 1, "maxLength": 100 }, "acls": { "description": "Replacement list of access control permissions for the key", "maxItems": 112, "type": "array", "items": {"$ref": "#/components/schemas/AdminAclType"} } } }, "ListAdminApiKeyResponse": { "type": "object", "properties": { "key_id": {"type": "string", "description": "Unique identifier for the API key"}, "name": {"type": "string", "description": "Display name for the API key"}, "created_at": {"type": "string", "description": "ISO 8601 timestamp when the key was created"}, "expires_at": { "nullable": true, "description": "ISO 8601 timestamp when the key expires, or null if no expiration", "type": "string" }, "acls": { "maxItems": 112, "type": "array", "items": {"type": "string"}, "description": "List of access control permissions for the key" }, "last_used_at": { "nullable": true, "description": "ISO 8601 timestamp when the key was last used, or null if never used", "type": "string" }, "created_by_user_id": { "description": "User ID of the admin who created this key", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] } }, "required": ["key_id", "name", "created_at", "expires_at", "acls", "last_used_at", "created_by_user_id"], "additionalProperties": false }, "AdminApiKeyListResponse": {"type": "array", "items": {"$ref": "#/components/schemas/ListAdminApiKeyResponse"}}, "CreateAdminApiKeyRequest": { "type": "object", "properties": { "name": {"type": "string", "minLength": 1, "maxLength": 100, "description": "Display name for the API key"}, "expires_in_days": { "description": "Number of days until the key expires", "type": "integer", "minimum": 1, "maximum": 365 }, "acls": { "maxItems": 112, "type": "array", "items": {"$ref": "#/components/schemas/AdminAclType"}, "description": "List of access control permissions for the key" } }, "required": ["name", "acls"] }, "CreateAdminApiKeyResponse": { "type": "object", "properties": { "key_id": {"type": "string", "description": "Unique identifier for the API key"}, "key": {"type": "string", "description": "The generated API key secret (only shown once)"}, "name": {"type": "string", "description": "Display name for the API key"}, "created_at": {"type": "string", "description": "ISO 8601 timestamp when the key was created"}, "expires_at": { "nullable": true, "description": "ISO 8601 timestamp when the key expires, or null if no expiration", "type": "string" }, "acls": { "maxItems": 112, "type": "array", "items": {"type": "string"}, "description": "List of access control permissions for the key" } }, "required": ["key_id", "key", "name", "created_at", "expires_at", "acls"], "additionalProperties": false }, "AdminAclListResponse": { "type": "object", "properties": { "acls": { "maxItems": 112, "type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 64}, "description": "Every admin access control permission the admin API recognises" } }, "required": ["acls"], "additionalProperties": false }, "AdminAclType": { "type": "string", "enum": [ "*", "acl:set:user", "admin_api_key:manage", "application:lookup", "application:list:by_owner", "application:transfer_ownership", "archive:trigger:guild", "archive:trigger:user", "archive:view_all", "asset:purge", "audit_log:view", "admin:authenticate", "jobs:view", "jobs:cancel", "ban:email:add", "ban:email:check", "ban:email:remove", "suspicious_email_domain:add", "suspicious_email_domain:check", "suspicious_email_domain:remove", "ban:phrase:add", "ban:phrase:check", "ban:phrase:remove", "ban:ip:add", "ban:ip:check", "ban:ip:remove", "ban:url:add", "ban:url:check", "ban:url:remove", "ban:url_domain:add", "ban:url_domain:check", "ban:url_domain:remove", "ban:file_sha:add", "ban:file_sha:check", "ban:file_sha:remove", "ban:avatar_hash:add", "ban:avatar_hash:check", "ban:avatar_hash:remove", "ban:profile_substring:add", "ban:profile_substring:check", "ban:profile_substring:remove", "bulk:add:guild_members", "bulk:delete:users", "bulk:delete:user_messages", "bulk:update:guild_features", "bulk:update:suspicious_activity", "bulk:update:user_flags", "csam:submit_ncmec", "discovery:remove", "discovery:review", "gateway:memory_stats", "gateway:reload_all", "gift_codes:generate", "guild:audit_log:view", "guild:ban_member", "guild:delete", "guild:force_add_member", "guild:kick_member", "guild:list:members", "guild:lookup", "guild:reload", "guild:shutdown", "guild:transfer_ownership", "guild:update:features", "guild:update:name", "guild:update:settings", "guild:update:vanity", "instance:config:update", "instance:config:view", "instance:limit_config:update", "instance:limit_config:view", "message:delete_all", "message:delete", "message:lookup", "message:shred", "report:resolve", "report:view", "report:view:reporter_pii", "system_dm:send", "system:heap_snapshot", "user:cancel:bulk_message_deletion", "user:delete", "user:disable:suspicious", "user:list:dm_channels", "user:list:guilds", "user:list:relationships", "user:list:sessions", "user:lookup", "user:remove:relationship", "user:view:contact_log", "user:view:dob", "user:view:email", "user:view:ip", "user:temp_ban", "user:update:bot_status", "user:update:dob", "user:update:email", "user:update:flags", "user:update:mfa", "user:update:phone", "user:update:profile", "user:update:suspicious_activity", "user:update:traits", "user:update:username", "voice:region:create", "voice:region:delete", "voice:region:list", "voice:region:update", "voice:server:create", "voice:server:delete", "voice:server:list", "voice:server:update" ] }, "ApplicationAdminResponse": { "type": "object", "properties": { "id": { "description": "The unique identifier for this application", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "name": { "description": "The display name of the application", "type": "string", "minLength": 1, "maxLength": 256 }, "owner_user_id": { "description": "The user ID that owns this application", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "owner_username": { "nullable": true, "description": "The username of the owner, if resolvable", "type": "string" }, "owner_global_name": { "nullable": true, "description": "The display name of the owner, if set", "type": "string" }, "owner_discriminator": { "nullable": true, "description": "The discriminator of the owner, if resolvable", "type": "string" }, "bot_user_id": { "nullable": true, "description": "The user ID of the associated bot user, if any", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "bot_username": {"nullable": true, "description": "The username of the bot user, if any", "type": "string"}, "bot_global_name": { "nullable": true, "description": "The display name of the bot user, if set", "type": "string" }, "bot_discriminator": { "nullable": true, "description": "The discriminator of the bot user, if any", "type": "string" }, "bot_is_public": {"type": "boolean", "description": "Whether the bot is publicly joinable"}, "bot_require_code_grant": { "type": "boolean", "description": "Whether an OAuth2 code grant is required for this bot" }, "oauth2_redirect_uris": { "maxItems": 10, "type": "array", "items": {"type": "string"}, "description": "Registered OAuth2 redirect URIs" }, "has_client_secret": { "type": "boolean", "description": "Whether a hashed client secret is stored for this application" }, "has_bot_token": { "type": "boolean", "description": "Whether a hashed bot token is stored for this application" }, "bot_token_preview": { "nullable": true, "description": "The preview (last few characters) of the bot token, if any", "type": "string" }, "bot_token_created_at": { "nullable": true, "description": "ISO 8601 timestamp when the bot token was created", "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "client_secret_created_at": { "nullable": true, "description": "ISO 8601 timestamp when the client secret was created", "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "version": { "description": "The optimistic locking version of the application record", "allOf": [{"$ref": "#/components/schemas/Int32Type"}] } }, "required": [ "id", "name", "owner_user_id", "owner_username", "owner_global_name", "owner_discriminator", "bot_user_id", "bot_username", "bot_global_name", "bot_discriminator", "bot_is_public", "bot_require_code_grant", "oauth2_redirect_uris", "has_client_secret", "has_bot_token", "bot_token_preview", "bot_token_created_at", "client_secret_created_at", "version" ], "additionalProperties": false }, "ChannelType": { "description": "The type of the channel", "type": "integer", "enum": [0, 1, 2, 3, 4, 998, 999], "format": "int32", "x-enumNames": [ "GUILD_TEXT", "DM", "GUILD_VOICE", "GROUP_DM", "GUILD_CATEGORY", "GUILD_LINK", "DM_PERSONAL_NOTES" ], "x-enumDescriptions": [ "A text channel within a guild", "A direct message between users", "A voice channel within a guild", "A group direct message between users", "A category that contains channels", "A link channel for external resources", "Personal notes DM channel" ] }, "BanProfileSubstringRequest": { "type": "object", "properties": { "scope": {"type": "string", "enum": ["username", "global_name", "nickname", "bio", "pronouns"]}, "substrings": {"minItems": 1, "maxItems": 1000, "type": "array", "items": {"type": "string"}}, "reason": {"type": "string"}, "notes": {"type": "string"} }, "required": ["scope", "substrings"] }, "BanAvatarHashRequest": { "type": "object", "properties": { "hashes": {"minItems": 1, "maxItems": 1000, "type": "array", "items": {"type": "string"}}, "category": {"type": "string"}, "severity": {"type": "integer", "minimum": 0, "maximum": 3}, "source_url": {"type": "string"}, "reason": {"type": "string"}, "notes": {"type": "string"} }, "required": ["hashes"] }, "BanFileShaRequest": { "type": "object", "properties": { "sha256_hex": {"description": "SHA-256 in hex", "type": "string"}, "category": {"type": "string"}, "severity": {"type": "integer", "minimum": 0, "maximum": 3}, "content_type": {"description": "Optional MIME type hint for observability", "type": "string"}, "source_url": {"type": "string"}, "notes": {"type": "string"} }, "required": ["sha256_hex"] }, "BanUrlDomainRequest": { "type": "object", "properties": { "domain": {"description": "Domain to ban (e.g. example.com)", "type": "string"}, "match_subdomains": { "default": true, "description": "If true, any subdomain rooted at this domain is also banned", "type": "boolean" }, "category": {"description": "Category / source slug (defaults to \"manual\")", "type": "string"}, "severity": { "description": "Severity: 0 allow, 1 warn, 2 block, 3 block+report (default 2)", "type": "integer", "minimum": 0, "maximum": 3 }, "source_url": {"description": "Upstream source URL if imported from a feed", "type": "string"}, "notes": {"description": "Internal notes for audit trail", "type": "string"} }, "required": ["domain"] }, "BanUrlRequest": { "type": "object", "properties": { "url": {"description": "Absolute URL to ban. Canonicalized before storage.", "type": "string"}, "category": {"description": "Category / source slug (defaults to \"manual\")", "type": "string"}, "severity": { "description": "Severity: 0 allow, 1 warn, 2 block, 3 block+report (default 2)", "type": "integer", "minimum": 0, "maximum": 3 }, "source_url": {"description": "Upstream source URL if imported from a feed", "type": "string"}, "notes": {"description": "Internal notes for audit trail", "type": "string"} }, "required": ["url"] }, "BanPhraseRequest": { "type": "object", "properties": { "phrase": { "description": "Phrase to ban. Matching is case-insensitive and also normalizes common bypass tricks such as inserted whitespace, punctuation, invisible characters, and compatibility glyphs.", "type": "string" } }, "required": ["phrase"] }, "SuspiciousEmailDomainRequest": { "type": "object", "properties": { "domain": { "type": "string", "minLength": 1, "maxLength": 253, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-.]*\\.[a-zA-Z]{2,}$", "description": "Email domain to flag as suspicious (e.g. mail.ru). Registrants from this domain will be required to verify a phone number." } }, "required": ["domain"] }, "BanEmailRequest": { "type": "object", "properties": { "email": {"description": "Email address to ban", "allOf": [{"$ref": "#/components/schemas/EmailType"}]} }, "required": ["email"] }, "BanIpRequest": { "type": "object", "properties": {"ip": {"description": "IPv4/IPv6 address or CIDR range to ban", "type": "string"}}, "required": ["ip"] }, "EmailType": {"type": "string"}, "CheckAvatarHashRequest": { "type": "object", "properties": {"hashes": {"minItems": 1, "maxItems": 1000, "type": "array", "items": {"type": "string"}}}, "required": ["hashes"] }, "AdminBlocklistProfileSubstringUpdateRequest": { "type": "object", "properties": { "scope": {"type": "string", "enum": ["username", "global_name", "nickname", "bio", "pronouns"]}, "reason": {"type": "string"}, "notes": {"type": "string"} }, "required": ["scope"] }, "AdminBlocklistAvatarHashUpdateRequest": { "type": "object", "properties": { "category": {"type": "string"}, "severity": {"type": "integer", "minimum": 0, "maximum": 3}, "source_url": {"type": "string"}, "reason": {"type": "string"}, "notes": {"type": "string"} } }, "AdminBlocklistFileShaUpdateRequest": { "type": "object", "properties": { "category": {"type": "string"}, "severity": {"type": "integer", "minimum": 0, "maximum": 3}, "content_type": {"description": "Optional MIME type hint for observability", "type": "string"}, "source_url": {"type": "string"}, "notes": {"type": "string"} } }, "AdminBlocklistUrlDomainUpdateRequest": { "type": "object", "properties": { "match_subdomains": { "default": true, "description": "If true, any subdomain rooted at this domain is also banned", "type": "boolean" }, "category": {"description": "Category / source slug (defaults to \"manual\")", "type": "string"}, "severity": { "description": "Severity: 0 allow, 1 warn, 2 block, 3 block+report (default 2)", "type": "integer", "minimum": 0, "maximum": 3 }, "source_url": {"description": "Upstream source URL if imported from a feed", "type": "string"}, "notes": {"description": "Internal notes for audit trail", "type": "string"} } }, "AdminBlocklistUrlUpdateRequest": { "type": "object", "properties": { "category": {"description": "Category / source slug (defaults to \"manual\")", "type": "string"}, "severity": { "description": "Severity: 0 allow, 1 warn, 2 block, 3 block+report (default 2)", "type": "integer", "minimum": 0, "maximum": 3 }, "source_url": {"description": "Upstream source URL if imported from a feed", "type": "string"}, "notes": {"description": "Internal notes for audit trail", "type": "string"} } }, "DeletionReasonCode": { "description": "Reason the account was scheduled for deletion", "type": "integer", "minimum": 0, "maximum": 2147483647, "format": "int32", "x-enumNames": [ "USER_REQUESTED", "OTHER", "SPAM", "CHEATING_OR_EXPLOITATION", "COORDINATED_RAIDING", "AUTOMATION_OR_SELFBOT", "NONCONSENSUAL_SEXUAL_CONTENT", "SCAM_OR_SOCIAL_ENGINEERING", "CHILD_SEXUAL_CONTENT", "PRIVACY_VIOLATION_OR_DOXXING", "HARASSMENT_OR_BULLYING", "PAYMENT_FRAUD", "CHILD_SAFETY_VIOLATION", "BILLING_DISPUTE_OR_ABUSE", "UNSOLICITED_EXPLICIT_CONTENT", "GRAPHIC_VIOLENCE", "BAN_EVASION", "TOKEN_OR_CREDENTIAL_SCAM", "INACTIVITY", "HATE_SPEECH_OR_EXTREMIST_CONTENT", "MALICIOUS_LINKS_OR_MALWARE", "IMPERSONATION_OR_FAKE_IDENTITY" ], "enum": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22] }, "GuildFeatureSchema": { "description": "A guild feature flag Known values: ANIMATED_ICON, ANIMATED_BANNER, AUDIO_BITRATE_128_KBPS, AUDIO_BITRATE_256_KBPS, AUDIO_BITRATE_384_KBPS, BANNER, CLONE_EMOJI_DISABLED, CLONE_EMOJI_ENABLED, CLONE_STICKER_DISABLED, CLONE_STICKER_ENABLED, DETACHED_BANNER, INVITE_SPLASH, INVITES_DISABLED, RAID_DETECTED, TEXT_CHANNEL_FLEXIBLE_NAMES, HIDE_OWNER_CROWN, MORE_EMOJI, MORE_STICKERS, UNLIMITED_EMOJI, UNLIMITED_STICKERS, EXPRESSION_PURGE_ALLOWED, VANITY_URL, DISCOVERABLE, PARTNERED, VERIFIED, VIP_VOICE, VOICE_E2EE, UNAVAILABLE_FOR_EVERYONE, UNAVAILABLE_FOR_EVERYONE_BUT_STAFF, UNAVAILABLE_HIDDEN, VISIONARY, LARGE_GUILD_OVERRIDE, VERY_LARGE_GUILD (other values allowed)", "x-enumNames": [ "ANIMATED_ICON", "ANIMATED_BANNER", "AUDIO_BITRATE_128_KBPS", "AUDIO_BITRATE_256_KBPS", "AUDIO_BITRATE_384_KBPS", "BANNER", "CLONE_EMOJI_DISABLED", "CLONE_EMOJI_ENABLED", "CLONE_STICKER_DISABLED", "CLONE_STICKER_ENABLED", "DETACHED_BANNER", "INVITE_SPLASH", "INVITES_DISABLED", "RAID_DETECTED", "TEXT_CHANNEL_FLEXIBLE_NAMES", "HIDE_OWNER_CROWN", "MORE_EMOJI", "MORE_STICKERS", "UNLIMITED_EMOJI", "UNLIMITED_STICKERS", "EXPRESSION_PURGE_ALLOWED", "VANITY_URL", "DISCOVERABLE", "PARTNERED", "VERIFIED", "VIP_VOICE", "VOICE_E2EE", "UNAVAILABLE_FOR_EVERYONE", "UNAVAILABLE_FOR_EVERYONE_BUT_STAFF", "UNAVAILABLE_HIDDEN", "VISIONARY", "LARGE_GUILD_OVERRIDE", "VERY_LARGE_GUILD" ], "x-enumDescriptions": [ "Guild can have an animated icon", "Guild can have an animated banner", "Guild can set a voice channel bitrate of up to 128 kbps", "Guild can set a voice channel bitrate of up to 256 kbps", "Guild can set a voice channel bitrate of up to 384 kbps", "Guild can have a banner", "Deprecated and no longer enforced: emoji cloning is now opt-in through CLONE_EMOJI_ENABLED", "Guild allows non-members to use the in-app one-click emoji clone shortcut", "Deprecated and no longer enforced: sticker cloning is now opt-in through CLONE_STICKER_ENABLED", "Guild allows non-members to use the in-app one-click sticker clone shortcut", "Guild banner is detached from splash", "Guild can have an invite splash", "Guild has invites disabled", "Guild has a detected raid and invites are restricted", "Guild allows flexible text channel names", "Guild hides the community owner crown icon", "Legacy increased emoji slots feature", "Legacy increased sticker slots feature", "Guild has unlimited emoji slots", "Guild has unlimited sticker slots", "Guild allows purging expressions", "Guild can have a vanity URL", "Guild is listed in the public discovery directory", "Guild is a partnered guild", "Guild is verified", "Guild has VIP voice features", "Guild has end-to-end encryption for voice channel calls", "Guild is unavailable for everyone", "Guild is unavailable except for staff", "Guild is hidden when it is force unavailable", "Guild is a visionary guild", "Guild has large guild overrides enabled", "Guild has increased member capacity enabled" ], "type": "string" }, "UserFlags": { "type": "string", "pattern": "^\\d+$", "description": "User account flags (64-bit)", "format": "int64", "x-bitflagValues": [ {"name": "STAFF", "value": "1", "description": "User is a staff member"}, {"name": "PARTNER", "value": "4", "description": "User is a partner"}, {"name": "BUG_HUNTER", "value": "8", "description": "User is a bug hunter"}, { "name": "HIGH_GLOBAL_RATE_LIMIT", "value": "8589934592", "description": "User has elevated global rate limits" }, {"name": "FRIENDLY_BOT", "value": "16", "description": "Bot accepts friend requests from users"}, { "name": "FRIENDLY_BOT_MANUAL_APPROVAL", "value": "32", "description": "Bot requires manual approval for friend requests" }, {"name": "SPAMMER", "value": "64", "description": "User is flagged as a spammer"}, {"name": "DELETED", "value": "17179869184", "description": "User account has been deleted"}, { "name": "DISABLED_SUSPICIOUS_ACTIVITY", "value": "34359738368", "description": "User account disabled due to suspicious activity" }, {"name": "SELF_DELETED", "value": "68719476736", "description": "User account was self-deleted"}, {"name": "DISABLED", "value": "274877906944", "description": "User account is disabled"}, {"name": "HAS_SESSION_STARTED", "value": "549755813888", "description": "User has started a session"}, {"name": "RATE_LIMIT_BYPASS", "value": "140737488355328", "description": "User can bypass rate limits"}, {"name": "REPORT_BANNED", "value": "281474976710656", "description": "User is banned from reporting"}, { "name": "VERIFIED_NOT_UNDERAGE", "value": "562949953421312", "description": "User is verified as not underage" }, { "name": "HAS_DISMISSED_PREMIUM_ONBOARDING", "value": "2251799813685248", "description": "User has dismissed premium onboarding" }, {"name": "APP_STORE_REVIEWER", "value": "9007199254740992", "description": "User is an app store reviewer"}, { "name": "STAFF_HIDDEN", "value": "144115188075855872", "description": "User staff status is hidden from public flags" }, { "name": "AGE_VERIFIED_ADULT", "value": "1152921504606846976", "description": "User has verified their age as an adult via credit card verification" }, { "name": "FORCE_INBOUND_PHONE_VERIFICATION", "value": "2305843009213693952", "description": "User is forced through inbound (expensive-destination) phone verification regardless of phone prefix, for debugging" }, { "name": "NOT_SUSPICIOUS", "value": "4611686018427387904", "description": "User is permanently exempt from automatic suspicious-activity flagging on RPC session start (does not require a prior payment)" } ] }, "MessageResponseSchema": { "type": "object", "properties": { "id": { "description": "The unique identifier (snowflake) for this message", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "channel_id": { "description": "The ID of the channel this message was sent in", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "author": { "description": "The author of the message", "allOf": [{"$ref": "#/components/schemas/UserPartialResponse"}] }, "webhook_id": { "description": "The ID of the webhook that sent this message", "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "type": {"allOf": [{"$ref": "#/components/schemas/MessageType"}]}, "flags": { "description": "The bitwise flags for this message", "allOf": [{"$ref": "#/components/schemas/MessageFlags"}] }, "content": {"type": "string", "description": "The text content of the message"}, "timestamp": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "description": "The ISO 8601 timestamp of when the message was created" }, "edited_timestamp": { "description": "The ISO 8601 timestamp of when the message was last edited", "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "pinned": {"type": "boolean", "description": "Whether the message is pinned"}, "mention_everyone": {"type": "boolean", "description": "Whether the message mentions @everyone"}, "tts": {"type": "boolean", "description": "Whether the message was sent as text-to-speech"}, "mentions": { "type": "array", "items": {"allOf": [{"$ref": "#/components/schemas/UserPartialResponse"}]}, "description": "The users mentioned in the message" }, "mention_roles": { "type": "array", "items": {"type": "string"}, "description": "The role IDs mentioned in the message" }, "mention_channels": { "description": "Channels mentioned in the message that are visible to @everyone", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageChannelMentionResponse"} }, "users": { "description": "Users referenced from non-notifying content, embed, and snapshot text, included for client-side resolution", "nullable": true, "type": "array", "items": {"allOf": [{"$ref": "#/components/schemas/UserPartialResponse"}]} }, "embeds": { "description": "The embeds attached to the message", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageEmbedResponse"} }, "attachments": { "description": "The files attached to the message", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageAttachmentResponse"} }, "stickers": { "description": "The stickers sent with the message", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageStickerResponse"} }, "reactions": { "description": "The reactions on the message", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageReactionResponse"} }, "message_reference": { "description": "Reference data for replies or forwards", "nullable": true, "type": "object", "properties": { "channel_id": { "description": "The ID of the channel containing the referenced message", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "message_id": { "description": "The ID of the referenced message", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "guild_id": { "description": "The ID of the guild containing the referenced message", "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "type": {"allOf": [{"$ref": "#/components/schemas/MessageReferenceType"}]} }, "required": ["channel_id", "message_id", "type"], "additionalProperties": false }, "message_snapshots": { "description": "Snapshots of forwarded messages", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageSnapshotResponse"} }, "nonce": { "description": "A client-provided value for message deduplication", "nullable": true, "type": "string" }, "call": { "description": "Call information if this message represents a call", "nullable": true, "type": "object", "properties": { "participants": { "type": "array", "items": {"type": "string"}, "description": "The user IDs of participants in the call" }, "ended_timestamp": { "description": "The ISO 8601 timestamp of when the call ended", "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": ["participants"], "additionalProperties": false }, "referenced_message": { "description": "The reply target. Present and populated when the target resolved, present and null when the target is gone, absent when this message carries no default reference. Clients must tell null apart from absent by key presence.", "nullable": true, "type": "object", "properties": { "id": { "description": "The unique identifier (snowflake) for this message", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "channel_id": { "description": "The ID of the channel this message was sent in", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "author": { "description": "The author of the message", "allOf": [{"$ref": "#/components/schemas/UserPartialResponse"}] }, "webhook_id": { "description": "The ID of the webhook that sent this message", "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "type": {"allOf": [{"$ref": "#/components/schemas/MessageType"}]}, "flags": { "description": "The bitwise flags for this message", "allOf": [{"$ref": "#/components/schemas/MessageFlags"}] }, "content": {"type": "string", "description": "The text content of the message"}, "timestamp": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "description": "The ISO 8601 timestamp of when the message was created" }, "edited_timestamp": { "description": "The ISO 8601 timestamp of when the message was last edited", "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "pinned": {"type": "boolean", "description": "Whether the message is pinned"}, "mention_everyone": {"type": "boolean", "description": "Whether the message mentions @everyone"}, "tts": {"type": "boolean", "description": "Whether the message was sent as text-to-speech"}, "mentions": { "type": "array", "items": {"allOf": [{"$ref": "#/components/schemas/UserPartialResponse"}]}, "description": "The users mentioned in the message" }, "mention_roles": { "type": "array", "items": {"type": "string"}, "description": "The role IDs mentioned in the message" }, "mention_channels": { "description": "Channels mentioned in the message that are visible to @everyone", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageChannelMentionResponse"} }, "users": { "description": "Users referenced from non-notifying content, embed, and snapshot text, included for client-side resolution", "nullable": true, "type": "array", "items": {"allOf": [{"$ref": "#/components/schemas/UserPartialResponse"}]} }, "embeds": { "description": "The embeds attached to the message", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageEmbedResponse"} }, "attachments": { "description": "The files attached to the message", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageAttachmentResponse"} }, "stickers": { "description": "The stickers sent with the message", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageStickerResponse"} }, "reactions": { "description": "The reactions on the message", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageReactionResponse"} }, "message_reference": { "description": "Reference data for replies or forwards", "nullable": true, "type": "object", "properties": { "channel_id": { "description": "The ID of the channel containing the referenced message", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "message_id": { "description": "The ID of the referenced message", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "guild_id": { "description": "The ID of the guild containing the referenced message", "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "type": {"allOf": [{"$ref": "#/components/schemas/MessageReferenceType"}]} }, "required": ["channel_id", "message_id", "type"], "additionalProperties": false }, "message_snapshots": { "description": "Snapshots of forwarded messages", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageSnapshotResponse"} }, "nonce": { "description": "A client-provided value for message deduplication", "nullable": true, "type": "string" }, "call": { "description": "Call information if this message represents a call", "nullable": true, "type": "object", "properties": { "participants": { "type": "array", "items": {"type": "string"}, "description": "The user IDs of participants in the call" }, "ended_timestamp": { "description": "The ISO 8601 timestamp of when the call ended", "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" } }, "required": ["participants"], "additionalProperties": false } }, "required": [ "id", "channel_id", "author", "type", "flags", "content", "timestamp", "pinned", "mention_everyone", "tts", "mentions", "mention_roles" ], "additionalProperties": false } }, "required": [ "id", "channel_id", "author", "type", "flags", "content", "timestamp", "pinned", "mention_everyone", "tts", "mentions", "mention_roles" ], "additionalProperties": false }, "AdminMessageSchema": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "channel_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "channel_name": {"nullable": true, "type": "string"}, "channel_nsfw": {"nullable": true, "type": "boolean"}, "channel_content_warning_level": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/ContentWarningLevel"}] }, "channel_content_warning_text": {"nullable": true, "type": "string", "maxLength": 200}, "guild_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "guild_name": {"nullable": true, "type": "string"}, "guild_nsfw_level": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/NSFWLevel"}]}, "guild_nsfw": {"nullable": true, "type": "boolean"}, "guild_content_warning_level": { "nullable": true, "allOf": [{"$ref": "#/components/schemas/ContentWarningLevel"}] }, "guild_content_warning_text": {"nullable": true, "type": "string", "maxLength": 200}, "author_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "author_username": {"type": "string", "minLength": 1, "maxLength": 100}, "author_global_name": {"nullable": true, "type": "string"}, "author_discriminator": {"type": "string", "minLength": 1, "maxLength": 10}, "author_avatar": {"nullable": true, "type": "string"}, "content": {"type": "string", "maxLength": 4000}, "timestamp": {"type": "string"}, "attachments": { "maxItems": 10, "type": "array", "items": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "filename": {"type": "string", "minLength": 1, "maxLength": 256}, "url": {"type": "string", "minLength": 1, "maxLength": 2048}, "nsfw": {"nullable": true, "type": "boolean"}, "content_type": {"nullable": true, "type": "string"}, "width": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}]}, "height": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}]}, "size": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/NonNegativeSafeIntegerType"}]}, "ncmec_status": { "description": "NCMEC submission status", "x-enumNames": ["not_submitted", "submitting", "submitted", "failed"], "x-enumDescriptions": [ "Report has not been submitted to NCMEC", "Report submission to NCMEC is in progress", "Report has been submitted to NCMEC", "Report submission to NCMEC failed" ], "enum": ["not_submitted", "submitting", "submitted", "failed"], "type": "string" }, "ncmec_report_id": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 256}, "ncmec_failure_reason": {"nullable": true, "type": "string", "minLength": 1, "maxLength": 4000} }, "required": [ "id", "filename", "url", "nsfw", "content_type", "width", "height", "ncmec_status", "ncmec_report_id", "ncmec_failure_reason" ], "additionalProperties": false } }, "user_prior_ncmec_report_ids": { "maxItems": 100, "type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 256} } }, "required": [ "id", "channel_id", "channel_name", "channel_nsfw", "guild_id", "guild_name", "guild_nsfw_level", "author_id", "author_username", "author_global_name", "author_discriminator", "author_avatar", "content", "timestamp", "attachments" ], "additionalProperties": false }, "NonNegativeSafeIntegerType": {"type": "integer", "minimum": 0, "maximum": 9007199254740991}, "ContentWarningLevel": { "description": "The content warning level for a guild, category, or channel", "type": "integer", "enum": [0, 1], "format": "int32", "x-enumNames": ["INHERIT", "CONTENT_WARNING"], "x-enumDescriptions": [ "No level set on this scope; channels and categories inherit from parent", "Show a content warning before entering" ] }, "NSFWLevel": { "description": "The NSFW level of the guild", "type": "integer", "enum": [0, 3], "format": "int32", "x-enumNames": ["SAFE", "AGE_RESTRICTED"], "x-enumDescriptions": ["Guild is safe for all ages", "Guild is age-restricted"] }, "MessageSnapshotResponse": { "type": "object", "properties": { "content": {"description": "The text content of the snapshot", "nullable": true, "type": "string"}, "timestamp": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "description": "The ISO 8601 timestamp of when the original message was created" }, "edited_timestamp": { "description": "The ISO 8601 timestamp of when the original message was last edited", "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "mentions": { "description": "The user IDs mentioned in the snapshot", "nullable": true, "type": "array", "items": {"type": "string"} }, "mention_roles": { "description": "The role IDs mentioned in the snapshot", "nullable": true, "type": "array", "items": {"type": "string"} }, "mention_channels": { "description": "Channels mentioned in the snapshot that are visible to @everyone", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageChannelMentionResponse"} }, "embeds": { "description": "The embeds included in the snapshot", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageEmbedResponse"} }, "attachments": { "description": "The attachments included in the snapshot", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageAttachmentResponse"} }, "stickers": { "description": "The stickers included in the snapshot", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/MessageStickerResponse"} }, "type": {"allOf": [{"$ref": "#/components/schemas/MessageType"}]}, "flags": {"allOf": [{"$ref": "#/components/schemas/MessageFlags"}]} }, "required": ["timestamp", "type", "flags"], "additionalProperties": false }, "MessageReferenceType": { "description": "The type of message reference", "type": "integer", "enum": [0, 1], "format": "int32", "x-enumNames": ["DEFAULT", "FORWARD"], "x-enumDescriptions": ["Default reference (reply)", "Forwarded message reference"] }, "MessageReactionResponse": { "type": "object", "properties": { "emoji": { "type": "object", "properties": { "id": { "description": "The ID of the custom emoji (null for Unicode emojis)", "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "name": { "type": "string", "description": "The name of the emoji (or Unicode character for standard emojis)" }, "animated": {"description": "Whether the emoji is animated", "nullable": true, "type": "boolean"} }, "required": ["name"], "additionalProperties": false, "description": "The emoji used for the reaction" }, "count": { "description": "The total number of times this reaction has been used", "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "me": { "description": "Whether the current user has reacted with this emoji", "nullable": true, "type": "boolean" } }, "required": ["emoji", "count"], "additionalProperties": false }, "MessageStickerResponse": { "type": "object", "properties": { "id": { "description": "The unique identifier of the sticker", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "name": {"type": "string", "description": "The name of the sticker"}, "animated": {"type": "boolean", "description": "Whether the sticker is animated"} }, "required": ["id", "name", "animated"], "additionalProperties": false }, "MessageAttachmentResponse": { "type": "object", "properties": { "id": { "description": "The unique identifier for this attachment", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "filename": {"type": "string", "description": "The name of the attached file"}, "title": {"description": "The title of the attachment", "nullable": true, "type": "string"}, "description": {"description": "The description of the attachment", "nullable": true, "type": "string"}, "content_type": {"description": "The MIME type of the attachment", "nullable": true, "type": "string"}, "content_hash": {"description": "The hash of the attachment content", "nullable": true, "type": "string"}, "size": { "description": "The size of the attachment in bytes", "allOf": [{"$ref": "#/components/schemas/NonNegativeSafeIntegerType"}] }, "url": {"description": "The URL of the attachment", "nullable": true, "type": "string"}, "proxy_url": {"description": "The proxied URL of the attachment", "nullable": true, "type": "string"}, "width": { "description": "The width of the attachment in pixels (for images/videos)", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "height": { "description": "The height of the attachment in pixels (for images/videos)", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "placeholder": { "description": "The base64 encoded placeholder image for lazy loading", "nullable": true, "type": "string" }, "flags": {"allOf": [{"$ref": "#/components/schemas/MessageAttachmentFlags"}]}, "nsfw": {"description": "Whether the attachment is flagged as NSFW", "nullable": true, "type": "boolean"}, "duration": { "description": "The duration of the media in seconds", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "waveform": {"description": "The base64 encoded audio waveform data", "nullable": true, "type": "string"}, "expires_at": { "description": "The ISO 8601 timestamp when the attachment URL expires", "nullable": true, "type": "string" }, "expired": {"description": "Whether the attachment URL has expired", "nullable": true, "type": "boolean"} }, "required": ["id", "filename", "size", "flags"], "additionalProperties": false }, "MessageEmbedResponse": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of embed (e.g., rich, image, video, gifv, article, link)" }, "url": {"description": "The URL of the embed", "nullable": true, "type": "string", "format": "uri"}, "title": {"description": "The title of the embed", "nullable": true, "type": "string"}, "color": { "description": "The color code of the embed sidebar", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "timestamp": { "description": "The ISO 8601 timestamp of the embed content", "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "description": {"description": "The description of the embed", "nullable": true, "type": "string"}, "author": { "description": "The author information of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedAuthorResponse"}] }, "image": { "description": "The image of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedMediaResponse"}] }, "thumbnail": { "description": "The thumbnail of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedMediaResponse"}] }, "footer": { "description": "The footer of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedFooterResponse"}] }, "fields": { "description": "The fields of the embed", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/EmbedFieldResponse"} }, "provider": { "description": "The provider of the embed (e.g., YouTube, Twitter)", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedAuthorResponse"}] }, "video": { "description": "The video of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedMediaResponse"}] }, "audio": { "description": "The audio of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedMediaResponse"}] }, "html": { "description": "Sanitized oEmbed HTML for trusted specialized embed renderers", "nullable": true, "type": "string" }, "html_width": { "description": "The preferred width of sanitized oEmbed HTML", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "html_height": { "description": "The preferred height of sanitized oEmbed HTML", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "nsfw": {"description": "Whether the embed is flagged as NSFW", "nullable": true, "type": "boolean"}, "children": { "description": "Internal nested embeds generated by unfurlers", "nullable": true, "maxItems": 1, "type": "array", "items": {"$ref": "#/components/schemas/MessageEmbedChildResponse"} } }, "required": ["type"], "additionalProperties": false }, "UserPartialResponse": { "type": "object", "properties": { "id": { "description": "The unique identifier (snowflake) for this user", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "username": {"type": "string", "description": "The username of the user, not unique across the platform"}, "discriminator": {"type": "string", "description": "The four-digit discriminator tag of the user"}, "global_name": {"nullable": true, "description": "The display name of the user, if set", "type": "string"}, "avatar": {"nullable": true, "description": "The hash of the user avatar image", "type": "string"}, "avatar_color": { "nullable": true, "description": "The dominant avatar color of the user as an integer", "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "bot": {"description": "Whether the user is a bot account", "type": "boolean"}, "system": {"description": "Whether the user is an official system user", "type": "boolean"}, "flags": {"allOf": [{"$ref": "#/components/schemas/PublicUserFlags"}]}, "mention_flags": { "description": "The user's account-wide reply mention preference. Omitted when the user has no preference set (treated as NO_PREFERENCE).", "allOf": [{"$ref": "#/components/schemas/MentionReplyPreferences"}] } }, "required": ["id", "username", "discriminator", "global_name", "avatar", "avatar_color", "flags"], "additionalProperties": false }, "MessageChannelMentionResponse": { "type": "object", "properties": { "id": { "description": "The ID of the mentioned channel", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "name": {"type": "string", "description": "The name of the mentioned channel"}, "type": { "description": "The type of the mentioned channel", "allOf": [{"$ref": "#/components/schemas/Int32Type"}] } }, "required": ["id", "name", "type"], "additionalProperties": false }, "MessageFlags": { "type": "integer", "minimum": 0, "maximum": 2147483647, "description": "The bitwise flags of the original message", "format": "int32", "x-bitflagValues": [ { "name": "SUPPRESS_EMBEDS", "value": "4", "description": "Do not include embeds when serialising this message" }, { "name": "SUPPRESS_NOTIFICATIONS", "value": "4096", "description": "This message will not trigger push or desktop notifications" }, {"name": "VOICE_MESSAGE", "value": "8192", "description": "This message is a voice message"} ] }, "MessageType": { "description": "The type of message", "type": "integer", "enum": [0, 1, 2, 3, 4, 5, 6, 7, 19], "format": "int32", "x-enumNames": [ "DEFAULT", "RECIPIENT_ADD", "RECIPIENT_REMOVE", "CALL", "CHANNEL_NAME_CHANGE", "CHANNEL_ICON_CHANGE", "CHANNEL_PINNED_MESSAGE", "USER_JOIN", "REPLY" ], "x-enumDescriptions": [ "A regular message", "A system message indicating a user was added to the conversation", "A system message indicating a user was removed from the conversation", "A message representing a call", "A system message indicating the channel name changed", "A system message indicating the channel icon changed", "A system message indicating a message was pinned", "A system message indicating a user joined", "A reply message" ] }, "MentionReplyPreferences": { "description": "Reply mention preference", "type": "integer", "enum": [0, 1, 2], "format": "int32", "x-enumNames": ["NO_PREFERENCE", "PREFER_MENTION", "PREFER_NO_MENTION"], "x-enumDescriptions": [ "Respect the sender intent on each reply, with no warning when toggling the @ mention. On a guild member, inherits the value from the user-level preference.", "Default replies to @mention this user, and warn the sender when they disable the mention", "Default replies to omit the @mention for this user, and warn the sender when they enable it" ] }, "PublicUserFlags": { "type": "integer", "minimum": 0, "maximum": 2147483647, "description": "The public flags on the user account", "format": "int32", "x-bitflagValues": [ {"name": "STAFF", "value": "1", "description": "User is a staff member"}, {"name": "PARTNER", "value": "4", "description": "User is a partner"}, {"name": "BUG_HUNTER", "value": "8", "description": "User is a bug hunter"}, {"name": "FRIENDLY_BOT", "value": "16", "description": "Bot accepts friend requests from users"}, { "name": "FRIENDLY_BOT_MANUAL_APPROVAL", "value": "32", "description": "Bot requires manual approval for friend requests" }, {"name": "SPAMMER", "value": "64", "description": "User is flagged as a spammer"} ] }, "MessageEmbedChildResponse": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of embed (e.g., rich, image, video, gifv, article, link)" }, "url": {"description": "The URL of the embed", "nullable": true, "type": "string", "format": "uri"}, "title": {"description": "The title of the embed", "nullable": true, "type": "string"}, "color": { "description": "The color code of the embed sidebar", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "timestamp": { "description": "The ISO 8601 timestamp of the embed content", "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "description": {"description": "The description of the embed", "nullable": true, "type": "string"}, "author": { "description": "The author information of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedAuthorResponse"}] }, "image": { "description": "The image of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedMediaResponse"}] }, "thumbnail": { "description": "The thumbnail of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedMediaResponse"}] }, "footer": { "description": "The footer of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedFooterResponse"}] }, "fields": { "description": "The fields of the embed", "nullable": true, "type": "array", "items": {"$ref": "#/components/schemas/EmbedFieldResponse"} }, "provider": { "description": "The provider of the embed (e.g., YouTube, Twitter)", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedAuthorResponse"}] }, "video": { "description": "The video of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedMediaResponse"}] }, "audio": { "description": "The audio of the embed", "nullable": true, "allOf": [{"$ref": "#/components/schemas/EmbedMediaResponse"}] }, "html": { "description": "Sanitized oEmbed HTML for trusted specialized embed renderers", "nullable": true, "type": "string" }, "html_width": { "description": "The preferred width of sanitized oEmbed HTML", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "html_height": { "description": "The preferred height of sanitized oEmbed HTML", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "nsfw": {"description": "Whether the embed is flagged as NSFW", "nullable": true, "type": "boolean"} }, "required": ["type"], "additionalProperties": false }, "EmbedMediaResponse": { "type": "object", "properties": { "url": {"type": "string", "description": "The URL of the media"}, "proxy_url": { "description": "The proxied URL of the media", "nullable": true, "type": "string", "format": "uri" }, "content_type": {"description": "The MIME type of the media", "nullable": true, "type": "string"}, "content_hash": {"description": "The hash of the media content", "nullable": true, "type": "string"}, "width": { "description": "The width of the media in pixels", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "height": { "description": "The height of the media in pixels", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "description": {"description": "The description of the media", "nullable": true, "type": "string"}, "placeholder": { "description": "The base64 encoded placeholder image for lazy loading", "nullable": true, "type": "string" }, "duration": { "description": "The duration of the media in seconds", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "flags": {"allOf": [{"$ref": "#/components/schemas/EmbedMediaFlags"}]} }, "required": ["url", "flags"], "additionalProperties": false }, "EmbedAuthorResponse": { "type": "object", "properties": { "name": {"type": "string", "description": "The name of the author"}, "url": {"description": "The URL of the author", "nullable": true, "type": "string", "format": "uri"}, "icon_url": { "description": "The URL of the author icon", "nullable": true, "type": "string", "format": "uri" }, "proxy_icon_url": { "description": "The proxied URL of the author icon", "nullable": true, "type": "string", "format": "uri" } }, "required": ["name"], "additionalProperties": false }, "EmbedFieldResponse": { "type": "object", "properties": { "name": {"type": "string", "description": "The name of the field"}, "value": {"type": "string", "description": "The value of the field"}, "inline": {"type": "boolean", "description": "Whether the field should be displayed inline"} }, "required": ["name", "value", "inline"], "additionalProperties": false }, "EmbedFooterResponse": { "type": "object", "properties": { "text": {"type": "string", "description": "The footer text"}, "icon_url": { "description": "The URL of the footer icon", "nullable": true, "type": "string", "format": "uri" }, "proxy_icon_url": { "description": "The proxied URL of the footer icon", "nullable": true, "type": "string", "format": "uri" } }, "required": ["text"], "additionalProperties": false }, "EmbedMediaFlags": { "type": "integer", "minimum": 0, "maximum": 2147483647, "description": "The bitwise flags for this media", "format": "int32", "x-bitflagValues": [ {"name": "CONTAINS_EXPLICIT_MEDIA", "value": "16", "description": "Embed media contains explicit content"}, {"name": "IS_ANIMATED", "value": "32", "description": "Embed media is animated"} ] }, "MessageAttachmentFlags": { "type": "integer", "minimum": 0, "maximum": 2147483647, "description": "The bitwise flags for this attachment", "format": "int32", "x-bitflagValues": [ {"name": "IS_SPOILER", "value": "8", "description": "Attachment is marked as a spoiler"}, { "name": "CONTAINS_EXPLICIT_MEDIA", "value": "16", "description": "Attachment contains explicit media content" }, {"name": "IS_ANIMATED", "value": "32", "description": "Attachment is animated"} ] }, "DiscoveryAdminPendingApplicationResponse": { "type": "object", "properties": { "guild_id": {"description": "Guild ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "guild_name": {"type": "string", "description": "Guild name"}, "guild_icon": {"nullable": true, "description": "Guild icon hash", "type": "string"}, "guild_owner_id": { "description": "Guild owner user ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "guild_owner_username": {"nullable": true, "description": "Guild owner username", "type": "string"}, "guild_owner_global_name": {"nullable": true, "description": "Guild owner display name", "type": "string"}, "guild_owner_discriminator": {"nullable": true, "description": "Guild owner discriminator", "type": "string"}, "guild_member_count": {"type": "number", "description": "Approximate member count"}, "guild_nsfw_level": { "nullable": true, "description": "NSFW level of the guild", "allOf": [{"$ref": "#/components/schemas/NSFWLevel"}] }, "guild_features": {"type": "array", "items": {"type": "string"}, "description": "Guild feature flags"}, "description": {"type": "string", "description": "Discovery description"}, "category_type": {"type": "number", "description": "Discovery category type"}, "primary_language": {"nullable": true, "description": "Primary community language", "type": "string"}, "custom_tags": {"type": "array", "items": {"type": "string"}, "description": "Custom discovery tags"}, "applied_at": {"type": "string", "description": "Application timestamp"} }, "required": [ "guild_id", "guild_name", "guild_icon", "guild_owner_id", "guild_owner_username", "guild_owner_global_name", "guild_owner_discriminator", "guild_member_count", "guild_nsfw_level", "guild_features", "description", "category_type", "primary_language", "custom_tags", "applied_at" ], "additionalProperties": false }, "DiscoveryRejectionReason": { "type": "string", "minLength": 1, "maxLength": 500, "description": "Rejection reason" }, "DiscoveryReviewReason": {"type": "string", "maxLength": 500, "description": "Review reason"}, "DiscoveryCategoryResponse": { "type": "object", "properties": { "id": {"type": "number", "description": "Category ID"}, "name": {"type": "string", "description": "Category display name"} }, "required": ["id", "name"], "additionalProperties": false }, "DiscoveryAdminListedGuildResponse": { "type": "object", "properties": { "guild_id": {"description": "Guild ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "guild_name": {"type": "string", "description": "Guild name"}, "guild_icon": {"nullable": true, "description": "Guild icon hash", "type": "string"}, "guild_owner_id": { "description": "Guild owner user ID", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "guild_owner_username": {"nullable": true, "description": "Guild owner username", "type": "string"}, "guild_owner_global_name": {"nullable": true, "description": "Guild owner display name", "type": "string"}, "guild_owner_discriminator": {"nullable": true, "description": "Guild owner discriminator", "type": "string"}, "guild_member_count": {"type": "number", "description": "Approximate member count"}, "guild_nsfw_level": { "nullable": true, "description": "NSFW level of the guild", "allOf": [{"$ref": "#/components/schemas/NSFWLevel"}] }, "guild_features": {"type": "array", "items": {"type": "string"}, "description": "Guild feature flags"}, "description": {"type": "string", "description": "Discovery description"}, "category_type": {"type": "number", "description": "Discovery category type"}, "primary_language": {"nullable": true, "description": "Primary community language", "type": "string"}, "custom_tags": {"type": "array", "items": {"type": "string"}, "description": "Custom discovery tags"}, "applied_at": {"type": "string", "description": "Application timestamp"}, "approved_at": {"nullable": true, "description": "Approval timestamp", "type": "string"} }, "required": [ "guild_id", "guild_name", "guild_icon", "guild_owner_id", "guild_owner_username", "guild_owner_global_name", "guild_owner_discriminator", "guild_member_count", "guild_nsfw_level", "guild_features", "description", "category_type", "primary_language", "custom_tags", "applied_at", "approved_at" ], "additionalProperties": false }, "Int64StringType": {"type": "string", "pattern": "^-?\\d+$", "format": "int64"}, "GiftCodeDurationTypeSchema": { "description": "Gift code duration unit", "x-enumNames": ["days", "weeks", "months", "years"], "x-enumDescriptions": [ "Gift duration in days", "Gift duration in weeks", "Gift duration in months", "Gift duration in years" ], "enum": ["days", "weeks", "months", "years"], "type": "string" }, "GuildAdminResponse": { "type": "object", "properties": { "id": { "description": "The unique identifier for this guild", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "name": {"type": "string", "description": "The name of the guild"}, "features": { "maxItems": 100, "type": "array", "items": {"allOf": [{"$ref": "#/components/schemas/GuildFeatureSchema"}]}, "description": "Array of guild feature flags" }, "owner_id": { "description": "The ID of the guild owner", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "owner_username": {"nullable": true, "description": "The username of the guild owner", "type": "string"}, "owner_global_name": { "nullable": true, "description": "The display name of the guild owner, if set", "type": "string" }, "owner_discriminator": { "nullable": true, "description": "The discriminator of the guild owner", "type": "string" }, "icon": {"nullable": true, "description": "The hash of the guild icon", "type": "string"}, "banner": {"nullable": true, "description": "The hash of the guild banner", "type": "string"}, "member_count": { "description": "The number of members in the guild", "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "nsfw_level": {"allOf": [{"$ref": "#/components/schemas/NSFWLevel"}]}, "nsfw": {"description": "Whether the guild is flagged as adult content", "type": "boolean"}, "content_warning_level": { "description": "The content warning level for the guild", "allOf": [{"$ref": "#/components/schemas/ContentWarningLevel"}] }, "content_warning_text": { "description": "Custom content warning text shown before entry", "nullable": true, "type": "string", "maxLength": 200 }, "approximate_member_count": { "description": "Approximate total member count (only when with_counts is true)", "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "approximate_presence_count": { "description": "Approximate online member count (only when with_counts is true)", "allOf": [{"$ref": "#/components/schemas/Int32Type"}] } }, "required": [ "id", "name", "features", "owner_id", "owner_username", "owner_global_name", "owner_discriminator", "icon", "banner", "member_count" ], "additionalProperties": false }, "Permissions": { "type": "string", "pattern": "^\\d+$", "description": "Permission bitfield as string", "format": "int64", "x-bitflagValues": [ {"name": "CREATE_INSTANT_INVITE", "value": "1", "description": "Allows creation of instant invites"}, {"name": "KICK_MEMBERS", "value": "2", "description": "Allows kicking members from the guild"}, {"name": "BAN_MEMBERS", "value": "4", "description": "Allows banning members from the guild"}, { "name": "ADMINISTRATOR", "value": "8", "description": "Grants all permissions and bypasses channel permission overwrites" }, { "name": "MANAGE_CHANNELS", "value": "16", "description": "Allows management, editing, and deletion of channels" }, {"name": "MANAGE_GUILD", "value": "32", "description": "Allows management and editing of the guild"}, {"name": "ADD_REACTIONS", "value": "64", "description": "Allows adding reactions to messages"}, {"name": "VIEW_AUDIT_LOG", "value": "128", "description": "Allows viewing of the audit log"}, { "name": "PRIORITY_SPEAKER", "value": "256", "description": "Allows using priority speaker in a voice channel" }, {"name": "STREAM", "value": "512", "description": "Allows the user to go live"}, {"name": "VIEW_CHANNEL", "value": "1024", "description": "Allows viewing a channel"}, {"name": "SEND_MESSAGES", "value": "2048", "description": "Allows sending messages in a channel"}, {"name": "SEND_TTS_MESSAGES", "value": "4096", "description": "Allows sending text-to-speech messages"}, {"name": "MANAGE_MESSAGES", "value": "8192", "description": "Allows for deleting and pinning messages"}, {"name": "EMBED_LINKS", "value": "16384", "description": "Links sent will have an embed automatically"}, {"name": "ATTACH_FILES", "value": "32768", "description": "Allows uploading files"}, {"name": "READ_MESSAGE_HISTORY", "value": "65536", "description": "Allows reading message history"}, {"name": "MENTION_EVERYONE", "value": "131072", "description": "Allows using @everyone and @here mentions"}, {"name": "USE_EXTERNAL_EMOJIS", "value": "262144", "description": "Allows using emojis from other guilds"}, {"name": "CONNECT", "value": "1048576", "description": "Allows connecting to a voice channel"}, {"name": "SPEAK", "value": "2097152", "description": "Allows speaking in a voice channel"}, {"name": "MUTE_MEMBERS", "value": "4194304", "description": "Allows muting members in voice channels"}, {"name": "DEAFEN_MEMBERS", "value": "8388608", "description": "Allows deafening members in voice channels"}, {"name": "MOVE_MEMBERS", "value": "16777216", "description": "Allows moving members between voice channels"}, {"name": "USE_VAD", "value": "33554432", "description": "Allows using voice activity detection"}, {"name": "CHANGE_NICKNAME", "value": "67108864", "description": "Allows changing own nickname"}, {"name": "MANAGE_NICKNAMES", "value": "134217728", "description": "Allows changing other members nicknames"}, {"name": "MANAGE_ROLES", "value": "268435456", "description": "Allows management and editing of roles"}, {"name": "MANAGE_WEBHOOKS", "value": "536870912", "description": "Allows management and editing of webhooks"}, { "name": "MANAGE_EXPRESSIONS", "value": "1073741824", "description": "Allows management of guild expressions" }, { "name": "USE_EXTERNAL_STICKERS", "value": "137438953472", "description": "Allows using stickers from other guilds" }, {"name": "MODERATE_MEMBERS", "value": "1099511627776", "description": "Allows timing out users"}, {"name": "CREATE_EXPRESSIONS", "value": "8796093022208", "description": "Allows creating guild expressions"}, {"name": "PIN_MESSAGES", "value": "2251799813685248", "description": "Allows pinning messages"}, {"name": "BYPASS_SLOWMODE", "value": "4503599627370496", "description": "Allows bypassing slowmode"}, {"name": "UPDATE_RTC_REGION", "value": "9007199254740992", "description": "Allows updating the voice region"}, { "name": "VIEW_CHANNEL_MEMBERS", "value": "18014398509481984", "description": "Allows viewing the member list in a channel" } ] }, "SystemChannelFlags": { "type": "integer", "minimum": 0, "maximum": 2147483647, "description": "System channel message flags", "format": "int32", "x-bitflagValues": [ { "name": "SUPPRESS_JOIN_NOTIFICATIONS", "value": "1", "description": "Suppress member join notifications in system channel" } ] }, "DefaultMessageNotifications": { "description": "Default notification level for new members", "type": "integer", "enum": [0, 1], "format": "int32", "x-enumNames": ["ALL_MESSAGES", "ONLY_MENTIONS"], "x-enumDescriptions": ["Notify on all messages", "Notify only on mentions"] }, "GuildExplicitContentFilter": { "description": "Level of content filtering for explicit media", "type": "integer", "enum": [0, 1, 2], "format": "int32", "x-enumNames": ["DISABLED", "MEMBERS_WITHOUT_ROLES", "ALL_MEMBERS"], "x-enumDescriptions": [ "Media content will not be scanned", "Media content from members without roles will be scanned", "Media content from all members will be scanned" ] }, "GuildMFALevel": { "description": "Required MFA level for moderation actions", "type": "integer", "enum": [0, 1], "format": "int32", "x-enumNames": ["NONE", "ELEVATED"], "x-enumDescriptions": ["Guild has no MFA requirement", "Guild requires 2FA for moderation actions"] }, "GuildVerificationLevel": { "description": "Required verification level for members", "type": "integer", "enum": [0, 1, 2, 3, 4], "format": "int32", "x-enumNames": ["NONE", "LOW", "MEDIUM", "HIGH", "VERY_HIGH"], "x-enumDescriptions": [ "Unrestricted", "Must have verified email", "Registered for more than 5 minutes", "Member of the server for more than 10 minutes", "Must have a verified phone number" ] }, "GuildOperations": { "type": "integer", "minimum": 0, "maximum": 2147483647, "description": "Bitmask of disabled guild operations", "format": "int32", "x-bitflagValues": [ {"name": "PUSH_NOTIFICATIONS", "value": "1", "description": "Allow push notifications for this guild"}, {"name": "EVERYONE_MENTIONS", "value": "2", "description": "Allow @everyone mentions in this guild"}, {"name": "TYPING_EVENTS", "value": "4", "description": "Enable typing indicator events"}, {"name": "INSTANT_INVITES", "value": "8", "description": "Allow creation of instant invites"}, {"name": "SEND_MESSAGE", "value": "16", "description": "Allow sending messages in the guild"}, {"name": "REACTIONS", "value": "32", "description": "Allow adding reactions to messages"}, {"name": "MEMBER_LIST_UPDATES", "value": "64", "description": "Enable member list update events"} ] }, "DefaultMessageNotificationsInput": { "description": "Default notification level for new members", "type": "integer", "minimum": 0, "maximum": 2147483647, "format": "int32", "x-enumNames": ["ALL_MESSAGES", "ONLY_MENTIONS"], "x-enumDescriptions": ["Notify on all messages", "Notify only on mentions"], "enum": [0, 1] }, "GuildExplicitContentFilterInput": { "description": "Level of content filtering for explicit media", "type": "integer", "minimum": 0, "maximum": 2147483647, "format": "int32", "x-enumNames": ["DISABLED", "MEMBERS_WITHOUT_ROLES", "ALL_MEMBERS"], "x-enumDescriptions": [ "Media content will not be scanned", "Media content from members without roles will be scanned", "Media content from all members will be scanned" ], "enum": [0, 1, 2] }, "ContentWarningLevelInput": { "description": "The content warning level for a guild, category, or channel", "type": "integer", "minimum": 0, "maximum": 2147483647, "format": "int32", "x-enumNames": ["INHERIT", "CONTENT_WARNING"], "x-enumDescriptions": [ "No level set on this scope; channels and categories inherit from parent", "Show a content warning before entering" ], "enum": [0, 1] }, "NSFWLevelInput": { "description": "The NSFW level of the guild", "type": "integer", "minimum": 0, "maximum": 2147483647, "format": "int32", "x-enumNames": ["SAFE", "AGE_RESTRICTED"], "x-enumDescriptions": ["Guild is safe for all ages", "Guild is age-restricted"], "enum": [0, 3] }, "GuildMFALevelInput": { "description": "Required MFA level for moderation actions", "type": "integer", "minimum": 0, "maximum": 2147483647, "format": "int32", "x-enumNames": ["NONE", "ELEVATED"], "x-enumDescriptions": ["Guild has no MFA requirement", "Guild requires 2FA for moderation actions"], "enum": [0, 1] }, "GuildVerificationLevelInput": { "description": "Required verification level for members", "type": "integer", "minimum": 0, "maximum": 2147483647, "format": "int32", "x-enumNames": ["NONE", "LOW", "MEDIUM", "HIGH", "VERY_HIGH"], "x-enumDescriptions": [ "Unrestricted", "Must have verified email", "Registered for more than 5 minutes", "Member of the server for more than 10 minutes", "Must have a verified phone number" ], "enum": [0, 1, 2, 3, 4] }, "PurgeGuildAssetErrorSchema": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "error": {"type": "string", "minLength": 1, "maxLength": 4000} }, "required": ["id", "error"], "additionalProperties": false }, "PurgeGuildAssetResultSchema": { "type": "object", "properties": { "id": { "description": "Unique identifier of the asset", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "asset_type": { "description": "Type of guild asset", "x-enumNames": ["emoji", "sticker", "unknown"], "x-enumDescriptions": ["Custom emoji asset", "Custom sticker asset", "Unknown asset type"], "enum": ["emoji", "sticker", "unknown"], "type": "string" }, "found_in_db": {"type": "boolean", "description": "Whether the asset was found in the database"}, "guild_id": { "nullable": true, "description": "ID of the guild the asset belongs to", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "guild_nsfw_level": { "nullable": true, "description": "NSFW level of the guild the asset belongs to", "allOf": [{"$ref": "#/components/schemas/NSFWLevel"}] } }, "required": ["id", "asset_type", "found_in_db", "guild_id", "guild_nsfw_level"], "additionalProperties": false }, "AuditLogWebhookResponse": { "type": "object", "properties": { "id": { "description": "The unique identifier for this webhook", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "type": {"allOf": [{"$ref": "#/components/schemas/WebhookType"}]}, "guild_id": { "description": "The guild ID this webhook belongs to", "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "channel_id": { "description": "The channel ID this webhook posts to", "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "name": {"type": "string", "description": "The name of the webhook"}, "avatar_hash": {"description": "The hash of the webhook avatar", "nullable": true, "type": "string"} }, "required": ["id", "type", "name"], "additionalProperties": false }, "GuildAuditLogEntryResponse": { "type": "object", "properties": { "id": { "description": "The unique identifier for this audit log entry", "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "action_type": {"allOf": [{"$ref": "#/components/schemas/AuditLogActionType"}]}, "user_id": { "description": "The user ID of the user who performed the action", "nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}] }, "target_id": { "description": "The ID of the affected entity (user, channel, role, invite code, etc.)", "nullable": true, "type": "string" }, "reason": {"description": "The reason provided for the action", "type": "string"}, "options": { "description": "Additional options depending on action type", "type": "object", "properties": { "channel_id": {"description": "Channel ID for relevant actions", "type": "string"}, "count": {"description": "Count of items affected", "type": "number"}, "delete_member_days": { "description": "Number of days of messages to delete on member ban", "type": "string" }, "id": {"description": "ID of the affected entity", "type": "string"}, "integration_type": {"description": "Type of integration", "type": "number"}, "message_id": {"description": "Message ID for relevant actions", "type": "string"}, "members_removed": {"description": "Number of members removed", "type": "number"}, "role_name": {"description": "Name of the role", "type": "string"}, "type": {"description": "Type identifier", "type": "number"}, "inviter_id": {"description": "ID of the user who created the invite", "type": "string"}, "max_age": {"description": "Maximum age of the invite in seconds", "type": "number"}, "max_uses": {"description": "Maximum number of uses for the invite", "type": "number"}, "temporary": {"description": "Whether the invite grants temporary membership", "type": "boolean"}, "uses": {"description": "Number of times the invite has been used", "type": "number"} }, "additionalProperties": false }, "changes": { "description": "Changes made to the target", "type": "array", "items": {"$ref": "#/components/schemas/AuditLogChangeSchema"} } }, "required": ["id", "action_type"], "additionalProperties": false }, "AuditLogChangeSchema": { "type": "object", "properties": { "key": {"type": "string", "description": "The field that changed"}, "old_value": { "description": "Value before the change", "anyOf": [ {"type": "string"}, {"type": "number"}, {"type": "boolean"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "number"}}, { "type": "object", "properties": { "added": {"type": "array", "items": {"type": "string"}}, "removed": {"type": "array", "items": {"type": "string"}} }, "required": ["added", "removed"], "additionalProperties": false }, {"type": "string", "nullable": true, "enum": [null]} ] }, "new_value": { "description": "Value after the change", "anyOf": [ {"type": "string"}, {"type": "number"}, {"type": "boolean"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "number"}}, { "type": "object", "properties": { "added": {"type": "array", "items": {"type": "string"}}, "removed": {"type": "array", "items": {"type": "string"}} }, "required": ["added", "removed"], "additionalProperties": false }, {"type": "string", "nullable": true, "enum": [null]} ] } }, "required": ["key"], "additionalProperties": false }, "AuditLogActionType": { "description": "The type of action that occurred", "type": "integer", "enum": [ 1, 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 40, 41, 42, 50, 51, 52, 60, 61, 62, 90, 91, 92, 72, 73, 74, 75 ], "format": "int32", "x-enumNames": [ "GUILD_UPDATE", "CHANNEL_CREATE", "CHANNEL_UPDATE", "CHANNEL_DELETE", "CHANNEL_OVERWRITE_CREATE", "CHANNEL_OVERWRITE_UPDATE", "CHANNEL_OVERWRITE_DELETE", "MEMBER_KICK", "MEMBER_PRUNE", "MEMBER_BAN_ADD", "MEMBER_BAN_REMOVE", "MEMBER_UPDATE", "MEMBER_ROLE_UPDATE", "MEMBER_MOVE", "MEMBER_DISCONNECT", "BOT_ADD", "ROLE_CREATE", "ROLE_UPDATE", "ROLE_DELETE", "INVITE_CREATE", "INVITE_UPDATE", "INVITE_DELETE", "WEBHOOK_CREATE", "WEBHOOK_UPDATE", "WEBHOOK_DELETE", "EMOJI_CREATE", "EMOJI_UPDATE", "EMOJI_DELETE", "STICKER_CREATE", "STICKER_UPDATE", "STICKER_DELETE", "MESSAGE_DELETE", "MESSAGE_BULK_DELETE", "MESSAGE_PIN", "MESSAGE_UNPIN" ], "x-enumDescriptions": [ "Guild settings were updated", "Channel was created", "Channel was updated", "Channel was deleted", "Permission overwrite was created", "Permission overwrite was updated", "Permission overwrite was deleted", "Member was kicked", "Members were pruned", "Member was banned", "Member ban was removed", "Member was updated", "Member roles were updated", "Member was moved to a different voice channel", "Member was disconnected from a voice channel", "Bot was added to the guild", "Role was created", "Role was updated", "Role was deleted", "Invite was created", "Invite was updated", "Invite was deleted", "Webhook was created", "Webhook was updated", "Webhook was deleted", "Emoji was created", "Emoji was updated", "Emoji was deleted", "Sticker was created", "Sticker was updated", "Sticker was deleted", "Message was deleted", "Messages were bulk deleted", "Message was pinned", "Message was unpinned" ] }, "WebhookType": { "description": "The type of webhook", "type": "integer", "enum": [1, 2], "format": "int32", "x-enumNames": ["INCOMING", "CHANNEL_FOLLOWER"], "x-enumDescriptions": ["Incoming webhook", "Channel follower webhook"] }, "GuildMemberResponse": { "type": "object", "properties": { "user": { "description": "The user this guild member represents", "allOf": [{"$ref": "#/components/schemas/UserPartialResponse"}] }, "nick": {"description": "The nickname of the member in this guild", "nullable": true, "type": "string"}, "avatar": {"description": "The hash of the member guild-specific avatar", "nullable": true, "type": "string"}, "banner": {"description": "The hash of the member guild-specific banner", "nullable": true, "type": "string"}, "accent_color": { "description": "The accent colour of the member guild profile as an integer", "nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}] }, "roles": { "maxItems": 250, "type": "array", "items": {"type": "string"}, "description": "Array of role IDs the member has" }, "joined_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "description": "ISO8601 timestamp of when the user joined the guild" }, "mute": {"type": "boolean", "description": "Whether the member is muted in voice channels"}, "deaf": {"type": "boolean", "description": "Whether the member is deafened in voice channels"}, "communication_disabled_until": { "description": "ISO8601 timestamp until which the member is timed out", "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" }, "profile_flags": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/GuildMemberProfileFlags"}]}, "mention_flags": { "nullable": true, "description": "Per-guild reply mention preference override; NO_PREFERENCE means inherit the user-level mention_flags.", "allOf": [{"$ref": "#/components/schemas/MentionReplyPreferences"}] } }, "required": ["user", "roles", "joined_at", "mute", "deaf"], "additionalProperties": false }, "GuildMemberProfileFlags": { "type": "integer", "minimum": 0, "maximum": 2147483647, "description": "Member profile flags", "format": "int32", "x-bitflagValues": [ {"name": "AVATAR_UNSET", "value": "1", "description": "Guild member avatar is unset"}, {"name": "BANNER_UNSET", "value": "2", "description": "Guild member banner is unset"} ] }, "InstanceCaptchaProviderSchema": {"type": "string", "enum": ["hcaptcha", "turnstile", "none"]}, "InstanceRegistrationModeSchema": { "description": "Registration mode", "x-enumNames": ["open", "approval", "closed"], "x-enumDescriptions": [ "Anyone can register", "Anyone can register, but admins must approve new accounts", "Public registration is closed" ], "enum": ["open", "approval", "closed"], "type": "string" }, "MessageKeyboardFocusConfigUpdateRequest": { "type": "object", "properties": { "enabled": {"type": "boolean"}, "rollout_basis_points": {"type": "integer", "minimum": 0, "maximum": 10000}, "rollout_salt": {"type": "string", "minLength": 1, "maxLength": 64}, "included_user_ids": { "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} }, "excluded_user_ids": { "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} } } }, "MessageHoverTrackingConfigUpdateRequest": { "type": "object", "properties": { "enabled": {"type": "boolean"}, "rollout_basis_points": {"type": "integer", "minimum": 0, "maximum": 10000}, "rollout_salt": {"type": "string", "minLength": 1, "maxLength": 64}, "included_user_ids": { "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} }, "excluded_user_ids": { "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} } } }, "ExperimentDeliveryConfigUpdateRequest": { "type": "object", "properties": { "poll_interval_seconds": {"type": "integer", "minimum": 60, "maximum": 86400}, "poll_jitter_percent": {"type": "integer", "minimum": 0, "maximum": 50} } }, "VoiceNoiseSuppressionConfigUpdateRequest": { "type": "object", "properties": { "enabled": {"type": "boolean"}, "default_backend": {"allOf": [{"$ref": "#/components/schemas/VoiceNoiseSuppressionBackendSchema"}]}, "enabled_backends": { "maxItems": 7, "type": "array", "items": {"$ref": "#/components/schemas/VoiceNoiseSuppressionBackendSchema"} }, "allow_user_override": {"type": "boolean"}, "rollout_basis_points": {"type": "integer", "minimum": 0, "maximum": 10000}, "rollout_salt": {"type": "string", "minLength": 1, "maxLength": 64}, "included_user_ids": { "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} }, "excluded_user_ids": { "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} }, "guild_overrides": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "guild_id": {"type": "string", "pattern": "^\\d{1,20}$"}, "backend": {"$ref": "#/components/schemas/VoiceNoiseSuppressionBackendSchema"} }, "required": ["guild_id", "backend"] } }, "stereo_enabled": {"type": "boolean"}, "suppression_strength": {"type": "integer", "minimum": 0, "maximum": 100} } }, "GatewayRolloutConfigUpdateRequest": { "type": "object", "properties": { "session_rollout_percentage": {"type": "number", "minimum": 0, "maximum": 100}, "session_rollout_mode": {"type": "string", "enum": ["modulo", "random"]}, "guild_rollout_percentage": {"type": "number", "minimum": 0, "maximum": 100}, "rpc_request_timeout_ms": {"type": "integer", "minimum": 1000, "maximum": 60000}, "max_concurrent_session_starts": {"type": "integer", "minimum": 1, "maximum": 10000}, "max_concurrent_guild_starts": {"type": "integer", "minimum": 1, "maximum": 10000}, "gateway_dispatch_relay_shards": {"type": "integer", "minimum": 1, "maximum": 10000}, "gateway_dispatch_relay_max_queue": {"type": "integer", "minimum": 0, "maximum": 1000000}, "voice_e2ee_scope": {"type": "string", "enum": ["guild_feature_only", "platform_wide"]} } }, "VoiceNoiseSuppressionBackendSchema": { "type": "string", "enum": ["none", "standard", "gate", "speex", "rnnoise", "gtcrn", "deep_filter"] }, "MessageKeyboardFocusConfigResponse": { "type": "object", "properties": { "enabled": {"default": false, "type": "boolean"}, "config_version": {"default": 0, "type": "integer", "minimum": 0, "maximum": 9007199254740991}, "rollout_basis_points": {"default": 0, "type": "integer", "minimum": 0, "maximum": 10000}, "rollout_salt": {"default": "message-keyboard-focus-v1", "type": "string", "minLength": 1, "maxLength": 64}, "included_user_ids": { "default": [], "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} }, "excluded_user_ids": { "default": [], "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} } }, "required": [ "enabled", "config_version", "rollout_basis_points", "rollout_salt", "included_user_ids", "excluded_user_ids" ], "additionalProperties": false }, "MessageHoverTrackingConfigResponse": { "type": "object", "properties": { "enabled": {"default": false, "type": "boolean"}, "config_version": {"default": 0, "type": "integer", "minimum": 0, "maximum": 9007199254740991}, "rollout_basis_points": {"default": 0, "type": "integer", "minimum": 0, "maximum": 10000}, "rollout_salt": {"default": "message-hover-tracking-v1", "type": "string", "minLength": 1, "maxLength": 64}, "included_user_ids": { "default": [], "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} }, "excluded_user_ids": { "default": [], "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} } }, "required": [ "enabled", "config_version", "rollout_basis_points", "rollout_salt", "included_user_ids", "excluded_user_ids" ], "additionalProperties": false }, "ExperimentDeliveryConfigResponse": { "type": "object", "properties": { "poll_interval_seconds": {"default": 300, "type": "integer", "minimum": 60, "maximum": 86400}, "poll_jitter_percent": {"default": 15, "type": "integer", "minimum": 0, "maximum": 50} }, "required": ["poll_interval_seconds", "poll_jitter_percent"], "additionalProperties": false }, "VoiceNoiseSuppressionConfigResponse": { "type": "object", "properties": { "enabled": {"default": false, "type": "boolean"}, "config_version": {"default": 0, "type": "integer", "minimum": 0, "maximum": 9007199254740991}, "default_backend": { "default": "standard", "allOf": [{"$ref": "#/components/schemas/VoiceNoiseSuppressionBackendSchema"}] }, "enabled_backends": { "default": ["none", "standard", "gate", "speex", "rnnoise", "gtcrn", "deep_filter"], "maxItems": 7, "type": "array", "items": {"$ref": "#/components/schemas/VoiceNoiseSuppressionBackendSchema"} }, "allow_user_override": {"default": true, "type": "boolean"}, "rollout_basis_points": {"default": 0, "type": "integer", "minimum": 0, "maximum": 10000}, "rollout_salt": {"default": "voice-ns-v1", "type": "string", "minLength": 1, "maxLength": 64}, "included_user_ids": { "default": [], "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} }, "excluded_user_ids": { "default": [], "maxItems": 1000, "type": "array", "items": {"type": "string", "pattern": "^\\d{1,20}$"} }, "guild_overrides": { "default": [], "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "guild_id": {"type": "string", "pattern": "^\\d{1,20}$"}, "backend": {"$ref": "#/components/schemas/VoiceNoiseSuppressionBackendSchema"} }, "required": ["guild_id", "backend"], "additionalProperties": false } }, "stereo_enabled": {"default": false, "type": "boolean"}, "suppression_strength": {"default": 80, "type": "integer", "minimum": 0, "maximum": 100} }, "required": [ "enabled", "config_version", "default_backend", "enabled_backends", "allow_user_override", "rollout_basis_points", "rollout_salt", "included_user_ids", "excluded_user_ids", "guild_overrides", "stereo_enabled", "suppression_strength" ], "additionalProperties": false }, "GatewayRolloutConfigResponse": { "type": "object", "properties": { "session_rollout_percentage": {"default": 100, "type": "number", "minimum": 0, "maximum": 100}, "session_rollout_mode": {"default": "modulo", "type": "string", "enum": ["modulo", "random"]}, "guild_rollout_percentage": {"default": 100, "type": "number", "minimum": 0, "maximum": 100}, "rpc_request_timeout_ms": {"default": 10000, "type": "integer", "minimum": 1000, "maximum": 60000}, "max_concurrent_session_starts": {"default": 512, "type": "integer", "minimum": 1, "maximum": 10000}, "max_concurrent_guild_starts": {"default": 256, "type": "integer", "minimum": 1, "maximum": 10000}, "gateway_dispatch_relay_shards": {"default": 32, "type": "integer", "minimum": 1, "maximum": 10000}, "gateway_dispatch_relay_max_queue": {"default": 50000, "type": "integer", "minimum": 0, "maximum": 1000000}, "voice_e2ee_scope": { "default": "guild_feature_only", "type": "string", "enum": ["guild_feature_only", "platform_wide"] } }, "required": [ "session_rollout_percentage", "session_rollout_mode", "guild_rollout_percentage", "rpc_request_timeout_ms", "max_concurrent_session_starts", "max_concurrent_guild_starts", "gateway_dispatch_relay_shards", "gateway_dispatch_relay_max_queue", "voice_e2ee_scope" ], "additionalProperties": false }, "JobLedgerEntrySchema": { "type": "object", "properties": { "job_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "task_type": {"type": "string"}, "status": {"type": "string", "enum": ["queued", "running", "succeeded", "cancelled", "deadletter"]}, "progress_current": {"nullable": true, "type": "number"}, "progress_total": {"nullable": true, "type": "number"}, "progress_message": {"nullable": true, "type": "string"}, "error_message": {"nullable": true, "type": "string"}, "created_at": {"type": "string", "description": "ISO 8601"}, "started_at": {"nullable": true, "type": "string"}, "completed_at": {"nullable": true, "type": "string"}, "requested_by_user_id": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/SnowflakeStringType"}]}, "audit_log_reason": {"nullable": true, "type": "string"}, "jet_stream_lane": {"nullable": true, "type": "string"}, "jet_stream_seq": {"nullable": true, "type": "string"}, "attempts": {"type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991}, "max_attempts": {"type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991}, "run_at": {"nullable": true, "type": "string"}, "cancel_requested": {"type": "boolean"}, "context_link": {"nullable": true, "type": "string"}, "payload": {"nullable": true, "description": "JSON-encoded original payload", "type": "string"}, "result": {"nullable": true, "description": "JSON-encoded result, if any", "type": "string"} }, "required": [ "job_id", "task_type", "status", "progress_current", "progress_total", "progress_message", "error_message", "created_at", "started_at", "completed_at", "requested_by_user_id", "audit_log_reason", "jet_stream_lane", "jet_stream_seq", "attempts", "max_attempts", "run_at", "cancel_requested", "context_link", "payload", "result" ], "additionalProperties": false }, "ReportType": { "description": "The type of entity being reported", "type": "integer", "enum": [0, 1, 2], "format": "int32", "x-enumNames": ["MESSAGE", "USER", "GUILD"], "x-enumDescriptions": ["Report of a message", "Report of a user", "Report of a guild"] }, "ReportStatus": { "description": "The status of the report", "type": "integer", "enum": [0, 1], "format": "int32", "x-enumNames": ["PENDING", "RESOLVED"], "x-enumDescriptions": ["Report is pending review", "Report has been resolved"] }, "UserAdminResponseSchema": { "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "username": {"type": "string"}, "discriminator": {"$ref": "#/components/schemas/Int32Type"}, "global_name": {"nullable": true, "type": "string"}, "bot": {"type": "boolean"}, "system": {"type": "boolean"}, "flags": {"allOf": [{"$ref": "#/components/schemas/UserFlags"}]}, "premium_flags": {"allOf": [{"$ref": "#/components/schemas/PremiumFlags"}]}, "avatar": {"nullable": true, "type": "string"}, "banner": {"nullable": true, "type": "string"}, "bio": {"nullable": true, "type": "string"}, "pronouns": {"nullable": true, "type": "string"}, "accent_color": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}]}, "email": {"nullable": true, "type": "string"}, "email_verified": {"type": "boolean"}, "email_bounced": {"type": "boolean"}, "has_verified_phone": {"type": "boolean"}, "date_of_birth": {"nullable": true, "type": "string"}, "locale": {"nullable": true, "type": "string"}, "premium_type": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}]}, "premium_since": {"nullable": true, "type": "string"}, "premium_until": {"nullable": true, "type": "string"}, "premium_grace_ends_at": {"nullable": true, "type": "string"}, "premium_lifetime_sequence": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}]}, "suspicious_activity_flags": {"allOf": [{"$ref": "#/components/schemas/SuspiciousActivityFlags"}]}, "phone_verification_deferred": { "type": "boolean", "description": "Whether a stored phone requirement is deferred until the user joins a discoverable or large community" }, "temp_banned_until": {"nullable": true, "type": "string"}, "pending_deletion_at": {"nullable": true, "type": "string"}, "pending_bulk_message_deletion_at": {"nullable": true, "type": "string"}, "deletion_reason_code": {"nullable": true, "allOf": [{"$ref": "#/components/schemas/Int32Type"}]}, "deletion_public_reason": {"nullable": true, "type": "string"}, "acls": {"maxItems": 112, "type": "array", "items": {"type": "string"}}, "traits": {"maxItems": 100, "type": "array", "items": {"type": "string"}}, "has_totp": {"type": "boolean"}, "authenticator_types": {"maxItems": 10, "type": "array", "items": {"$ref": "#/components/schemas/Int32Type"}}, "last_active_at": {"nullable": true, "type": "string"}, "last_active_ip": {"nullable": true, "type": "string"}, "last_active_ip_reverse": {"nullable": true, "type": "string"}, "last_active_location": {"nullable": true, "type": "string"} }, "required": [ "id", "username", "discriminator", "global_name", "bot", "system", "flags", "premium_flags", "avatar", "banner", "bio", "pronouns", "accent_color", "email", "email_verified", "email_bounced", "has_verified_phone", "date_of_birth", "locale", "premium_type", "premium_since", "premium_until", "premium_grace_ends_at", "premium_lifetime_sequence", "suspicious_activity_flags", "phone_verification_deferred", "temp_banned_until", "pending_deletion_at", "pending_bulk_message_deletion_at", "deletion_reason_code", "deletion_public_reason", "acls", "traits", "has_totp", "authenticator_types", "last_active_at", "last_active_ip", "last_active_ip_reverse", "last_active_location" ], "additionalProperties": false }, "SuspiciousActivityFlags": { "type": "integer", "minimum": 0, "maximum": 2147483647, "description": "Suspicious activity indicators", "format": "int32", "x-bitflagValues": [ {"name": "REQUIRE_VERIFIED_EMAIL", "value": "1", "description": "Requires verified email address"}, {"name": "REQUIRE_REVERIFIED_EMAIL", "value": "2", "description": "Requires re-verified email address"}, {"name": "REQUIRE_VERIFIED_PHONE", "value": "4", "description": "Requires verified phone number"}, {"name": "REQUIRE_REVERIFIED_PHONE", "value": "8", "description": "Requires re-verified phone number"}, { "name": "REQUIRE_VERIFIED_EMAIL_OR_VERIFIED_PHONE", "value": "16", "description": "Requires verified email or verified phone" }, { "name": "REQUIRE_REVERIFIED_EMAIL_OR_VERIFIED_PHONE", "value": "32", "description": "Requires re-verified email or re-verified phone" }, { "name": "REQUIRE_VERIFIED_EMAIL_OR_REVERIFIED_PHONE", "value": "64", "description": "Requires verified email or re-verified phone" }, { "name": "REQUIRE_REVERIFIED_EMAIL_OR_REVERIFIED_PHONE", "value": "128", "description": "Requires re-verified email or re-verified phone" }, { "name": "REQUIRE_INBOUND_PHONE_VERIFICATION", "value": "256", "description": "Requires inbound SMS verification (user must text code to platform number)" } ] }, "PremiumFlags": { "type": "integer", "minimum": 0, "maximum": 2147483647, "description": "User premium-related flags (32-bit)", "format": "int32", "x-bitflagValues": [ {"name": "DISCRIMINATOR", "value": "1", "description": "User has a premium discriminator"}, {"name": "BADGE_HIDDEN", "value": "2", "description": "User has hidden their premium badge"}, {"name": "BADGE_MASKED", "value": "4", "description": "User has masked their premium badge"}, { "name": "BADGE_TIMESTAMP_HIDDEN", "value": "8", "description": "User has hidden their premium badge timestamp" }, { "name": "BADGE_SEQUENCE_HIDDEN", "value": "16", "description": "User has hidden their premium badge sequence" }, {"name": "PERKS_SANITIZED", "value": "32", "description": "User premium perks are sanitized"}, {"name": "PURCHASE_DISABLED", "value": "64", "description": "Premium purchase is disabled for this user"}, {"name": "ENABLED_OVERRIDE", "value": "128", "description": "Premium status is enabled via override"}, {"name": "PERKS_DISABLED", "value": "256", "description": "User has temporarily disabled premium perks"} ] }, "AdminRelationshipEntrySchema": { "type": "object", "properties": { "target_user_id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "category": {"$ref": "#/components/schemas/RelationshipCategoryEnum"}, "nickname": {"nullable": true, "type": "string"}, "since": {"nullable": true, "type": "string"}, "target": { "nullable": true, "type": "object", "properties": { "id": {"$ref": "#/components/schemas/SnowflakeStringType"}, "username": {"type": "string"}, "discriminator": {"type": "string"}, "global_name": {"nullable": true, "type": "string"}, "avatar": {"nullable": true, "type": "string"} }, "required": ["id", "username", "discriminator", "global_name", "avatar"], "additionalProperties": false } }, "required": ["target_user_id", "category", "nickname", "since", "target"], "additionalProperties": false }, "DiscriminatorType": {"anyOf": [{"type": "string"}, {"type": "number"}]}, "UsernameType": {"type": "string"}, "WebAuthnCredentialResponse": { "type": "object", "properties": { "id": {"type": "string", "description": "The credential ID"}, "name": {"type": "string", "description": "User-assigned name for the credential"}, "created_at": {"type": "string", "description": "When the credential was registered"}, "last_used_at": {"nullable": true, "description": "When the credential was last used", "type": "string"} }, "required": ["id", "name", "created_at", "last_used_at"], "additionalProperties": false }, "VoiceServerAdminResponse": { "type": "object", "properties": { "region_id": {"type": "string", "description": "ID of the region this server belongs to"}, "server_id": {"type": "string", "description": "Unique identifier for the voice server"}, "endpoint": { "type": "string", "format": "uri", "description": "Client signal WebSocket endpoint URL for the voice server" }, "latitude": { "nullable": true, "description": "Optional geographic latitude override for this server", "type": "number" }, "longitude": { "nullable": true, "description": "Optional geographic longitude override for this server", "type": "number" }, "is_active": {"type": "boolean", "description": "Whether the server is currently active"}, "soft_connection_limit": { "nullable": true, "description": "Connection count above which placement prefers another server, or null when the server has no limit", "type": "integer", "minimum": 1, "maximum": 2147483647 }, "vip_only": {"type": "boolean", "description": "Whether this server is restricted to VIP users"}, "required_guild_features": { "maxItems": 100, "type": "array", "items": {"type": "string"}, "description": "Guild features required to use this server" }, "allowed_guild_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"}, "description": "Guild IDs explicitly allowed to use this server" }, "allowed_user_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"}, "description": "User IDs explicitly allowed to use this server" }, "created_at": { "nullable": true, "description": "ISO 8601 timestamp when the server was created", "type": "string" }, "updated_at": { "nullable": true, "description": "ISO 8601 timestamp when the server was last updated", "type": "string" } }, "required": [ "region_id", "server_id", "endpoint", "latitude", "longitude", "is_active", "soft_connection_limit", "vip_only", "required_guild_features", "allowed_guild_ids", "allowed_user_ids", "created_at", "updated_at" ], "additionalProperties": false }, "VoiceRegionAdminResponse": { "type": "object", "properties": { "id": {"type": "string", "description": "Unique identifier for the voice region"}, "name": {"type": "string", "description": "Display name of the voice region"}, "emoji": {"type": "string", "description": "Emoji representing the region"}, "latitude": {"type": "number", "description": "Geographic latitude coordinate"}, "longitude": {"type": "number", "description": "Geographic longitude coordinate"}, "is_default": {"type": "boolean", "description": "Whether this is the default region"}, "vip_only": {"type": "boolean", "description": "Whether this region is restricted to VIP users"}, "required_guild_features": { "maxItems": 100, "type": "array", "items": {"type": "string"}, "description": "Guild features required to use this region" }, "allowed_guild_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"}, "description": "Guild IDs explicitly allowed to use this region" }, "allowed_user_ids": { "maxItems": 1000, "type": "array", "items": {"$ref": "#/components/schemas/SnowflakeStringType"}, "description": "User IDs explicitly allowed to use this region" }, "created_at": { "nullable": true, "description": "ISO 8601 timestamp when the region was created", "type": "string" }, "updated_at": { "nullable": true, "description": "ISO 8601 timestamp when the region was last updated", "type": "string" } }, "required": [ "id", "name", "emoji", "latitude", "longitude", "is_default", "vip_only", "required_guild_features", "allowed_guild_ids", "allowed_user_ids", "created_at", "updated_at" ], "additionalProperties": false } }, "securitySchemes": { "botToken": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "Bot token: `Authorization: Bot `. This is the primary authentication method for bot applications." }, "oauth2Token": { "type": "oauth2", "description": "OAuth2 access token: `Authorization: Bearer `.", "flows": { "authorizationCode": { "authorizationUrl": "/oauth2/authorize", "tokenUrl": "/oauth2/token", "scopes": { "identify": "Read basic user identity information.", "email": "Read the user email address.", "guilds": "Read guild membership information for the current user.", "connections": "Read linked third-party account connections for the current user.", "bot": "Add a bot user to a guild." } } } }, "bearerToken": { "type": "http", "scheme": "bearer", "description": "Bearer-form token: `Authorization: Bearer `. Use `oauth2Token` when a route requires OAuth2 scopes." }, "sessionToken": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "User session token from login: `Authorization: ` (no prefix). Prefer a bot account over user tokens where possible." }, "adminApiKey": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "Admin API key: `Authorization: Admin `. Only valid for `/admin/*` endpoints." } } }, "tags": [{"name": "Admin", "description": "Administrative operations for instance management"}] }