Channels
List a server's channels, see a channel's details and read its recent messages, with an admin session.
Discord channel listing, message history, and message sending - project API key
List all channels in a server (admin session)
/api/admin/servers/{serverId}/channelsReturns all channels the bot can access in the server, with categories.
Authentication: Admin session token (Authorization: Bearer <token>)
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 | Authentication required. | |
403 | System Admin access required. | |
404 | Server not found or bot not connected. |
Open in Swagger (opens in a new tab)
Get channel details (admin session)
/api/admin/servers/{serverId}/channels/{channelId}Returns detailed information about a specific channel, including its permission overwrites.
Authentication: Admin session token (Authorization: Bearer <token>)
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 | Authentication required. | |
403 | System Admin access required. | |
404 | Channel does not exist or bot lacks access. |
Open in Swagger (opens in a new tab)
Get recent messages from a channel (admin session)
/api/admin/servers/{serverId}/channels/{channelId}/messagesRetrieves message history from a text channel. Read-only; supports pagination and author filtering.
Authentication: Admin session token (Authorization: Bearer <token>)
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 | Authentication required. | |
403 | System Admin access required. | |
404 | Channel does not exist or bot lacks access. | |
429 | Rate limit exceeded. 30 requests per minute. |
Open in Swagger (opens in a new tab)
Schemas
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 |
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 |
Source: apps/api/openapi.json.