Skip to content

Messages

Messages belong to text channels within guilds.

GET /api/v1/channels/:id/messages

Fetch messages from a text channel. Uses cursor-based pagination.

Headers: Authorization: Bearer <token>

Query parameters:

ParameterDescription
limitNumber of messages to return, default 50, max 100 (optional)
beforeMessage ID — returns messages older than this (optional)

Response 200 OK:

[
{
"id": 100,
"channel_id": 1,
"author_id": 1,
"content": "Hello everyone!",
"created_at": "2026-01-15T12:00:00Z"
}
]

Messages are returned in reverse chronological order (newest first).

POST /api/v1/channels/:id/messages

Send a message to a text channel. The user must be a member of the guild that owns the channel.

Headers: Authorization: Bearer <token>

Request body:

{
"content": "Hello everyone!"
}

Response 201 Created: Returns the created message object.

This endpoint is rate-limited. See API Overview for details.

A MESSAGE_CREATE event is broadcast to all WebSocket clients subscribed to channel:<id>.

GET /api/v1/channels/:id/voice-state

Get the current state of a voice channel — who is connected and their mute/deafen status.

Headers: Authorization: Bearer <token>

Response 200 OK:

{
"channel_id": 5,
"joined": false,
"member_user_ids": [1, 2],
"member_states": [
{ "user_id": 1, "muted": false, "deafened": false, "guild_muted": false, "guild_deafened": false },
{ "user_id": 2, "muted": true, "deafened": false, "guild_muted": false, "guild_deafened": false }
]
}
POST /api/v1/channels/:id/voice-state

Join/leave a voice channel or update mute/deafen status.

Headers: Authorization: Bearer <token>

Request body (all fields optional):

{
"join": true,
"muted": false,
"deafened": false
}

Response 200 OK: Returns the updated voice state object.

A VOICE_STATE_UPDATE event is broadcast to all WebSocket clients subscribed to channel:<id>.