Skip to content
Fluxer API

Channels

A channel is where people send messages or join a voice call. Guild channels and threads belong to a guild, and direct messages, group direct messages and personal notes don't.

Every channel has id and type, and the other fields are present only on the channel types that use them.

FieldTypeDescription
idsnowflakeThe ID of the channel
typeintegerThe type of the channel
guild_id?snowflakeThe ID of the guild
name?stringThe name of the channel (guild channels, and group direct messages that have one)
topic??stringThe topic of the channel
url??stringThe destination URL (link channels)
icon??stringThe icon hash (group direct messages)
owner_id??snowflakeThe ID of the owner (group direct messages and threads)
position?integerThe sort position (guild channels other than threads)
parent_id??snowflakeThe ID of the parent category, or of the parent channel for a thread
bitrate??integerThe bitrate in bits per second (voice channels)
user_limit??integerThe most members allowed in the channel at once, 0 for no limit (voice channels)
voice_connection_limit??integerThe most voice connections one user can have at once (voice channels)
rtc_region??stringThe ID of the RTC region, null for automatic (voice channels)
rtc_p2p?booleanWhether calls use peer-to-peer voice (voice channels)
last_message_id??snowflakeThe ID of the most recent message
last_pin_timestamp??ISO8601 timestampWhen a message was last pinned
permission_overwrites?array[permission overwrite object]The permission overwrites (guild channels other than threads)
recipients?array[partial user object]The other recipients of a direct message or group direct message
nsfw?booleanWhether the channel is age restricted, or a group direct message is marked for mature content
nsfw_override??booleanWhether this channel overrides the inherited age restriction, null when it inherits
content_warning_level?integerThe content warning level of this channel
content_warning_text??stringThe content warning text of this channel
rate_limit_per_user?integerThe slowmode interval in seconds, 0 for none
nicks?map[snowflake, string]The group direct message nicknames by user ID (1-32 characters each)
flags?integerThe channel flags (forum and media channels and threads)
thread_metadata?thread metadata objectThe archive and lock state (threads)
message_count?integerThe number of messages in the thread
total_message_sent?integerThe number of messages ever sent in the thread
member_count?integerThe number of thread members, counted up to 50
applied_tags?array[snowflake]The IDs of the forum tags on a forum post (max 5)
member_ids_preview?array[snowflake]The IDs of the latest members to join a forum post, newest first (max 8)
member?thread member objectYour thread member object, if you joined the thread
default_auto_archive_duration??integerThe default auto archive duration, stored but not applied to new threads
default_thread_rate_limit_per_user?integerThe slowmode interval in seconds that new threads get
available_tags?array[forum tag object]The tags a post can use (max 20, forum and media channels)
default_reaction_emoji??default reaction objectThe reaction shown on each post (forum and media channels)
default_sort_order??integerThe default sort order of posts (forum and media channels)
default_forum_layout?integerThe default layout of posts (forum channels)
default_tag_setting?stringThe default tag matching of a post search (forum and media channels)

Threads and forum channels have more fields, described under thread object and forum channel fields.

nsfw, nsfw_override and the content warning fields describe only this channel. To find the setting that applies, use the first one that is set on the channel, then its parent category, then the guild.

{
"id": "1501314428688998182",
"type": 0,
"guild_id": "1501314428688990000",
"name": "general",
"topic": "Anything goes",
"position": 3,
"parent_id": "1501314428688991111",
"permission_overwrites": [],
"nsfw": false,
"nsfw_override": null,
"content_warning_level": 0,
"content_warning_text": null,
"rate_limit_per_user": 0,
"last_message_id": "1501320000000000000",
"last_pin_timestamp": null
}
ValueNameDescription
0GUILD_TEXTGuild text channel
1DMDirect message between two users
2GUILD_VOICEGuild voice channel, which also has messages
3GROUP_DMGroup direct message
4GUILD_CATEGORYGuild category
5GUILD_ANNOUNCEMENTText channel that other channels can follow
10ANNOUNCEMENT_THREADThread in an announcement channel
11PUBLIC_THREADThread anyone who can view the parent can see
12PRIVATE_THREADThread only its members and thread moderators can see
15GUILD_FORUMChannel of posts, with no messages of its own
16GUILD_MEDIAForum channel that can hide media download options
998GUILD_LINKChannel with a destination URL and no messages
999DM_PERSONAL_NOTESYour personal notes, whose ID is your user ID

A bot always sees threads, forum channels and media channels. A user session sees them only when it declares the channel_threads client capability, and an OAuth2 token never does. Other callers get 404 UNKNOWN_CHANNEL for them.

A permission overwrite changes the permissions of one role or member in one channel. allow and deny are decimal strings, and Permissions lists the flags.

FieldTypeDescription
idsnowflakeThe ID of the role or member
typeintegerThe permission overwrite type
allowdecimal stringThe permissions this overwrite allows
denydecimal stringThe permissions this overwrite denies
ValueNameDescription
0ROLEOverwrite for a role
1MEMBEROverwrite for a member
ValueNameDescription
0INHERITUse the content warning of the parent category, then the guild
1CONTENT_WARNINGUse the content warning text of this channel

This object tells you whether you can send in a channel with slowmode.

FieldTypeDescription
rate_limit_per_userintegerThe slowmode interval in seconds, 0 for none
retry_after_msintegerThe milliseconds left before you can send
next_send_allowed_at?ISO8601 timestampWhen you can send next, null when you can send now
can_bypassbooleanWhether you skip slowmode with BYPASS_SLOWMODE

Bots never wait, and direct messages and group direct messages have no slowmode. In a forum or media channel, the state applies to creating a post.

An RTC region is a voice region on the instance, and a voice channel stores its id in rtc_region.

FieldTypeDescription
idstringThe ID of the RTC region
namestringThe display name of the region
emojistringThe emoji shown for the region

Following an announcement channel returns this object.

FieldTypeDescription
channel_idsnowflakeThe ID of the followed announcement channel
webhook_idsnowflakeThe ID of the channel follower webhook in the target channel

This object counts the channels that follow an announcement channel.

FieldTypeDescription
channel_countintegerThe number of channels that follow it
guild_countintegerThe number of guilds those channels are in
GET/v1/channels/{channel_id}Bot

Returns a channel object. You need VIEW_CHANNEL in a guild channel, and a private thread also needs you to be a member or a thread moderator.

StatusBodyCondition
200channel objectThe channel was returned
403error responseNSFW_CONTENT_AGE_RESTRICTED when the channel is age restricted and the age check fails

The rate limit is 100 requests per 10 seconds, on the channel:read::channel_id bucket.

GET/v1/channels/{channel_id}/slowmodeBot

Returns your channel slowmode state object. You need the same access as for Get channel.

StatusBodyCondition
200channel slowmode state objectThe state was returned

The rate limit is 100 requests per 10 seconds, on the channel:read::channel_id bucket.

GET/v1/channels/{channel_id}/rtc-regions

Returns the RTC regions you can pick for a guild voice channel, sorted by name. You need the same access as for Get channel, and bots can't use this route.

StatusBodyCondition
200array[RTC region object]The regions were returned
400error responseINVALID_CHANNEL_TYPE when the channel is not a guild voice channel

The rate limit is 100 requests per 10 seconds, on the channel:read::channel_id bucket.

PATCH/v1/channels/{channel_id}BotAudit reason

Changes a guild channel or a group direct message and returns the channel object. For threads, use Modify thread. A guild channel needs VIEW_CHANNEL and MANAGE_CHANNELS. Changing permission_overwrites also needs MANAGE_ROLES, and changing rtc_region also needs UPDATE_RTC_REGION. Unless you own the guild, you can only allow, or stop denying, permissions you have yourself.

FieldTypeDescription
X-Fluxer-Features?stringThe feature-gated permission bits you can set

The body depends on the channel type, and a thread accepts every field of the Modify thread body. Sending one for a direct message or personal notes returns 400 INVALID_FORM_BODY.

Every field is optional, and a field the channel type doesn't use is ignored.

FieldTypeDescription
name??stringThe name of the channel (1-100 characters)
topic??stringThe topic (1-1,024 characters, 4,096 in forum and media channels), null to clear it
url??stringThe http or https destination of a link channel (1-2,048 characters), null to clear it
parent_id??snowflakeThe ID of the parent category, null to move the channel to the top level
bitrate?1?integerThe voice bitrate in bits per second (8,000-384,000)
user_limit??integerThe most members allowed in a voice channel at once (0-99, 0 for no limit)
voice_connection_limit??integerThe most voice connections one user can have at once (1-100)
permission_overwrites?array[permission overwrite object]Every overwrite of the channel, replacing the current ones
nsfw_override??booleanWhether this channel overrides the inherited age restriction, null to inherit
nsfw??booleanWhether the channel is age restricted, ignored when you send nsfw_override
content_warning_level?integerThe content warning level
content_warning_text??stringThe content warning text (max 200 characters), null to clear it
rate_limit_per_user??integerThe slowmode interval in seconds (0-21,600)
rtc_region??stringThe ID of an RTC region, null for automatic
rtc_p2p?2booleanWhether calls in a voice channel use peer-to-peer voice

1 Values over the guild's maximum are lowered to it. The maximum is 96,000 unless the guild has an audio bitrate feature.

2 Turning it on needs peer-to-peer voice enabled on the instance and for you, or returns 400 GUILD_FEATURE_NOT_TOGGLEABLE.

A text or announcement channel also accepts type to switch between the two.

FieldTypeDescription
type?integerThe channel type to convert to, 0 or 5

A text, announcement, forum or media channel also accepts these fields from a bot or a session with channel_threads.

FieldTypeDescription
default_auto_archive_duration??integerThe default auto archive duration, null to clear it
default_thread_rate_limit_per_user??integerThe slowmode interval in seconds new threads get (0-21,600), null to clear it

A forum channel also accepts every field of the forum field table. A media channel accepts every field of the same table except default_forum_layout.

Every field is optional. Only the owner can change owner_id, nsfw or another recipient's nickname.

FieldTypeDescription
name??stringThe name of the group (1-100 characters), null to clear it
icon??base64 stringThe icon image as base64 or a data URL, null to clear it
owner_id??snowflakeThe ID of the recipient who becomes the owner
nicks??map[snowflake, ?string]Nicknames by user ID (0-32 characters each), null to clear them all
nsfw??booleanWhether the group is marked for mature content

The decoded icon can't be larger than the avatar_max_size limit.

StatusBodyCondition
200channel objectThe channel was changed
400error responseCHANNEL_TYPE_CONVERSION_NOT_SUPPORTED when type is not 0 or 5
400error responseCHANNEL_HAS_FOLLOWED_CHANNELS when converting to announcement while the channel follows an announcement channel
400error responseCHANNEL_HAS_THREADS when converting to announcement while the channel has a private thread
400error responseMAX_CATEGORY_CHANNELS when the new parent category is full
400error responseGROUP_DM_MATURE_CONTENT_INELIGIBLE when a recipient fails the age check
400error responseCANNOT_TRANSFER_OWNERSHIP_TO_BOT when owner_id is a bot

Converting an announcement channel back to text removes every follow of it.

Fluxer sends Channel Update to the guild or the group. When you change the overwrites of a category, every child whose overwrites matched the old ones gets the new ones too. Changing rate_limit_per_user resets everyone's slowmode delay in the channel.

The rate limit is 20 requests per 10 seconds, on the channel:update::channel_id bucket.

DELETE/v1/channels/{channel_id}BotAudit reason

Deletes a guild channel, closes a direct message or leaves a group direct message, and returns 204. Deleting a guild channel needs VIEW_CHANNEL and MANAGE_CHANNELS. Delete thread has this route for threads.

FieldTypeDescription
silent?booleanWhether to skip the system message when leaving a group direct message (default false)
delete_messages?booleanWhether to first delete your own messages in this channel and its threads (default false)
FieldTypeDescription
X-Fluxer-Sudo-Mode-JWT?stringA sudo mode token, used when delete_messages is set

The body is optional. With delete_messages set, a user session needs sudo mode and can prove it with these fields when it has no sudo token.

FieldTypeDescription
password?stringThe account password, for an account with no TOTP or WebAuthn
mfa_method?stringThe verification method, one of totp, webauthn or email_code
mfa_code?stringThe authenticator code or a backup code (1-32 characters)
webauthn_response?WebAuthn assertion objectThe WebAuthn assertion
webauthn_challenge?stringThe challenge the assertion signed (1-256 characters)
email_code_ticket?stringThe ticket from send a sudo email code (1-128 characters)
email_code?stringThe 6-digit code from that email
StatusBodyCondition
204emptyThe channel was deleted, closed or left
400error responseCANNOT_EXECUTE_ON_DM for your personal notes channel
403error responseSUDO_MODE_REQUIRED when delete_messages is set without sudo mode

Deleting a guild channel sends Channel Delete to the guild. Fluxer sends no Thread Delete for its threads, and you should remove every thread whose parent_id is the channel. Deleting a category moves its channels to the top level, with a Channel Update for each.

Closing a direct message only hides it for you.

Leaving a group direct message sends Channel Recipient Remove to the others. If you owned the group, another recipient becomes the owner. To see the new owner_id, fetch the channel again, because Fluxer sends no Channel Update for the change. When the last recipient leaves, the group and its messages are deleted.

The rate limit is 20 requests per 10 seconds, on the channel:delete::channel_id bucket.

PUT/v1/channels/{channel_id}/recipients/{user_id}Bot

Adds a user to a group direct message and returns 204. You need to be in the group and friends with the user, and the user's privacy settings have to allow group direct messages from you.

FieldTypeDescription
X-Captcha-Token?stringThe solved CAPTCHA, see CAPTCHA handling
StatusBodyCondition
204emptyThe user was added, or was already in the group
400error responseCAPTCHA_REQUIRED or INVALID_CAPTCHA when the CAPTCHA is missing or wrong
400error responseNOT_FRIENDS_WITH_USER when you aren't friends with the user
400error responseMAX_GROUP_DM_RECIPIENTS when the group is full, with the limit in max_recipients
400error responseINVALID_CHANNEL_TYPE when the channel is not a group direct message
403error responseMISSING_ACCESS when the user's settings or age don't allow it
403error responseACCOUNT_LIMITED when your account is limited

A group can have at most max_group_dm_recipients recipients. The added user gets Channel Create and the others get Channel Recipient Add.

The rate limit is 20 requests per 10 seconds, on the channel:update::channel_id bucket. Adding recipients also has a limit of 10 requests per hour, on the user:group_dm:recipient:add bucket.

DELETE/v1/channels/{channel_id}/recipients/{user_id}Bot

Removes a user from a group direct message and returns 204. You can always remove yourself, and only the owner can remove someone else.

FieldTypeDescription
silent?booleanWhether to skip the removal system message (default false)
delete_messages?booleanWhether to first delete your own messages in this channel, only when removing yourself (default false)
FieldTypeDescription
X-Fluxer-Sudo-Mode-JWT?stringA sudo mode token, used when delete_messages is set

The optional body has the same sudo verification fields as Delete or leave channel.

StatusBodyCondition
204emptyThe user was removed
400error responseINVALID_CHANNEL_TYPE when the channel is not a group direct message
400error responseINVALID_FORM_BODY with USER_NOT_IN_CHANNEL when the user isn't in the group
403error responseSUDO_MODE_REQUIRED when delete_messages is set without sudo mode

The removed user gets Channel Delete and the others get Channel Recipient Remove. Ownership moves the same way as in Delete or leave channel.

The rate limit is 20 requests per 10 seconds, on the channel:update::channel_id bucket.

PUT/v1/channels/{channel_id}/permissions/{overwrite_id}BotAudit reason

Creates or replaces the overwrite for one role or member and returns 204. You need MANAGE_ROLES in the channel, and unless you have ADMINISTRATOR you can only allow, or stop denying, permissions you have yourself.

FieldTypeDescription
X-Fluxer-Features?stringThe feature-gated permission bits you can set
FieldTypeDescription
typeintegerThe permission overwrite type of overwrite_id
allow??decimal stringThe permissions to allow (default 0)
deny??decimal stringThe permissions to deny (default 0)
StatusBodyCondition
204emptyThe overwrite was created or replaced
400error responseINVALID_CHANNEL_TYPE when the channel is a thread

Fluxer sends Channel Update to the guild. On a category, children whose overwrites matched the old ones get the new ones too.

The rate limit is 20 requests per 10 seconds, on the channel:update::channel_id bucket.

DELETE/v1/channels/{channel_id}/permissions/{overwrite_id}BotAudit reason

Deletes the overwrite for one role or member and returns 204, even if there was none. You need MANAGE_ROLES in the channel, and unless you have ADMINISTRATOR you need every permission the overwrite denied.

FieldTypeDescription
X-Fluxer-Features?stringThe feature-gated permission bits you can clear. Gated bits you don't declare stay on the overwrite
StatusBodyCondition
204emptyThe overwrite was deleted, or didn't exist
400error responseINVALID_CHANNEL_TYPE when the channel is a thread

Fluxer sends Channel Update to the guild, and a category updates matching children as in Set channel permission overwrite.

The rate limit is 20 requests per 10 seconds, on the channel:update::channel_id bucket.

POST/v1/channels/{channel_id}/followersBotAudit reason

Follows an announcement channel into a guild text channel and returns a followed channel object. Fluxer creates a channel follower webhook in the target channel, and published messages are copied into it from then on, as described in Announcement channels. You need VIEW_CHANNEL on the announcement channel and VIEW_CHANNEL and MANAGE_WEBHOOKS on the target channel.

FieldTypeDescription
webhook_channel_idsnowflakeThe ID of the guild text channel that gets the published messages
StatusBodyCondition
200followed channel objectThe follow was created
400error responseANNOUNCEMENT_CHANNEL_REQUIRED when the channel is not an announcement channel
400error responseINVALID_FOLLOW_TARGET_CHANNEL when the target is not a guild text channel
400error responseCHANNEL_ALREADY_FOLLOWED when the target already follows this channel
400error responseFOLLOW_TARGET_NOT_AGE_RESTRICTED when the channel is age restricted and the target isn't
400error responseFOLLOW_TARGET_CONTENT_WARNING_REQUIRED when the channel has a content warning and the target doesn't
400error responseMAX_WEBHOOKS_PER_CHANNEL or MAX_WEBHOOKS_PER_GUILD when the target has no room for the webhook
403error responseFEATURE_TEMPORARILY_DISABLED when the guild has ANNOUNCEMENT_CHANNELS_DISABLED

An age-restricted target doesn't need its own content warning. Fluxer sends Webhooks Update for the target channel and posts a CHANNEL_FOLLOW_ADD system message in it. Delete webhook on the follower webhook stops the follow.

The rate limit is 5 requests per 10 seconds, on the channel:follow::channel_id bucket.

GET/v1/channels/{channel_id}/follower-statsBot

Returns the channel follower stats object of an announcement channel. You need the same access as for Get channel, and the counts can be up to 60 seconds old.

StatusBodyCondition
200channel follower stats objectThe counts were returned
400error responseANNOUNCEMENT_CHANNEL_REQUIRED when the channel is not an announcement channel

The rate limit is 10 requests per 10 seconds, on the channel:follower_stats::channel_id bucket.