Discord Gateway API

The Gateway API from Discord — 2 operation(s) for gateway.

Operations 2

GET /gateway/bot #
GET /gateway #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/discord-gateway-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

discord-gateway-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Discord Interactions Application Commands Gateway 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: Gateway
paths:
  /gateway/bot:
    get:
      operationId: get_bot_gateway
      responses:
        '200':
          description: 200 response for get_bot_gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayBotResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - BotToken: []
      tags:
      - Gateway
  /gateway:
    get:
      operationId: get_gateway
      responses:
        '200':
          description: 200 response for get_gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayResponse'
        4XX:
          $ref: '#/components/responses/ClientErrorResponse'
      security:
      - {}
      - BotToken: []
      tags:
      - Gateway
components:
  responses:
    ClientErrorResponse:
      description: Client error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      description: Errors object returned by the Discord API
      allOf:
      - $ref: '#/components/schemas/Error'
      - type: object
        properties:
          errors:
            $ref: '#/components/schemas/ErrorDetails'
    GatewayBotSessionStartLimitResponse:
      type: object
      properties:
        max_concurrency:
          type: integer
          format: int32
        remaining:
          type: integer
          format: int32
        reset_after:
          type: integer
          format: int32
        total:
          type: integer
          format: int32
      required:
      - max_concurrency
      - remaining
      - reset_after
      - total
    GatewayBotResponse:
      type: object
      properties:
        url:
          type: string
          format: uri
        session_start_limit:
          $ref: '#/components/schemas/GatewayBotSessionStartLimitResponse'
        shards:
          type: integer
          format: int32
      required:
      - url
      - session_start_limit
      - shards
    ErrorDetails:
      oneOf:
      - type: object
        additionalProperties:
          $ref: '#/components/schemas/ErrorDetails'
      - $ref: '#/components/schemas/InnerErrors'
    InnerErrors:
      type: object
      properties:
        _errors:
          type: array
          description: The list of errors for this field
          items:
            $ref: '#/components/schemas/Error'
      additionalProperties: false
      required:
      - _errors
    GatewayResponse:
      type: object
      properties:
        url:
          type: string
          format: uri
      required:
      - url
    Error:
      type: object
      description: A single error, either for an API response or a specific field.
      properties:
        code:
          type: integer
          description: Discord internal error code. See error code reference
        message:
          type: string
          description: Human-readable error message
      required:
      - code
      - message
  securitySchemes:
    BotToken:
      type: http
      scheme: bearer
      description: Bot token authentication
externalDocs:
  description: Discord Interactions Documentation
  url: https://discord.com/developers/docs/interactions/overview