---
title: "Create a webhook for an email domain"
method: POST
path: "/email_domains/{domain_id}/webhooks"
tags: ["Email Webhooks"]
---

# Create a webhook for an email domain

`POST /email_domains/{domain_id}/webhooks`

Creates a webhook endpoint subscribed to a specific allowlist of event types. Both `email.*` events (published by email-api) and `email_domain.*` events (published by this service) flow through the same webhooks.

## Path parameters

- `domain_id` string, uuid, required

## Request body

- CreateEmailWebhookRequest
  - `url` string, uri, required — HTTPS endpoint to deliver subscribed events to.
  - `events` EmailWebhookEvent[], required — At least one event type is required.

## Response `201`

Email webhook created

- EmailWebhookResponse
  - `data` EmailWebhook, required
    - `id` string, uuid, required
    - `record_type` 'email_webhook', required
    - `url` string, uri, required — HTTPS endpoint to deliver subscribed events to.
    - `events` EmailWebhookEvent[], required — Allowlist of event types delivered to this webhook. At least one event is required — there is no default-to-all.
    - `domain_id` string, uuid, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `404` — Resource not found
- `422` — Validation failed
- `500` — Internal server error

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/versions/8f5f4e537994/schema)
