Skip to main content

Channel Object

Represents a guild or DM channel within Discord.
Channel Structure
* rate_limit_per_user also applies to thread creation. Users can send one message and create one thread during each rate_limit_per_user interval. ** For threads created before July 1, 2022, the message count is inaccurate when it’s greater than 50.
Channel Types
Type 10, 11 and 12 are only available in API v9 and above.
* The GUILD_MEDIA channel type is still in active development. Avoid implementing any features that are not documented here, since they are subject to change without notice!
Video Quality Modes
Channel Flags
Sort Order Types
Forum Layout Types
Example Guild Text Channel
Example Guild Announcement Channel
Bots can post or publish messages in this type of channel if they have the proper permissions.
Example Guild Voice Channel
Example DM Channel
Example Group DM Channel
Example Channel Category
Example Thread Channel
Threads can be either archived or active. Archived threads are generally immutable. To send a message or add a reaction, a thread must first be unarchived. The API will helpfully automatically unarchive a thread when sending a message in that thread. Unlike with channels, the API will only sync updates to users about threads the current user can view. When receiving a guild create payload, the API will only include active threads the current user can view. Threads inside of private channels are completely private to the members of that private channel. As such, when gaining access to a channel the API sends a thread list sync, which includes all active threads in that channel. Threads also track membership. Users must be added to a thread before sending messages in them. The API will helpfully automatically add users to a thread when sending a message in that thread. Guilds have limits on the number of active threads and members per thread. Once these are reached additional threads cannot be created or unarchived, and users cannot be added. Threads do not count against the per-guild channel limit. The threads topic has some more information.

Followed Channel Object

Followed Channel Structure

Overwrite Object

See permissions for more information about the allow and deny fields.
Overwrite Structure

Thread Metadata Object

The thread metadata object contains a number of thread-specific channel fields that are not needed by other channel types.
Thread Metadata Structure

Thread Member Object

A thread member object contains information about a user that has joined a thread.
Thread Member Structure
* These fields are omitted on the member sent within each thread in the GUILD_CREATE event. ** The member field is only present when with_member is set to true when calling List Thread Members or Get Thread Member.

Default Reaction Object

An object that specifies the emoji to use as the default way to react to a forum post. Exactly one of emoji_id and emoji_name must be set.
Default Reaction Structure

Forum Tag Object

An object that represents a tag that is able to be applied to a thread in a GUILD_FORUM or GUILD_MEDIA channel.
Forum Tag Structure
When updating a GUILD_FORUM or a GUILD_MEDIA channel, tag objects in available_tags only require the name field.
* At most one of emoji_id and emoji_name may be set to a non-null value.

Get Channel

Get a channel by ID. Returns a channel object. If the channel is a thread, a thread member object is included in the returned result.

Modify Channel

Update a channel’s settings. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters.
All parameters to this endpoint are optional.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params (Group DM)
Fires a Channel Update Gateway event.
JSON Params (Guild channel)
Requires the MANAGE_CHANNELS permission for the guild. Fires a Channel Update Gateway event. If modifying a category, individual Channel Update events will fire for each child channel that also changes. If modifying permission overwrites, the MANAGE_ROLES permission is required. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel). * For voice channels, normal servers can set bitrate up to 96000, servers with Boost level 1 can set up to 128000, servers with Boost level 2 can set up to 256000, and servers with Boost level 3 or the VIP_REGIONS guild feature can set up to 384000. For stage channels, bitrate can be set up to 64000. ** In each overwrite object, the allow and deny keys can be omitted or set to null, which both default to "0".
JSON Params (Thread)
When setting archived to false, when locked is also false, only the SEND_MESSAGES permission is required. Otherwise, requires the MANAGE_THREADS permission. Fires a Thread Update Gateway event. Requires the thread to have archived set to false or be set to false in the request.

Set Voice Channel Status

Set a voice channel’s status. Requires the SET_VOICE_CHANNEL_STATUS permission, and additionally the MANAGE_CHANNELS permission if the current user is not connected to the voice channel. Fires a Voice Channel Status Update Gateway event.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params

Delete/Close Channel

Delete a channel, or close a private message. Requires the MANAGE_CHANNELS permission for the guild, or MANAGE_THREADS if the channel is a thread. Deleting a category does not delete its child channels; they will have their parent_id removed and a Channel Update Gateway event will fire for each of them. Returns a channel object on success. Fires a Channel Delete Gateway event (or Thread Delete if the channel was a thread).
Deleting a guild channel cannot be undone. Use this with caution, as it is impossible to undo this action when performed on a guild channel. In contrast, when used with a private message, it is possible to undo the action by opening a private message with the recipient again.
For Community guilds, the Rules or Guidelines channel and the Community Updates channel cannot be deleted.
This endpoint supports the X-Audit-Log-Reason header.

Edit Channel Permissions

Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel). Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params

Get Channel Invites

Returns a list of invite objects (with invite metadata) for the channel. Only usable for guild channels. Requires the MANAGE_CHANNELS permission.

Create Channel Invite

Create a new invite object for the channel. Only usable for guild channels. Requires the CREATE_INSTANT_INVITE permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object ({}). Returns an invite object. Fires an Invite Create Gateway event.
This endpoint supports the X-Audit-Log-Reason header.
JSON/Form Params
* Requires multipart/form-data as the content type with other parameters as form fields in the multipart body. Uploading a file with invalid user IDs will result in a 400 with the invalid IDs described. Duplicate user IDs in the file will be ignored. ** Requires the MANAGE_ROLES permission and cannot assign roles with higher permissions than the sender.

Delete Channel Permission

Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions
This endpoint supports the X-Audit-Log-Reason header.

Follow Announcement Channel

Follow an Announcement Channel to send messages to a target channel. Requires the MANAGE_WEBHOOKS permission in the target channel. Returns a followed channel object. Fires a Webhooks Update Gateway event for the target channel.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params

Trigger Typing Indicator

Post a typing indicator for the specified channel, which expires after 10 seconds. Returns a 204 empty response on success. Fires a Typing Start Gateway event. Generally bots should not use this route. However, if a bot is responding to a command and expects the computation to take a few seconds, this endpoint may be called to let the user know that the bot is processing their message.

Group DM Add Recipient

Adds a recipient to a Group DM using their access token.
JSON Params

Group DM Remove Recipient

Removes a recipient from a Group DM.

Start Thread from Message

Creates a new thread from an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create and a Message Update Gateway event. When called on a GUILD_TEXT channel, creates a PUBLIC_THREAD. When called on a GUILD_ANNOUNCEMENT channel, creates a ANNOUNCEMENT_THREAD. Does not work on a GUILD_FORUM or a GUILD_MEDIA channel. The id of the created thread will be the same as the id of the source message, and as such a message can only have a single thread created from it.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params

Start Thread without Message

Creates a new thread that is not connected to an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create Gateway event.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params
* type currently defaults to PRIVATE_THREAD in order to match the behavior when thread documentation was first published. In a future API version this will be changed to be a required field, with no default.

Start Thread in Forum or Media Channel

Creates a new thread in a forum or a media channel, and sends a message within the created thread. Returns a channel, with a nested message object, on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create and Message Create Gateway event.
  • The type of the created thread is PUBLIC_THREAD.
  • See message formatting for more information on how to properly format messages.
  • The current user must have the SEND_MESSAGES permission (CREATE_PUBLIC_THREADS is ignored).
  • The maximum request size when sending a message is 25 MiB.
  • For the embed object, you can set every field except type (it will be rich regardless of if you try to set it), provider, video, and any height, width, or proxy_url values for images.
  • Examples for file uploads are available in Uploading Files.
  • Files must be attached using a multipart/form-data body as described in Uploading Files.
  • Note that when sending a message, you must provide a value for at least one of content, embeds, sticker_ids, components, or files[n].
Discord may strip certain characters from message content, like invalid unicode characters or characters which cause unexpected message formatting. If you are passing user-generated strings into message content, consider sanitizing the data to prevent unexpected behavior and using allowed_mentions to prevent unexpected mentions.
This endpoint supports the X-Audit-Log-Reason header.
JSON/Form Params
Forum and Media Thread Message Params Object
When sending a message, apps must provide a value for at least one of content, embeds, sticker_ids, components, or files[n].
* At least one of content, embeds, sticker_ids, components, or files[n] is required.

Join Thread

Adds the current user to a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update and a Thread Create Gateway event.

Add Thread Member

Adds another member to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response if the member is successfully added or was already a member of the thread. Fires a Thread Members Update Gateway event.

Leave Thread

Removes the current user from a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event.

Remove Thread Member

Removes another member from a thread. Requires the MANAGE_THREADS permission, or the creator of the thread if it is a PRIVATE_THREAD. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event.

Get Thread Member

Returns a thread member object for the specified user if they are a member of the thread, returns a 404 response otherwise. When with_member is set to true, the thread member object will include a member field containing a guild member object.
Query String Params

List Thread Members

Starting in API v11, this endpoint will always return paginated results. Paginated results can be enabled before API v11 by setting with_member to true. Read the changelog for details.
Returns array of thread members objects that are members of the thread. When with_member is set to true, the results will be paginated and each thread member object will include a member field containing a guild member object.
This endpoint is restricted according to whether the GUILD_MEMBERS Privileged Intent is enabled for your application.
Query String Params

List Public Archived Threads

Returns archived threads in the channel that are public. When called on a GUILD_TEXT channel, returns threads of type PUBLIC_THREAD. When called on a GUILD_ANNOUNCEMENT channel returns threads of type ANNOUNCEMENT_THREAD. Threads are ordered by archive_timestamp, in descending order. Requires the READ_MESSAGE_HISTORY permission.
Query String Params
Response Body

List Private Archived Threads

Returns archived threads in the channel that are of type PRIVATE_THREAD. Threads are ordered by archive_timestamp, in descending order. Requires both the READ_MESSAGE_HISTORY and MANAGE_THREADS permissions.
Query String Params
Response Body

List Joined Private Archived Threads

Returns archived threads in the channel that are of type PRIVATE_THREAD, and the user has joined. Threads are ordered by their id, in descending order. Requires the READ_MESSAGE_HISTORY permission.
Query String Params
Response Body