Skip to main content

Channels

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

NameInTypeRequiredDescription
serverIdpathstringyesDiscord server ID
typequery"all" or "text" or "voice" or "announcement" or "category"noFilter by channel type
categoryIdquerystringnoFilter by parent category ID

Responses

StatusDescriptionBody
200List of channels and categories.ChannelListResponseDto
400Invalid query parameters.
401Missing or invalid API key.
403Project does not have READ access to this server.
404Server 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

NameInTypeRequiredDescription
serverIdpathstringyesDiscord server ID
channelIdpathstringyesDiscord channel ID

Responses

StatusDescriptionBody
200Channel details.ChannelDetailResponseDto
400Invalid channel ID format.
401Missing or invalid API key.
403Project does not have READ access to this server.
404Channel 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

NameInTypeRequiredDescription
serverIdpathstringyesDiscord server ID
channelIdpathstringyesDiscord channel ID
limitquerynumbernoMax number of messages (1-100) Default: 50.
beforequerystringnoGet messages before this Discord snowflake ID
afterquerystringnoGet messages after this Discord snowflake ID
authorIdquerystringnoFilter by author Discord ID

Responses

StatusDescriptionBody
200List of messages.GetMessagesResponseDto
400Invalid query parameters.
401Missing or invalid API key.
403Project does not have READ access to this server.
404Channel does not exist or bot lacks access.
429Rate 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

NameInTypeRequiredDescription
serverIdpathstringyesDiscord server ID
channelIdpathstringyesDiscord channel ID

Request body (JSON, required): SendMessageDto schema.

Responses

StatusDescriptionBody
201Message sent successfully.SendMessageResponseDto
400Invalid message content or embed validation failed.
401Missing or invalid API key.
403Project does not have SEND_MESSAGES operation on this server.
404Channel does not exist or bot lacks access.
429Rate limit exceeded. 5 messages per minute per project.

Open in Swagger (opens in a new tab)

Schemas

AllowedMentionsDto schema

FieldTypeRequiredDescription
parsearray of "everyone" or "roles" or "users"noTypes of mentions allowed
rolesarray of stringnoDiscord role IDs to allow mentioning
usersarray of stringnoDiscord user IDs to allow mentioning

ChannelCategoryDto schema

FieldTypeRequiredDescription
childrenarray of stringyesChild channel IDs
idstringyesCategory ID
namestringyesCategory name
positionnumberyesPosition

ChannelDetailResponseDto schema

FieldTypeRequiredDescription
createdAtstringyesISO 8601 creation timestamp
idstringyesDiscord channel ID
lastMessageIdstring or nullyesLast message ID
namestringyesChannel name
nsfwbooleanyesWhether the channel is NSFW
overwritesarray of ChannelPermissionOverwriteDtoyesPer-target permission overwrites configured on the channel
parentIdstring or nullyesParent category ID
permissionOverwritesbooleanyesWhether the channel has any permission overwrites
positionnumberyesPosition
topicstring or nullyesChannel topic
typestringyesChannel type

ChannelListResponseDto schema

FieldTypeRequiredDescription
categoriesarray of ChannelCategoryDtoyes
channelsarray of ChannelResponseDtoyes

ChannelPermissionOverwriteDto schema

FieldTypeRequiredDescription
allowstringyesAllowed permission bits (Discord bitfield as a string)
denystringyesDenied permission bits (Discord bitfield as a string)
idstringyesRole or member ID the overwrite targets
type"role" or "member"yesWhether the overwrite targets a role or a member

ChannelResponseDto schema

FieldTypeRequiredDescription
createdAtstringnoISO 8601 creation timestamp
idstringyesDiscord channel ID
lastMessageIdstring or nullnoLast message ID
namestringyesChannel name
nsfwbooleanyesWhether the channel is NSFW
parentIdstring or nullyesParent category ID
permissionOverwritesbooleanyesWhether the channel has permission overwrites
positionnumberyesPosition in the channel list
topicstring or nullyesChannel topic
type"text" or "voice" or "announcement" or "category"yesChannel type

EmbedAuthorDto schema

FieldTypeRequiredDescription
icon_urlstring (uri)noAuthor icon URL
namestringyesAuthor name
urlstring (uri)noAuthor URL

EmbedDto schema

FieldTypeRequiredDescription
authorEmbedAuthorDtonoEmbed author
colornumbernoColor as decimal integer (0-16777215)
descriptionstringnoEmbed description
footerEmbedFooterDtonoEmbed footer
imageEmbedImageDtonoEmbed image
thumbnailEmbedThumbnailDtonoEmbed thumbnail
titlestringnoEmbed title
urlstring (uri)noEmbed URL

EmbedFooterDto schema

FieldTypeRequiredDescription
icon_urlstring (uri)noFooter icon URL
textstringyesFooter text

EmbedImageDto schema

FieldTypeRequiredDescription
urlstring (uri)yesURL of the image

EmbedThumbnailDto schema

FieldTypeRequiredDescription
urlstring (uri)yesURL of the thumbnail

GetMessagesResponseDto schema

FieldTypeRequiredDescription
hasMorebooleanyesWhether there are more messages available
messagesarray of MessageDtoyes

MentionDto schema

FieldTypeRequiredDescription
idstringyesMentioned user/role ID
namestring or nullnoMentioned user name

MessageAttachmentDto schema

FieldTypeRequiredDescription
filenamestringyesFile name
idstringyesAttachment ID
sizenumberyesFile size in bytes
urlstringyesAttachment URL

MessageAuthorDto schema

FieldTypeRequiredDescription
avatarstring or nullnoAvatar hash or URL
idstringyesDiscord user ID
usernamestringyesDiscord username

MessageDto schema

FieldTypeRequiredDescription
attachmentsarray of MessageAttachmentDtoyes
authorMessageAuthorDtoyes
contentstringyesMessage content
embedsarray of MessageEmbedDtoyes
idstringyesDiscord message ID
mentionsarray of MentionDtoyes
timestampstringyesISO 8601 timestamp

MessageEmbedDto schema

FieldTypeRequiredDescription
colornumber or nullnoColor in decimal
descriptionstring or nullnoEmbed description
titlestring or nullnoEmbed title
typestring or nullnoEmbed type
urlstring or nullnoEmbed URL

SendMessageDto schema

FieldTypeRequiredDescription
allowed_mentionsAllowedMentionsDtonoAllowed mentions configuration
contentstringnoMessage content (max 2000 chars, optional if embeds provided)
embedsarray of EmbedDtonoEmbed objects (max 10)
ttsbooleannoWhether the message is text-to-speech Default: false.

SendMessageResponseDto schema

FieldTypeRequiredDescription
authorMessageAuthorDtoyes
channelIdstringyesDiscord channel ID
contentstringyesMessage content
idstringyesDiscord message ID
timestampstringyesISO 8601 timestamp

Source: apps/api/openapi.json.