Discord Webhook Events API

The Discord Webhook Events API provides HTTP-based outgoing webhook events that allow applications to receive notifications for specific events without maintaining a persistent connection. Supported events include APPLICATION_AUTHORIZED, ENTITLEMENT_CREATE, and QUEST_USER_ENROLLMENT.

OpenAPI Specification

discord-webhook-events-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Discord Interactions Application Commands Webhook Events 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: Webhook Events
  description: Incoming webhook events from Discord
paths:
  /discord-webhook:
    post:
      operationId: receiveWebhookEvent
      summary: Discord Receive webhook event
      description: Endpoint on your server that receives webhook events from Discord. Discord sends a POST request with the event payload. Your server must respond with a 204 No Content for successful processing. Discord validates the endpoint using Ed25519 signatures.
      tags:
      - Webhook Events
      security: []
      parameters:
      - name: X-Signature-Ed25519
        in: header
        required: true
        schema:
          type: string
        description: Ed25519 signature for request verification
      - name: X-Signature-Timestamp
        in: header
        required: true
        schema:
          type: string
        description: Timestamp used in signature verification
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        '204':
          description: Event processed successfully
        '401':
          description: Invalid signature
components:
  schemas:
    WebhookEventBody:
      type: object
      properties:
        type:
          type: string
          description: 'Event type: APPLICATION_AUTHORIZED, ENTITLEMENT_CREATE, QUEST_USER_ENROLLMENT'
          enum:
          - APPLICATION_AUTHORIZED
          - ENTITLEMENT_CREATE
          - QUEST_USER_ENROLLMENT
        timestamp:
          type: string
          format: date-time
          description: When the event occurred
        data:
          oneOf:
          - $ref: '#/components/schemas/ApplicationAuthorizedData'
          - $ref: '#/components/schemas/EntitlementCreateData'
          - $ref: '#/components/schemas/QuestUserEnrollmentData'
      required:
      - type
      - timestamp
    WebhookEvent:
      type: object
      properties:
        version:
          type: integer
          description: Always 1
        application_id:
          type: string
          description: ID of the application receiving the event
        type:
          type: integer
          description: 0=PING, 1=EVENT
        event:
          $ref: '#/components/schemas/WebhookEventBody'
      required:
      - version
      - application_id
      - type
    PartialGuild:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        icon:
          type: string
          nullable: true
        features:
          type: array
          items:
            type: string
    QuestUserEnrollmentData:
      type: object
      description: Data for QUEST_USER_ENROLLMENT event
      properties:
        user_id:
          type: string
        quest_id:
          type: string
        enrolled_at:
          type: string
          format: date-time
    User:
      type: object
      properties:
        id:
          type: string
        username:
          type: string
        discriminator:
          type: string
        global_name:
          type: string
          nullable: true
        avatar:
          type: string
          nullable: true
      required:
      - id
      - username
    EntitlementCreateData:
      type: object
      description: Data for ENTITLEMENT_CREATE event
      properties:
        id:
          type: string
        sku_id:
          type: string
        application_id:
          type: string
        user_id:
          type: string
        type:
          type: integer
        deleted:
          type: boolean
        starts_at:
          type: string
          format: date-time
        ends_at:
          type: string
          format: date-time
        guild_id:
          type: string
    ApplicationAuthorizedData:
      type: object
      description: Data for APPLICATION_AUTHORIZED event
      properties:
        integration_type:
          type: integer
          description: 0=GUILD_INSTALL, 1=USER_INSTALL
        user:
          $ref: '#/components/schemas/User'
        scopes:
          type: array
          items:
            type: string
          description: OAuth2 scopes granted
        guild:
          $ref: '#/components/schemas/PartialGuild'
  securitySchemes:
    BotToken:
      type: http
      scheme: bearer
      description: Bot token authentication
externalDocs:
  description: Discord Interactions Documentation
  url: https://discord.com/developers/docs/interactions/overview