Guilds
A guild is a community with its own channels, roles, members and settings. Members and ownership are on Guild members, and channels are on Guild channels. An OAuth2 bearer token with the guilds scope can call only List current user guilds and Get guild. A guild that doesn't exist returns 404 UNKNOWN_GUILD, and a route that needs membership returns 403 MISSING_PERMISSIONS to a non-member.
Guild object
Section titled “Guild object”Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the guild |
| name | string | The name of the guild (1-100 characters) |
| icon1 | ?string | Guild icon hash |
| banner1 | ?string | Guild banner hash |
| banner_width2 | ?integer | Banner width in pixels |
| banner_height2 | ?integer | Banner height in pixels |
| splash1 | ?string | Invite splash hash |
| splash_width2 | ?integer | Invite splash width in pixels |
| splash_height2 | ?integer | Invite splash height in pixels |
| splash_card_alignment | integer | Splash card alignment |
| embed_splash1 | ?string | Embedded invite splash hash |
| embed_splash_width2 | ?integer | Embedded invite splash width in pixels |
| embed_splash_height2 | ?integer | Embedded invite splash height in pixels |
| vanity_url_code | ?string | Custom invite code |
| owner_id | snowflake | The ID of the guild owner |
| system_channel_id | ?snowflake | Text or announcement channel that gets system messages |
| system_channel_flags | integer | System channel flags |
| rules_channel_id | ?snowflake | The ID of the rules channel |
| afk_channel_id | ?snowflake | Voice channel that inactive members are moved to |
| afk_timeout | integer | AFK timeout in seconds (60-3600) |
| features | array[string] | Guild features, in no fixed order |
| badge_ids | array[string] | Badge IDs, in no fixed order. Look them up with List guild badges (at most 200) |
| verification_level | integer | Verification level |
| mfa_level | integer | MFA level |
| nsfw_level | integer | NSFW level |
| nsfw | boolean | Whether the guild is marked as adult content |
| content_warning_level | integer | Guild content warning level |
| content_warning_text | ?string | Content warning text (max 200 characters), or null for the default text |
| explicit_content_filter | integer | Guild explicit content filter level |
| default_message_notifications | integer | Default message notification level |
| disabled_operations | integer | Disabled guild operations |
| message_history_cutoff3 | ?ISO8601 timestamp | Earliest message a member without READ_MESSAGE_HISTORY can see |
| permissions?4 | decimal string | Your permissions in the guild |
| roles?5 | array[guild role object] | Guild roles |
| emojis?5 | array[guild emoji object] | Guild emojis |
| stickers?5 | array[guild sticker object] | Guild stickers |
| channels?5 | array[channel object] | Guild channels you can view, without threads |
| member_count?5 | integer | Member count |
| online_count?5 | integer | Online member count |
| approximate_member_count?4 | integer | Approximate member count |
| approximate_presence_count?4 | integer | Approximate online member count |
| threads_active?4 | boolean | Always true, and says you can use threads, forum channels and media channels |
| visiting?5 | boolean | true when you are visiting the guild without being a member |
1 Null when the guild doesn't have BANNER (banner) or INVITE_SPLASH (splash and embed_splash). An animated hash loses its a_ prefix when the guild doesn't have ANIMATED_ICON or ANIMATED_BANNER
2 Null when the matching hash is null
3 Null means a member without READ_MESSAGE_HISTORY can't see any earlier messages
4 Only List current user guilds returns this field. The approximate counts need with_counts, and threads_active needs a bot or a session with the channel_threads capability. Without that capability, a user session gets permissions and role permissions with the thread permission bits removed
5 Only Get guild returns this field. For a visitor, each channel has only its @everyone overwrite
Example
Section titled “Example”{ "id": "1489002177550843904", "name": "Ada's Workshop", "icon": "a_9f2c1d4e", "banner": null, "splash": null, "vanity_url_code": "workshop", "owner_id": "1489002177550843905", "system_channel_id": "1489002177550843907", "system_channel_flags": 0, "afk_channel_id": null, "afk_timeout": 300, "features": ["ANIMATED_ICON", "BANNER", "VANITY_URL"], "verification_level": 1, "mfa_level": 0, "nsfw_level": 0, "nsfw": false, "content_warning_level": 0, "content_warning_text": null, "explicit_content_filter": 1, "default_message_notifications": 1, "disabled_operations": 0, "message_history_cutoff": null}Partial guild object
Section titled “Partial guild object”Invites return this smaller guild object, and its asset fields follow the same feature rules as the guild object.
Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the guild |
| name | string | The name of the guild |
| icon | ?string | Guild icon hash |
| banner | ?string | Guild banner hash |
| banner_width | ?integer | Banner width in pixels |
| banner_height | ?integer | Banner height in pixels |
| splash | ?string | Invite splash hash |
| splash_width | ?integer | Invite splash width in pixels |
| splash_height | ?integer | Invite splash height in pixels |
| splash_card_alignment | integer | Splash card alignment |
| embed_splash | ?string | Embedded invite splash hash |
| embed_splash_width | ?integer | Embedded invite splash width in pixels |
| embed_splash_height | ?integer | Embedded invite splash height in pixels |
| features | array[string] | Guild features |
| badge_ids | array[string] | Badge IDs, in no fixed order. Look them up with List guild badges (at most 200) |
| visits_enabled?1 | boolean | Whether you can visit the guild from this invite |
1 Only Get invite returns this field, and only with the guild_visits assignment
Guild creation template object
Section titled “Guild creation template object”A template lists the roles and channels that Create guild creates. Its IDs are local to the template, as integers or decimal strings, and Fluxer gives each role and channel a new snowflake.
Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| name1 | string | Template name |
| description?1 | ?string | Template description |
| verification_level?2 | integer | Verification level (default 0) |
| default_message_notifications?2 | integer | Default message notification level (default 0) |
| explicit_content_filter?2 | integer | Guild explicit content filter level (default 0) |
| system_channel_id?3 | ?decimal string | integer | Template ID of the text or announcement channel for system messages |
| afk_timeout?2 | integer | AFK timeout in seconds (60-3600, default 300) |
| system_channel_flags? | integer | System channel flags (default 0) |
| roles | array[guild template role object] | Template roles (max 250) |
| channels | array[guild template channel object] | Template channels (max 500) |
1 Fluxer ignores this field and uses name from the Create guild body
2 A value out of range is clamped into it
3 When this isn't a text or announcement channel in the template, the first one becomes the system channel. A template with none gets a text channel called general
Guild template role object
Section titled “Guild template role object”Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| id | decimal string | integer | Template role ID, unique in the template |
| name?1 | ?string | Role name (default empty) |
| permissions? | decimal string | integer | Legacy role permission bitfield |
| permissions_new? | decimal string | integer | Role permission bitfield, which wins over permissions when you send both |
| color? | integer | Role color (default 0) |
| hoist? | boolean | Whether the role is shown separately in the member list (default false) |
| mentionable? | boolean | Whether anyone can mention the role (default false) |
| unicode_emoji? | ?string | Role Unicode emoji, stored as null when it isn't a single Unicode emoji. Templates can't set an image icon |
1 The role called @everyone, or the role with ID 0 when none has that name, sets the permissions of the everyone role. The other roles are created in array order
Guild template channel object
Section titled “Guild template channel object”Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| id | decimal string | integer | Template channel ID, unique in the template |
| type1 | integer | Channel type |
| name? | ?string | Channel name (default empty) |
| topic? | ?string | Channel topic, or forum guidelines on a forum or media channel |
| position | integer | The sort position of the channel |
| parent_id? | ?decimal string | integer | Template ID of the parent category |
| bitrate? | ?integer | Voice bitrate (default 64000, max 96000) |
| user_limit? | ?integer | Voice occupancy limit (default 0) |
| voice_connection_limit? | ?integer | Per-user voice connection limit (default 5) |
| nsfw? | ?boolean | Whether the channel is age restricted (default false) |
| rate_limit_per_user? | ?integer | Slowmode interval in seconds (default 0) |
| permission_overwrites?2 | ?array[guild template role permission overwrite object] | Role permission overwrites |
| available_tags? | ?array[guild template forum tag object] | Tags for a forum or media channel (max 20) |
| default_reaction_emoji? | ?guild template default reaction object | Default reaction on posts in a forum or media channel |
| default_sort_order? | ?integer | Default forum sort order of a forum or media channel |
| default_forum_layout? | ?integer | Default forum layout of a forum channel |
| default_tag_setting? | ?string | Default forum tag setting of a forum or media channel |
| default_thread_rate_limit_per_user? | ?integer | Slowmode interval in seconds for new threads (max 21600) |
| default_auto_archive_duration? | ?integer | Default auto archive duration in minutes for new threads |
| flags? | ?integer | Channel flags of a forum or media channel |
1 0 creates a text channel, 2 or 13 a voice channel, 4 a category, 5 an announcement channel, 15 a forum channel and 16 a media channel. Fluxer skips any other type
2 Fluxer applies only role overwrites whose id is a role in the template, and ID 0 is the everyone role
Guild template forum tag object
Section titled “Guild template forum tag object”Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| name | string | Tag name |
| moderated? | ?boolean | Whether only moderators can apply the tag |
| emoji_id? | ?string | integer | Custom emoji of the tag, which Fluxer ignores |
| emoji_name? | ?string | Unicode emoji of the tag |
Guild template default reaction object
Section titled “Guild template default reaction object”Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| emoji_id? | ?string | integer | Custom emoji of the reaction, which Fluxer ignores |
| emoji_name? | ?string | Unicode emoji of the reaction |
Guild template role permission overwrite object
Section titled “Guild template role permission overwrite object”Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| id | decimal string | integer | Template role ID |
| type | integer | string | Overwrite type, 0 or role for a role |
| allow | decimal string | integer | Allowed permission bitfield |
| deny | decimal string | integer | Denied permission bitfield |
Verification levels
Section titled “Verification levels”The verification level decides who can send messages in the guild. The owner, bots and members with at least one role skip the check.
| Value | Name | Description |
|---|---|---|
| 0 | NONE | No verification requirement |
| 1 | LOW1 | The account is claimed and its email address verified |
| 2 | MEDIUM | The LOW requirement, and the account is at least 5 minutes old |
| 3 | HIGH | The MEDIUM requirement, and the membership is at least 10 minutes old |
1 A guild with DISCOVERABLE is always at least LOW, and Modify guild rejects a lower value with the field code DISCOVERABLE_GUILD_VERIFICATION_LEVEL_TOO_LOW
A member who fails the check gets 403 GUILD_VERIFICATION_REQUIRED, GUILD_EMAIL_VERIFICATION_REQUIRED or ACCOUNT_TOO_NEW_FOR_GUILD.
MFA levels
Section titled “MFA levels”| Value | Name | Description |
|---|---|---|
| 0 | NONE | MFA is not required for moderation actions |
| 1 | ELEVATED | MFA is required for moderation actions |
At ELEVATED, a member other than the owner can use the elevated permissions only with an authenticator set up, and gets 400 TWO_FACTOR_REQUIRED without one. A bot needs its application owner to have an authenticator.
Splash card alignments
Section titled “Splash card alignments”| Value | Name | Description |
|---|---|---|
| 0 | CENTER | Center the splash card |
| 1 | LEFT | Align the splash card to the left |
| 2 | RIGHT | Align the splash card to the right |
Guild explicit content filter levels
Section titled “Guild explicit content filter levels”The account setting is on the user settings object.
| Value | Name | Description |
|---|---|---|
| 0 | DISABLED | Do not apply the guild explicit content filter |
| 1 | MEMBERS_WITHOUT_ROLES | Apply the filter to members without roles |
| 2 | ALL_MEMBERS | Apply the filter to all members |
Default message notification levels
Section titled “Default message notification levels”| Value | Name | Description |
|---|---|---|
| 0 | ALL_MESSAGES | Notify for all messages by default |
| 1 | ONLY_MENTIONS | Notify only for mentions by default |
NSFW levels
Section titled “NSFW levels”Fluxer sets the level from the guild's nsfw field.
| Value | Name | Description |
|---|---|---|
| 0 | SAFE | Guild is not age restricted |
| 3 | AGE_RESTRICTED | Guild is age restricted |
Guild content warning levels
Section titled “Guild content warning levels”A channel set to inherit uses the guild level, as described in channel content warning levels.
| Value | Name | Description |
|---|---|---|
| 0 | INHERIT | A channel that inherits shows no content warning |
| 1 | CONTENT_WARNING | A channel that inherits shows the guild content warning |
System channel flags
Section titled “System channel flags”| Value | Name | Description |
|---|---|---|
| 1 << 0 | SUPPRESS_JOIN_NOTIFICATIONS | Suppress member join system messages |
Disabled guild operations
Section titled “Disabled guild operations”Only the Admin API sets these bits.
| Value | Name | Description |
|---|---|---|
| 1 << 0 | PUSH_NOTIFICATIONS | Disable push notifications |
| 1 << 1 | EVERYONE_MENTIONS | Disable mentions of the everyone role |
| 1 << 2 | TYPING_EVENTS | Disable typing events |
| 1 << 3 | INSTANT_INVITES | Disable instant invites |
| 1 << 4 | SEND_MESSAGE | Disable message sending |
| 1 << 5 | REACTIONS | Disable reactions |
| 1 << 6 | MEMBER_LIST_UPDATES | Disable member list updates |
Guild features
Section titled “Guild features”| Value | Description |
|---|---|
| ANIMATED_BANNER | Guild can use an animated banner |
| ANIMATED_ICON | Guild can use an animated icon |
| ANNOUNCEMENT_CHANNELS_DISABLED1 | Publishing from and following the guild's announcement channels is disabled |
| AUDIO_BITRATE_128_KBPS2 | Voice channel bitrate limit is 128000 |
| AUDIO_BITRATE_256_KBPS2 | Voice channel bitrate limit is 256000 |
| AUDIO_BITRATE_384_KBPS2 | Voice channel bitrate limit is 384000 |
| BANNER | Guild can use a banner |
| CLONE_EMOJI_DISABLED | Deprecated and has no effect |
| CLONE_EMOJI_ENABLED3 | Other guilds can clone this guild's emojis |
| CLONE_STICKER_DISABLED | Deprecated and has no effect |
| CLONE_STICKER_ENABLED3 | Other guilds can clone this guild's stickers |
| DETACHED_BANNER3 | Guild banner is independent from its splash |
| DISCOVERABLE | Guild is listed in discovery |
| EXPRESSION_PURGE_ALLOWED | Emoji and sticker deletes can use purge |
| HIDE_OWNER_CROWN3 | Guild owner crown is hidden |
| INVITE_SPLASH | Guild can use invite splash assets |
| INVITES_DISABLED3 | Guild invites can't be used |
| LARGE_GUILD_OVERRIDE4 | Guild is marked as a large guild |
| MORE_EMOJI4 | Raises the emoji limit |
| MORE_STICKERS4 | Raises the sticker limit |
| PARTNERED | Guild has partnered status |
| RAID_DETECTED | Set together with INVITES_DISABLED while invites are paused after a raid |
| TEXT_CHANNEL_FLEXIBLE_NAMES3 | Text, announcement, forum and media channel names keep uppercase letters, spaces and punctuation |
| UNAVAILABLE_FOR_EVERYONE5 | Guild is unavailable to every account, including the owner |
| UNAVAILABLE_FOR_EVERYONE_BUT_STAFF5 | Guild is unavailable to every account without the instance staff flag |
| UNAVAILABLE_HIDDEN | The Gateway sends the unavailable guild with unavailable_hidden: true |
| UNLIMITED_EMOJI | Guild has 999999 emoji slots |
| UNLIMITED_STICKERS | Guild has 999999 sticker slots |
| VANITY_URL | Guild can have a custom invite code |
| VERIFIED | Guild has verified status |
| VERY_LARGE_GUILD | Member limit is 10000000 (default 1000000) |
| VIP_VOICE | Guild can use voice regions limited to VIP guilds |
| VISITS_ENABLED3 | People can visit the guild before joining |
| VOICE_E2EE | Guild voice channels support end-to-end encryption |
1 Crosspost message and Follow announcement channel return 403 FEATURE_TEMPORARILY_DISABLED
2 Without one of these, the limit is 96000. A higher bitrate is stored at the limit
3 You can add or remove this feature with Modify guild
4 Has no effect unless an instance limit rule uses it
5 Guild and channel routes return 403 MISSING_ACCESS
Visiting guilds
Section titled “Visiting guilds”A visit lets someone read a guild before joining. A visitor sees the channels the @everyone role can read, with only the @everyone overwrite applied, and can't post, react, type, join voice or see the member list. Visits need the guild_visits experiment assignment, and a session gets its visited guilds only when it identifies with the GUILD_VISITS session flag.
A guild takes visitors while it has VISITS_ENABLED. A visit starts from Visit invite guild, Visit discovery guild or the instance's single community after sign up. Visitors can't see private threads, and adult channels stay hidden from people who may not see adult content. Without a verified email, a visitor sees only the last guild_visit_history_days_unverified days of messages (30 by default). Search by author or mention returns 400 SEARCH_FILTER_NEEDS_MEMBERSHIP.
You can visit max_guild_visits guilds at once (10 by default, half without a verified email), and starting another ends the oldest. A visit ends in these cases, and each one sends Guild Delete.
- 14 days pass without you opening it
- Its invite is deleted or expires
- You're banned
- The guild turns off
VISITS_ENABLED
Joining the guild ends the visit and sends Guild Create.
Guild visit object
Section titled “Guild visit object”| Field | Type | Description |
|---|---|---|
| guild_id | snowflake | The ID of the guild being visited |
| source | integer | Guild visit source |
| started_at | ISO8601 timestamp | When the visit started |
| opened_at | ISO8601 timestamp | When the visit was last opened |
Guild visit sources
Section titled “Guild visit sources”| Value | Name | Description |
|---|---|---|
| 1 | INVITE | The visit started from an invite |
| 2 | VANITY_URL | The visit started from a custom invite URL |
| 3 | DISCOVERY | The visit started from a discovery listing |
| 4 | OPERATOR | The visit started from the instance's single community after sign up |
Guild visit start object
Section titled “Guild visit start object”Visit invite guild and Visit discovery guild return this object.
| Field | Type | Description |
|---|---|---|
| guild_id | snowflake | The ID of the guild |
| member | boolean | Whether you are already a member, in which case no visit starts |
| visit | ?guild visit object | The visit, or null when member is true |
Custom invite URL object
Section titled “Custom invite URL object”Returned by Get guild custom invite URL.
Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| code | ?string | Current custom invite code |
| uses | integer | How many times the code was used, or 0 when there is no code |
Custom invite URL selection object
Section titled “Custom invite URL selection object”Returned by Modify guild custom invite URL.
Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| code | ?string | Custom invite code the guild has after the request (2-32 characters) |
Sudo verification fields
Section titled “Sudo verification fields”Routes that need sudo mode take these fields in the JSON body. You can send an earlier proof in the X-Fluxer-Sudo-Mode-JWT header instead, and a successful response can return a new one in that header.
Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
| password?1 | string | Current account password |
| mfa_method? | string | MFA method, one of totp, webauthn or email_code |
| mfa_code? | string | Authenticator or backup code when the method is totp (1-32 characters) |
| webauthn_response? | WebAuthn assertion object | Assertion when the method is webauthn |
| webauthn_challenge? | string | Challenge bound to the WebAuthn assertion |
| email_code_ticket? | string | The ticket from send a sudo email code (1-128 characters) |
| email_code? | string | The 6-digit code from that email |
1 Accepted only when the account has no authenticator app or passkey
A request without a proof gets 403 SUDO_MODE_REQUIRED, except from a bot or an account with no password, email address, authenticator or passkey.
Create guild
Section titled “Create guild”POST/v1/guildsCreates a guild that you own and returns the guild object without roles, channels or counts. You need a user account with a verified email address.
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| name | string | Guild name (1-100 characters) |
| icon?1 | ?base64 string | Guild icon |
| empty_features?2 | boolean | Whether to create the guild with no features (default false) |
| template? | guild creation template object | Roles and channels to create |
1 Raw base64 or a data URL, up to the instance avatar_max_size limit. Animated AVIF isn't accepted
2 When false, the guild starts with ANIMATED_ICON, ANIMATED_BANNER, BANNER, INVITE_SPLASH and VISITS_ENABLED
Without a template, the guild gets a general text channel, a General voice channel and an everyone role with the default permissions.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | guild object | The guild was created |
| 400 | error response | MAX_GUILDS, GUILD_TEMPLATE_INVALID, BOTS_CANNOT_CREATE_GUILDS or UNCLAIMED_ACCOUNT_CANNOT_CREATE_GUILDS |
| 400 | error response | SINGLE_COMMUNITY_CANNOT_CREATE_GUILDS while the instance runs a single community |
| 403 | error response | GUILD_CREATION_EMAIL_VERIFICATION_REQUIRED, CONTENT_BLOCKED or ACCOUNT_LIMITED |
You get Guild Create and User Settings Update with the new guild in your folders.
The rate limit is 10 requests per minute, on the guild:create bucket.
List current user guilds
Section titled “List current user guilds”GET/v1/users/@me/guildsReturns a guild object for each guild you are a member of, in ascending ID order.
Query parameters
Section titled “Query parameters”| Field | Type | Description |
|---|---|---|
| before? | snowflake | Return guilds with a lower ID than this guild ID |
| after? | snowflake | Return guilds with a higher ID than this guild ID |
| limit?1 | integer | Maximum number returned (1-200, default 200) |
| with_counts? | boolean | Include approximate member and presence counts (default false) |
1 Above 100, the guilds have no permissions
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | array[guild object] | Guilds were returned |
| 403 | error response | MISSING_OAUTH_SCOPE when the bearer credential lacks guilds |
The rate limit is 40 requests per 10 seconds, on the guild:list bucket.
Get guild
Section titled “Get guild”GET/v1/guilds/{guild_id}Returns the guild object with its roles, emojis, stickers, the channels you can view and member counts. You need to be a member or a visitor.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | guild object | The guild was returned |
| 403 | error response | MISSING_ACCESS when the guild is unavailable |
The rate limit is 100 requests per 10 seconds, on the guild:read::guild_id bucket.
Modify guild
Section titled “Modify guild”PATCH/v1/guilds/{guild_id}Changes guild settings and returns the updated guild object. You need MANAGE_GUILD, which is an elevated permission. Only the owner can change mfa_level, and it needs sudo mode.
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| name? | string | Guild name (1-100 characters) |
| icon? | ?base64 string | Guild icon, or null to clear it |
| system_channel_id? | ?snowflake | Text or announcement channel for system messages, or null to clear it |
| system_channel_flags? | integer | System channel flags |
| afk_channel_id? | ?snowflake | AFK voice channel ID, or null to clear it |
| afk_timeout? | integer | AFK timeout in seconds (60-3600) |
| default_message_notifications? | integer | Default message notification level |
| verification_level? | integer | Verification level |
| mfa_level?1 | integer | MFA level |
| nsfw_level?2 | integer | Legacy NSFW level, 0 or 3 |
| nsfw? | boolean | Whether the guild is marked as adult content |
| content_warning_level? | integer | Guild content warning level |
| content_warning_text? | ?string | Content warning text (max 200 characters), or null for the default text |
| explicit_content_filter? | integer | Guild explicit content filter level |
| banner?3 | ?base64 string | Guild banner, or null to clear it |
| splash?4 | ?base64 string | Static invite splash, or null to clear it |
| embed_splash?4 | ?base64 string | Static embedded invite splash, or null to clear it |
| splash_card_alignment? | integer | Splash card alignment |
| features?5 | array[string] | The full guild feature set you want (max 100 entries) |
| message_history_cutoff? | ?ISO8601 timestamp | Earliest history visible without READ_MESSAGE_HISTORY, or null to hide all of it |
| password? | string | Sudo verification password |
| mfa_method? | string | Sudo verification method, one of totp, webauthn or email_code |
| mfa_code? | string | Sudo verification authenticator code |
| webauthn_response? | WebAuthn assertion object | Sudo verification assertion |
| webauthn_challenge? | string | Challenge bound to the WebAuthn assertion |
| email_code_ticket? | string | The ticket from send a sudo email code (1-128 characters) |
| email_code? | string | The 6-digit code from that email |
1 Fails with the field code MUST_ENABLE_2FA_BEFORE_REQUIRING_FOR_MODS when the owner has no authenticator
2 nsfw wins when you send both
3 Needs BANNER, and an animated banner also needs ANIMATED_BANNER
4 Needs INVITE_SPLASH
5 You can only add or remove INVITES_DISABLED, TEXT_CHANNEL_FLEXIBLE_NAMES, DETACHED_BANNER, CLONE_EMOJI_ENABLED, CLONE_STICKER_ENABLED, HIDE_OWNER_CROWN and VISITS_ENABLED, and Fluxer keeps every other feature the guild has
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | guild object | The guild was updated |
| 400 | error response | TWO_FACTOR_REQUIRED when the guild has the ELEVATED MFA level and you have no authenticator |
| 403 | error response | SUDO_MODE_REQUIRED when changing mfa_level without a proof |
Every successful request sends Guild Update, and a request that changes something also records a GUILD_UPDATE audit entry.
The rate limit is 20 requests per 10 seconds, on the guild:update::guild_id bucket.
Delete guild
Section titled “Delete guild”POST/v1/guilds/{guild_id}/deleteDeletes the guild with its channels, messages, attachments, roles and invites, and returns 204. You need to be the owner and in sudo mode.
JSON body
Section titled “JSON body”Takes the sudo verification fields, all optional.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | The guild was deleted |
| 400 | error response | SINGLE_COMMUNITY_CANNOT_DELETE for the instance's single community |
| 403 | error response | SUDO_MODE_REQUIRED without a proof |
Every member gets Guild Delete.
The rate limit is 10 requests per minute, on the guild:delete::guild_id bucket.
Leave guild
Section titled “Leave guild”DELETE/v1/users/@me/guilds/{guild_id}Removes your membership and returns 204.
Query parameters
Section titled “Query parameters”| Field | Type | Description |
|---|---|---|
| delete_messages? | boolean | Delete every message you wrote in the guild first, which needs sudo mode (default false) |
JSON body
Section titled “JSON body”Takes the sudo verification fields when delete_messages is true.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | You left the guild |
| 400 | error response | Field code CANNOT_LEAVE_GUILD_AS_OWNER when you own the guild |
| 400 | error response | SINGLE_COMMUNITY_CANNOT_LEAVE for the instance's single community |
| 403 | error response | SUDO_MODE_REQUIRED when delete_messages is true without a proof |
| 404 | error response | UNKNOWN_MEMBER when you aren't a member |
Other members get Guild Member Remove and your sessions get Guild Delete.
The rate limit is 10 requests per 10 seconds, on the guild:leave::guild_id bucket.
Bulk delete current user's guild messages
Section titled “Bulk delete current user's guild messages”POST/v1/users/@me/guilds/{guild_id}/messages/bulk-delete-mineDeletes every message you wrote in the guild and returns 202 when all are gone. You stay a member, and you need sudo mode.
JSON body
Section titled “JSON body”Takes the sudo verification fields, all optional.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 202 | empty | The messages were deleted |
| 403 | error response | SUDO_MODE_REQUIRED without a proof |
Each channel gets Message Delete Bulk events.
The rate limit is 10 requests per 10 seconds, on the shared guild:leave::guild_id bucket.
Get guild custom invite URL
Section titled “Get guild custom invite URL”GET/v1/guilds/{guild_id}/vanity-urlReturns the custom invite URL object. You need MANAGE_GUILD.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | custom invite URL object | The custom invite URL was returned |
| 400 | error response | TWO_FACTOR_REQUIRED when the guild has the ELEVATED MFA level and you have no authenticator |
The rate limit is 100 requests per 10 seconds, on the guild:vanity_url:get::guild_id bucket.
Modify guild custom invite URL
Section titled “Modify guild custom invite URL”PATCH/v1/guilds/{guild_id}/vanity-urlSets or removes the custom invite code and returns the custom invite URL selection object. You need MANAGE_GUILD, and setting a code needs the VANITY_URL feature.
JSON body
Section titled “JSON body”| Field | Type | Description |
|---|---|---|
| code?1 | ?string | Custom invite code, or null to remove it |
1 Fluxer lowercases the code and turns spaces into hyphens. It must be 2-32 characters of a-z, 0-9 and inner hyphens and can't contain fluxer
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | custom invite URL selection object | The code was set, removed or already matched |
| 400 | error response | TWO_FACTOR_REQUIRED when the guild has the ELEVATED MFA level and you have no authenticator |
| 400 | error response | Field code VANITY_URL_CODE_ALREADY_TAKEN when another invite uses the code |
A change sends Guild Update and records a GUILD_UPDATE audit entry.
The rate limit is 10 requests per minute, on the guild:vanity_url:patch::guild_id bucket.
List guild visits
Section titled “List guild visits”GET/v1/users/@me/guild-visitsReturns the guilds you are visiting, most recently opened first.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | array[guild visit object] | Visits were returned |
The rate limit is 30 requests per 10 seconds, on the user:guild_visits bucket.
Stop visiting guild
Section titled “Stop visiting guild”DELETE/v1/users/@me/guild-visits/{guild_id}Ends your visit to a guild and returns 204. Your sessions get Guild Delete.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | The visit ended, or there was none |
The rate limit is 30 requests per 10 seconds, on the user:guild_visits bucket.
Join visited guild
Section titled “Join visited guild”POST/v1/users/@me/guild-visits/{guild_id}/joinTurns your visit into membership and returns the guild object. The join runs the same checks as the invite or discovery listing that started the visit. Your sessions get Guild Create.
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | guild object | You joined the guild, or were already a member |
| 400 | error response | MAX_GUILDS or MAX_GUILD_MEMBERS |
| 403 | error response | ACCOUNT_VERIFICATION_REQUIRED, INVITES_DISABLED, USER_BANNED_FROM_GUILD or USER_IP_BANNED_FROM_GUILD |
| 404 | error response | GUILD_VISIT_NOT_FOUND, or UNKNOWN_INVITE when the invite that started the visit is gone |
| 404 | error response | UNKNOWN_GUILD when the discovery listing that started the visit is no longer approved |
The rate limit is 10 requests per 10 seconds, on the invite:accept bucket.