# Create a domain webhook

Create a list of webhook URLs you'd like to receive Mailgun's POST requests containing event information.

Endpoint: POST /v3/domains/{domain}/webhooks
Version: 3.0.0
Security: basicAuth

## Path parameters:

  - `domain` (string, required)
    The domain name to create the webhook for

## Request fields (multipart/form-data):

  - `id` (string, required)
    Webhook type to create.
    Enum: "accepted", "clicked", "opened", "unsubscribed", "delivered", "permanent_fail", "temporary_fail", "complained"

  - `url` (string, required)
    url(s) for webhooks to be sent to. Use multiple times to associate more than one url. Maximum of 3 urls for a given webhook type.

## Response 200 fields (application/json):

  - `message` (string, required)
    A message indicating success

  - `webhook` (object, required)
    Webhook details

  - `webhook.urls` (array)
    List of webhooks

## Response 400 fields (application/json):

  - `Reason` (string, required)

## Response 401 fields (application/json):

  - `message` (string, required)
    Response message

## Response 404 fields (application/json):

  - `message` (string, required)
    Response message


