openapi: 3.1.0 info: title: Mailgun Domains Webhooks API description: Mailgun (by Sinch) is a transactional email API platform offering message send, inbound routing, suppression management, list management, webhooks, and event analytics. The HTTP API uses HTTP Basic Authentication with the literal username `api` and the account API key as the password. Regional endpoints are available for US (`api.mailgun.net`) and EU (`api.eu.mailgun.net`) data residency. version: 3.0.0 contact: name: Mailgun url: https://documentation.mailgun.com/docs/mailgun/api-reference/ servers: - url: https://api.mailgun.net/v3 description: US region - url: https://api.eu.mailgun.net/v3 description: EU region security: - BasicAuth: [] tags: - name: Webhooks paths: /domains/{domain}/webhooks: get: tags: - Webhooks summary: List webhooks for a domain operationId: listWebhooks parameters: - name: domain in: path required: true schema: type: string responses: '200': description: Webhooks post: tags: - Webhooks summary: Create a webhook operationId: createWebhook parameters: - name: domain in: path required: true schema: type: string requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object required: - id - url properties: id: type: string description: Event type (e.g. delivered, opened, clicked) url: type: string format: uri responses: '200': description: Webhook /domains/{domain}/webhooks/{type}: delete: tags: - Webhooks summary: Delete a webhook operationId: deleteWebhook parameters: - name: domain in: path required: true schema: type: string - name: type in: path required: true schema: type: string responses: '200': description: Deleted components: securitySchemes: BasicAuth: type: http scheme: basic description: HTTP Basic with username `api` and your Mailgun API key as the password.