Servidores

Guilds in Discord represent an isolated collection of users and channels, and are often referred to as "servers" in the UI.

Guild Structure

Field
Type
Description

id

snowflake

The ID of the guild

name

string

The name of the guild (2-100 characters)

icon

?string

The guild's icon hash

banner

?string

The guild's banner hash

home_header

?string

The guild's home header hash, used in new member welcome

splash

?string

The guild's splash hash

discovery_splash

?string

owner_id

snowflake

The user ID of the guild's owner

application_id

?snowflake

The application ID of the guild's owner, if bot-created

description

?string

The description for the guild (max 300 characters)

region? (deprecated)

?string

The main voice region ID of the guild

afk_channel_id

?snowflake

The ID of the guild's AFK channel; this is where members in voice idle for longer than afk_timeout are moved

afk_timeout

integer

The AFK timeout of the guild (one of 60, 300, 900, 1800, 3600, in seconds)

widget_enabled?

boolean

Whether the guild widget is enabled

widget_channel_id?

?snowflake

The channel ID that the widget will generate an invite to, if any

verification_level

integer

The verification level required for the guild

default_message_notifications

integer

Default message notification level for the guild

explicit_content_filter

integer

Whose messages are scanned and deleted for explicit content in the guild

features

array[string]

roles

array[role object]

Roles in the guild

emojis

array[emoji object]

Custom guild emojis

stickers

array[sticker object]

Custom guild stickers

mfa_level

integer

Required MFA level for administrative actions within the guild

system_channel_id

?snowflake

The ID of the channel where system event messages, such as member joins and premium subscriptions (boosts), are posted

system_channel_flags

integer

The flags that limit system event messages

rules_channel_id

?snowflake

The ID of the channel where community guilds display rules and/or guidelines

public_updates_channel_id

?snowflake

The ID of the channel where admins and moderators of community guilds receive notices from Discord

safety_alerts_channel_id

?snowflake

The ID of the channel where admins and moderators of community guilds receive safety alerts from Discord

max_presences?

?integer

The maximum number of presences for the guild (null is usually returned, apart from the largest of guilds)

max_members?

integer

The maximum number of members for the guild

vanity_url_code

?string

The guild's vanity invite code

premium_tier

integer

The guild's premium tier (boost level)

premium_subscription_count

integer

The number of premium subscriptions (boosts) the guild currently has

preferred_locale

string

The preferred locale of the guild; used in discovery and notices from Discord (default "en-US")

max_video_channel_users?

integer

The maximum number of users in a voice channel while someone has video enabled

max_stage_video_channel_users? 1

integer

The maximum number of users in a stage channel while someone has video enabled

nsfw (deprecated)

boolean

Whether the guild is considered NSFW (EXPLICIT or AGE_RESTRICTED)

nsfw_level

integer

The NSFW level of the guild

hub_type

?integer

The type of student hub the guild is, if it is a student hub

premium_progress_bar_enabled

boolean

Whether the guild has the premium (boost) progress bar enabled

latest_onboarding_question_id

?snowflake

The ID of the guild's latest onboarding prompt option

incidents_data

Information on the guild's AutoMod incidents

inventory_settings (deprecated)

Settings for emoji packs

approximate_member_count? 2

integer

Approximate count of total members in the guild

approximate_presence_count? 2

integer

Approximate count of non-offline members in the guild

premium_features 3

The guild's powerup information

profile 3

The guild's identity

1 This limit also applies to stream viewers within the channel. The value is always 50 for premium tiers 0 to 1, 150 for premium tier 2, and for premium tier 3.

2 Only included when fetched from the Get Guild endpoint with set to .

3 Only included in guild objects returned over the Gateway, through the Join Guild endpoint, or through OAuth2.

Partial Guild Structure

Field
Type
Description

id

snowflake

The ID of the guild

name

string

The name of the guild (2-100 characters)

icon

?string

The guild's icon hash

description

?string

The description for the guild (max 300 characters)

splash

?string

The guild's splash hash

discovery_splash

?string

home_header

?string

The guild's home header hash, used in new member welcome

features

array[string]

emojis? 1

array[emoji object]

Custom guild emojis

stickers? 1

array[sticker object]

Custom guild stickers

approximate_member_count? 2

integer

Approximate number of total members in the guild

approximate_presence_count? 2

integer

Approximate number of non-offline members in the guild

1 Only included when fetched from the Get Guild Preview endpoint.

2 Not included when fetched from the Get Guild Basic or Get Join Request Guilds endpoints.

Guild Identity Structure

Field
Type
Description

tag

string

The tag of the guild (2-4 characters)

badge

string

Guild Inventory Settings Structure

Field
Type
Description

is_emoji_pack_collectible?

boolean

Allows everyone to collect and use the guild's emoji globally

Guild Premium Features Structure

Field
Type
Description

features

array[string]

additional_emoji_slots

integer

The number of additional emoji slots available to the guild

additional_sticker_slots

integer

The number of additional sticker slots available to the guild

additional_sound_slots

integer

The number of additional soundboard slots available to the guild

Message Notification Level

Value
Name
Description

0

ALL_MESSAGES

Receive notifications for all messages

1

ONLY_MENTIONS

Receive notifications only for messages that @mention you

2 1

NO_MESSAGES

Don't receive notifications

3 1

INHERIT

Inherit value from guild settings when in a channel override context

1 Only available inside a user guild settings context.

Explicit Content Filter Level

Value
Name
Description

0

DISABLED

Media content will not be scanned

1

MEMBERS_WITHOUT_ROLES

Media content sent by members without roles will be scanned

2

ALL_MEMBERS

Media content sent by all members will be scanned

MFA Level

Value
Name
Description

0

NONE

Guild has no MFA requirement for moderation actions

1

ELEVATED

Guild has a MFA requirement for moderation actions

Verification Level

Value
Name
Description

0

NONE

Unrestricted

1

LOW

Must have a verified email on file

2

MEDIUM

Must be registered on Discord for longer than 5 minutes

3

HIGH

Must be a member of the server for longer than 10 minutes

4

VERY_HIGH

Must have a verified phone number on file

NSFW Level

Value
Name
Description

0

DEFAULT

Guild is not yet rated by Discord

1

EXPLICIT

Guild has mature content only suitable for users over 18

2

SAFE

Guild is safe for work

3

AGE_RESTRICTED

Guild has mildly mature content that may not be suitable for users under 18

Premium Tier

Value
Name
Description

0

NONE

Guild has not unlocked any Server Boost perks

1

TIER_1

Guild has unlocked Server Boost level 1 perks

2

TIER_2

Guild has unlocked Server Boost level 2 perks

3

TIER_3

Guild has unlocked Server Boost level 3 perks

System Channel Flags

Value
Name
Description

1 << 0

SUPPRESS_JOIN_NOTIFICATIONS

Suppress member join notifications

1 << 1

SUPPRESS_PREMIUM_SUBSCRIPTIONS

Suppress premium subscription (boost) notifications

1 << 2

SUPPRESS_GUILD_REMINDER_NOTIFICATIONS

Suppress guild setup tips

1 << 3

SUPPRESS_JOIN_NOTIFICATION_REPLIES

Hide member join sticker reply buttons

1 << 4

SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS

Suppress role subscription purchase and renewal notifications

1 << 5

SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES

Hide role subscription sticker reply buttons

1 << 7

SUPPRESS_CHANNEL_PROMPT_DEADCHAT

Suppress dead chat channel prompts

Privacy Level

Value
Name
Description

1

PUBLIC

Scheduled event or stage instance is visible publicly

2

GUILD_ONLY

Scheduled event or stage instance is only visible to guild members

Hub Type

Value
Name
Description

0

DEFAULT

Student hub is not categorized as a high school or post-secondary institution

1

HIGH_SCHOOL

Student hub is for a high school

2

COLLEGE

Student hub is for a post-secondary institution (college or university)

Guild Features

The available guild features, their functionality, and their requirements is subject to arbitrary change. The following table is a best-effort attempt to document the current state of guild features.

Value
Description

ACTIVITIES_ALPHA

Access to alpha embedded activities ( release phase)

ACTIVITIES_EMPLOYEE

Access to employee-released embedded activities ( release phase)

ACTIVITIES_INTERNAL_DEV

Access to internal developer embedded activities ( release phase)

ACTIVITY_FEED_DISABLED_BY_USER

ACTIVITY_FEED_ENABLED_BY_USER

ANIMATED_BANNER

Ability to set an animated guild banner image

ANIMATED_ICON

Ability to set an animated guild icon

APPLICATION_COMMAND_PERMISSIONS_V2

AUDIO_BITRATE_128_KBPS

Increased maximum voice channel bitrate (128 kbps)

AUDIO_BITRATE_256_KBPS

Increased maximum voice channel bitrate (256 kbps)

AUDIO_BITRATE_384_KBPS

Increased maximum voice channel bitrate (384 kbps)

AUTO_MODERATION

AutoMod feature enabled

AUTOMOD_TRIGGER_KEYWORD_FILTER 1

Access to the keyword filter trigger for AutoMod

AUTOMOD_TRIGGER_ML_SPAM_FILTER 1

Access to the machine learning-based spam filter trigger for AutoMod

AUTOMOD_TRIGGER_SPAM_LINK_FILTER 1

Access to the spam link filter trigger for AutoMod

AUTOMOD_TRIGGER_USER_PROFILE

Access to the user profile trigger for AutoMod

BANNER

Ability to set a guild banner image

BFG

Big what now 🤨

BOOSTING_TIERS_EXPERIMENT_MEDIUM_GUILD

Guild requires a reduced amount of premium subscriptions to go up a premium tier (tier 2 - 7 boosts, tier 3 - 10 boosts)

BOOSTING_TIERS_EXPERIMENT_SMALL_GUILD

Guild requires a reduced amount of premium subscriptions to go up a premium tier (tier 2 - 3 boosts, tier 3 - 4 boosts)

BOT_DEVELOPER_EARLY_ACCESS

Access to early feature testing for bot and library developers

BURST_REACTIONS 1

Access to burst reactions

CHANNEL_BANNER

Ability to set a channel banner

CHANNEL_ICON_EMOJIS_GENERATED

Guild has channel icon emojis populated

CHANNEL_HIGHLIGHTS

Access to channel highlights

CHANNEL_HIGHLIGHTS_DISABLED

CLAN

Guild is a clan

CLAN_DISCOVERY_DISABLED

Clan discovery permanently disabled by Discord

CLAN_PILOT_GENSHIN

Access to clan conversion and clan discovery for Genshin Impact

CLAN_PILOT_VALORANT

Access to clan conversion and clan discovery for Valorant

CLAN_PREPILOT_GENSHIN

CLAN_PREPILOT_VALORANT

CLAN_SAFETY_REVIEW_DISABLED

CLYDE_DISABLED

Clyde AI integration opted-out

CLYDE_ENABLED

Clyde AI integration enabled

CLYDE_EXPERIMENT_ENABLED

Clyde AI experiment enabled

COMMERCE

Access to store channels

COMMUNITY_CANARY

Early access to experimental community features

COMMUNITY_EXP_LARGE_GATED

COMMUNITY_EXP_LARGE_UNGATED

COMMUNITY_EXP_MEDIUM

CREATOR_ACCEPTED_NEW_TERMS

Guild owner has accepted the updated monetization agreements

CREATOR_MONETIZABLE

Monetization enabled

CREATOR_MONETIZABLE_DISABLED

Monetization permanently disabled by Discord

CREATOR_MONETIZABLE_PENDING_NEW_OWNER_ONBOARDING

Monetization features are pending until the new guild owner completes the onboarding process

CREATOR_MONETIZABLE_PROVISIONAL

Monetization enabled

CREATOR_MONETIZABLE_RESTRICTED

Guild has restrictions on monetization features

CREATOR_MONETIZABLE_WHITEGLOVE

Guild has a fast-tracked monetization onboarding process

CREATOR_MONETIZATION_APPLICATION_ALLOWLIST

CREATOR_STORE_PAGE

Monetization store page enabled

DEVELOPER_SUPPORT_SERVER

DISCOVERABLE

Guild is public and discoverable in the directory

DISCOVERABLE_DISABLED

Discovery permanently disabled by Discord

ENABLED_DISCOVERABLE_BEFORE

Guild has previously been discoverable

ENABLED_MODERATION_EXPERIENCE_FOR_NON_COMMUNITY

Guild has enabled the members tab in the channel list without being a community guild

ENHANCED_ROLE_COLORS

Ability to set gradient role colors

EXPOSED_TO_ACTIVITIES_WTP_EXPERIMENT

EXPOSED_TO_BOOSTING_TIERS_EXPERIMENT

Guild requires a reduced amount of premium subscriptions to go up a premium tier (see , )

FEATURABLE

Guild is featured in discovery

FORCE_RELAY

Shards connections to the guild to different nodes that relay information between each other (see RELAY_ENABLED)

FORWARDING_DISABLED

Guild has disabled forwarding messages to other channels

GENSHIN_L30

Access to clan conversion based on the intensity of Genshin Impact engagement among the guild's members, as depicted by the power user curve

GUESTS_ENABLED

Guild has used guest invites

GUILD_AUTOMOD_DEFAULT_LIST 1

GUILD_COMMUNICATION_DISABLED_GUILDS 1

Access to member timeouts

GUILD_HOME_DEPRECATION_OVERRIDE

Home tab deprecation notice hidden

GUILD_HOME_OVERRIDE

Access to the Home feature, without additionally checking for the matching user experiment

GUILD_HOME_TEST

Access to the Home feature

GUILD_MEMBER_VERIFICATION_EXPERIMENT

GUILD_ONBOARDING

Onboarding feature enabled

GUILD_ONBOARDING_ADMIN_ONLY

Onboarding only visible to guild admins

GUILD_ONBOARDING_EVER_ENABLED

Guild has previously enabled the onboarding feature

GUILD_ONBOARDING_HAS_PROMPTS

Guild has prompts configured in onboarding

GUILD_PRODUCTS

Access to guild products

GUILD_PRODUCTS_ALLOW_ARCHIVED_FILE

Allows uploading archive formats as guild products

GUILD_ROLE_SUBSCRIPTIONS

Role subscriptions enabled (see ROLE_SUBSCRIPTIONS_ENABLED)

GUILD_ROLE_SUBSCRIPTION_PURCHASE_FEEDBACK_LOOP 1

GUILD_ROLE_SUBSCRIPTION_TIER_TEMPLATE 1

Access to role subscriptions tier templates

GUILD_ROLE_SUBSCRIPTION_TRIALS 1

Access to role subscriptions trials

GUILD_SERVER_GUIDE

New member welcome feature enabled

GUILD_TAGS

Ability to set a guild tag

GUILD_WEB_PAGE_VANITY_URL

Guild has an immutable vanity given by the server web page feature

HAD_EARLY_ACTIVITIES_ACCESS

Guild previously had access to embedded activities and can bypass the premium tier requirement

HAS_DIRECTORY_ENTRY

Guild is listed in a directory channel

HIDE_FROM_EXPERIMENT_UI

HUB

Guild is a student hub

INCREASED_THREAD_LIMIT

Ability to have over 1,000 active threads

INTERNAL_EMPLOYEE_ONLY

Restricts guild joining to Discord employees

INVITE_SPLASH

Ability to set an invite splash background

LEADERBOARD_ENABLED

Guild has game leaderboard enabled

INVITES_DISABLED

Guild has paused invites, preventing new members from joining

LINKED_TO_HUB

Guild is linked to a student hub

LURKABLE

Ability to preview the guild before joining (see DISCOVERABLE and PREVIEW_ENABLED)

MARKETPLACES_CONNECTION_ROLES 1

Access to guild linked roles

MAX_FILE_SIZE_50_MB

Increased maximum file upload size (50 MB)

MAX_FILE_SIZE_100_MB

Increased maximum file upload size (100 MB)

MEDIA_CHANNEL_ALPHA 1

Access to media channels

MEMBER_LIST_DISABLED

Member list access disallowed

MEMBER_PROFILES

Allows members to customize their per-guild profiles without Nitro

MEMBER_SAFETY_PAGE_ROLLOUT

Access to member safety tab

MEMBER_VERIFICATION_GATE_ENABLED

Member verification enabled, requiring new members to pass the verification gate before interacting with the guild

MEMBER_VERIFICATION_MANUAL_APPROVAL

Membership verification manual approval enabled

MEMBER_VERIFICATION_ROLLOUT_TEST

Early access to member verification manual approval general availability

MOBILE_WEB_ROLE_SUBSCRIPTION_PURCHASE_PAGE 1

Allows purchasing role subscriptions tiers via web version of Discord on mobile

MONETIZATION_ENABLED

Monetization enabled (see CREATOR_MONETIZABLE)

MORE_EMOJI

Increased guild emoji slots (200 each for normal and animated)

MORE_SOUNDBOARD

Increased guild soundboard slots (96)

MORE_STICKERS

Increased guild sticker slots (60)

NEWS

Access to news channels

NEW_THREAD_PERMISSIONS 1

NON_COMMUNITY_RAID_ALERTS

Non-community guild is opted-in to raid alerts

PARTNERED

PREMIUM_TIER_3_OVERRIDE

All guild powerups are force-enabled regardless of premium subscription count

PREVIEW_ENABLED

Guild is accessable (read-only) without passing member verification

PRIVATE_THREADS 1

Ability to create private threads

PRODUCTS_AVAILABLE_FOR_PURCHASE

Guild has guild products available for purchase

PUBLIC_DISABLED

Community features are permanently disabled by Discord

RAID_ALERTS_DISABLED

Raid alerts opted out

RAID_ALERTS_ENABLED

Raid alerts enabled (see RAID_ALERTS_DISABLED)

RAPIDASH_TEST

Access to clan conversion and clan discovery

RAPIDASH_TEST_REBIRTH

Access to clan conversion and clan discovery

RELAY_ENABLED

Shards connections to the guild to different nodes that relay information between each other

RESTRICT_SPAM_RISK_GUILDS 1

Guild has additional spam risk protections enabled

ROLE_ICONS

Ability to set an image or emoji as a role icon

ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE

Guild has role subscriptions available for purchase

ROLE_SUBSCRIPTIONS_ENABLED

Role subscriptions enabled

ROLE_SUBSCRIPTIONS_ENABLED_FOR_PURCHASE

Ability to purchase role subscriptions in the guild (see ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE)

SEVEN_DAY_THREAD_ARCHIVE 1

Ability to have threads that archive after seven days

SHARD

Shards student hub UI

SHARED_CANVAS_FRIENDS_AND_FAMILY_TEST

Access to the shared canvas feature

SOUNDBOARD

Guild has a custom soundboard sound

STAGE_CHANNEL_VIEWERS_50

Increased maximum stage stream viewers (50)

STAGE_CHANNEL_VIEWERS_150

Increased maximum stage stream viewers (150)

STAGE_CHANNEL_VIEWERS_300

Increased maximum stage stream viewers (300)

SUMMARIES_ENABLED

Access to conversation summaries (see SUMMARIES_ENABLED_GA)

SUMMARIES_ENABLED_GA

Access to conversation summaries general access

SUMMARIES_DISABLED_BY_USER

SUMMARIES_ENABLED_BY_USER

SUMMARIES_LONG_LOOKBACK

Conversation summaries with a longer lookback period

SUMMARIES_OPT_OUT_EXPERIENCE

Conversation summaries enabled by default, must be opted out instead of opted in

STAFF_LEVEL_COLLABORATOR_REQUIRED

Restricts guild joining to users with the flag or higher

STAFF_LEVEL_RESTRICTED_COLLABORATOR_REQUIRED

Restricts guild joining to users with the flag or higher

TEXT_IN_STAGE_ENABLED 1

Access to text in stage (messageable stage channels)

TEXT_IN_VOICE_ENABLED 1

Access to text in voice (messageable voice channels)

THREADS_ENABLED 1

Access to threads

THREADS_ENABLED_TESTING 1

Access to threads prior to release, meant for bot and library developers to test their code against the new features

THREAD_DEFAULT_AUTO_ARCHIVE_DURATION

THREADS_ONLY_CHANNEL 1

Access to forum channels

THREE_DAY_THREAD_ARCHIVE 1

Ability to have threads that archive after three days

TICKETED_EVENTS_ENABLED

Access to ticketed scheduled events

TICKETING_ENABLED

Access to ticketed scheduled events (see TICKETED_EVENTS_ENABLED)

TIERLESS_BOOSTING

Guild is using the new powerups-based boosting system

TIERLESS_BOOSTING_CLIENT_TEST

Early access to guild powerup management

TIERLESS_BOOSTING_TEST

Early access to guild powerup management

VALORANT_L30

Access to clan conversion based on the intensity of Valorant engagement among the guild's members, as depicted by the power user curve

VANITY_URL

Ability to set a vanity URL

VERIFIED

Guild is verified

VIDEO_BITRATE_ENHANCED

Increased camera feed quality (720p)

VIDEO_QUALITY_720_60FPS

Increased maximum streaming quality (720p, 60fps)

VIDEO_QUALITY_1080_60FPS

Increased maximum streaming quality (1080p, 60fps)

VIP_REGIONS

Increased maximum voice channel bitrate (384 kbps)

VOICE_CHANNEL_EFFECTS 1

Access to voice channel effects

VOICE_IN_THREADS

Access to voice in threads (calls within threads)

WELCOME_SCREEN_ENABLED

Welcome screen enabled

1 This is now a base feature, and the guild feature has no effect if still present.

Mutable Guild Features

These guild features are mutable, and can be edited with the Modify Guild endpoint.

Feature
Description
Required Permissions

ACTIVITY_FEED_DISABLED_BY_USER 1

Whether the member list activity feed is explicitly disabled

MANAGE_GUILD

ACTIVITY_FEED_ENABLED_BY_USER 1

Whether the member list activity feed is explicitly enabled

MANAGE_GUILD

COMMUNITY 2

Whether community features are available

ADMINISTRATOR

DISCOVERABLE 3

Whether the guild is public and discoverable in the directory

ADMINISTRATOR

ENABLED_MODERATION_EXPERIENCE_FOR_NON_COMMUNITY

Whether the member tab is shown in the channel list for non-community guilds

MANAGE_GUILD

INVITES_DISABLED

Whether joining the guild is disabled

MANAGE_GUILD

MEMBER_VERIFICATION_GATE_ENABLED 4

Whether the member verification gate is enabled

MANAGE_GUILD

NON_COMMUNITY_RAID_ALERTS

Whether raid alerts are opted in for non-community guilds

MANAGE_GUILD

RAID_ALERTS_DISABLED

Whether raid alerts are opted out for community guilds

MANAGE_GUILD

SUMMARIES_ENABLED_BY_USER 5

Whether conversation summaries are enabled

MANAGE_GUILD

1 Only one of the features can be set at a time.

2 Modification requires the permission.

3 Guild must also pass all discovery requirements in order to set.

4 Feature is only removable, not settable.

5 Guild must have access to conversation summaries (either the or feature).

Example Guild

{  "id": "81384788765712384",  "name": "Discord API",  "icon": "a363a84e969bcbe1353eb2fdfb2e50e6",  "description": null,  "home_header": null,  "splash": null,  "discovery_splash": null,  "features": [    "INVITE_SPLASH",    "VIP_REGIONS",    "PREVIEW_ENABLED",    "VANITY_URL",    "CHANNEL_ICON_EMOJIS_GENERATED",    "COMMUNITY",    "NEW_THREAD_PERMISSIONS",    "WELCOME_SCREEN_ENABLED",    "NEWS",    "ANIMATED_ICON",    "AUTO_MODERATION",    "MEMBER_VERIFICATION_GATE_ENABLED",    "THREADS_ENABLED",    "COMMUNITY_EXP_LARGE_UNGATED",    "SOUNDBOARD",    "THREE_DAY_THREAD_ARCHIVE"  ],  "emojis": [],  "stickers": [],  "banner": null,  "owner_id": "80088516616269824",  "application_id": null,  "region": "deprecated",  "afk_channel_id": null,  "afk_timeout": 3600,  "system_channel_id": "381870553235193857",  "widget_enabled": true,  "widget_channel_id": null,  "verification_level": 3,  "roles": [    {      "id": "81384788765712384",      "name": "@everyone",      "description": null,      "permissions": "110917634608832",      "position": 0,      "color": 0,      "hoist": false,      "managed": false,      "mentionable": false,      "icon": null,      "unicode_emoji": null,      "flags": 0    }  ],  "default_message_notifications": 1,  "mfa_level": 1,  "explicit_content_filter": 2,  "max_presences": null,  "max_members": 500000,  "max_stage_video_channel_users": 50,  "max_video_channel_users": 25,  "vanity_url_code": "discord-api",  "premium_tier": 1,  "premium_subscription_count": 5,  "system_channel_flags": 9,  "preferred_locale": "en-US",  "rules_channel_id": "381898062269775883",  "safety_alerts_channel_id": null,  "public_updates_channel_id": "650136538264502282",  "hub_type": null,  "premium_progress_bar_enabled": false,  "latest_onboarding_question_id": null,  "incidents_data": null,  "inventory_settings": null,  "nsfw": false,  "nsfw_level": 0}

Example Partial Guild

{  "id": "752630786561409076",  "name": "Elite Creative",  "icon": "278da1c7740e394657c1179f4782aef1",  "description": "The largest Fortnite Creative server across the globe. Join a Creative community offering events, 1v1s. and more!",  "home_header": null,  "splash": "2b4ae5cdd71038b4880b1b57a6e5dacb",  "discovery_splash": "9d7ec672b89b320ef7a51e5b6ae453b8",  "features": [    "ANIMATED_BANNER",    "ANIMATED_ICON",    "AUTO_MODERATION",    "BANNER",    "COMMUNITY",    "DISCOVERABLE",    "ENABLED_DISCOVERABLE_BEFORE",    "GUILD_ONBOARDING_EVER_ENABLED",    "GUILD_WEB_PAGE_VANITY_URL",    "INVITE_SPLASH",    "NEWS",    "PREVIEW_ENABLED",    "RAID_ALERTS_ENABLED",    "ROLE_ICONS",    "VANITY_URL",    "WELCOME_SCREEN_ENABLED"  ],  "approximate_member_count": 155451,  "approximate_presence_count": 7532,  "emojis": [],  "stickers": []}

A partial guild object returned from the Get User Guilds endpoint. Represents a guild the user is a member of.

User Guild Structure

Field
Type
Description

id

snowflake

The ID of the guild

name

string

The name of the guild (2-100 characters)

icon

?string

The guild's icon hash

banner

?string

The guild's banner hash

owner

boolean

Whether the user is the owner of the guild

features

array[string]

permissions

string

Total permissions for the user in the guild (excludes overwrites)

approximate_member_count? 1

integer

Approximate count of total members in the guild

approximate_presence_count? 1

integer

Approximate count of non-offline members in the guild

1 Only included when fetched from the Get User Guilds endpoint with set to .

Example User Guild

[  {    "id": "80351110224678913",    "name": "1337 Krew",    "icon": "8342729096ea3675442027381ff50dfe",    "banner": "bb42bdc37653b7cf58c4c8cc622e76cb",    "owner": true,    "permissions": "36953089",    "features": ["COMMUNITY", "NEWS", "ANIMATED_ICON", "INVITE_SPLASH", "BANNER", "ROLE_ICONS"],    "approximate_member_count": 420,    "approximate_presence_count": 69  }]

An embeddable widget for a guild.

Guild Widget Structure

Field
Type
Description

id

snowflake

The ID of the guild the widget is for

name

string

The name of the guild the widget is for

instant_invite

?string

The invite URL for the guild's widget channel, if any

presence_count

integer

Approximate count of non-offline members in the guild

channels

array[widget channel object]

The public voice and stage channels in the guild

members

array[widget member object]

The non-offline guild members (max 100)

Guild Widget Channel Structure

Field
Type
Description

id

snowflake

The ID of the channel

name

string

The name of the channel (1-100 characters)

position

integer

Sorting position of the channel

Guild Widget Member Structure

Field
Type
Description

id

snowflake

The incrementing ID of the member

username

string

The display name or censored username of the member

avatar_url

string

The avatar URL of the member

status

string

The status of the member

activity?

The primary activity the member is participating in

channel_id?

snowflake

The ID of the voice or stage channel the member is in

deaf?

boolean

Whether the member is deafened by the guild, if any

mute?

boolean

Whether the member is muted by the guild, if any

self_deaf?

boolean

Whether the member is locally deafened

self_mute?

boolean

Whether the member is locally muted

suppress?

boolean

Whether the member's permission to speak is denied

Guild Widget Member Activity Structure

Field
Type
Description

name

string

The name of the activity

Example Guild Widget

{  "id": "1046920999469330512",  "name": "Alien Network",  "instant_invite": "https://discord.com/invite/alien",  "channels": [    {      "id": "1053657210082836620",      "name": "stage",      "position": 2    }  ],  "members": [    {      "id": "0",      "username": "Dolfies",      "discriminator": "0000",      "avatar": null,      "status": "dnd",      "activity": {        "name": "balls lmao"      },      "deaf": false,      "mute": false,      "self_deaf": false,      "self_mute": true,      "suppress": false,      "channel_id": "1057241425793798144",      "avatar_url": "https://cdn.discordapp.com/widget-avatars/zOXeOyhOGqx-bwpzszp-obU-_RFE9xI9HG19HylPyMs/actPlrz4a6Kz4NSBV4jmkd1E4raF_UjDuIXnyCjJgY5DpcbFPZnVS1SvQbRkHbXaVLvKKv7gkZi0PPXX2gdxngxHSyFH7AuxH0Y-8pgQh5xhWQaC9PsmeJ64Bv8xjF9Wb_whrDVNA-I4Eg"    }  ],  "presence_count": 69}

Guild Widget Settings Structure

Field
Type
Description

enabled

boolean

Whether the widget is enabled

channel_id

?snowflake

The channel ID that the widget will generate an invite to, if any

Example Guild Widget Settings

{  "enabled": true,  "channel_id": "41771983444115456"}

Roles represent a set of permissions attached to a group of users. Roles have names, colors, and can be "pinned" to the side bar, causing their members to be listed separately. Roles can have separate permission profiles for the global context (guild) and channel context. The @everyone role has the same ID as the guild it belongs to.

Role Structure

Field
Type
Description

id

snowflake

The ID of the role

name

string

The name of the role (max 100 characters)

description

?string

The description for the role (max 90 characters)

color (deprecated)

integer

The color of the role represented as an integer representation of a hexadecimal color code

colors

The colors of the role encoded as an integer representation of hexadecimal color codes

hoist

boolean

Whether this role is pinned in the user listing

icon?

?string

The role's icon hash

unicode_emoji?

?string

The role's unicode emoji

position

integer

Position of this role

permissions

string

The permission bitwise value for the role

managed

boolean

Whether this role is managed by an integration

mentionable

boolean

Whether this role is mentionable

flags?

integer

tags?

role tags object

The tags this role has

Role Colors Structure

Field
Type
Description

primary_color

integer

The primary color of the role (matches color)

secondary_color

?integer

The secondary color of the role, creating a two-point gradient

tertiary_color 1

?integer

The tertiary color of the role, creating a three-point gradient

1 The only valid three-point gradient is (, , ). Attempting to set with any other values will fail.

Role Tags Structure

Field
Type
Description

bot_id?

snowflake

The ID of the bot this role belongs to

integration_id?

snowflake

The ID of the integration this role belongs to

premium_subscriber?

null

Whether this is the guild's premium subscriber (booster) role

subscription_listing_id?

snowflake

The ID of this role's subscription SKU and listing

available_for_purchase?

null

Whether this role is available for purchase

guild_connections?

null

Whether this role has a connection requirement

Role Flags

Value
Name
Description

1 << 0

IN_PROMPT

Role is part of an onboarding prompt option

Example Role

{  "id": "1050931799506817125",  "name": "Premium Members",  "description": null,  "permissions": "262144",  "position": 176,  "color": 3447003,  "colors": {    "primary_color": 3447003,    "secondary_color": null,    "tertiary_color": null  },  "hoist": false,  "managed": true,  "mentionable": false,  "icon": null,  "unicode_emoji": "👽",  "flags": 0,  "tags": {    "integration_id": "1055934248995000390"  }}

Holds configuration for a role's linking requirements.

Role Connection Configuration Structure

This structure is represented as an array[array[role connection requirement object]].

The top-level array represents requirements using OR logic, while the inner arrays represent requirements using AND logic. This means that a user must satisfy at least one requirement from the top-level array, but all requirements within that array to be considered eligible for the role.

Role Connection Requirement Structure

Field
Type
Description

connection_type 1

string

The type of connection required

connection_metadata_field? 2

?string

The metadata field to check for the connection

operator?

?integer

value?

?string

The value to compare the metadata field to

application_id?

snowflake

The ID of the application to check for the connection

application? 3

The application to check for the connection

name? 3

string

The friendly name of the application's metadata field

description? 3

string

The description of the application's metadata field

result? 3

boolean

The result of the connection check

1 A special connection type of is used to represent application role connection requirements.

2 In the case of regular connections, this is checked against the provider's connection metadata. For application connections, this is checked against the user's application metadata.

3 Only included when fetched from the Get Guild Role Connection Eligibility endpoint. Received only and cannot be set.

Role Connection Operator Type

Value
Name
Description

1

INTEGER_LESS_THAN_OR_EQUAL

The metadata value (integer) is less than or equal to the guild's configured value (integer)

2

INTEGER_GREATER_THAN_OR_EQUAL

The metadata value (integer) is greater than or equal to the guild's configured value (integer)

3

INTEGER_EQUAL

The metadata value (integer) is equal to the guild's configured value (integer)

4

INTEGER_NOT_EQUAL

The metadata value (integer) is not equal to the guild's configured value (integer)

5

DATETIME_LESS_THAN_OR_EQUAL

The metadata value (ISO8601 string) is less than or equal to the guild's configured value (integer; days before current date)

6

DATETIME_GREATER_THAN_OR_EQUAL

The metadata value (ISO8601 string) is greater than or equal to the guild's configured value (integer; days before current date)

7

BOOLEAN_EQUAL

The metadata value (integer) is equal to the guild's configured value (integer; 1)

8

BOOLEAN_NOT_EQUAL

The metadata value (integer) is not equal to the guild's configured value (integer; 1)

Example Role Connection Configuration

[  [    {      "connection_type": "paypal",      "connection_metadata_field": null,      "operator": null,      "value": null    },    {      "connection_type": "paypal",      "connection_metadata_field": "verified",      "operator": 1,      "value": "1"    },    {      "connection_type": "paypal",      "connection_metadata_field": "created_at",      "operator": 4,      "value": "0"    }  ],  [    {      "connection_type": "spotify",      "connection_metadata_field": null,      "operator": null,      "value": null    }  ]]

A participating user in a guild.

Guild Member Structure

Field
Type
Description

user 1

partial user object

The user this guild member represents

nick?

?string

The guild-specific nickname of the member (1-32 characters)

avatar?

?string

The member's guild avatar hash

avatar_decoration_data?

collectibles?

?collectibles object

The member's equipped collectibles

banner?

?string

The member's guild banner hash

roles

array[snowflake]

The role IDs assigned to this member

joined_at

ISO8601 timestamp

When the user joined the guild

premium_since?

?ISO8601 timestamp

When the member subscribed to (started boosting) the guild

deaf?

boolean

Whether the member is deafened in voice channels

mute?

boolean

Whether the member is muted in voice channels

pending? 2

boolean

Whether the member has not yet passed the guild's member verification requirements

communication_disabled_until? 3

?ISO8601 timestamp

When the member's timeout will expire and they will be able to communicate in the guild again

unusual_dm_activity_until? 3

?ISO8601 timestamp

When the member's unusual DM activity flag will expire

flags

integer

permissions? 4

string

Total permissions of the member in the channel, including overwrites

1 Won't be included in the member object attached to Message Create and Message Update Gateway events.

2 Won't be included in contexts that are impossible for a pending member to exist in. If the guild has previewing disabled, this field will always be .

3 If the value is a time in the past, the flag has expired.

4 Only returned when received in a slash command interaction.

Guild Member Flags

Value
Name
Description

1 << 0

DID_REJOIN

Guild member has left and rejoined the guild

1 << 1

COMPLETED_ONBOARDING

Guild member has completed onboarding

1 << 2

BYPASSES_VERIFICATION 1

Guild member bypasses guild verification requirements and member verification

1 << 3

STARTED_ONBOARDING

Guild member has started onboarding

1 << 4

IS_GUEST

Guild member is a guest and not a true member

1 << 5

STARTED_HOME_ACTIONS

Guild member has started the new member actions in the server guide

1 << 6

COMPLETED_HOME_ACTIONS

Guild member has completed all of the new member actions in the server guide

1 << 7

AUTOMOD_QUARANTINED_NAME 2

Guild member has been indefinitely quarantined by an AutoMod Rule for their username, display name, or nickname

1 << 8

AUTOMOD_QUARANTINED_BIO 2

Guild member has been indefinitely quarantined by an AutoMod Rule for their bio

1 << 9

DM_SETTINGS_UPSELL_ACKNOWLEDGED

Guild member has acknowledged the DM privacy settings upsell modal

1 << 10

AUTOMOD_QUARANTINED_GUILD_TAG 2

Guild member has been indefinitely quarantined by an AutoMod Rule for their primary guild tag

1 Allows a member who does not meet verification requirements to participate in the guild, and forces the member's status to be . Removing this flag does not make the member pending again, but subjects them to the verification requirements again.

2 Quarantined users, similar to timed out users, are prevented from interacting with the guild in any way.

Example Guild Member

{  "avatar": null,  "banner": null,  "communication_disabled_until": null,  "unusual_dm_activity_until": null,  "flags": 34,  "joined_at": "2023-03-22T13:59:47.553000+00:00",  "nick": null,  "pending": false,  "premium_since": null,  "roles": [    "1040221495437299782",    "1029330445336313927",    "1049489484179312691",    "1053820570367701012",    "1029317826755956827",    "1029316630431412287"  ],  "user": {    "id": "828387742575624222",    "username": "jupppper",    "avatar": "e14a7c62b0b38068be88be194b23910f",    "discriminator": "0",    "public_flags": 16384,    "banner": "e45c9b5799fcb46b82bd5f1afc1b30c4",    "global_name": "Jup",    "accent_color": 1,    "avatar_decoration_data": null,    "primary_guild": null  },  "mute": false,  "deaf": false}

Additional information about a participating user's join source in a guild.

Field
Type
Description

user_id? 1

snowflake

The ID of the user this guild member represents

member? 2

The associated guild member

join_source_type?

integer

source_invite_code?

?string

The invite code or vanity used to join the guild, if applicable

inviter_id?

?snowflake

The ID of the user who invited the user to the guild, if applicable

integration_type?

?integer

The type of integration that added the user to the guild, if applicable

join_source_application_id? 2

?snowflake

The ID of the application that owns the linked lobby

join_source_channel_id? 2

?snowflake

The ID of the channel the lobby is linked to

1 is only included when fetched from the Get Guild Members Supplemental endpoint.

2 Only included when fetched from the Search Guild Members endpoint.

Join Source Type

Value
Name
Description

0

UNSPECIFIED

The user joined the guild through an unknown source

1

BOT

The user was added to the guild by a bot using the OAuth2 scope

2

INTEGRATION

The user was added to the guild by an integration (e.g. Twitch)

3

DISCOVERY

The user joined the guild through guild discovery

4

HUB

The user joined the guild through a student hub

5

INVITE

The user joined the guild through an invite

6

VANITY_URL

The user joined the guild through a vanity URL

7

MANUAL_MEMBER_VERIFICATION

The user was accepted into the guild after applying for membership

8

SOCIAL_LAYER_INTEGRATION_LINKED_CHANNEL

The user joined the guild through a linked lobby

{  "user_id": "257496590401536000",  "source_invite_code": "41i3n5",  "join_source_type": 5,  "inviter_id": "1001086404203389018",  "integration_type": null}

A ban for a guild. Banned users can't rejoin a guild unless unbanned.

Ban Structure

Field
Type
Description

user

partial user object

The banned user

reason

?string

The reason for the ban

Example Ban

{  "user": {    "id": "53908232506183680",    "username": "mason",    "avatar": "a_d5efa99b3eeaa7dd43acca82f5692432",    "discriminator": "0",    "public_flags": 4325445,    "banner": "42db4e3be824706cb1304fba05995722",    "accent_color": null,    "global_name": "Mason",    "avatar_decoration_data": null,    "primary_guild": null  },  "reason": "mentioning b1nzy"}

Welcome Screen Structure

Field
Type
Description

description

?string

The welcome message shown in the welcome screen (max 140 characters)

welcome_channels

The channels shown in the welcome screen (max 5)

Welcome Screen Channel Structure

Field
Type
Description

channel_id

snowflake

The ID of the channel

description

string

The description shown for the channel (1-50 characters)

emoji_id

?snowflake

The emoji ID, if the emoji is custom

emoji_name

?string

The emoji name if custom, the unicode character if standard, or null if no emoji is set

Example Welcome Screen

{  "description": "Discord Developers is a place to learn about Discord's API, bots, and SDKs and integrations. This is NOT a general Discord support server.",  "welcome_channels": [    {      "channel_id": "697138785317814292",      "description": "Follow for official Discord API updates",      "emoji_id": null,      "emoji_name": "📡"    },    {      "channel_id": "697236247739105340",      "description": "Get help with Bot Verifications",      "emoji_id": null,      "emoji_name": "📸"    },    {      "channel_id": "697489244649816084",      "description": "Create amazing things with Discord's API",      "emoji_id": null,      "emoji_name": "🔬"    },    {      "channel_id": "613425918748131338",      "description": "Integrate Discord into your game",      "emoji_id": null,      "emoji_name": "🎮"    },    {      "channel_id": "646517734150242346",      "description": "Find more places to help you on your quest",      "emoji_id": null,      "emoji_name": "🔦"    }  ]}

In guilds with member verification enabled, when a member joins, a Guild Member Add Gateway event will be dispatched but they will initially be restricted from doing any actions in the guild, and will be true in the guild member object. When the member completes the verification, a Guild Member Update Gateway event will be dispatched and will be false.

To represent a member's progress towards becoming a full member of the guild, a Guild Join Request Create Gateway event will be dispatched. Once the join request is approved, the member's status will be false and they will be able to interact with the guild. Unless using manual approval, the join request will be automatically approved when the user submits their join request.

Assigning a member the flag will force their status to be false and approve their current join request regardless of the join request's status. Note that bot users will always bypass member verification and have their status set to false.

Guild Previewing

Discoverable guilds, guilds with member verification enabled, and guilds in a directory entry have thefeature by default. This allows the guild to be lurkable by users who are not members, if discoverable, and allows members who have not passed the verification gate to view the guild without interacting with it.

If a guild has member verification enabled and is not previewable, new joiners will not be able to view the guild until they pass the verification gate, and are therefore not considered members until they do. This means members do not join the guild until they pass the verification gate. A Guild Member Add Gateway event will not be dispatched until the member has passed the verification gate, and will always be false in the guild member object for new joiners. Join requests will continue to be dispatched as normal, but there will not be an associated guild member until the join request is approved.

From the joiner's perspective, they will also not receive a Guild Create Gateway event or any other events dispatched from the guild until they pass member verification. Non-previewable pending guilds can only be retrieved with the Get Join Request Guilds endpoint. Their join requests are also sent in the field of the Ready event.

Note that the preview disabled paradigm only applies if a guild meets one of the requirements for previewing in the first place.

Manual Approval

To use form field types other than , the guild must have the guild feature enabled. When using these form field types, join requests must be manually approved after they are submitted before the user can complete member verification.

When only using only form field types, the join request will be automatically approved when the user submits the request.

Member Verification Structure

Field
Type
Description

version

?ISO8601 timestamp

When the member verification was last modified

form_fields

Questions for applicants to answer (max 5)

description

?string

A description of what the guild is about; this can be different than the guild's description (max 300 characters)

guild 1

The guild this member verification is for

profile 1

The profile of the guild this member verification is for

1 Only included when fetched from the Get Guild Member Verification endpoint with set to .

Member Verification Form Field Structure

Field
Type
Description

field_type

string

label

string

The label for the form field (max 300 characters)

choices?

array[string]

Multiple choice answers (1-8, max 150 characters)

values?

?array[string]

The rules that the user must agree to (1-16, max 300 characters)

response? 1

?string | integer | boolean

Response for this field

required

boolean

Whether this field is required for a successful application

description

?string

The subtext of the form field

automations

?array[string]

Unknown (max 300 characters, max 10)

placeholder?

?string

Placeholder text for the field's response area

1 Not present when fetched from the Get Guild Member Verification endpoint. For form fields, the response should be . For form field types, the response is the index of the selected choice.

Member Verification Form Field Type

Value
Description

TERMS

User must agree to the guild rules

TEXT_INPUT

User must respond with a short answer (max 150 characters)

PARAGRAPH

User must respond with a paragraph (max 1000 characters)

MULTIPLE_CHOICE

User must select one of the provided choices

VERIFICATION

User must verify their email or phone number

Member Verification Guild Structure

Field
Type
Description

id

snowflake

The ID of the guild

name

string

The name of the guild (2-100 characters)

icon

?string

The guild's icon hash

description

?string

The description for the guild (max 300 characters)

splash

?string

The guild's splash hash

discovery_splash

?string

home_header

?string

The guild's home header hash, used in new member welcome

verification_level

integer

The verification level required for the guild

features

array[string]

emojis

array[emoji object]

Custom guild emojis

approximate_member_count

integer

Approximate number of total members in the guild

approximate_presence_count

integer

Approximate number of non-offline members in the guild

Example Member Verification

{  "version": "2022-12-21T16:08:17.822000+00:00",  "form_fields": [    {      "field_type": "TERMS",      "label": "Read and agree to the server rules",      "description": null,      "automations": null,      "required": true,      "values": [        "No spam or self-promotion (server invites, advertisements, etc) without permission from a staff member. This includes DMing fellow members.",        "No age-restricted or obscene content. This includes text, images, or links featuring nudity, sex, hard violence, or other graphically disturbing content.",        "If you see something against the rules or something that makes you feel unsafe, let staff know. We want this server to be a welcoming space!"      ]    },    {      "field_type": "TEXT_INPUT",      "label": "Why do you like aliens?",      "description": null,      "automations": null,      "required": true,      "placeholder": null    },    {      "field_type": "MULTIPLE_CHOICE",      "label": "What is your favorite alien movie?",      "description": null,      "automations": null,      "required": true,      "choices": ["Alien", "E.T."]    }  ],  "description": "Alien",  "guild": {    "id": "1046920999469330512",    "name": "Alien Network",    "icon": "66b0f4d96c145970fa9d96ada8afadf3",    "description": "Where the 👽s 👽 and sometimes very 👽 things happen 😨.",    "home_header": "39ba384a31e9c285649ad00b359946ab",    "splash": "b40e61f7730b8781b9a551964570e0cc",    "discovery_splash": "0e11ae8d9f1c86958be05e61b0c90ac3",    "features": [],    "approximate_member_count": 100,    "approximate_presence_count": 99,    "emojis": [],    "verification_level": 2  }}

Guild join requests are an extension of member verification that represent a user's request to join a guild. A join request is created when a user attempts to join a guild with member verification enabled, and the user must complete the verification process to join the guild. All join requests are stored for 180 days.

Most join request features require the guild feature, as join request are automatically actioned when only using the form field type and do not require manual approval. This includes most of the join request endpoints, such as Get Guild Join Request and Action Guild Join Request.

Guild Join Request Structure

Field
Type
Description

id

snowflake

The ID of the join request

join_request_id

snowflake

The ID of the join request

created_at

ISO8601 timestamp

When the join request was created

application_status

string

guild_id

snowflake

The ID of the guild this join request is for

form_responses? 1

Responses to the guild's member verification questions

last_seen

?ISO8601 timestamp

When the request was acknowledged by the user

actioned_at? 1

snowflake

A snowflake representing when the join request was actioned

actioned_by_user? 1

partial user object

The moderator who actioned the join request

rejection_reason

?string

Why the join request was rejected

user_id

snowflake

The ID of the user who created this join request

user? 1 2

partial user object

The user who created this join request

interview_channel_id

?snowflake

The ID of a channel where an interview regarding this join request may be conducted

1 Only included when fetched from the Get Guild Join Request or Get Guild Join Requests endpoints, or when receiving a related Gateway event as a moderator.

2 Only guaranteed for users other than the current user.

Guild Join Request Status

Value
Description

STARTED

The request is started but not submitted

SUBMITTED

The request has been submitted

REJECTED

The request has been rejected

APPROVED

The request has been approved

Example Guild Join Request

{  "created_at": "2024-05-20T03:45:28.965000+00:00",  "join_request_id": "1241959960003477524",  "id": "1241959960003477524",  "rejection_reason": null,  "application_status": "APPROVED",  "actioned_at": "2024-05-20T03:45:44.547975+00:00",  "actioned_by_user": {    "id": "828387742575624222",    "username": "jupppper",    "avatar": "e14a7c62b0b38068be88be194b23910f",    "discriminator": "0",    "public_flags": 16384,    "banner": "e45c9b5799fcb46b82bd5f1afc1b30c4",    "global_name": "Jup",    "accent_color": 1,    "avatar_decoration_data": null,    "primary_guild": null  },  "form_responses": [    {      "field_type": "TERMS",      "label": "Read and agree to the server rules",      "description": null,      "automations": null,      "required": true,      "values": [        "No spam or self-promotion (server invites, advertisements, etc) without permission from a staff member. This includes DMing fellow members.",        "No age-restricted or obscene content. This includes text, images, or links featuring nudity, sex, hard violence, or other graphically disturbing content.",        "If you see something against the rules or something that makes you feel unsafe, let staff know. We want this server to be a welcoming space!"      ],      "response": true    },    {      "field_type": "TEXT_INPUT",      "label": "Why do you like aliens?",      "description": null,      "automations": null,      "required": true,      "placeholder": null,      "response": "I like aliens because they're cool!"    },    {      "field_type": "MULTIPLE_CHOICE",      "label": "What is your favorite alien movie?",      "description": null,      "automations": null,      "required": true,      "values": ["Alien", "E.T."],      "response": 0    }  ],  "last_seen": "2024-05-20T03:45:44.547975+00:00",  "guild_id": "1046920999469330512",  "user_id": "852892297661906993",  "user": {    "id": "852892297661906993",    "username": "alien",    "global_name": "Alien",    "avatar": "14733482e560d9267c0a414b21b2fb8d",    "discriminator": "0",    "public_flags": 64,    "avatar_decoration_data": null,    "primary_guild": null  },  "interview_channel_id": null}

The onboarding flow for a guild.

Onboarding Structure

Field
Type
Description

guild_id

snowflake

The ID of the guild this onboarding is part of

prompts

array[onboarding prompt object]

The prompts shown during onboarding and in community customization

default_channel_ids

array[snowflake]

The channel IDs that members get opted into automatically

enabled

boolean

Whether onboarding is enabled in the guild

below_requirements

boolean

Whether the guild is below the requirements for onboarding

mode

integer

The current criteria mode for onboarding

Onboarding Mode

Defines the criteria used to satisfy onboarding constraints that are required for enabling.

Value
Name
Description

0

ONBOARDING_DEFAULT

Count only default channels towards constraints

1

ONBOARDING_ADVANCED

Count default channels and questions towards constraints

Onboarding Prompt Structure

Field
Type
Description

id

snowflake

The ID of the prompt

type

integer

options

Options available within the prompt

title

string

The title of the prompt

single_select

boolean

Whether users are limited to selecting one option for the prompt

required

boolean

Whether the prompt is required before a user completes the onboarding flow

in_onboarding

boolean

Wether the prompt is present in the onboarding flow, or only appears in community customization

Onboarding Prompt Option Structure

Field
Type
Description

id

snowflake

The ID of the prompt option

channel_ids

array[snowflake]

The channel IDs a member is added to when the option is selected

role_ids

array[snowflake]

The role IDs assigned to a member when the option is selected

emoji

emoji object

Emoji representing the option

title

string

The title of the option

description

?string

The description for the option

Onboarding Prompt Type

Value
Name
Description

0

MULTIPLE_CHOICE

Prompt offers multiple options to select from

1

DROPDOWN

Prompt offers a dropdown menu to select from

Example Onboarding

{  "guild_id": "960007075288915998",  "prompts": [    {      "id": "1067461047608422473",      "title": "What do you want to do in this community?",      "options": [        {          "id": "1067461047608422476",          "title": "Chat with Friends",          "description": "",          "emoji": {            "id": "1070002302032826408",            "name": "chat",            "animated": false          },          "role_ids": [],          "channel_ids": ["962007075288916001"]        },        {          "id": "1070004843541954678",          "title": "Get Gud",          "description": "We have excellent teachers!",          "emoji": {            "id": null,            "name": "😀",            "animated": false          },          "role_ids": ["982014491980083211"],          "channel_ids": []        }      ],      "single_select": false,      "required": false,      "in_onboarding": true,      "type": 0    }  ],  "default_channel_ids": [    "998678771706110023",    "998678693058719784",    "1070008122577518632",    "998678764340912138",    "998678704446263309",    "998678683592171602",    "998678699715067986"  ],  "enabled": true,  "mode": 0,  "below_requirements": false}

The welcome experience for new and existing members in a guild, also known as the server guide.

New Member Welcome Structure

Field
Type
Description

guild_id

snowflake

The ID of the guild this new member welcome is for

enabled

boolean

Whether the new member welcome experience is enabled

welcome_message

Welcome message shown to new members of the guild

new_member_actions

array[new member action object]

Actions shown to new members of the guild (max 5)

resource_channels

array[resource channel object]

Read-only channels that provide resources for new members (max 7)

New Member Welcome Message Structure

Field
Type
Description

author_ids 1

array[snowflake]

The IDs of the users who authored the welcome message (max 10)

message 2

string

The welcome message shown to new members (max 300 characters)

1 New member welcome message authors must be guild members with the or permission.

2 may be used as a placeholder for the member's name.

New Member Action Structure

Field
Type
Description

channel_id

snowflake

The ID of the channel where the action is located

action_type

integer

The type of action the user should take in the channel

title

string

The title of the action (max 60 characters)

description

string

The description of the action (max 200 characters)

emoji?

partial emoji object

The emoji representing the action

icon?

string

The icon hash representing the action

New Member Action Type

Value
Name
Description

0

VIEW

View the channel

1

CHAT

Send a message in the channel

Resource Channel Structure

Field
Type
Description

channel_id

snowflake

The ID of the channel that provides resources for new members

title

string

The title of the resource channel (max 60 characters)

description

string

The description of the resource channel (max 200 characters)

emoji?

partial emoji object

The emoji representing the resource channel

icon?

string

The icon hash representing the resource channel

Example New Member Welcome

{  "guild_id": "1029315212005888060",  "enabled": false,  "welcome_message": {    "author_ids": ["852892297661906993"],    "message": "Hello [@username], 👽👽👽"  },  "new_member_actions": [    {      "channel_id": "1029316811088478299",      "action_type": 0,      "title": "Get your info",      "description": "",      "emoji": {        "id": null,        "name": "👽",        "animated": false      }    }  ],  "resource_channels": [    {      "channel_id": "1029316811088478299",      "title": "Info",      "description": "Absolute cinema"    }  ]}

A user's progress towards completing the new member actions in a guild.

New Member Actions Progress Structure

Field
Type
Description

guild_id

snowflake

The ID of the guild this new member actions progress is for

user_id

snowflake

The ID of the user this new member actions progress is for

channel_actions

map[snowflake, new member action progress object]

The progress of the user in each new member action channel they have interacted with

New Member Action Progress Structure

Field
Type
Description

completed

boolean

Whether the user has completed the new member action in the channel

Example New Member Actions Progress

{  "guild_id": "1029315212005888060",  "user_id": "852892297661906993",  "channel_actions": {    "1029316811088478299": {      "completed": true    }  }}

Represents a member's premium guild subscription (boost).

Premium Guild Subscription Structure

Field
Type
Description

id

snowflake

The ID of the premium guild subscription

guild_id

snowflake

The ID of the guild this subscription is for

user_id

snowflake

The ID of the user who created this premium guild subscription

ended

boolean

If this premium guild subscription has ended

ends_at?

ISO8601 timestamp

When this premium guild subscription will expire

pause_ends_at

?ISO8601 timestamp

When the user's overall subscription pause will end, reactivating the premium guild subscription

user

partial user object

The user this premium guild subscription is for

Example Premium Guild Subscription

{  "id": "1315132642890350602",  "user_id": "673658900435697665",  "guild_id": "1081635484209520802",  "ended": false,  "pause_ends_at": null,  "user": {    "id": "673658900435697665",    "username": "android",    "global_name": "Android",    "avatar": "08f104f8d5406c4d46916794fe2efeb7",    "avatar_decoration_data": {      "asset": "a_8552f9857793aed0cf816f370e2df3be",      "sku_id": "1232071712695386162",      "expires_at": null    },    "collectibles": null,    "discriminator": "0",    "public_flags": 4194560,    "primary_guild": null  }}

GET/users/@me/guilds

Returns a list of user guild objects representing the guilds the current user is a member of.

Query String Params

Field
Type
Description

before?

snowflake

Get guilds before this guild ID

after?

snowflake

Get guilds after this guild ID

limit?

integer

Max number of guilds to return (1-200, default 200)

with_counts? 1

boolean

Whether to include approximate member and presence counts (default false)

1 For OAuth2 requests, this parameter requires the additional scope.

GET/users/@me/join-request-guilds

Returns a list of partial guild objects representing non-previewable guilds the current user has pending join requests for.

DELETE/users/@me/guilds/{guild.id}

Leaves the given guild ID. Returns a 204 empty response on success. Fires a Guild Delete and a Guild Member Remove Gateway event.

JSON Params

Field
Type
Description

lurking?

boolean

Whether the user is lurking in the guild (default false)

POST/guilds

Creates a new guild. Returns a guild object on success. Fires a Guild Create Gateway event.

JSON Params

Field
Type
Description

name

string

The name of the guild (2-100 characters, excluding trailing and leading whitespace)

description?

?string

The description for the guild (max 300 characters)

region? (deprecated)

?string

The main voice region ID of the guild

icon?

The guild's icon

verification_level?

?integer

The verification level required for the guild

default_message_notifications?

?integer

Default message notification level for the guild

explicit_content_filter?

?integer

Whose messages are scanned and deleted for explicit content in the guild

preferred_locale?

?string

The preferred locale of the guild (default "en-US")

roles? 1

?array[partial role object]

Roles in the new guild

channels? 2

?array[partial channel object]

Channels in the new guild

afk_channel_id?

?snowflake

The ID of the guild's AFK channel; this is where members in voice idle for longer than afk_timeout are moved

afk_timeout?

?integer

The AFK timeout of the guild (one of 60, 300, 900, 1800, 3600, in seconds)

system_channel_id?

?snowflake

The ID of the channel where system event messages, such as member joins and premium subscriptions (boosts), are posted

system_channel_flags?

?integer

The flags that limit system event messages

guild_template_code?

?string

The template code that inspired this guild, used for analytics

staff_only? 3

boolean

Whether the new guild will only be accessible for Discord employees

1 The first member of the array is used to change properties of the guild's default (@everyone) role. If you are trying to bootstrap a guild with additional roles, keep this in mind. Additionally, the required field within each role object is an integer placeholder, and will be replaced by the API upon consumption. Its purpose is to allow you to overwrite a role's permissions in a channel when also passing in channels with the channels array.

2 The field within each channel object may be set to an integer placeholder, and will be replaced by the API upon consumption. Its purpose is to allow you to create channels by setting the field on any children to the category's field. Category channels must be listed before any children.

3 Adds the guild feature, making the server only available for Discord employees. Only settable by Discord employees.

Example Partial Channel Object

{  "name": "my-category",  "type": 4,  "id": 1}{  "name": "naming-things-is-hard",  "type": 0,  "parent_id": 1}

GET/guilds/{guild.id}

Returns a guild object for the given guild ID. User must be a member of the guild.

Query String Params

Field
Type
Description

with_counts?

boolean

Whether to include approximate member and presence counts (default false)

GET/guilds/{guild.id}/basic

Returns a partial guild object for the given guild ID. If the user is not in the guild, the guild must be discoverable.

GET/guilds/{guild.id}/preview

Returns a partial guild object for the given guild ID with all partial fields. If the user is not in the guild, the guild must be discoverable.

PATCH/guilds/{guild.id}

Modifies a guild's settings. Requires the permission. Returns the updated guild object on success. Fires a Guild Update Gateway event.

JSON Params

Field
Type
Description

name?

string

The name of the guild (2-100 characters, excluding trailing and leading whitespace)

icon?

The guild's icon; animated icons are only shown when the guild has the ANIMATED_ICON feature

banner?

The guild's banner; banners are only shown when the guild has the BANNER feature, animated banners are only shown when the guild has the ANIMATED_BANNER feature

home_header?

The guild's home header, used in new member welcome; home headers are only shown when the guild has the BANNER feature

splash?

The guild's invite splash; splashes are only shown when the guild has the INVITE_SPLASH feature

discovery_splash?

The guild's discovery splash

owner_id?

snowflake

The user ID of the guild's owner (must be the current owner); if the current owner has an email address associated with their account and does not have MFA enabled, code must be provided

code? 2

string

The guild ownership transfer code

description?

?string

The description for the guild (max 300 characters)

region? (deprecated)

?string

The main voice region ID of the guild

afk_channel_id?

?snowflake

The ID of the guild's AFK channel; this is where members in voice idle for longer than afk_timeout are moved

afk_timeout?

integer

The AFK timeout of the guild (one of 60, 300, 900, 1800, 3600, in seconds)

verification_level?

integer

The verification level required for the guild

default_message_notifications?

integer

Default message notification level for the guild

explicit_content_filter?

integer

Whose messages are scanned and deleted for explicit content in the guild

features?

array[string]

system_channel_id? 1

?snowflake

The ID of the channel where system event messages, such as member joins and premium subscriptions (boosts), are posted

system_channel_flags?

integer

The flags that limit system event messages

rules_channel_id? 1

?snowflake

The ID of the channel where community guilds display rules and/or guidelines

public_updates_channel_id?

?snowflake

The ID of the channel where admins and moderators of community guilds receive notices from Discord

safety_alerts_channel_id?

?snowflake

The ID of the channel where admins and moderators of community guilds receive safety alerts from Discord

preferred_locale?

string

The preferred locale of the guild; used in discovery and notices from Discord (default "en-US")

premium_progress_bar_enabled?

boolean

Whether the guild has the premium (boost) progress bar enabled

1 Setting these to a value of will implicitly create a new "#rules" or "#moderator-only" channel.

2 This value can be obtained by requesting a verification code with the Get Guild Ownership Transfer Code endpoint.

POST/guilds/{guild.id}/mfa

Modifies the guild's MFA requirement for administrative actions within the guild. User must be the owner. Fires a Guild Update Gateway event.

JSON Params / Response Body

Field
Type
Description

level

integer

Required MFA level for administrative actions within the guild

Example Response

{  "level": 1}

PUT/guilds/{guild.id}/pincode

Sends a verification code to the guild owner's email address to initiate the guild ownership transfer process. User must be the owner. Returns a 204 empty response on success.

DELETE/guilds/{guild.id}

Deletes a guild permanently. User must be the owner. Returns a 204 empty response on success. Fires a Guild Delete Gateway event.

GET/guilds/{guild.id}/members

Returns a list of guild member objects that are members of the guild. User must be a member of the guild.

Query String Params

Field
Type
Description

limit?

integer

Max number of members to return (1-1000, default 1)

after?

snowflake

Get members after this member ID

GET/guilds/{guild.id}/members/search

Returns a list of guild member objects whose username or nickname contains a provided string. User must be a member of the guild.

Functionally identical to the Request Guild Members Gateway Opcode.

Query String Params

Field
Type
Description

query

string

Query to match username(s) and nickname(s) against

limit?

integer

Max number of members to return (1-1000, default 1)

POST/guilds/{guild.id}/members-search

Returns supplemental guild member objects containing guild member objects that match a specified query. Requires the permission.

This endpoint utilizes Elasticsearch to power results. This means that while it is very powerful, it's also tricky to use and reliant on the index, meaning results may not be immediately available for a recently-joined member.

JSON Params

Field
Type
Description

limit?

integer

Max number of members to return (1-1000, default 25)

sort?

integer

The sorting algorithm to use (default JOINED_AT_DESC)

or_query?

The filter criteria to match against members using OR logic

and_query?

The filter criteria to match against members using AND logic

before?

Get members before this member

after?

Get members after this member

Member Sort Type

Value
Name
Description

1

JOINED_AT_DESC

Sort by when the user joined the guild descending (default)

2

JOINED_AT_ASC

Sort by when the user joined the guild ascending

3

USER_ID_DESC

Sort by when the user joined Discord descending

4

USER_ID_ASC

Sort by when the user joined Discord ascending

Member Filter Structure

Field
Type
Description
Queries

user_id?

query object (snowflake)

Query to match member IDs against

or_query, range

usernames?

query object (string)

Query to match display name(s), username(s), and nickname(s) against

or_query

role_ids?

query object (snowflake)

IDs of roles to match members against

or_query, and_query

guild_joined_at?

query object (integer)

When the user joined the guild

range

safety_signals?

Safety signals to match members against

is_pending?

boolean

Whether the member has not yet passed the guild's member verification requirements

true, false

did_rejoin?

boolean

Whether the member left and rejoined the guild

true, false

join_source_type?

query object (integer)

or_query

source_invite_code?

query object (string)

The invite code or vanity used to join the guild

or_query

Safety Signals Structure

Field
Type
Description
Queries

unusual_dm_activity_until?

query object (integer)

When the member's unusual DM activity flag will expire

range

communication_disabled_until?

query object (integer)

When the member's timeout will expire

range

unusual_account_activity?

boolean

Whether the user has the flag

true, false

automod_quarantined_username?

boolean

Whether the member has been indefinitely quarantined by an AutoMod Rule for their username, display name, or nickname

true, false

Query Structure

Field
Type
Description

or_query?

array[snowflake | string | integer]

The values to match against using OR logic (1-100 characters, max 10)

and_query?

array[snowflake | string | integer]

The values to match against using AND logic (1-100 characters, max 10)

range?

The range of values to match against

Range Query Structure

Field
Type
Description

gte?

snowflake | integer

Inclusive lower bound value to match

lte?

snowflake | integer

Inclusive upper bound value to match

Field
Type
Description

user_id

snowflake

The ID of the user to paginate past

guild_joined_at

integer

When the user to paginate past joined the guild

Response Body

Field
Type
Description

guild_id

snowflake

The ID of the guild searched

members

The resulting members

page_result_count

integer

The number of results returned

total_result_count

integer

The total number of results found

POST/guilds/{guild.id}/members/supplemental

Returns a list of supplemental guild member objects including join source information for the given user IDs. Requires the permission.

JSON Params

Field
Type
Description

users

array[snowflake]

The user IDs to fetch supplemental guild member information for (max 200)

GET/guilds/{guild.id>/members/unusual-dm-activity

Returns a list of guild member unusual DM activity objects representing the members that have ever had unusual DM activity. User must be a member of the guild.

Query String Params

Field
Type
Description

limit?

integer

Max number of members to return (max 1000, default 100)

after?

snowflake

Get members after this member ID

Guild Member Unusual DM Activity Structure

Field
Type
Description

user_id

snowflake

The ID of the user with unusual DM activity

guild_id

snowflake

The ID of the guild the user is in

unusual_dm_activity_until 1

ISO8601 timestamp

When the user's unusual DM activity flag will expire

1 If the value is a time in the past, the flag has expired.

Example Guild Member Unusual DM Activity

{  "user_id": "934487154330066945",  "guild_id": "81384788765712384",  "unusual_dm_activity_until": "2024-01-15T06:10:37.288219+00:00"}

GET/users/@me/guilds/{guild.id}/member

Returns the guild member object for the current user in the specified guild.

GET/guilds/{guild.id}/members/{user.id}

Returns a guild member object for the specified user.

PUT/guilds/{guild.id}/members/@me

Adds the current user to the guild. The guild must be discoverable. If the user is not a member of the guild, returns a guild object with the extra fields below. Otherwise, returns a 204 empty response. May fire a Guild Create, Guild Member Add, and/or Guild Join Request Create Gateway event.

For guilds with member verification enabled, this endpoint will default to adding new members as in the guild member object. Members that are will have to complete member verification before they become full members that can talk.

Query String Params

Field
Type
Description

lurker? 1

boolean

Whether the user will lurk the guild (default false)

session_id?

string

The session ID to lurk with, required for lurking

location?

string

The analytics location the request initiated from

recommendation_load_id?

string

The unique identifier for the current guild discovery recommendations (client-generated UUID as a hexadecimal string)

1 Lurking a guild allows the user to receive Gateway events for the guild without being a full member for the lifetime of the Gateway session. This is useful for previewing the guild before joining. Lurking requires the guild feature.

Response Body Extra Fields

Field
Type
Description

show_verification_form?

boolean

Whether the user should be shown the guild's member verification form

welcome_screen?

The guild's welcome screen, shown to new members when joining the guild

PUT/guilds/{guild.id}/members/{user.id}

Adds a user to the guild, provided you have a valid OAuth2 access token for the user with the scope. Returns the joined guild member object or a 204 empty response (if the user is already a member of the guild) on success. May fire a Guild Member Add and/or Guild Join Request Create Gateway event.

For guilds with member verification enabled, this endpoint will default to adding new members as in the guild member object. Members that are will have to complete member verification before they become full members that can talk. Note that this endpoint ignores whether guild previewing is enabled and will always join the user as a member.

JSON Params

Field
Type
Description
Permission

access_token

string

An OAuth2 access token granted with the guilds.join to the bot's application for the user you want to add to the guild

CREATE_INSTANT_INVITE

nick?

?string

The guild-specific nickname of the member (1-32 characters)

MANAGE_NICKNAMES

roles?

array[snowflake]

The role IDs assigned to this member

MANAGE_ROLES

mute?

boolean

Whether the member is muted in voice channels

MUTE_MEMBERS

deaf?

boolean

Whether the user is deafened in voice channels

DEAFEN_MEMBERS

flags? 1

integer

The member's flags (only BYPASSES_VERIFICATION can be set)

MANAGE_GUILD or (MODERATE_MEMBERS and KICK_MEMBERS and BAN_MEMBERS)

1 For guilds with member verification enabled, assigning the guild member flag will add the user as a full member ( is false in the member object).

PATCH/guilds/{guild.id}/members/{user.id}

Modifies attributes of a guild member. User must be a member of the guild. Returns the updated guild member object on success. Fires a Guild Member Update Gateway event.

JSON Params

Field
Type
Description
Permission

nick?

?string

The guild-specific nickname of the member (1-32 characters)

MANAGE_NICKNAMES

roles?

array[snowflake]

The role IDs assigned to this member

MANAGE_ROLES

mute? 1

boolean

Whether the member is muted in voice channels

MUTE_MEMBERS

deaf? 1

boolean

Whether the user is deafened in voice channels

DEAFEN_MEMBERS

channel_id? 1

snowflake

The ID of the voice channel the user is connected to

MOVE_MEMBERS

communication_disabled_until? 2

?ISO8601 timestamp

When the user's timeout will expire and they will be able to communicate in the guild again (up to 28 days in the future)

MODERATE_MEMBERS

flags?

integer

The member's flags (only BYPASSES_VERIFICATION can be set)

MANAGE_GUILD or (MODERATE_MEMBERS and KICK_MEMBERS and BAN_MEMBERS)

1 Requires the member to be connected to voice. When moving members to channels, the current user must have permissions to both connect to the channel and have the permission. If the is set to , this will force the target user to be disconnected from voice.

2 Guild administrators cannot be timed out. If a member is timed out and becomes an administrator before their timeout expires, the timeout will no longer have an effect.

PATCH/guilds/{guild.id}/members/@me

Modifies the current user's member in the guild. Returns the updated guild member object on success (including extra and fields). Fires a Guild Member Update Gateway event.

JSON Params

Field
Type
Description
Permission

nick?

?string

The guild-specific nickname of the member (1-32 characters)

CHANGE_NICKNAME

avatar?

The member's guild avatar; can only be changed for premium (Nitro) users

avatar_decoration_id?

?snowflake

The ID of the member's guild avatar decoration

avatar_decoration_sku_id?

?snowflake

The SKU ID of the member's guild avatar decoration

collectibles?

?collectibles object

The member's equipped collectibles

pronouns?

?string

The member's guild pronouns (max 40 characters)

bio?

?string

The member's guild bio; can only be changed for premium (Nitro) users

banner?

The member's guild banner; can only be changed for premium (Nitro) users

Collectibles Structure

Field
Type
Description

nameplate?

The member's nameplate

Nameplate Data Structure

Field
Type
Description

id?

snowflake

The ID of the nameplate

sku_id?

snowflake

The ID of the nameplate's SKU

PATCH/guilds/{guild.id}/members/@me/nick

Modifies the current user's member in the guild. Returns the updated guild member object on success (including extra and fields). Fires a Guild Member Update Gateway event.

See Modify Current Guild Member for more information.

PATCH/guilds/{guild.id}/profile/@me

Modifies the current user's profile in the guild. Returns a profile metadata object on success. Fires a Guild Member Update Gateway event.

JSON Params

Field
Type
Description

pronouns?

?string

The member's guild pronouns (max 40 characters)

bio?

?string

The member's guild bio (max 190 characters); can only be changed for premium (Nitro) users

banner?

The member's guild banner; can only be changed for premium (Nitro) users

accent_color?

?integer

The member's guild accent color as a hex integer; can only be changed for premium (Nitro) users

theme_colors?

?array[integer, integer]

The member's two guild theme colors encoded as an array of integers representing hexadecimal color codes; can only be changed for premium (Nitro) users

popout_animation_particle_type?

?snowflake

The member's guild profile popout animation particle type

emoji_id?

?snowflake

The member's guild profile emoji ID

profile_effect_id?

?snowflake

The member's guild profile effect ID

PUT/guilds/{guild.id}/members/{user.id}/roles/{role.id}

Adds a role to a guild member. Requires the permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.

DELETE/guilds/{guild.id}/members/{user.id}/roles/{role.id}

Removes a role from a guild member. Requires the permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.

DELETE/guilds/{guild.id}/members/{user.id}

Removes a member from a guild. Requires the permission. Returns a 204 empty response on success. Fires a Guild Member Remove Gateway event.

POST/users/@me/guilds/{guild.id}/member/ack-dm-upsell-settings

Adds the member flag to the current user. User must be a member of the guild. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.

GET/guilds/{guild.id}/bans

Returns a list of ban objects for the guild. Requires the permission.

Query String Params

Field
Type
Description

before? 1

snowflake

Get bans before this user ID

after? 1

snowflake

Get bans after this user ID

limit? 2

number

Max number of bans to return (1-1000, default all or 1000)

1 Bans will always be returned in ascending order by user ID.

2 Ban pagination for user accounts is currently optional. It must be explicitly opted into by specifying the query string parameter. Without specifying it, the and query string parameters will not work, and all bans will be returned by default. For bots, pagination is always enabled and 1000 bans are returned by default.

GET/guilds/{guild.id}/bans/search

Returns a list of ban objects whose username or display name contains a provided string. Requires the permission.

Query String Params

Field
Type
Description

query

string

Query to match username(s) and display name(s) against (1-32 characters)

limit?

integer

Max number of members to return (1-10, default 10)

GET/guilds/{guild.id}/bans/{user.id}

Returns a ban object for the given user. Requires the permission.

PUT/guilds/{guild.id}/bans/{user.id}

Creates a guild ban and optionally deletes previous messages sent by the banned user. Requires the permission. Returns a 204 empty response on success. Fires a Guild Ban Add and optionally a Guild Member Remove Gateway event.

JSON Params

Field
Type
Description

delete_message_days? (deprecated)

integer

Number of days to delete messages for (0-7, default 0)

delete_message_seconds?

integer

Number of seconds to delete messages for (0-604800, default 0)

POST/guilds/{guild.id}/bulk-ban

Create multiple guild bans and optionally delete previous messages sent by the banned users. Requires both the and permissions. Fires multiple Guild Ban Add and optionally Guild Member Remove Gateway events.

JSON Params

Field
Type
Description

user_ids

array[snowflake]

The user IDs to ban (max 200)

delete_message_seconds?

integer

Number of seconds to delete messages for (0-604800, default 0)

Response Body

Field
Type
Description

banned_users

array[snowflake]

The user IDs that were successfully banned

failed_users 1

array[snowflake]

The user IDs that were not banned

1 A ban will fail if the user is already banned, the user has a higher role than the current user, the user is the owner of the guild, or the user is the current user. If a bulk ban has no successful bans, the response will be an error.

DELETE/guilds/{guild.id}/bans/{user.id}

Removes the ban for a user. Requires the permission. Returns a 204 empty response on success. Fires a Guild Ban Remove Gateway event.

GET/guilds/{guild.id}/roles

Returns a list of role objects for the guild. User must be a member of the guild.

GET/guilds/{guild.id}/roles/{role.id}

Returns a role object for the given role. User must be a member of the guild.

GET/guilds/{guild.id}/roles/member-counts

Returns a mapping of role IDs to their respective member counts. User must be a member of the guild.

Example Response

{  "1040221495437299782": 2,  "1040221495437299783": 1,  "1040221495437299784": 0}

GET/guilds/{guild.id}/roles/{role.id}/member-ids

Returns a list of member IDs that have the specified role, up to a maximum of 100. User must be a member of the guild.

Example Response

["852892297661906993", "907489667895676928"]

PATCH/guilds/{guild.id}/roles/{role.id}/members

Adds multiple guild members to a role. Requires the permission. Returns a mapping of member IDs to guild member objects. Fires multiple Guild Member Update Gateway events.

JSON Params

Field
Type
Description

member_ids

array[snowflake]

The member IDs to assign the role to (max 30)

Example Response

{  "863406480111566858": {    "avatar": null,    "banner": null,    "communication_disabled_until": null,    "unusual_dm_activity_until": null,    "flags": 0,    "joined_at": "2022-10-11T12:31:03.882000+00:00",    "nick": ":~]",    "pending": false,    "premium_since": null,    "roles": ["1040221495437299782"],    "user": {      "id": "863406480111566858",      "username": "leaduck",      "global_name": "LeaDuck",      "avatar": "bb450561133bac3da5c7e201db40af6c",      "discriminator": "0",      "public_flags": 256,      "avatar_decoration_data": null,      "primary_guild": null    },    "mute": false,    "deaf": false  }}

GET/guilds/{guild.id}/roles/connections-configurations

Returns a list of role connection rule objects representing the role connections for the guild. User must be a member of the guild.

Role Connection Rule Structure

Field
Type
Description

role_id

snowflake

The ID of the linkable role

rules

The requirements for the linkable role

applications

map[snowflake, integration application]

The applications referenced in the rules

GET/guilds/{guild.id}/roles/{role.id}/connections/configuration

Returns a role connection configuration object representing the role connection for the given role. Requires the permission.

PUT/guilds/{guild.id}/roles/{role.id}/connections/configuration

Replaces the role connection configuration for the given role. Requires the permission. Accepts a role connection configuration object. Returns the updated role connection configuration object on success.

GET/guilds/{guild.id}/roles/{role.id}/connections/eligibility

Returns a role connection configuration object with extra fields representing the user's eligibility to link the given role. User must be a member of the guild.

PUT/guilds/{guild.id}/roles/{role.id}/connections/assign

Assigns an eligibile role connection to the current user. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.

POST/guilds/{guild.id}/roles/{role.id}/connections/unassign

Unassigns a role connection from the current user. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.

Response Body

POST/guilds/{guild.id}/roles

Creates a new role for the guild. Requires the permission. Returns the new role object on success. Fires a Guild Role Create Gateway event.

JSON Params

Field
Type
Description

name?

?string

The name of the role (max 100 characters, default "new role")

description?

?string

The description for the role (max 90 characters)

color? (deprecated) 1

?integer

Integer representation of a hexadecimal color code for the role

colors? 1 2

?role colors object

The colors of the role encoded as an integer representation of hexadecimal color codes

hoist?

boolean

Whether this role is pinned in the user listing (default false)

icon?

The role's icon

unicode_emoji?

?string

The role's unicode emoji

permissions?

?string

The permission bitwise value for the role (default @everyone permissions)

mentionable?

boolean

Whether this role is mentionable (default false)

1 If both and are provided, the field will be ignored.

2 Requires the guild feature.

PATCH/guilds/{guild.id}/roles

Modifies the positions of a set of role objects for the guild. Requires the permission. Returns a list of all of the guild's role objects on success. Fires multiple Guild Role Update Gateway events.

This endpoint takes a JSON array of parameters in the following format:

JSON Params

Field
Type
Description

id

snowflake

The ID of the role

position?

?integer

Sorting position of the role

PATCH/guilds/{guild.id}/roles/{role.id}

Modifies a guild role. Requires the permission. Returns the updated role on success. Fires a Guild Role Update Gateway event.

JSON Params

Field
Type
Description

name?

?string

The name of the role (max 100 characters, default "new role" if null)

description?

?string

The description for the role (max 90 characters)

color? (deprecated) 1

?integer

Integer representation of a hexadecimal color code for the role

colors? 1 2

?role colors object

The colors of the role encoded as an integer representation of hexadecimal color codes

hoist?

?boolean

Whether this role is pinned in the user listing

icon?

The role's icon

unicode_emoji?

?string

The role's unicode emoji

permissions?

?string

The permission bitwise value for the role (default @everyone permissions if null)

mentionable?

?boolean

Whether this role is mentionable

1 If both and are provided, the field will be ignored.

2 Requires the guild feature.

DELETE/guilds/{guild.id}/roles/{role.id}

Deletes a guild role. Requires the permission. Returns a 204 empty response on success. Fires a Guild Role Delete Gateway event.

GET/guilds/{guild.id}/prune

Returns the number of members that would be removed in a prune operation. Requires both the and permissions.

By default, prune will not remove users with roles. You can optionally include specific roles in your prune by providing the 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

Field
Type
Description

days?

integer

Number of inactive days to count prune for (1-30, default 7)

include_roles?

array[snowflake]

Additional roles to include

Response Body

Field
Type
Description

pruned

integer

The number of members that would be removed in a prune operation with the provided parameters

Example Response

{  "pruned": 42}

POST/guilds/{guild.id}/prune

Begins a prune operation. Requires both the and permissions. For large guilds, it's recommended to set the option to , allowing the request to return before all members are pruned. 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 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.

JSON Params

Field
Type
Description

days?

integer

Number of inactive days to prune for (1-30, default 7)

compute_prune_count?

boolean

Whether to wait for the prune to complete before responding (default true)

include_roles?

array[snowflake]

Additional roles to include

Response Body

Field
Type
Description

pruned

?integer

The number of members that were removed in the prune operation with the provided parameters; null if not computed

Example Response

{  "pruned": null}

GET/guilds/{guild.id}/widget

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

PATCH/guilds/{guild.id}/widget

Modifies the widget settings for the guild. Requires the permission. Returns the updated guild widget settings object on success.

JSON Params

Field
Type
Description

enabled?

boolean

Whether the widget is enabled

channel_id?

?snowflake

The channel ID that the widget will generate an invite to, if any

GET/guilds/{guild.id}/widget.json

Returns a guild widget object for the given guild ID. The guild must have the widget enabled. May fire an Invite Create Gateway event.

GET/guilds/{guild.id}/widget.png

Returns a widget image PNG for the given guild ID. The guild must have the widget enabled.

Query String Params

Field
Type
Description

style?

string

Style of widget image returned (default shield)

Guild Widget Image Style Option

Value
Description
Example

shield

Shield style widget with Discord icon and online count

banner1

Large image with guild icon, name and online count; "POWERED BY DISCORD" as the footer of the widget

banner2

Smaller widget style with guild icon, name and online count; split on the right with Discord logo

banner3

Large image with guild icon, name and online count; in the footer, Discord logo on the left and "Chat Now" on the right

banner4

Large Discord logo at the top of the widget; guild icon, name and online count in the middle portion of the widget and a "JOIN MY SERVER" button at the bottom

GET/guilds/{guild.id}/vanity-url

Returns the vanity invite for the guild. The guild must have the or feature. Requires the permission.

Response Body

Field
Type
Description

code

?string

The vanity invite code for the guild

uses

integer

The number of times this invite has been used

Example Response

{  "code": "abc",  "uses": 12}

PATCH/guilds/{guild.id}/vanity-url

Modifies the vanity invite for the guild. The guild must have the or feature. Guilds without the feature can only clear their vanity invite. Requires both the and permissions. Fires a Guild Update Gateway event.

JSON Params

Field
Type
Description

code

?string

The vanity invite code for the guild (2-25 characters, alphanumeric and -)

Response Body

Field
Type
Description

code

?string

The vanity invite code for the guild

uses

integer

The number of times this invite has been used (now 0)

GET/guilds/{guild.id}/member-verification

Returns the member verification object for the guild if one is set. If the user is not in the guild, the guild must be discoverable or have guild previewing disabled.

Query String Params

Field
Type
Description

with_guild? 1

boolean

Whether to include the guild object in the response (default false)

invite_code?

string

The invite code the verification is fetched from

1 Requires that the user is not a member of the guild, and that the guild is not full.

PATCH/guilds/{guild.id}/member-verification

Modifies the member verification for the guild. Requires the permission. Returns the updated member verification object. May fire a Guild Update Gateway event.

JSON Params

Field
Type
Description

enabled?

boolean

Whether the member verification gate is enabled

form_fields?

Questions for applicants to answer (max 5)

description?

?string

A description of what the guild is about; this can be different than the guild's description (max 300 characters)

GET/guilds/{guild.id}/requests

Returns a list of join requests for the guild for manual approval. Requires the permission.

Query String Params

Field
Type
Description

status

string

limit?

integer

Max number of join requests to return (1-100, default 100)

before?

snowflake

Get join requests before this request ID

after?

snowflake

Get join requests after this request ID

Response Body

Field
Type
Description

guild_join_requests? 1

The join requests for the guild

total?

integer

The total number of join requests that match the query

limit

integer

The maximum number of join requests returned

1 Join requests are omitted when retrieving requests with the status.

GET/join-requests/{guild_join_request.id}

Returns a guild join request object for the given request ID. Requires the permission if the request is not for the current user.

GET/guilds/{guild.id}/requests/@me/cooldown

Returns the remaining time until the current user can submit another join request for the guild.

Response Body

Field
Type
Description

cooldown

integer

How long (in seconds) the user has to wait until the current user can submit a join request

PUT/guilds/{guild.id}/requests/@me

Submits a request to join a guild. Returns a partial guild join request object on success. Fires a Guild Join Request Create or Guild Join Request Update Gateway event.

JSON Params

Field
Type
Description

form_fields 1

The answered member verification questions

version

?ISO8601 timestamp

When the member verification was last modified, same as in the member verification object

1 The array must contain all fields from the guild's member verification object, with a populated field for each field.

POST/guilds/{guild.id}/requests/@me

Resets the current user's join request for the guild. Returns a partial guild join request object on success. Fires a Guild Join Request Delete and Guild Join Request Create Gateway event.

POST/guilds/{guild.id}/requests/@me/ack OR /guilds/{guild.id}/requests/{guild_join_request.id}/ack

Acknowledges an approved join request for the current user. Returns a 204 empty response on success. Fires a Guild Join Request Update Gateway event.

DELETE/guilds/{guild.id}/requests/@me

If the guild has previewing disabled, deletes the current user's join request. Else, functions the same as Reset Guild Join Request. Returns a 204 empty response if deletion is successful or a partial guild join request object if the join request is reset. Fires a Guild Join Request Delete and optionally a Guild Join Request Create Gateway event.

POST/join-requests/{guild_join_request.id}/interview

Creates or returns an existing private interview channel for the join request. Requires the permission. Returns a group DM channel object on success. Fires a Guild Join Request Update and Channel Create Gateway event.

PATCH/guilds/{guild.id}/requests/id/{guild_join_request.id}

Accepts or denies a join request for the guild. Requires the permission. Returns a guild join request object on success. Fires a Guild Join Request Update and optionally a Guild Member Add or Guild Member Remove Gateway event.

JSON Params

Field
Type
Description

action

string

The action to take on the join requests (only APPROVED and REJECTED can be used)

rejection_reason?

?string

The reason for rejecting the join request (max 160 characters)

PATCH/guilds/{guild.id}/requests/{user.id}

Same as above, except this endpoint is keyed by the user ID instead of the guild join request ID.

PATCH/guilds/{guild.id}/requests

Accepts or denies all pending join requests for the guild. Requires the permission. Returns a 204 empty response on success. May fire multiple Guild Join Request Update, Guild Member Add, and Guild Member Remove Gateway events.

JSON Params

Field
Type
Description

action

string

The action to take on the join requests (only APPROVED and REJECTED can be used)

GET/guilds/{guild.id}/welcome-screen

Returns the welcome screen object for the guild. Requires the permission if the welcome screen is not yet enabled, otherwise no permission is required.

PATCH/guilds/{guild.id}/welcome-screen

Modifies the guild's welcome screen. Requires the permission. Returns the updated welcome screen object. May fire a Guild Update Gateway event.

JSON Params

Field
Type
Description

enabled?

?boolean

Whether the welcome screen is enabled

description?

?string

The welcome message shown in the welcome screen (max 140 characters)

welcome_channels?

?array[welcome screen channel object]

The channels shown in the welcome screen (max 5)

GET/guilds/{guild.id}/onboarding

Returns the onboarding object for the guild. Requires the permission if the feature is disabled, otherwise requires that the user is a member of the guild.

PUT/guilds/{guild.id}/onboarding

Modifies the onboarding configuration of the guild. Returns the updated onboarding object. Requires the permission. Fires a Guild Update Gateway event.

JSON Params

Field
Type
Description

prompts?

array[onboarding prompt object]

The prompts shown during onboarding and in community customization

default_channel_ids?

array[snowflake]

The channel IDs that members get opted into automatically

enabled?

boolean

Whether onboarding is enabled in the guild

mode?

integer

The current criteria mode for onboarding

GET/guilds/{guild.id}/new-member-welcome

If it exists, returns the new member welcome object for the guild. Otherwise, returns a 204 empty response. Requires the permission if the feature is disabled, otherwise no permission is required.

PUT/guilds/{guild.id}/new-member-welcome

Modifies the guild's new member welcome configuration. Requires the permission. Returns the updated new member welcome object. May fire a Guild Update Gateway event.

JSON Params

Field
Type
Description

enabled?

boolean

Whether the new member welcome experience is enabled

welcome_message?

Welcome message shown to new members of the guild

new_member_actions? 1

array[partial new member action object]

Actions shown to new members of the guild (max 5)

resource_channels? 2

array[partial resource channel object]

Read-only channels that provide resources for new members (max 7)

1 Only the , , and fields are required. cannot be set.

2 Only the and fields are required. cannot be set.

PATCH/guilds/{guild.id}/new-member-actions/{channel.id}

Modifies a new member action for the guild. Requires the permission. Returns the updated new member action object on success.

JSON Params

Field
Type
Description

icon?

The new member action's icon (max 10000 KiB)

PUT/guilds/{guild.id}/resource-channels/{channel.id}

Modifies a resource channel for the guild. Requires the permission. Returns the updated resource channel object on success.

JSON Params

Field
Type
Description

icon?

The resource channel's icon (max 10000 KiB)

GET/guilds/{guild.id}/new-member-actions

If it exists, returns a new member actions progress object for the user in the guild, representing the user's progress towards completing the new member actions. Otherwise, returns a 204 empty response.

POST/guilds/{guild.id}/new-member-action/{channel.id}

Completes a new member action for the user in the guild. Returns the updated new member actions progress object on success. May fire a Guild Member Update Gateway event.

GET/guilds/{guild.id}/top-games

Returns up to 20 of the top most played games for the guild. Requires the permission.

Response Body

Field
Type
Description

top_games

array[game activity object]

The top games played in the guild

Game Activity Structure

Field
Type
Description

game_application_id

snowflake

The ID of the application representing the game

activity_level

integer

The activity level of the guild in the game

activity_score

integer

The activity score of the guild in the game

GET/guilds/{guild.id}/premium/subscriptions

Returns a list of premium guild subscription objects for the guild. User must be a member of the guild.

GET/guilds/{guild.id}/powerups

Returns a list of entitlement objects representing the guild's applied powerups. Powerups are special SKUs that can be purchased using premium subscriptions (boosts) to enhance the guild's features. User must be a member of the guild.

Query String Params

Field
Type
Description

include_ends_at?

boolean

Unknown

POST/guilds/{guild.id}/skus/{sku.id}

Adds the given powerup SKU to the guild. Requires the permission. Returns a 204 empty response on success. Fires a Guild Update and Guild Powerup Entitlements Create Gateway event.

DELETE/guilds/{guild.id}/skus/{sku.id}

Removes the given powerup SKU from the guild. Requires the permission. Returns a 204 empty response on success. Fires a Guild Update and Guild Powerup Entitlements Delete Gateway event.

GET/guilds/{guild.id}/admin-server-eligibility

Checks if the user is eligible to join the Discord Admin Community through the guild. Requires the permission.

Response Body

Field
Type
Description

eligible_for_admin_server

boolean

Whether the user is eligible to join the Discord Admin Community through the guild

POST/guilds/{guild.id}/join-admin-server

Joins the Discord Admin Community through the guild. Requires the permission. Returns the joined guild object on success. Fires Guild Create, Guild Member Add, and optionally Guild Join Request Create Gateway events.

POST/guilds/automations/email-domain-lookup

Queries the student hubs for the given email.

JSON Params

Field
Type
Description

email

string

The email to lookup (max 320 characters)

use_verification_code? 1

boolean

Whether to email the user a code to verify their student status (default false)

allow_multiple_guilds? 2

boolean

Whether to return a list of guilds for the email instead of picking the first one (default false)

guild_id? 2

snowflake

The guild ID to email a verification code for

1 should always be set to as the old behavior is deprecated and results in an email asking the user to update their client to join the student hub.

2 should always be set to as the resultant guild ID is required for the Join Student Hub endpoint. If is set to , the parameter is ignored and an email is sent for the first guild found. If is set to , a second request must be made with a provided to send the email.

Response Body

Field
Type
Description

has_matching_guild

boolean

Whether a student hub was found and verification code was sent to the email provided

guilds_info? 1

array[student hub guild object]

The guilds found for the email provided

1 Only returned if is set to and no is provided.

Student Hub Guild Structure

Field
Type
Description

id

snowflake

The ID of the student hub

name

string

The name of the student hub (2-100 characters)

icon

?string

The student hub's icon hash

POST/guilds/automations/email-domain-lookup/verify-code

Verifies the student status of the user and joins them to the student hub guild. May fire Guild Create, Guild Member Add, and optionally Guild Join Request Create Gateway events.

JSON Params

Field
Type
Description

email

string

The email to verify (max 320 characters)

guild_id

snowflake

The ID of the student hub being joined

code

string

The verification code sent to the email (8 characters)

Response Body

Field
Type
Description

joined

boolean

Whether the user successfully joined the student hub guild

guild?

The student hub guild the user joined

POST/hub-waitlist/signup

Signs up the user for the student hub waitlist. The user will get an email and system message when a student hub is created for their email domain.

JSON Params

Field
Type
Description

email

string

The email to sign up for the waitlist (max 320 characters)

school

string

The name of the school the user is attending (3-20 characters)

Response Body

Field
Type
Description

email

string

The email that was signed up for the waitlist

email_domain

string

The domain of the email that was signed up for the waitlist

school

string

The name of the school the user is attending

user_id

snowflake

The ID of the user that signed up for the waitlist

Example Response

{  "email": "nelly@discordapp.com",  "user_id": "852892297661906993",  "email_domain": "discordapp.com",  "school": "discord"}