Discord Guilds API

The Guilds API from Discord — 45 operation(s) for guilds.

OpenAPI Specification

discord-guilds-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Discord Interactions Application Commands Guilds API
  description: The Discord Interactions API enables applications to create and respond to application commands (slash commands), message components, and modals. It supports both Gateway-based and webhook-based interaction handling, allowing bots to build rich, interactive user experiences within Discord.
  version: '10'
  contact:
    name: Discord Support
    url: https://support-dev.discord.com/hc/en-us
    email: support@discord.com
  termsOfService: https://discord.com/developers/docs/policies-and-agreements/developer-terms-of-service
servers:
- url: https://discord.com/api/v10
  description: Discord API v10
security:
- BotToken: []
tags:
- name: Guilds
paths:
  /guilds:
    post:
      operationId: create_guild
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuildCreateRequest'
        required: true
      responses:
        '201':
          description: 201 response for create_guild
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}/users:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    - name: guild_scheduled_event_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: list_guild_scheduled_event_users
      parameters:
      - name: with_member
        in: query
        schema:
          type: boolean
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
      - name: before
        in: query
        schema:
          $ref: '#/components/schemas/SnowflakeType'
      - name: after
        in: query
        schema:
          $ref: '#/components/schemas/SnowflakeType'
      responses:
        '200':
          description: 200 response for list_guild_scheduled_event_users
          content:
            application/json:
              schema:
                type:
                - array
                - 'null'
                items:
                  $ref: '#/components/schemas/ScheduledEventUserResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/auto-moderation/rules/{rule_id}:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    - name: rule_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: get_auto_moderation_rule
      responses:
        '200':
          description: 200 response for get_auto_moderation_rule
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/DefaultKeywordRuleResponse'
                - $ref: '#/components/schemas/KeywordRuleResponse'
                - $ref: '#/components/schemas/MLSpamRuleResponse'
                - $ref: '#/components/schemas/MentionSpamRuleResponse'
                - $ref: '#/components/schemas/SpamLinkRuleResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    delete:
      operationId: delete_auto_moderation_rule
      responses:
        '204':
          description: 204 response for delete_auto_moderation_rule
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    patch:
      operationId: update_auto_moderation_rule
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/DefaultKeywordListUpsertRequestPartial'
              - $ref: '#/components/schemas/KeywordUpsertRequestPartial'
              - $ref: '#/components/schemas/MLSpamUpsertRequestPartial'
              - $ref: '#/components/schemas/MentionSpamUpsertRequestPartial'
              x-discord-union: oneOf
        required: true
      responses:
        '200':
          description: 200 response for update_auto_moderation_rule
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/DefaultKeywordRuleResponse'
                - $ref: '#/components/schemas/KeywordRuleResponse'
                - $ref: '#/components/schemas/MLSpamRuleResponse'
                - $ref: '#/components/schemas/MentionSpamRuleResponse'
                - $ref: '#/components/schemas/SpamLinkRuleResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/auto-moderation/rules:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: list_auto_moderation_rules
      responses:
        '200':
          description: 200 response for list_auto_moderation_rules
          content:
            application/json:
              schema:
                type:
                - array
                - 'null'
                items:
                  oneOf:
                  - $ref: '#/components/schemas/DefaultKeywordRuleResponse'
                  - $ref: '#/components/schemas/KeywordRuleResponse'
                  - $ref: '#/components/schemas/MLSpamRuleResponse'
                  - $ref: '#/components/schemas/MentionSpamRuleResponse'
                  - $ref: '#/components/schemas/SpamLinkRuleResponse'
                  - type: 'null'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    post:
      operationId: create_auto_moderation_rule
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/DefaultKeywordListUpsertRequest'
              - $ref: '#/components/schemas/KeywordUpsertRequest'
              - $ref: '#/components/schemas/MLSpamUpsertRequest'
              - $ref: '#/components/schemas/MentionSpamUpsertRequest'
        required: true
      responses:
        '200':
          description: 200 response for create_auto_moderation_rule
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/DefaultKeywordRuleResponse'
                - $ref: '#/components/schemas/KeywordRuleResponse'
                - $ref: '#/components/schemas/MLSpamRuleResponse'
                - $ref: '#/components/schemas/MentionSpamRuleResponse'
                - $ref: '#/components/schemas/SpamLinkRuleResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/voice-states/@me:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    patch:
      operationId: update_self_voice_state
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                request_to_speak_timestamp:
                  type:
                  - string
                  - 'null'
                  format: date-time
                suppress:
                  type:
                  - boolean
                  - 'null'
                channel_id:
                  oneOf:
                  - type: 'null'
                  - $ref: '#/components/schemas/SnowflakeType'
        required: true
      responses:
        '204':
          description: 204 response for update_self_voice_state
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/members/search:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: search_guild_members
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 1000
        required: true
      - name: query
        in: query
        schema:
          type: string
          minLength: 1
          maxLength: 100
        required: true
      responses:
        '200':
          description: 200 response for search_guild_members
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GuildMemberResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/threads/active:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: get_active_guild_threads
      responses:
        '200':
          description: 200 response for get_active_guild_threads
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadsResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/members/@me:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    patch:
      operationId: update_my_guild_member
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                nick:
                  type:
                  - string
                  - 'null'
                  maxLength: 32
        required: true
      responses:
        '200':
          description: 200 response for update_my_guild_member
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrivateGuildMemberResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/members/{user_id}/roles/{role_id}:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    - name: user_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    - name: role_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    put:
      operationId: add_guild_member_role
      responses:
        '204':
          description: 204 response for add_guild_member_role
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    delete:
      operationId: delete_guild_member_role
      responses:
        '204':
          description: 204 response for delete_guild_member_role
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/templates/{code}:
    parameters:
    - name: code
      in: path
      schema:
        type: string
        maxLength: 152133
      required: true
    get:
      operationId: get_guild_template
      responses:
        '200':
          description: 200 response for get_guild_template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildTemplateResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - {}
      - BotToken: []
      tags:
      - Guilds
    post:
      operationId: create_guild_from_template
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 2
                  maxLength: 100
                icon:
                  type:
                  - string
                  - 'null'
                  contentEncoding: base64
              required:
              - name
        required: true
      responses:
        '201':
          description: 201 response for create_guild_from_template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/new-member-welcome:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: get_guild_new_member_welcome
      responses:
        '200':
          description: 200 response for get_guild_new_member_welcome
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildHomeSettingsResponse'
        '204':
          description: 204 response for get_guild_new_member_welcome
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    - name: guild_scheduled_event_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: get_guild_scheduled_event
      parameters:
      - name: with_user_count
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: 200 response for get_guild_scheduled_event
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ExternalScheduledEventResponse'
                - $ref: '#/components/schemas/StageScheduledEventResponse'
                - $ref: '#/components/schemas/VoiceScheduledEventResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    delete:
      operationId: delete_guild_scheduled_event
      responses:
        '204':
          description: 204 response for delete_guild_scheduled_event
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    patch:
      operationId: update_guild_scheduled_event
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/ExternalScheduledEventPatchRequestPartial'
              - $ref: '#/components/schemas/StageScheduledEventPatchRequestPartial'
              - $ref: '#/components/schemas/VoiceScheduledEventPatchRequestPartial'
              x-discord-union: oneOf
        required: true
      responses:
        '200':
          description: 200 response for update_guild_scheduled_event
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ExternalScheduledEventResponse'
                - $ref: '#/components/schemas/StageScheduledEventResponse'
                - $ref: '#/components/schemas/VoiceScheduledEventResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/scheduled-events:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: list_guild_scheduled_events
      parameters:
      - name: with_user_count
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: 200 response for list_guild_scheduled_events
          content:
            application/json:
              schema:
                type:
                - array
                - 'null'
                items:
                  oneOf:
                  - $ref: '#/components/schemas/ExternalScheduledEventResponse'
                  - $ref: '#/components/schemas/StageScheduledEventResponse'
                  - $ref: '#/components/schemas/VoiceScheduledEventResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    post:
      operationId: create_guild_scheduled_event
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/ExternalScheduledEventCreateRequest'
              - $ref: '#/components/schemas/StageScheduledEventCreateRequest'
              - $ref: '#/components/schemas/VoiceScheduledEventCreateRequest'
        required: true
      responses:
        '200':
          description: 200 response for create_guild_scheduled_event
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ExternalScheduledEventResponse'
                - $ref: '#/components/schemas/StageScheduledEventResponse'
                - $ref: '#/components/schemas/VoiceScheduledEventResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/welcome-screen:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: get_guild_welcome_screen
      responses:
        '200':
          description: 200 response for get_guild_welcome_screen
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildWelcomeScreenResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    patch:
      operationId: update_guild_welcome_screen
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WelcomeScreenPatchRequestPartial'
        required: true
      responses:
        '200':
          description: 200 response for update_guild_welcome_screen
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildWelcomeScreenResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/voice-states/{user_id}:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    - name: user_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    patch:
      operationId: update_voice_state
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                suppress:
                  type:
                  - boolean
                  - 'null'
                channel_id:
                  oneOf:
                  - type: 'null'
                  - $ref: '#/components/schemas/SnowflakeType'
        required: true
      responses:
        '204':
          description: 204 response for update_voice_state
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/integrations/{integration_id}:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    - name: integration_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    delete:
      operationId: delete_guild_integration
      responses:
        '204':
          description: 204 response for delete_guild_integration
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/integrations:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: list_guild_integrations
      responses:
        '200':
          description: 200 response for list_guild_integrations
          content:
            application/json:
              schema:
                type:
                - array
                - 'null'
                items:
                  oneOf:
                  - $ref: '#/components/schemas/DiscordIntegrationResponse'
                  - $ref: '#/components/schemas/ExternalConnectionIntegrationResponse'
                  - $ref: '#/components/schemas/GuildSubscriptionIntegrationResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/widget.json:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: get_guild_widget
      responses:
        '200':
          description: 200 response for get_guild_widget
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WidgetResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - {}
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/onboarding:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: get_guilds_onboarding
      responses:
        '200':
          description: 200 response for get_guilds_onboarding
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserGuildOnboardingResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    put:
      operationId: put_guilds_onboarding
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGuildOnboardingRequest'
        required: true
      responses:
        '200':
          description: 200 response for put_guilds_onboarding
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildOnboardingResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/vanity-url:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: get_guild_vanity_url
      responses:
        '200':
          description: 200 response for get_guild_vanity_url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VanityURLResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/audit-logs:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: list_guild_audit_log_entries
      parameters:
      - name: user_id
        in: query
        schema:
          $ref: '#/components/schemas/SnowflakeType'
      - name: target_id
        in: query
        schema:
          $ref: '#/components/schemas/SnowflakeType'
      - name: action_type
        in: query
        schema:
          type: integer
      - name: before
        in: query
        schema:
          $ref: '#/components/schemas/SnowflakeType'
      - name: after
        in: query
        schema:
          $ref: '#/components/schemas/SnowflakeType'
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
      responses:
        '200':
          description: 200 response for list_guild_audit_log_entries
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildAuditLogResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/widget.png:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: get_guild_widget_png
      parameters:
      - name: style
        in: query
        schema:
          $ref: '#/components/schemas/WidgetImageStyles'
      responses:
        '200':
          description: 200 response for get_guild_widget_png
          content:
            image/png:
              schema:
                type: string
                contentEncoding: binary
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - {}
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/templates/{code}:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    - name: code
      in: path
      schema:
        type: string
        maxLength: 152133
      required: true
    put:
      operationId: sync_guild_template
      responses:
        '200':
          description: 200 response for sync_guild_template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildTemplateResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    delete:
      operationId: delete_guild_template
      responses:
        '200':
          description: 200 response for delete_guild_template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildTemplateResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    patch:
      operationId: update_guild_template
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                description:
                  type:
                  - string
                  - 'null'
                  maxLength: 120
        required: true
      responses:
        '200':
          description: 200 response for update_guild_template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildTemplateResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/templates:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: list_guild_templates
      responses:
        '200':
          description: 200 response for list_guild_templates
          content:
            application/json:
              schema:
                type:
                - array
                - 'null'
                items:
                  $ref: '#/components/schemas/GuildTemplateResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    post:
      operationId: create_guild_template
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                description:
                  type:
                  - string
                  - 'null'
                  maxLength: 120
              required:
              - name
        required: true
      responses:
        '200':
          description: 200 response for create_guild_template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildTemplateResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/stickers/{sticker_id}:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    - name: sticker_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    get:
      operationId: get_guild_sticker
      responses:
        '200':
          description: 200 response for get_guild_sticker
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildStickerResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    delete:
      operationId: delete_guild_sticker
      responses:
        '204':
          description: 204 response for delete_guild_sticker
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
    patch:
      operationId: update_guild_sticker
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 2
                  maxLength: 30
                tags:
                  type: string
                  minLength: 1
                  maxLength: 200
                description:
                  type:
                  - string
                  - 'null'
                  maxLength: 100
        required: true
      responses:
        '200':
          description: 200 response for update_guild_sticker
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuildStickerResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Guilds
  /guilds/{guild_id}/bulk-ban:
    parameters:
    - name: guild_id
      in: path
      schema:
        $ref: '#/components/schemas/SnowflakeType'
      required: true
    post:
      operationId: bulk_ban_users_from_guild
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_ids:
                  type: array
                  items:
                    $ref: '#/components/schemas/SnowflakeType'
                  maxItems: 200
                  uniqueItems: true
                delete_message_seconds:
                  type:
                  - integer
                  - 'null'
                  minimum: 0
                  maximum:

# --- truncated at 32 KB (230 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/discord/refs/heads/main/openapi/discord-guilds-api-openapi.yml