Build powerful integrations with our REST endpoints for server management, user actions, and more.
The REST API allows you to make HTTP requests to perform actions like creating servers, managing members, and sending messages.
Use a bearer token in the Authorization header for all requests.
Authorization: Bearer YOUR_BOT_TOKEN
/api/v9/users/@me
Retrieve current user's information.
{
"id": "123456789012345678",
"username": "johndoe#1234",
"avatar": "https://cdn.discordapp.com/avatars/123456789012345678/0.png"
}
PATCH /api/v9/users/@me
Content-Type: application/json
{
"username": "new_username"
}
/api/v9/guilds
Create a new server with specified configuration.
{
"name": "My Cool Server",
"region": "us-west",
"icon": "base64_icon_data"
}
DELETE /api/v9/guilds/{guild.id}
/api/v9/channels/{channel.id}/messages
Send a message to a specific channel.
{
"content": "Hello from the REST API!",
"nonce": "1234567890"
}