API referenceProject API

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

Create a Discord category channel

POST/api/servers/{serverId}/categories

Creates a category channel in the Discord server. Requires the manage_channels scope on the server. The Idempotency-Key header is required: retrying with the same key returns the cached response instead of creating it again.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord server ID
Idempotency-KeyheaderstringyesRequired idempotency key (up to 128 characters). A retry with the same key returns the cached response instead of creating the resource again.

Request body (JSON, required): CreateCategoryDto schema.

Responses

StatusDescriptionBody
201Category created successfully.CategoryResponseDto
400Invalid category payload or missing Idempotency-Key header.
401Missing or invalid API key.
403Project does not have the manage_channels scope on this server.
404The project is not mapped to this server, the server does not exist, or the bot cannot reach it.
409Idempotency conflict: a request with this key is currently in progress, or the key was reused with a different payload.
429Rate limit exceeded.
502Discord rejected the request or bot lacks permissions.

Open in Swagger (opens in a new tab)

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)

Create a Discord channel

POST/api/servers/{serverId}/channels

Creates a text or voice channel in the Discord server, optionally under a parent category. Requires the manage_channels scope on the server. The Idempotency-Key header is required: retrying with the same key returns the cached response instead of creating it again.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord server ID
Idempotency-KeyheaderstringyesRequired idempotency key (up to 128 characters). A retry with the same key returns the cached response instead of creating the resource again.

Request body (JSON, required): CreateChannelDto schema.

Responses

StatusDescriptionBody
201Channel created successfully.CreateChannelResponseDto
400Invalid channel payload, parent is not a category, or missing Idempotency-Key header.
401Missing or invalid API key.
403Project does not have the manage_channels scope on this server.
404The project is not mapped to this server, the server does not exist, or the parent category is not in it.
409Idempotency conflict: a request with this key is currently in progress, or the key was reused with a different payload.
429Rate limit exceeded.
502Discord rejected the request or bot lacks permissions.

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)

Create a channel invite

POST/api/servers/{serverId}/channels/{channelId}/invites

Creates a Discord invite for a channel of a server the project may access. Retrying with the same Idempotency-Key returns the cached invite instead of creating another one.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord server ID
channelIdpathstringyesDiscord channel ID
Idempotency-KeyheaderstringnoOptional idempotency key (up to 128 characters). A retry with the same key returns the cached response.

Request body (JSON, required): CreateInviteDto schema.

Responses

StatusDescriptionBody
201Invite created.InviteResponseDto
400Invalid invite options.
401Missing or invalid API key.
403Project lacks the manage_channels scope on this server.
404Channel does not exist in this server or bot lacks access.
409Idempotency conflict: a request with this key is currently in progress, or the key was reused with a different payload.
429Rate limit exceeded. 5 invites per minute per project.
502Discord rejected the request or the bot lacks permission.

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

CategoryResponseDto schema

FieldTypeRequiredDescription
idstringyesDiscord snowflake ID of the created category
namestringyesName of the category

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

CreateCategoryDto schema

FieldTypeRequiredDescription
namestringyesName of the Discord category

CreateChannelDto schema

FieldTypeRequiredDescription
namestringyesName of the Discord channel
parentIdstringnoDiscord snowflake ID of the parent category
type"text" or "voice"yesType of the channel (text or voice)

CreateChannelResponseDto schema

FieldTypeRequiredDescription
idstringyesDiscord snowflake ID of the created channel
namestringyesName of the channel
parentIdstring or nullyesDiscord snowflake ID of the parent category, or null if root level
type"text" or "voice"yesType of the channel

CreateInviteDto schema

FieldTypeRequiredDescription
maxAgeSecondsnumbernoSeconds until the invite expires (0 = never). Discord default when omitted: 86400 (24 hours).
maxUsesnumbernoMaximum number of uses (0 = unlimited, the Discord default when omitted).

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

InviteResponseDto schema

FieldTypeRequiredDescription
codestringyesInvite code
expiresAtstring or nullyesExpiry (ISO 8601), null when the invite never expires
urlstringyesInvite URL

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.

On this page