List a server's channels, read recent messages and send a message to a channel, with a project API key.
Discord channel listing, message history, and message sending - project API key
List all channels in a server#
GET/api/servers/{serverId}/channels
Returns all channels the bot can access in the server, with categories.
Authentication: Project API key (X-API-Key header)
Parameters
| Name | In | Type | Required | Description |
|---|
serverId | path | string | yes | Discord server ID |
type | query | "all" or "text" or "voice" or "announcement" or "category" | no | Filter by channel type |
categoryId | query | string | no | Filter by parent category ID |
Responses
| Status | Description | Body |
|---|
200 | List of channels and categories. | ChannelListResponseDto |
400 | Invalid query parameters. | |
401 | Missing or invalid API key. | |
403 | Project does not have READ access to this server. | |
404 | Server not found or bot not connected. | |
Open in Swagger (opens in a new tab)
Get channel details#
GET/api/servers/{serverId}/channels/{channelId}
Returns detailed information about a specific channel.
Authentication: Project API key (X-API-Key header)
Parameters
| Name | In | Type | Required | Description |
|---|
serverId | path | string | yes | Discord server ID |
channelId | path | string | yes | Discord channel ID |
Responses
| Status | Description | Body |
|---|
200 | Channel details. | ChannelDetailResponseDto |
400 | Invalid channel ID format. | |
401 | Missing or invalid API key. | |
403 | Project does not have READ access to this server. | |
404 | Channel does not exist or bot lacks access. | |
Open in Swagger (opens in a new tab)
Get recent messages from a channel#
GET/api/servers/{serverId}/channels/{channelId}/messages
Retrieves message history from a text channel. Supports pagination and author filtering.
Authentication: Project API key (X-API-Key header)
Parameters
| Name | In | Type | Required | Description |
|---|
serverId | path | string | yes | Discord server ID |
channelId | path | string | yes | Discord channel ID |
limit | query | number | no | Max number of messages (1-100) Default: 50. |
before | query | string | no | Get messages before this Discord snowflake ID |
after | query | string | no | Get messages after this Discord snowflake ID |
authorId | query | string | no | Filter by author Discord ID |
Responses
| Status | Description | Body |
|---|
200 | List of messages. | GetMessagesResponseDto |
400 | Invalid query parameters. | |
401 | Missing or invalid API key. | |
403 | Project does not have READ access to this server. | |
404 | Channel does not exist or bot lacks access. | |
429 | Rate limit exceeded. 10 requests per minute per project. | |
Open in Swagger (opens in a new tab)
Send a message to a Discord channel#
POST/api/servers/{serverId}/channels/{channelId}/messages
Sends a message with optional embeds and mention configuration.
Authentication: Project API key (X-API-Key header)
Parameters
| Name | In | Type | Required | Description |
|---|
serverId | path | string | yes | Discord server ID |
channelId | path | string | yes | Discord channel ID |
Request body (JSON, required): SendMessageDto schema.
Responses
| Status | Description | Body |
|---|
201 | Message sent successfully. | SendMessageResponseDto |
400 | Invalid message content or embed validation failed. | |
401 | Missing or invalid API key. | |
403 | Project does not have SEND_MESSAGES operation on this server. | |
404 | Channel does not exist or bot lacks access. | |
429 | Rate limit exceeded. 5 messages per minute per project. | |
Open in Swagger (opens in a new tab)
Schemas#
AllowedMentionsDto schema#
| Field | Type | Required | Description |
|---|
parse | array of "everyone" or "roles" or "users" | no | Types of mentions allowed |
roles | array of string | no | Discord role IDs to allow mentioning |
users | array of string | no | Discord user IDs to allow mentioning |
ChannelCategoryDto schema#
| Field | Type | Required | Description |
|---|
children | array of string | yes | Child channel IDs |
id | string | yes | Category ID |
name | string | yes | Category name |
position | number | yes | Position |
ChannelDetailResponseDto schema#
| Field | Type | Required | Description |
|---|
createdAt | string | yes | ISO 8601 creation timestamp |
id | string | yes | Discord channel ID |
lastMessageId | string or null | yes | Last message ID |
name | string | yes | Channel name |
nsfw | boolean | yes | Whether the channel is NSFW |
overwrites | array of ChannelPermissionOverwriteDto | yes | Per-target permission overwrites configured on the channel |
parentId | string or null | yes | Parent category ID |
permissionOverwrites | boolean | yes | Whether the channel has any permission overwrites |
position | number | yes | Position |
topic | string or null | yes | Channel topic |
type | string | yes | Channel type |
ChannelListResponseDto schema#
| Field | Type | Required | Description |
|---|
categories | array of ChannelCategoryDto | yes | |
channels | array of ChannelResponseDto | yes | |
ChannelPermissionOverwriteDto schema#
| Field | Type | Required | Description |
|---|
allow | string | yes | Allowed permission bits (Discord bitfield as a string) |
deny | string | yes | Denied permission bits (Discord bitfield as a string) |
id | string | yes | Role or member ID the overwrite targets |
type | "role" or "member" | yes | Whether the overwrite targets a role or a member |
ChannelResponseDto schema#
| Field | Type | Required | Description |
|---|
createdAt | string | no | ISO 8601 creation timestamp |
id | string | yes | Discord channel ID |
lastMessageId | string or null | no | Last message ID |
name | string | yes | Channel name |
nsfw | boolean | yes | Whether the channel is NSFW |
parentId | string or null | yes | Parent category ID |
permissionOverwrites | boolean | yes | Whether the channel has permission overwrites |
position | number | yes | Position in the channel list |
topic | string or null | yes | Channel topic |
type | "text" or "voice" or "announcement" or "category" | yes | Channel type |
EmbedAuthorDto schema#
| Field | Type | Required | Description |
|---|
icon_url | string (uri) | no | Author icon URL |
name | string | yes | Author name |
url | string (uri) | no | Author URL |
EmbedDto schema#
| Field | Type | Required | Description |
|---|
author | EmbedAuthorDto | no | Embed author |
color | number | no | Color as decimal integer (0-16777215) |
description | string | no | Embed description |
footer | EmbedFooterDto | no | Embed footer |
image | EmbedImageDto | no | Embed image |
thumbnail | EmbedThumbnailDto | no | Embed thumbnail |
title | string | no | Embed title |
url | string (uri) | no | Embed URL |
| Field | Type | Required | Description |
|---|
icon_url | string (uri) | no | Footer icon URL |
text | string | yes | Footer text |
EmbedImageDto schema#
| Field | Type | Required | Description |
|---|
url | string (uri) | yes | URL of the image |
EmbedThumbnailDto schema#
| Field | Type | Required | Description |
|---|
url | string (uri) | yes | URL of the thumbnail |
GetMessagesResponseDto schema#
| Field | Type | Required | Description |
|---|
hasMore | boolean | yes | Whether there are more messages available |
messages | array of MessageDto | yes | |
MentionDto schema#
| Field | Type | Required | Description |
|---|
id | string | yes | Mentioned user/role ID |
name | string or null | no | Mentioned user name |
MessageAttachmentDto schema#
| Field | Type | Required | Description |
|---|
filename | string | yes | File name |
id | string | yes | Attachment ID |
size | number | yes | File size in bytes |
url | string | yes | Attachment URL |
MessageAuthorDto schema#
| Field | Type | Required | Description |
|---|
avatar | string or null | no | Avatar hash or URL |
id | string | yes | Discord user ID |
username | string | yes | Discord username |
MessageDto schema#
| Field | Type | Required | Description |
|---|
attachments | array of MessageAttachmentDto | yes | |
author | MessageAuthorDto | yes | |
content | string | yes | Message content |
embeds | array of MessageEmbedDto | yes | |
id | string | yes | Discord message ID |
mentions | array of MentionDto | yes | |
timestamp | string | yes | ISO 8601 timestamp |
MessageEmbedDto schema#
| Field | Type | Required | Description |
|---|
color | number or null | no | Color in decimal |
description | string or null | no | Embed description |
title | string or null | no | Embed title |
type | string or null | no | Embed type |
url | string or null | no | Embed URL |
SendMessageDto schema#
| Field | Type | Required | Description |
|---|
allowed_mentions | AllowedMentionsDto | no | Allowed mentions configuration |
content | string | no | Message content (max 2000 chars, optional if embeds provided) |
embeds | array of EmbedDto | no | Embed objects (max 10) |
tts | boolean | no | Whether the message is text-to-speech Default: false. |
SendMessageResponseDto schema#
| Field | Type | Required | Description |
|---|
author | MessageAuthorDto | yes | |
channelId | string | yes | Discord channel ID |
content | string | yes | Message content |
id | string | yes | Discord message ID |
timestamp | string | yes | ISO 8601 timestamp |
Source: apps/api/openapi.json.