Skip to main content
Guilds in Discord represent an isolated collection of users and channels, and are often referred to as “servers” in the UI.

Guild Object

Guild Structure
Fields specific to the GUILD_CREATE event are listed in the Gateway Events documentation.
* These fields are only sent when using the GET Current User Guilds endpoint and are relative to the requested user ** This field is deprecated and is replaced by channel.rtc_region
Default Message Notification Level
Explicit Content Filter Level
MFA Level
Verification Level
Guild Age-Restriction Level
Premium Tier
System Channel Flags
Guild Features
Mutable Guild Features
* Server also must be passing all discovery requirements
Example Guild

Unavailable Guild Object

A partial guild object. Represents an Offline Guild, or a Guild whose information has not been provided through Guild Create events during the Gateway connect.
Example Unavailable Guild

Guild Preview Object

Guild Preview Structure
Example Guild Preview

Guild Widget Settings Object

Guild Widget Settings Structure
Example Guild Widget Settings

Guild Widget Object

Guild Widget Structure
The fields id, discriminator and avatar are anonymized to prevent abuse.
Example Guild Widget

Guild Member Object

Guild Member Structure
The field user won’t be included in the member object attached to MESSAGE_CREATE and MESSAGE_UPDATE gateway events.
In GUILD_ events, pending will always be included as true or false. In non GUILD_ events which can only be triggered by non-pending users, pending will not be included.
Member objects retrieved from VOICE_STATE_UPDATE events will have joined_at set as null if the member was invited as a guest.
Example Guild Member
Guild Member Flags
BYPASSES_VERIFICATION allows a member who does not meet verification requirements to participate in a server.

Integration Object

Integration Structure
* These fields are not provided for discord bot integrations.
Some older integrations may not have an attached user.
Integration Expire Behaviors

Integration Account Object

Integration Account Structure

Integration Application Object

Integration Application Structure

Ban Object

Ban Structure
Example Ban

Welcome Screen Object

Welcome Screen Structure
Welcome Screen Channel Structure
Example Welcome Screen

Guild Onboarding Object

Represents the onboarding flow for a guild.
Guild Onboarding Structure
Onboarding Prompt Structure
Prompt Option Structure
When creating or updating a prompt option, the emoji_id, emoji_name, and emoji_animated fields must be used instead of the emoji object.
Onboarding Mode
Defines the criteria used to satisfy Onboarding constraints that are required for enabling.
Prompt Types
Example Guild Onboarding

Membership Screening Object

In guilds with Membership Screening enabled, when a member joins, Guild Member Add will be emitted but they will initially be restricted from doing any actions in the guild, and pending will be true in the member object. When the member completes the screening, Guild Member Update will be emitted and pending will be false.
We are making significant changes to the Membership Screening API specifically related to getting and editing the Membership Screening object. Long story short is that it can be improved. As such, we have removed those documentation. There will not be any changes to how pending members work, as outlined above. That behavior will stay the same.

Incidents Data Object

Incidents Data Structure
Example Incidents Data

Get Guild

Returns the guild object for the given id. If with_counts is set to true, this endpoint will also return approximate_member_count and approximate_presence_count for the guild.
Query String Params
Example Response

Get Guild Preview

Returns the guild preview object for the given id. If the user is not in the guild, then the guild must be discoverable.

Modify Guild

Modify a guild’s settings. Requires the MANAGE_GUILD permission. Returns the updated guild object on success. Fires a Guild Update Gateway event.
All parameters to this endpoint are optional.
This endpoint supports the X-Audit-Log-Reason header.
Attempting to add or remove the COMMUNITY guild feature requires the ADMINISTRATOR permission.
JSON Params

Get Guild Channels

Returns a list of guild channel objects. Does not include threads.

Create Guild Channel

Create a new channel object for the guild. Requires the MANAGE_CHANNELS permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting MANAGE_ROLES permission in channels is only possible for guild administrators. Returns the new channel object on success. Fires a Channel Create Gateway event.
All parameters to this endpoint are optional and nullable excluding name.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params
* 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".

Modify Guild Channel Positions

Modify the positions of a set of channel objects for the guild. Requires MANAGE_CHANNELS permission. Returns a 204 empty response on success. Fires multiple Channel Update Gateway events.
Only channels to be modified are required.
This endpoint takes a JSON array of parameters in the following format:
JSON Params

List Active Guild Threads

Returns all active threads in the guild, including public and private threads. Threads are ordered by their id, in descending order.
Response Body

Get Guild Member

Returns a guild member object for the specified user.

List Guild Members

Returns a list of guild member objects that are members of the guild.
This endpoint requires the GUILD_MEMBERS Privileged Intent.
All parameters to this endpoint are optional.
Query String Params

Search Guild Members

Returns a list of guild member objects whose username or nickname starts with a provided string.
All parameters to this endpoint except for query are optional
Query String Params

Add Guild Member

Adds a user to the guild, provided you have a valid oauth2 access token for the user with the guilds.join scope. Returns a 201 Created with the guild member as the body, or 204 No Content if the user is already a member of the guild. Fires a Guild Member Add Gateway event. For guilds with Membership Screening enabled, this endpoint will default to adding new members as pending in the guild member object. Members that are pending will have to complete membership screening before they become full members that can talk.
All parameters to this endpoint except for access_token are optional.
The Authorization header must be a Bot token (belonging to the same application used for authorization), and the bot must be a member of the guild with CREATE_INSTANT_INVITE permission.
JSON Params

Modify Guild Member

Modify attributes of a guild member. Returns a 200 OK with the guild member as the body. Fires a Guild Member Update Gateway event. If the channel_id is set to null, this will force the target user to be disconnected from voice.
All parameters to this endpoint are optional and nullable. When moving members to channels, the API user must have permissions to both connect to the channel and have the MOVE_MEMBERS permission.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params

Modify Current Member

Modifies the current member in a guild. Returns a 200 with the updated member object on success. Fires a Guild Member Update Gateway event.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params

Modify Current User Nick

Deprecated in favor of Modify Current Member.
Modifies the nickname of the current user in a guild. Returns a 200 with the nickname on success. Fires a Guild Member Update Gateway event.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params

Add Guild Member Role

Adds a role to a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.
This endpoint supports the X-Audit-Log-Reason header.

Remove Guild Member Role

Removes a role from a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.
This endpoint supports the X-Audit-Log-Reason header.

Remove Guild Member

Remove a member from a guild. Requires KICK_MEMBERS permission. Returns a 204 empty response on success. Fires a Guild Member Remove Gateway event.
This endpoint supports the X-Audit-Log-Reason header.

Get Guild Bans

Returns a list of ban objects for the users banned from this guild. Requires the BAN_MEMBERS permission.
Query String Params
* Provide a user id to before and after for pagination. Users will always be returned in ascending order by user.id. If both before and after are provided, only before is respected.

Get Guild Ban

Returns a ban object for the given user or a 404 not found if the ban cannot be found. Requires the BAN_MEMBERS permission.

Create Guild Ban

Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the BAN_MEMBERS permission. Returns a 204 empty response on success. Fires a Guild Ban Add Gateway event.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params

Remove Guild Ban

Remove the ban for a user. Requires the BAN_MEMBERS permissions. Returns a 204 empty response on success. Fires a Guild Ban Remove Gateway event.
This endpoint supports the X-Audit-Log-Reason header.

Bulk Guild Ban

Ban up to 200 users from a guild, and optionally delete previous messages sent by the banned users. Requires both the BAN_MEMBERS and MANAGE_GUILD permissions. Returns a 200 response on success, including the fields banned_users with the IDs of the banned users and failed_users with IDs that could not be banned or were already banned.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params
Bulk Ban Response
On success, this endpoint returns a 200 success response with the following body.
If none of the users could be banned, an error response code 500000: Failed to ban users is returned instead.

Get Guild Roles

Returns a list of role objects for the guild.

Get Guild Role

Returns a role object for the specified role.

Get Guild Role Member Counts

Returns a map of role IDs to the number of members with the role. Does not include the @everyone role.
Example Response

Create Guild Role

Create a new role for the guild. Requires the MANAGE_ROLES permission. Returns the new role object on success. Fires a Guild Role Create Gateway event. All JSON params are optional.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params
* color will still be returned by the API, but using the colors field is recommended when doing requests.

Modify Guild Role Positions

Modify the positions of a set of role objects for the guild. Requires the MANAGE_ROLES permission. Returns a list of all of the guild’s role objects on success. Fires multiple Guild Role Update Gateway events.
This endpoint supports the X-Audit-Log-Reason header.
This endpoint takes a JSON array of parameters in the following format:
JSON Params

Modify Guild Role

Modify a guild role. Requires the MANAGE_ROLES permission. Returns the updated role on success. Fires a Guild Role Update Gateway event.
All parameters to this endpoint are optional and nullable.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params
* color will still be returned by the API, but using the colors field is recommended when doing requests.

Delete Guild Role

Delete a guild role. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Role Delete Gateway event.
This endpoint supports the X-Audit-Log-Reason header.

Get Guild Prune Count

Returns an object with one pruned key indicating the number of members that would be removed in a prune operation. Requires the MANAGE_GUILD and KICK_MEMBERS permissions. By default, prune will not remove users with roles. You can optionally include specific roles in your prune by providing the include_roles parameter. Any inactive user that has a subset of the provided role(s) will be counted in the prune and users with additional roles will not.
Query String Params

Begin Guild Prune

Begin a prune operation. Requires the MANAGE_GUILD and KICK_MEMBERS permissions. Returns an object with one pruned key indicating the number of members that were removed in the prune operation. For large guilds it’s recommended to set the compute_prune_count option to false, forcing pruned to null. Fires multiple Guild Member Remove Gateway events. By default, prune will not remove users with roles. You can optionally include specific roles in your prune by providing the include_roles parameter. Any inactive user that has a subset of the provided role(s) will be included in the prune and users with additional roles will not.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params

Get Guild Voice Regions

Returns a list of voice region objects for the guild. Unlike the similar /voice route, this returns VIP servers when the guild is VIP-enabled.

Get Guild Invites

Returns a list of invite objects. Requires the MANAGE_GUILD or VIEW_AUDIT_LOG permission. Invite Metadata is included with the MANAGE_GUILD permission.

Get Guild Integrations

Returns a list of integration objects for the guild. Requires the MANAGE_GUILD permission.
This endpoint returns a maximum of 50 integrations. If a guild has more integrations, they cannot be accessed.

Delete Guild Integration

Delete the attached integration object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the MANAGE_GUILD permission. Returns a 204 empty response on success. Fires Guild Integrations Update and Integration Delete Gateway events.
This endpoint supports the X-Audit-Log-Reason header.

Get Guild Widget Settings

Returns a guild widget settings object. Requires the MANAGE_GUILD permission.

Modify Guild Widget

Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission. Returns the updated guild widget settings object. Fires a Guild Update Gateway event.
This endpoint supports the X-Audit-Log-Reason header.

Get Guild Widget

Returns the widget for the guild. Fires an Invite Create Gateway event when an invite channel is defined and a new Invite is generated.

Get Guild Vanity URL

Returns a partial invite object for guilds with that feature enabled. Requires the MANAGE_GUILD permission. code will be null if a vanity url for the guild is not set.
This endpoint is required to get the usage count of the vanity invite, but the invite code can be accessed as vanity_url_code in the guild object without having the MANAGE_GUILD permission.
Example Partial Invite Object

Get Guild Widget Image

Returns a PNG image widget for the guild. Requires no permissions or authentication.
All parameters to this endpoint are optional.
Query String Params
Widget Style Options

Get Guild Welcome Screen

Returns the Welcome Screen object for the guild. If the welcome screen is not enabled, the MANAGE_GUILD permission is required.

Modify Guild Welcome Screen

Modify the guild’s Welcome Screen. Requires the MANAGE_GUILD permission. Returns the updated Welcome Screen object. May fire a Guild Update Gateway event.
All parameters to this endpoint are optional and nullable.
This endpoint supports the X-Audit-Log-Reason header.
JSON Params

Get Guild Onboarding

Returns the Onboarding object for the guild.

Modify Guild Onboarding

Modifies the onboarding configuration of the guild. Returns a 200 with the Onboarding object for the guild. Requires the MANAGE_GUILD and MANAGE_ROLES permissions.
Onboarding enforces constraints when enabled. These constraints are that there must be at least 7 Default Channels and at least 5 of them must allow sending messages to the @everyone role. The mode field modifies what is considered when enforcing these constraints.
This endpoint supports the X-Audit-Log-Reason header.
All parameters to this endpoint are optional.
JSON Params

Modify Guild Incident Actions

Modifies the incident actions of the guild. Returns a 200 with the Incidents Data object for the guild. Requires the MANAGE_GUILD permission.
JSON Params
Both invites_disabled_until and dms_disabled_until can be enabled for a maximal timespan of 24 hours in the future.
* Supplying null disables the action.