Skip to content
FiveCord Docs

Guilds

A guild is a community with its own channels, roles, members, and configuration. Membership and ownership transfer live on Guild members, and channels on Guild channels.

List current user guilds and Get guild declare the guilds OAuth2 scope, and a bearer credential without that scope receives 403 MISSING_OAUTH_SCOPE. Every other route rejects a bearer credential with 403 ACCESS_DENIED.

A guild that does not exist returns 404 UNKNOWN_GUILD. A non-member receives 403 MISSING_PERMISSIONS. A guild that exists in storage but that the Gateway reports as not found returns 403 ACCESS_DENIED.

An unavailable guild can still appear in List current user guilds. Members can still leave or delete their own messages.

Submitted names and other text must pass the instance’s content policy. Blocked content returns 403 CONTENT_BLOCKED.

A guild object contains the guild’s configuration. The operation that returns it decides which embedded collections and caller-specific fields it has.

FieldTypeDescription
idsnowflakeThe ID of the guild
namestringThe name of the guild (1-100 characters)
icon1?stringGuild icon hash
banner2?stringGuild banner hash
banner_width3?integerBanner width in pixels
banner_height3?integerBanner height in pixels
splash4?stringInvite splash hash
splash_width3?integerInvite splash width in pixels
splash_height3?integerInvite splash height in pixels
splash_card_alignmentintegerSplash card alignment
embed_splash4?stringEmbedded invite splash hash
embed_splash_width3?integerEmbedded invite splash width in pixels
embed_splash_height3?integerEmbedded invite splash height in pixels
vanity_url_code?stringCustom invite code
owner_idsnowflakeThe ID of the guild owner
system_channel_id?snowflakeText channel that receives system messages
system_channel_flagsintegerSystem channel flags
rules_channel_id5?snowflakeThe ID of the rules channel
afk_channel_id?snowflakeVoice channel that inactive members are moved to
afk_timeoutintegerAFK timeout in seconds (60-3600)
features6array[string]Guild features
verification_levelintegerVerification level
mfa_levelintegerMFA level
nsfw_level7integerNSFW level
nsfwbooleanWhether the guild is marked as adult content
content_warning_levelintegerGuild content warning level
content_warning_text8?stringGuild content warning text (max 200 characters)
explicit_content_filterintegerGuild explicit content filter level
default_message_notificationsintegerDefault message notification level
disabled_operations9integerDisabled guild operations
message_history_cutoff10?ISO8601 timestampEarliest message visible to a member without READ_MESSAGE_HISTORY
permissions?11decimal stringCaller permissions in the guild
roles?12array[guild role object]Guild roles
emojis?12array[guild emoji object]Guild emojis
stickers?12array[guild sticker object]Guild stickers
channels?13array[channel object]Guild channels the caller can view
member_count?14integerMember count held by the main Gateway
online_count?14integerOnline presence count held by the main Gateway
approximate_member_count?15integerApproximate member count
approximate_presence_count?15integerApproximate online presence count

1 An animated icon hash has the a_ prefix, and that prefix is removed from the returned value while the guild lacks ANIMATED_ICON

2 The field is null whenever the guild lacks BANNER, and the a_ prefix is removed from the returned value while the guild lacks ANIMATED_BANNER

3 The dimension is null whenever its own asset hash field is null

4 The field is null whenever the guild lacks INVITE_SPLASH

5 No operation on this page assigns the rules channel

6 The set has each feature at most once, and its order is not stable

7 The value is derived from nsfw, so it is 3 when nsfw is true and 0 otherwise

8 A null value means the client renders the localised default warning text for the guild

9 Written only through the Admin API

10 The cutoff is evaluated only for a member that lacks READ_MESSAGE_HISTORY. A null value denies that member every message in the guild, and a set value exposes messages created at or after the timestamp

11 Only List current user guilds populates this field, and only when its permission lookup succeeds. The value is the complete mask the caller’s roles grant

12 Only Get guild populates this field

13 Only Get guild populates this field, and the array is filtered to the channels the caller can currently view

14 Only Get guild populates these fields

15 Only List current user guilds populates these fields, and only when with_counts is true. A guild for which the Gateway holds no cached counts reports 0 for both

{
"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
}

A partial guild object is the smaller shape that appears inside invite payloads. It has identity and display fields only, and the feature-gated asset rules of the complete guild object apply to it unchanged.

FieldTypeDescription
idsnowflakeThe ID of the guild
namestringThe name of the guild
icon1?stringGuild icon hash
banner2?stringGuild banner hash
banner_width3?integerBanner width in pixels
banner_height3?integerBanner height in pixels
splash4?stringInvite splash hash
splash_width3?integerInvite splash width in pixels
splash_height3?integerInvite splash height in pixels
splash_card_alignmentintegerSplash card alignment
embed_splash4?stringEmbedded invite splash hash
embed_splash_width3?integerEmbedded invite splash width in pixels
embed_splash_height3?integerEmbedded invite splash height in pixels
features5array[string]Guild features

1 An animated icon hash has the a_ prefix, and that prefix is removed from the returned value while the guild lacks ANIMATED_ICON

2 The field is null whenever the guild lacks BANNER, and the a_ prefix is removed from the returned value while the guild lacks ANIMATED_BANNER

3 The dimension is null whenever its own asset hash field is null

4 The field is null whenever the guild lacks INVITE_SPLASH

5 The set has each feature at most once, and vanity_url_code is never part of this representation

{
"id": "1489002177550843904",
"name": "Ada's Workshop",
"icon": "a_9f2c1d4e",
"banner": null,
"splash": null,
"splash_card_alignment": 0,
"embed_splash": null,
"features": ["ANIMATED_ICON", "BANNER"]
}

A creation template describes the roles and channels that Create guild creates. FiveCord remaps its template-local identifiers to newly allocated guild snowflakes during creation. Every template-local identifier is compared as its decimal string form, so the integer 1 and the string "1" name the same entity.

FieldTypeDescription
name1stringTemplate name
description?1?stringTemplate description
verification_level?2integerVerification level, defaulting to 0
default_message_notifications?2integerDefault message notification level, defaulting to 0
explicit_content_filter?2integerGuild explicit content filter level, defaulting to 0
system_channel_id?3?decimal string | integerTemplate-local ID of the text channel that becomes the system channel
afk_timeout?2integerAFK timeout in seconds, clamped to 60-3600 and defaulting to 300
system_channel_flags?4integerSystem channel flags, defaulting to 0
roles5array[guild template role object]Template roles (max 250)
channels6array[guild template channel object]Template channels (max 500)

1 The field is read and discarded. The new guild takes its name from the name of the Create guild body

2 The value is truncated to an integer and clamped into its registry range, and a missing value becomes the stated default. A non-numeric value fails validation and returns 400 INVALID_FORM_BODY

3 An identifier that resolves to no text channel in the same template, and an absent or null value, all fall back to the template’s first text channel. A template with no text channel receives a root text channel named general, which becomes the system channel

4 Every bit outside the registry is discarded

5 A template with more than 250 roles is rejected with 400 GUILD_TEMPLATE_INVALID. The ceiling counts the submitted array, and the everyone role is created on top of it, so 250 template roles that name no everyone role produce a guild holding 251

6 A template with more than 500 channels is rejected with 400 GUILD_TEMPLATE_INVALID

FieldTypeDescription
id1decimal string | integerTemplate-local role ID
name?2?stringRole name, defaulting to the empty string
permissions?3decimal string | integerLegacy role permission bitfield
permissions_new?3decimal string | integerPreferred role permission bitfield
color?integerRole colour, defaulting to 0
hoist?booleanWhether the role is displayed separately (default false)
mentionable?booleanWhether anyone can mention the role (default false)
unicode_emoji?4?stringRole Unicode emoji

1 A duplicate identifier rejects creation with 400 GUILD_TEMPLATE_INVALID

2 The role whose name is exactly @everyone supplies the permissions of the new guild’s everyone role, and when no role has that name the role whose identifier is 0 supplies them. Every remaining role is created in array order at positions 1 upward

3 permissions_new takes precedence over permissions, the value is masked to the permission bits FiveCord defines, and a value that is not a valid integer rejects creation with 400 GUILD_TEMPLATE_INVALID. An everyone role whose resolved mask is 0 receives the default permission set

4 The value is stored on the created role. The everyone role is always created with no Unicode emoji

FieldTypeDescription
id1decimal string | integerTemplate-local channel ID
type2integerSource channel type
name??stringChannel name, defaulting to the empty string
topic??stringChannel topic
positionintegerThe sort position of the channel
parent_id?3?decimal string | integerTemplate-local parent category ID
bitrate?4?integerVoice bitrate, defaulting to 64000 for a voice channel and capped at 96000
user_limit?4?integerVoice occupancy limit, defaulting to 0 for a voice channel
voice_connection_limit?4?integerPer-user voice connection limit, defaulting to 5 for a voice channel
nsfw?booleanWhether the channel is age restricted (default false)
rate_limit_per_user?integerSlowmode interval in seconds, defaulting to 0
permission_overwrites?5array[guild template role permission overwrite object]Role permission overwrites

1 A duplicate identifier in the same template rejects creation with 400 GUILD_TEMPLATE_INVALID

2 The value 0 creates a text channel, 2 a voice channel, and 4 a category. The value 5, the announcement channel type of another platform, creates a text channel. The value 13, the stage channel type of another platform, creates a voice channel. FiveCord skips every other value, so the channel is not created

3 The identifier is applied only when it resolves to a category in the same template, and every other value leaves the channel at the guild root

4 These voice fields are stored only on a voice channel and are null on every other channel type

5 An entry is applied only when its resolved type is 0 and its id resolves to a role in the same template, and the identifier 0 resolves to the everyone role. FiveCord skips every other entry, and a channel whose entries are all skipped is created with no overwrites

Guild template role permission overwrite object

Section titled “Guild template role permission overwrite object”
FieldTypeDescription
iddecimal string | integerTemplate-local role ID
type1integer | stringOverwrite type
allow2decimal string | integerAllowed permission bitfield
deny2decimal string | integerDenied permission bitfield

1 The string role resolves to 0 and the string member resolves to 1, and every other string is read as a number. Only a resolved value of 0 is applied

2 The value is masked to the permission bits FiveCord defines, and a value that is not a valid integer rejects creation with 400 GUILD_TEMPLATE_INVALID

A verification level gates member participation. FiveCord evaluates it when a member sends a message in the guild.

ValueNameDescription
0NONENo verification requirement
1LOW1The account is claimed and its email address verified
2MEDIUMThe LOW requirement, and the account is at least 5 minutes old
3HIGH2The MEDIUM requirement, and the membership is at least 10 minutes old
4VERY_HIGH3The account has a verified phone number

1 A guild with DISCOVERABLE is evaluated at an effective minimum of LOW even when the stored value is NONE, and Modify guild rejects lowering a discoverable guild below LOW with 400 INVALID_FORM_BODY and the field code DISCOVERABLE_GUILD_VERIFICATION_LEVEL_TOO_LOW

2 The membership age requirement is skipped when the join timestamp cannot be read, so the level behaves as MEDIUM

3 A verified phone number is the whole requirement at this level

The guild owner, a bot, and any member holding at least one role bypass the check at every level.

ValueNameDescription
0NONEMFA is not required for moderation actions
1ELEVATED1MFA is required for moderation actions

1 Only the guild owner can change this value, the owner account needs a second factor already configured, and the change requires sudo mode

While the level is ELEVATED, a non-owner caller uses the elevated permissions only with an enrolled authenticator. A bot inherits the enrolment state of its application owner. An operation that asserts an elevated permission the caller holds but cannot use returns 400 TWO_FACTOR_REQUIRED after confirming the permission itself.

ValueNameDescription
0CENTERCentre the splash card
1LEFTAlign the splash card to the left
2RIGHTAlign the splash card to the right

A guild explicit content filter level is the guild-wide filter a moderator selects. The account setting of the same name on the user settings object is a different registry with different values.

ValueNameDescription
0DISABLEDDo not apply the guild explicit content filter
1MEMBERS_WITHOUT_ROLESApply the filter to members without roles
2ALL_MEMBERSApply the filter to all members
ValueNameDescription
0ALL_MESSAGESNotify for all messages by default
1ONLY_MENTIONSNotify only for mentions by default
ValueNameDescription
0SAFEGuild is not age restricted
3AGE_RESTRICTEDGuild is age restricted

The registry has no other value. FiveCord derives the level from the guild’s nsfw field and never writes it directly.

The guild is the last position in the resolution chain described by channel content warning levels.

ValueNameDescription
0INHERITNo level is set at guild level, so a channel that inherits displays no content warning
1CONTENT_WARNINGA channel that inherits displays the guild content warning
ValueNameDescription
1 << 0SUPPRESS_JOIN_NOTIFICATIONSSuppress member join system messages

Every bit outside this registry is discarded when the field is written.

A set bit disables the named behaviour across the guild. Only the Admin API writes the bitfield.

ValueNameDescription
1 << 0PUSH_NOTIFICATIONSDisable push notifications
1 << 1EVERYONE_MENTIONSDisable mentions of the everyone role
1 << 2TYPING_EVENTSDisable typing events
1 << 3INSTANT_INVITESDisable instant invites
1 << 4SEND_MESSAGEDisable message sending
1 << 5REACTIONSDisable reactions
1 << 6MEMBER_LIST_UPDATESDisable member list updates

Each value in the guild’s features array is a capability or availability flag.

ValueDescription
ANIMATED_ICONGuild can use an animated icon
ANIMATED_BANNERGuild can use an animated banner
AUDIO_BITRATE_128_KBPS6Voice channel bitrate ceiling is raised to 128000
AUDIO_BITRATE_256_KBPS6Voice channel bitrate ceiling is raised to 256000
AUDIO_BITRATE_384_KBPS6Voice channel bitrate ceiling is raised to 384000
BANNERGuild can use a banner
CLONE_EMOJI_DISABLED7Deprecated. Emoji cloning now needs CLONE_EMOJI_ENABLED
CLONE_EMOJI_ENABLED1Guild permits another guild to clone its emojis
CLONE_STICKER_DISABLED7Deprecated. Sticker cloning now needs CLONE_STICKER_ENABLED
CLONE_STICKER_ENABLED1Guild permits another guild to clone its stickers
DETACHED_BANNER1Guild banner is independent from its splash
INVITE_SPLASHGuild can use invite splash assets
INVITES_DISABLED1Guild invite use is disabled
RAID_DETECTEDRaid detection is active and invites are restricted
TEXT_CHANNEL_FLEXIBLE_NAMES1Text channel names keep uppercase letters, spaces, and punctuation
HIDE_OWNER_CROWN1Guild owner crown is hidden
MORE_EMOJI2Legacy increased emoji slot allowance
MORE_STICKERS2Legacy increased sticker slot allowance
UNLIMITED_EMOJI3Guild emoji slots are effectively unlimited
UNLIMITED_STICKERS3Guild sticker slots are effectively unlimited
EXPRESSION_PURGE_ALLOWEDExpression assets can be purged through delete operations
VANITY_URLGuild can own a custom invite code
DISCOVERABLEGuild is present in public discovery
PARTNEREDGuild has partnered status
VERIFIEDGuild has verified status
VIP_VOICEGuild can use voice regions that are restricted to VIP guilds
VOICE_E2EEGuild voice channels support end-to-end encryption
UNAVAILABLE_FOR_EVERYONE4Guild is unavailable to every account
UNAVAILABLE_FOR_EVERYONE_BUT_STAFF4Guild is unavailable to every account without the instance staff flag
UNAVAILABLE_HIDDENWhile the guild is unavailable, the Gateway sends its unavailable guild entry with unavailable_hidden: true
VISIONARYGuild has visionary status
LARGE_GUILD_OVERRIDE2Guild is marked as a large guild
VERY_LARGE_GUILD5Guild member capacity is raised

1 The feature is added or removed through Modify guild, as part of the complete array. Send every feature without this marker back to features exactly as the guild holds it

2 The feature changes no HTTP API behaviour. An instance can name it in a filter of the ordered limit configuration, and the stock configuration names none of them

3 Emoji and sticker creation use a fixed slot ceiling of 999999 and ignore the instance limit configuration

4 Guild and channel routes return 403 MISSING_ACCESS. UNAVAILABLE_FOR_EVERYONE includes the guild owner. UNAVAILABLE_FOR_EVERYONE_BUT_STAFF exempts accounts with the instance staff flag

5 The feature raises the default max_guild_members limit from 1000000 to 10000000 before the ordered limit configuration is checked, so the raised ceiling applies even when no configured rule names the feature

6 A guild holding none of the three caps a voice channel bitrate at 96000. The highest feature the guild holds wins, and a write above the cap is stored at the cap rather than rejected. A guild that loses the feature keeps the stored value, and the next write to bitrate lowers it to the cap

7 The feature is deprecated and changes no behaviour. FiveCord still returns it for a guild that already holds it, and Modify guild can neither add nor remove it

A custom invite URL object reports the guild’s current custom invite code and how many times the invite behind it has been used. Get guild custom invite URL returns it.

FieldTypeDescription
code?stringCurrent custom invite code
uses1integerUse count of the invite backing the current code

1 The value is 0 when the guild holds no code and when the backing invite can no longer be resolved

{
"code": "workshop",
"uses": 128
}

A custom invite URL selection object reports the code the guild holds after a write. Modify guild custom invite URL returns it.

FieldTypeDescription
code?stringCustom invite code held by the guild after the request (2-32 characters)

These fields prove sudo mode when an operation requires it. A caller can also supply an existing proof through the X-FiveCord-Sudo-Mode-JWT request header.

FieldTypeDescription
password?1stringCurrent account password
mfa_method?2stringMFA method, either totp or webauthn
mfa_code?stringAuthenticator code or unconsumed backup code when the method is totp (1-32 characters)
webauthn_response?WebAuthn assertion objectAssertion when the method is webauthn
webauthn_challenge?stringChallenge bound to the WebAuthn assertion

1 The password is accepted only while the account holds neither a TOTP secret nor a registered WebAuthn credential, and it returns the field code INVALID_PASSWORD when it does not match

2 The MFA proof is accepted only while the account holds a TOTP secret or a registered WebAuthn credential, and it returns the field code INVALID_MFA_CODE on any failure

A bot credential satisfies sudo mode without any proof, and so does an account with no password, no TOTP secret, and no registered WebAuthn credential. Every other account that supplies no usable proof receives 403 SUDO_MODE_REQUIRED, whose error object has has_mfa and a methods object reporting whether totp, webauthn, and backup_codes are available.

FiveCord issues a newly generated proof in the X-FiveCord-Sudo-Mode-JWT header of the success response, and only for an account holding a TOTP secret or a registered WebAuthn credential. A proof supplied on the request is echoed back in that same header.

POST/v1/guilds

Creates a guild owned by the caller. Requires a user session credential. Returns a guild object on success. Emits Guild Create and User Settings Update Gateway events to the owner.

  • A bot credential is rejected with 400 BOTS_CANNOT_CREATE_GUILDS.
  • An unclaimed account is rejected with 400 UNCLAIMED_ACCOUNT_CANNOT_CREATE_GUILDS.
  • An account without a verified email address is rejected with 403 GUILD_CREATION_EMAIL_VERIFICATION_REQUIRED.
  • A caller already at the configured guild limit is rejected with 400 MAX_GUILDS.
  • While single_community_enabled is true in the instance policy, every caller is rejected with 400 SINGLE_COMMUNITY_CANNOT_CREATE_GUILDS.
FieldTypeDescription
name1stringGuild name (1-100 characters)
icon?2?base64 stringGuild icon
empty_features?3booleanWhether to create the guild with no features (default false)
template?guild creation template objectRoles and channels to create for the new guild

1 FiveCord trims the value before it measures the length bound

2 The field accepts raw base64, or a data URL whose payload is everything after the first comma

3 When false the guild is created holding ANIMATED_ICON, ANIMATED_BANNER, BANNER, and INVITE_SPLASH

A name outside 1 to 100 characters after normalisation returns STRING_LENGTH_INVALID. A blocked name returns 403 CONTENT_BLOCKED.

The icon base64 payload is bounded to 1 to 13981016 characters and is otherwise rejected with BASE64_LENGTH_INVALID, and a payload that is not valid base64 with INVALID_BASE64_FORMAT. The decoded image must fit within the instance avatar_max_size limit, which defaults to the 10 MiB ceiling, and a larger image is rejected with IMAGE_SIZE_EXCEEDS_LIMIT. PNG, JPEG, WebP, GIF, APNG, AVIF, HEIC, HEIF, JXL, and SVG are accepted. An animated AVIF is rejected with INVALID_IMAGE_FORMAT.

Without a template the guild is created with a Text Channels category holding a text channel named general, a Voice Channels category holding a voice channel named General, and an everyone role with the default permission set. The general channel becomes the system channel.

StatusBodyCondition
200guild objectGuild was created
4001error responseBody, image, template, bot or unclaimed credential, configured guild limit, or single community policy rejects creation
4032error responseEmail address is unverified, or the name is blocked

1 The error code is SINGLE_COMMUNITY_CANNOT_CREATE_GUILDS while the single community policy is active, BOTS_CANNOT_CREATE_GUILDS for a bot credential, UNCLAIMED_ACCOUNT_CANNOT_CREATE_GUILDS for an unclaimed account, MAX_GUILDS at the configured guild limit, GUILD_TEMPLATE_INVALID for a rejected template, and INVALID_FORM_BODY otherwise

2 The error code is GUILD_CREATION_EMAIL_VERIFICATION_REQUIRED for an unverified email address and CONTENT_BLOCKED for a blocked name or body string

The operation creates the guild, its everyone role, its template or default channels, and the owner’s membership. A supplied icon becomes the guild icon. FiveCord adds the guild to the owner’s guild folder layout. The owner receives Guild Create for the new guild and User Settings Update with the changed folder layout. No audit log entry is recorded, and an X-Audit-Log-Reason header on this request is read and discarded.

10 requests per minute for each authenticated user, on the guild:create bucket.

GET/v1/users/@me/guildsBotguilds

Returns an array of guild objects, one for every guild the authenticated user is a member of. A bearer credential requires the guilds OAuth2 scope.

FieldTypeDescription
before?1snowflakeReturn guilds with a lower ID than this guild ID
after?1snowflakeReturn guilds with a higher ID than this guild ID
limit?integerMaximum number returned (1-200, default 200)
with_counts?2booleanInclude approximate member and presence counts (default false)

1 A page is always ordered by ascending guild ID whichever cursor is used, and after takes precedence when both cursors are supplied. A cursor naming a guild the caller is not a member of is ignored, so the page starts at the first guild

2 A guild whose counts cannot be fetched is returned without them

The page excludes deleted guilds but includes guilds marked UNAVAILABLE_FOR_EVERYONE.

A page within that ceiling can still omit permissions from an individual guild the lookup could not resolve.

StatusBodyCondition
200array[guild object]Guilds were returned
403error responseBearer credential lacks the guilds scope and the request returns MISSING_OAUTH_SCOPE

40 requests per 10 seconds for each authenticated user, on the guild:list bucket.

GET/v1/guilds/{guild_id}Botguilds

Returns the guild object with its roles, emojis, stickers, viewable channels, member_count, and online_count. Requires membership of the guild, and a bearer credential requires the guilds OAuth2 scope.

The response has no permissions field. Read List current user guilds for the caller’s mask.

FieldTypeDescription
guild_idsnowflakeThe ID of the guild
StatusBodyCondition
200guild objectGuild was returned
4031error responseGuild is unavailable, the bearer credential lacks the guilds scope, or the caller is not a member
404error responseGuild does not exist and the request returns UNKNOWN_GUILD

1 The error code is MISSING_ACCESS for an unavailable guild, MISSING_OAUTH_SCOPE for a missing scope, MISSING_PERMISSIONS for a non-member, and ACCESS_DENIED when the guild exists in storage but the Gateway reports it as not found

100 requests per 10 seconds for each authenticated user and guild, on the guild:read::guild_id bucket.

PATCH/v1/guilds/{guild_id}BotAudit reasonMFA

Modifies guild configuration and returns the updated guild object. Requires membership and MANAGE_GUILD. Emits a Guild Update Gateway event to every session that can see the guild.

MANAGE_GUILD is an elevated permission. While the guild MFA level is elevated, a non-owner caller also needs an enrolled authenticator, and receives 400 TWO_FACTOR_REQUIRED without one.

Changing mfa_level to a different value also requires the guild owner, an owner account that already has a second factor, and sudo mode. A caller who is not the owner receives 403 MISSING_PERMISSIONS for that change even while holding MANAGE_GUILD. Sudo mode is verified before ownership, so a non-owner without a proof receives 403 SUDO_MODE_REQUIRED first.

FieldTypeDescription
guild_idsnowflakeThe ID of the guild
FieldTypeDescription
X-FiveCord-Sudo-Mode-JWT?stringExisting sudo mode proof, read when the MFA level changes

Every field is optional. An omitted field preserves its current value, and a field explicitly set to null clears it where the type allows null.

FieldTypeDescription
name?1stringGuild name (1-100 characters)
icon?2?base64 stringGuild icon, or null to clear it
system_channel_id?3?snowflakeSystem channel ID, or null to clear it
system_channel_flags?4integerSystem channel flags
afk_channel_id?5?snowflakeAFK voice channel ID, or null to clear it
afk_timeout?integerAFK timeout in seconds (60-3600)
default_message_notifications?integerDefault message notification level
verification_level?6integerVerification level
mfa_level?7integerMFA level
nsfw_level?8integerLegacy NSFW level, which is translated into nsfw and the content warning level
nsfw?9booleanWhether the guild is marked as adult content
content_warning_level?10integerGuild content warning level
content_warning_text?11?stringContent warning text (max 200 characters), or null for the localised default
explicit_content_filter?integerGuild explicit content filter level
banner?12?base64 stringGuild banner, or null to clear it
splash?13?base64 stringStatic invite splash, or null to clear it
embed_splash?13?base64 stringStatic embedded invite splash, or null to clear it
splash_card_alignment?integerSplash card alignment
features?14array[string]Complete desired guild feature set (max 100 entries)
message_history_cutoff?15?ISO8601 timestampEarliest history visible without READ_MESSAGE_HISTORY, or null to deny historical access
password?stringSudo verification password
mfa_method?stringSudo verification method, either totp or webauthn
mfa_code?stringSudo verification authenticator code
webauthn_response?WebAuthn assertion objectSudo verification assertion
webauthn_challenge?stringChallenge bound to the WebAuthn assertion

1 Normalised and trimmed before its length is measured. A blocked name returns 403 CONTENT_BLOCKED

2 The accepted encoding, byte ceiling, and format set are the ones listed by Create guild. No guild feature gates an animated icon on write, but the a_ prefix is stripped from the returned hash while the guild lacks ANIMATED_ICON

3 The channel must exist in this guild and be a text channel, and is otherwise rejected with SYSTEM_CHANNEL_MUST_BE_IN_GUILD or SYSTEM_CHANNEL_MUST_BE_TEXT

4 Every bit outside the registry is discarded

5 The channel must exist in this guild and be a voice channel, and is otherwise rejected with AFK_CHANNEL_MUST_BE_IN_GUILD or AFK_CHANNEL_MUST_BE_VOICE

6 A guild with DISCOVERABLE cannot be lowered below LOW and is rejected with the field code DISCOVERABLE_GUILD_VERIFICATION_LEVEL_TOO_LOW

7 Sending the value the guild already holds needs neither ownership nor sudo mode, and an owner without a configured second factor is rejected with the field code MUST_ENABLE_2FA_BEFORE_REQUIRING_FOR_MODS

8 The only accepted values are 0 and 3, and nsfw takes precedence when both fields are supplied. Setting 3 through this field also raises the content warning level to CONTENT_WARNING when content_warning_level is absent from the same body and the guild content warning level is INHERIT

9 The write also sets nsfw_level to 3 when true and 0 when false, and unlike nsfw_level it never changes the content warning level

10 Any value other than 1 is stored as 0

11 The value is trimmed, and a value that is empty after trimming is stored as null

12 A non-null value requires BANNER, and an animated image also requires ANIMATED_BANNER, otherwise the request is rejected with the field codes GUILD_BANNER_REQUIRES_FEATURE or ANIMATED_GUILD_BANNER_REQUIRES_FEATURE

13 A non-null value requires INVITE_SPLASH and is rejected with the field codes INVITE_SPLASH_REQUIRES_FEATURE or EMBED_SPLASH_REQUIRES_FEATURE. Both splash fields take static images only, so GIF and APNG are not accepted for either and an animated upload is rejected with the field code INVALID_IMAGE_FORMAT

14 Adding a feature that is not user-toggleable is rejected with the field code GUILD_FEATURE_NOT_TOGGLEABLE, while omitting a feature that is not user-toggleable leaves it in place. The user-toggleable features are INVITES_DISABLED, TEXT_CHANNEL_FLEXIBLE_NAMES, DETACHED_BANNER, CLONE_EMOJI_ENABLED, CLONE_STICKER_ENABLED, and HIDE_OWNER_CROWN

15 A timestamp earlier than the guild’s creation time or in the future is rejected with MESSAGE_HISTORY_CUTOFF_BEFORE_GUILD_CREATION or MESSAGE_HISTORY_CUTOFF_IN_FUTURE

StatusBodyCondition
200guild objectGuild was modified, or the supplied values matched current state
4001error responseBody, image, feature set, channel reference, timestamp, or sudo proof is invalid
4001error responseCaller cannot use MANAGE_GUILD
4032error responseGuild is unavailable, the name is blocked, MANAGE_GUILD or ownership is absent, or sudo mode is required
4043error responseGuild does not exist

1 The error code is TWO_FACTOR_REQUIRED for a caller who holds MANAGE_GUILD but cannot use it, and INVALID_FORM_BODY otherwise

2 The error code is MISSING_ACCESS for an unavailable guild, CONTENT_BLOCKED for a blocked name or body string, SUDO_MODE_REQUIRED when an MFA level change is unproven, and MISSING_PERMISSIONS for a non-member, a missing MANAGE_GUILD, or a non-owner changing the MFA level

3 The error code is UNKNOWN_GUILD

Every successful request emits Guild Update to every session that can see the guild, and a request that writes no field still emits it.

A request that changes the stored value of at least one body field records a GUILD_UPDATE audit entry with the previous and new values. That entry emits Guild Audit Log Entry Create to sessions that can read the audit log.

Removing TEXT_CHANNEL_FLEXIBLE_NAMES renames every guild text channel whose stored name changes when FiveCord trims it, lowercases it, replaces each whitespace run with a hyphen, and removes disallowed punctuation. When at least one channel is renamed, the removal emits one Channel Update Bulk Dispatch with every channel in the guild.

Replacing an image removes the previous asset. A failed replacement leaves the previous image unchanged.

20 requests per 10 seconds for each authenticated user and guild, on the guild:update::guild_id bucket.

POST/v1/guilds/{guild_id}/deleteMFA

Permanently deletes the guild and returns 204 with an empty body. Requires the guild owner and sudo mode. Emits a Guild Delete Gateway event to every member session.

FiveCord refuses a non-owner with 403 MISSING_PERMISSIONS. A bot can never own a guild, so a bot credential never satisfies the requirement.

While single_community_enabled is true in the instance policy, the guild named by single_community_guild_id cannot be deleted and returns 400 SINGLE_COMMUNITY_CANNOT_DELETE.

FieldTypeDescription
guild_idsnowflakeThe ID of the guild
FieldTypeDescription
X-FiveCord-Sudo-Mode-JWT?stringExisting sudo mode proof

The body is the optional sudo verification fields. A request that already has a valid proof can omit it.

StatusBodyCondition
204emptyGuild was deleted
4001error responseBody, sudo proof, or single community policy rejects the request
4032error responseGuild is unavailable, the caller is not the owner, or sudo mode is required
4043error responseGuild does not exist

1 The error code is SINGLE_COMMUNITY_CANNOT_DELETE while the policy protects this guild, and INVALID_FORM_BODY otherwise

2 The error code is MISSING_ACCESS for an unavailable guild, SUDO_MODE_REQUIRED when sudo mode is unproven, and MISSING_PERMISSIONS for a caller who is not a member or not the owner

3 The error code is UNKNOWN_GUILD

Every member receives Guild Delete. FiveCord deletes every member’s user guild settings for the guild. Non-bot members also receive User Settings Update with the guild removed from their folder layout.

No audit log entry is recorded, because the audit log is destroyed with the guild. An X-Audit-Log-Reason header on this request is read and discarded.

10 requests per minute for each authenticated user and guild, on the guild:delete::guild_id bucket.

DELETE/v1/users/@me/guilds/{guild_id}Bot

Removes the authenticated account’s membership and returns 204 with an empty body. Requires a current membership. Emits a Guild Member Remove Gateway event to the remaining guild sessions and a Guild Delete Gateway event to the leaving account’s own sessions.

A caller with no current membership receives 404 UNKNOWN_MEMBER whether or not the guild exists. The guild owner cannot leave and receives 400 INVALID_FORM_BODY with the field code CANNOT_LEAVE_GUILD_AS_OWNER. While single_community_enabled is true in the instance policy, the guild named by single_community_guild_id cannot be left and returns 400 SINGLE_COMMUNITY_CANNOT_LEAVE. Setting delete_messages requires sudo mode, which a bot credential satisfies implicitly.

FieldTypeDescription
guild_idsnowflakeThe ID of the guild
FieldTypeDescription
delete_messages?1booleanDelete every message the caller authored in the guild before leaving (default false)

1 The deletion runs inside this request and completes before the membership is removed. The response is sent only after every matching message is gone

With delete_messages, a non-member of an existing guild receives 403 MISSING_PERMISSIONS rather than 404 UNKNOWN_MEMBER.

FieldTypeDescription
X-FiveCord-Sudo-Mode-JWT?stringExisting sudo mode proof, read only when delete_messages is true

The optional body is the sudo verification fields. It is validated on every request and used only when delete_messages is true.

StatusBodyCondition
204emptyMembership was removed
4001error responseQuery, body, sudo proof, guild ownership, or single community policy rejects the request
4032error responseSudo mode is required, or the caller is not a member while delete_messages is true
4043error responseCaller holds no membership in the guild

1 The error code is SINGLE_COMMUNITY_CANNOT_LEAVE while the policy protects this guild, and INVALID_FORM_BODY otherwise, with the field code CANNOT_LEAVE_GUILD_AS_OWNER on guild_id for the guild owner

2 The error code is SUDO_MODE_REQUIRED when delete_messages is true and sudo mode is unproven, and MISSING_PERMISSIONS for a non-member reached through the delete_messages path

3 The error code is UNKNOWN_MEMBER, and UNKNOWN_GUILD when delete_messages is true and the guild does not exist

The account leaves the guild. Non-bot accounts receive User Settings Update with the guild removed from their folder layout.

Remaining guild sessions receive Guild Member Remove and the leaving account’s sessions receive Guild Delete.

Guild read states and settings are unchanged, but the guild profile and roles are lost. Rejoining within one year resumes any unexpired communication timeout. Leaving records no audit entry, and X-Audit-Log-Reason has no effect.

10 requests per 10 seconds for each authenticated user and guild, 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-mineBotMFA

Deletes every message the authenticated account has authored in the guild and returns 202 with an empty body. Requires membership and sudo mode, which a bot credential satisfies implicitly. The membership survives the request.

The deletion runs inside this request, so the 202 is sent only after every matching message in every guild channel has been removed. Each processed batch emits Message Delete Bulk in its channel.

FieldTypeDescription
guild_idsnowflakeThe ID of the guild
FieldTypeDescription
X-FiveCord-Sudo-Mode-JWT?stringExisting sudo mode proof

The body is the optional sudo verification fields.

StatusBodyCondition
202emptyMessages were deleted
400error responseBody or sudo proof is invalid
4031error responseCaller is not a member, or sudo mode is required
4042error responseGuild does not exist

1 The error code is MISSING_PERMISSIONS for a caller who is not a member and SUDO_MODE_REQUIRED when sudo mode is unproven

2 The error code is UNKNOWN_GUILD

The caller’s messages and attachments are permanently deleted. Affected channels receive Message Delete Bulk events with up to 100 message IDs each. No audit entry is recorded.

10 requests per 10 seconds for each authenticated user and guild, on the shared guild:leave::guild_id bucket.

GET/v1/guilds/{guild_id}/vanity-urlBot

Returns the guild’s custom invite URL object. Requires membership and MANAGE_GUILD.

MANAGE_GUILD is an elevated permission. While the guild MFA level is elevated, a non-owner caller also needs an enrolled authenticator, and receives 400 TWO_FACTOR_REQUIRED without one.

FieldTypeDescription
guild_idsnowflakeThe ID of the guild
StatusBodyCondition
200custom invite URL objectCustom invite URL state was returned
4001error responseCaller cannot use MANAGE_GUILD
4032error responseGuild is unavailable, or MANAGE_GUILD is absent
404error responseGuild does not exist and the request returns UNKNOWN_GUILD

1 The error code is TWO_FACTOR_REQUIRED

2 The error code is MISSING_ACCESS for an unavailable guild and MISSING_PERMISSIONS for a non-member or a caller lacking MANAGE_GUILD

100 requests per 10 seconds for each authenticated user and guild, on the guild:vanity_url:get::guild_id bucket.

PATCH/v1/guilds/{guild_id}/vanity-urlBotAudit reasonMFA

Sets or removes the guild’s custom invite code and returns the custom invite URL selection object. Requires membership and MANAGE_GUILD. An effective change emits a Guild Update Gateway event to every session that can see the guild.

MANAGE_GUILD is an elevated permission. While the guild MFA level is elevated, a non-owner caller also needs an enrolled authenticator, and receives 400 TWO_FACTOR_REQUIRED without one.

A non-null code also requires the VANITY_URL guild feature and is otherwise rejected with the field code VANITY_URL_REQUIRES_FEATURE.

FieldTypeDescription
guild_idsnowflakeThe ID of the guild
FieldTypeDescription
code?1?stringCustom invite code to claim, or null to remove the current code

1 FiveCord lowercases the value, turns each whitespace run into one hyphen, and collapses repeated hyphens. The result must match ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$ and be 2 to 32 characters

A result that fails the pattern returns VANITY_URL_INVALID_CHARACTERS, and one outside the length bound returns VANITY_URL_CODE_LENGTH_INVALID. A code containing fluxer returns VANITY_URL_CODE_CANNOT_CONTAIN_FLUXER. An unchanged valid code succeeds. A code claimed by another invite returns VANITY_URL_CODE_ALREADY_TAKEN.

StatusBodyCondition
200custom invite URL selection objectCode was claimed, removed, or already matched
4001error responseCode, reserved term policy, feature requirement, or global uniqueness check rejects the request
4001error responseCaller cannot use MANAGE_GUILD
4032error responseGuild is unavailable, the code is blocked, or MANAGE_GUILD is absent
404error responseGuild does not exist and the request returns UNKNOWN_GUILD

1 The error code is TWO_FACTOR_REQUIRED for a caller who holds MANAGE_GUILD but cannot use it, and INVALID_FORM_BODY otherwise

2 The error code is MISSING_ACCESS for an unavailable guild, CONTENT_BLOCKED for a blocked code, and MISSING_PERMISSIONS for a non-member or a caller lacking MANAGE_GUILD

An unchanged code has no side effects. A change replaces or removes the previous invite, records a GUILD_UPDATE audit entry and emits Guild Update and Guild Audit Log Entry Create.

10 requests per minute for each authenticated user and guild, on the guild:vanity_url:patch::guild_id bucket.