---
title: "Mailgun to make webhook call"
method: POST
path: "/webhook/mailgun"
tags: ["Webhook Mailgun"]
---

# Mailgun to make webhook call

`POST /webhook/mailgun`

## Request body

- WebhookMailgunDef
  - `signature` SignatureDef, required
    - `timestamp` string, required
    - `token` string, required
    - `signature` string, required
  - `event-data` EventDataDef, required
    - `geolocation` EventDataGeoLocationDef
      - `country` string
      - `region` string
      - `city` string
    - `client-info` EventDataClientInfoDef
      - `client-name` string
      - `client-os` string
      - `user-agent` string
      - `device-type` string
      - `client-type` string
    - `event` string, required
    - `severity` string
    - `tags` string[]
    - `timestamp` number
    - `storage` EventDataStorageDef
      - `url` string
      - `key` string
    - `log-level` string
    - `campaigns` string[]
    - `reason` string
    - `user-variables` EventDataUserVariablesDef
    - `flags` EventDataFlagsDef
      - `is-routed` boolean
      - `is-authenticated` boolean
      - `is-system-test` boolean
      - `is-test-mode` boolean
    - `recipient-domain` string
    - `envelope` EventDataEnvelopeDef
      - `sending-ip` string
      - `sender` string
      - `transport` string
      - `targets` string
    - `recipient` string
    - `id` string
    - `delivery-status` EventDataDeliveryStatusDef
      - `tls` boolean
      - `mx-host` string
      - `attempt-no` number
      - `description` string
      - `session-seconds` number
      - `utf8` boolean
      - `code` number
      - `message` string
      - `certificate-verified` boolean
    - `message` EventDataMessageDef, required
      - `headers` EventDataHeadersMessageHeadersDef, required
        - `message-id` string, required
        - `to` string
        - `from` string
        - `subject` string
      - `attachments` object[]
      - `size` number

## Response `200`

Response for making a webhook call with status information of email that we sent

- WebhookMailgunResponseDef

## Other responses

- `400` — Validation error on making a wehbook cal
- `default` — Server error occurred

---

[API](https://skmtc.dev/staffshift/apis/staffshift-api-gateway.md) · [All operations](https://skmtc.dev/staffshift/apis/staffshift-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/staffshift/staffshift-api-gateway/revisions/6e2cb83db3a9/schema)
