# Domain events

> Sending domains created, updated or deleted.



## domain.created

> Sent when a sending domain is added to the workspace. Includes the DNS records to publish, all with the status pending.

# domain.created

Sent when a sending domain is added to the workspace, for example with [Create a domain](/docs/api-reference/domains/create/). The payload includes the DNS records to publish; they all start as `pending`. See [Add a domain](/docs/domains/add-a-domain/).

Webhook requests carry a JSON array of events like this one; see [Webhook requests](/docs/webhooks/webhook-requests/).

```json
{
  "event_id": "evt_2xLc9Rr4Tn6Wb1Qm8Ks3Vf0Hd7a",
  "type": "domain.created",
  "object": {
    "id": "dom_2xLh4Dy9Ts6Zp1Ve3Ao8Lf5Mu0h",
    "object": "domain",
    "name": "acme.com",
    "tracking_key": null,
    "inbound_key": null,
    "track_loads": false,
    "track_clicks": false,
    "created_at": "2026-10-01T10:02:11.583000+00:00",
    "dns_records": [
      {
        "required": true,
        "type": "MX",
        "name": "emailit.acme.com",
        "value": "feedback-smtp.ffdc-1.emailit.com",
        "priority": 10,
        "ttl": "auto",
        "status": "pending",
        "error": null
      },
      {
        "required": true,
        "type": "TXT",
        "name": "emailit.acme.com",
        "value": "v=spf1 include:_spf.emailit.com ~all",
        "priority": null,
        "ttl": "auto",
        "status": "pending",
        "error": null
      },
      {
        "required": true,
        "type": "TXT",
        "name": "emailit._domainkey.acme.com",
        "value": "v=DKIM1; t=s; h=sha256; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu4Vd1kQ…IDAQAB;",
        "priority": null,
        "ttl": "auto",
        "status": "pending",
        "error": null
      },
      {
        "required": false,
        "type": "TXT",
        "name": "_dmarc.acme.com",
        "value": "v=DMARC1; p=none;",
        "priority": null,
        "ttl": "auto",
        "status": "pending",
        "error": null
      },
      {
        "required": false,
        "type": "CNAME",
        "name": "go.acme.com",
        "value": "go.emailitmail.com",
        "priority": null,
        "ttl": "auto",
        "status": "pending",
        "error": null
      },
      {
        "required": false,
        "type": "MX",
        "name": "inbound.acme.com",
        "value": "inbound.emailitmail.com",
        "priority": 10,
        "ttl": "auto",
        "status": "pending",
        "error": null
      }
    ]
  },
  "data": {
    "object": {
      "id": "dom_2xLh4Dy9Ts6Zp1Ve3Ao8Lf5Mu0h",
      "object": "domain",
      "name": "acme.com",
      "tracking_key": null,
      "inbound_key": null,
      "track_loads": false,
      "track_clicks": false,
      "created_at": "2026-10-01T10:02:11.583000+00:00",
      "dns_records": [
        {
          "required": true,
          "type": "MX",
          "name": "emailit.acme.com",
          "value": "feedback-smtp.ffdc-1.emailit.com",
          "priority": 10,
          "ttl": "auto",
          "status": "pending",
          "error": null
        },
        {
          "required": true,
          "type": "TXT",
          "name": "emailit.acme.com",
          "value": "v=spf1 include:_spf.emailit.com ~all",
          "priority": null,
          "ttl": "auto",
          "status": "pending",
          "error": null
        },
        {
          "required": true,
          "type": "TXT",
          "name": "emailit._domainkey.acme.com",
          "value": "v=DKIM1; t=s; h=sha256; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu4Vd1kQ…IDAQAB;",
          "priority": null,
          "ttl": "auto",
          "status": "pending",
          "error": null
        },
        {
          "required": false,
          "type": "TXT",
          "name": "_dmarc.acme.com",
          "value": "v=DMARC1; p=none;",
          "priority": null,
          "ttl": "auto",
          "status": "pending",
          "error": null
        },
        {
          "required": false,
          "type": "CNAME",
          "name": "go.acme.com",
          "value": "go.emailitmail.com",
          "priority": null,
          "ttl": "auto",
          "status": "pending",
          "error": null
        },
        {
          "required": false,
          "type": "MX",
          "name": "inbound.acme.com",
          "value": "inbound.emailitmail.com",
          "priority": 10,
          "ttl": "auto",
          "status": "pending",
          "error": null
        }
      ]
    }
  }
}
```

## Fields

- `event_id` (string): Event ID (`evt_…`). A retried request carries the same ID, so use it to skip events you already handled. You can also look the event up with [Retrieve an event](/docs/api-reference/events/get/).

- `type` (string): Always `domain.created`.

- `object` (object): The domain the event describes. Its fields are listed below.

- `data.object` (object): The same object again, in the shape that the [Events API](/docs/api-reference/events/get/) returns in `data`.

### Domain object

- `id` (string): Domain ID (`dom_…`).

- `object` (string): Always `domain`.

- `name` (string): Domain name, for example `acme.com`.

- `tracking_key` (string | null): Custom subdomain for the tracking CNAME, or `null` for the default `go`.

- `inbound_key` (string | null): Custom subdomain for the inbound MX record, or `null` for the default `inbound`.

- `track_loads` (boolean): Whether open tracking is on by default for emails from this domain.

- `track_clicks` (boolean): Whether click tracking is on by default for emails from this domain.

- `created_at` (string): When the domain was added, in ISO 8601 with a UTC offset.

- `dns_records` (object[]): DNS records for the domain. See [DNS records](/docs/domains/dns-records/).

- `dns_records[].required` (boolean): `true` for the return-path MX, SPF and DKIM records, which are needed for verification. DMARC, tracking and inbound records are optional.

- `dns_records[].type` (string): `MX`, `TXT` or `CNAME`.

- `dns_records[].name` (string): Host name of the record.

- `dns_records[].value` (string): Value to publish.

- `dns_records[].priority` (integer | null): MX priority, or `null` for other types.

- `dns_records[].ttl` (string): Always `auto`.

- `dns_records[].status` (string): Result of the last DNS check: `pending`, `ok`, `missing` or `invalid`.

- `dns_records[].error` (string | null): Why the last check failed, or `null`.

---
Source: https://emailit.com/docs/webhooks/events/domain/domain-created/

## domain.updated

> Sent when a sending domain's settings change, such as tracking or inbound options. Verification checks don't send it.

# domain.updated

Sent when a domain's settings change, for example its tracking or inbound options, with [Update a domain](/docs/api-reference/domains/update/) or in the dashboard. DNS checks and verification don't send this event; use [Retrieve a domain](/docs/api-reference/domains/get/) to follow the verification status.

Webhook requests carry a JSON array of events like this one; see [Webhook requests](/docs/webhooks/webhook-requests/).

```json
{
  "event_id": "evt_2xLc9Rr4Tn6Wb1Qm8Ks3Vf0Hd7a",
  "type": "domain.updated",
  "object": {
    "id": "dom_2xLh4Dy9Ts6Zp1Ve3Ao8Lf5Mu0h",
    "object": "domain",
    "name": "acme.com",
    "verified_at": "2026-09-28T08:40:19.226000+00:00",
    "tracking_key": null,
    "inbound_key": null,
    "track_loads": true,
    "track_clicks": true,
    "dns_checked_at": "2026-10-01T03:00:07.512000+00:00",
    "created_at": "2026-09-28T08:31:52.690000+00:00",
    "dns_records": [
      {
        "required": true,
        "type": "MX",
        "name": "emailit.acme.com",
        "value": "feedback-smtp.ffdc-1.emailit.com",
        "priority": 10,
        "ttl": "auto",
        "status": "ok",
        "error": null
      },
      {
        "required": true,
        "type": "TXT",
        "name": "emailit.acme.com",
        "value": "v=spf1 include:_spf.emailit.com ~all",
        "priority": null,
        "ttl": "auto",
        "status": "ok",
        "error": null
      },
      {
        "required": true,
        "type": "TXT",
        "name": "emailit._domainkey.acme.com",
        "value": "v=DKIM1; t=s; h=sha256; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu4Vd1kQ…IDAQAB;",
        "priority": null,
        "ttl": "auto",
        "status": "ok",
        "error": null
      },
      {
        "required": false,
        "type": "TXT",
        "name": "_dmarc.acme.com",
        "value": "v=DMARC1; p=none;",
        "priority": null,
        "ttl": "auto",
        "status": "pending",
        "error": null
      },
      {
        "required": false,
        "type": "CNAME",
        "name": "go.acme.com",
        "value": "go.emailitmail.com",
        "priority": null,
        "ttl": "auto",
        "status": "pending",
        "error": null
      },
      {
        "required": false,
        "type": "MX",
        "name": "inbound.acme.com",
        "value": "inbound.emailitmail.com",
        "priority": 10,
        "ttl": "auto",
        "status": "pending",
        "error": null
      }
    ]
  },
  "data": {
    "object": {
      "id": "dom_2xLh4Dy9Ts6Zp1Ve3Ao8Lf5Mu0h",
      "object": "domain",
      "name": "acme.com",
      "verified_at": "2026-09-28T08:40:19.226000+00:00",
      "tracking_key": null,
      "inbound_key": null,
      "track_loads": true,
      "track_clicks": true,
      "dns_checked_at": "2026-10-01T03:00:07.512000+00:00",
      "created_at": "2026-09-28T08:31:52.690000+00:00",
      "dns_records": [
        {
          "required": true,
          "type": "MX",
          "name": "emailit.acme.com",
          "value": "feedback-smtp.ffdc-1.emailit.com",
          "priority": 10,
          "ttl": "auto",
          "status": "ok",
          "error": null
        },
        {
          "required": true,
          "type": "TXT",
          "name": "emailit.acme.com",
          "value": "v=spf1 include:_spf.emailit.com ~all",
          "priority": null,
          "ttl": "auto",
          "status": "ok",
          "error": null
        },
        {
          "required": true,
          "type": "TXT",
          "name": "emailit._domainkey.acme.com",
          "value": "v=DKIM1; t=s; h=sha256; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu4Vd1kQ…IDAQAB;",
          "priority": null,
          "ttl": "auto",
          "status": "ok",
          "error": null
        },
        {
          "required": false,
          "type": "TXT",
          "name": "_dmarc.acme.com",
          "value": "v=DMARC1; p=none;",
          "priority": null,
          "ttl": "auto",
          "status": "pending",
          "error": null
        },
        {
          "required": false,
          "type": "CNAME",
          "name": "go.acme.com",
          "value": "go.emailitmail.com",
          "priority": null,
          "ttl": "auto",
          "status": "pending",
          "error": null
        },
        {
          "required": false,
          "type": "MX",
          "name": "inbound.acme.com",
          "value": "inbound.emailitmail.com",
          "priority": 10,
          "ttl": "auto",
          "status": "pending",
          "error": null
        }
      ]
    }
  }
}
```

## Fields

- `event_id` (string): Event ID (`evt_…`). A retried request carries the same ID, so use it to skip events you already handled. You can also look the event up with [Retrieve an event](/docs/api-reference/events/get/).

- `type` (string): Always `domain.updated`.

- `object` (object): The domain the event describes. Its fields are listed below.

- `data.object` (object): The same object again, in the shape that the [Events API](/docs/api-reference/events/get/) returns in `data`.

### Domain object

- `id` (string): Domain ID (`dom_…`).

- `object` (string): Always `domain`.

- `name` (string): Domain name, for example `acme.com`.

- `verified_at` (string | null): When the domain was verified, or `null` if it isn't verified.

- `tracking_key` (string | null): Custom subdomain for the tracking CNAME, or `null` for the default `go`.

- `inbound_key` (string | null): Custom subdomain for the inbound MX record, or `null` for the default `inbound`.

- `track_loads` (boolean): Whether open tracking is on by default for emails from this domain.

- `track_clicks` (boolean): Whether click tracking is on by default for emails from this domain.

- `dns_checked_at` (string | null): When Emailit last checked the DNS records.

- `created_at` (string): When the domain was added, in ISO 8601 with a UTC offset.

- `dns_records` (object[]): DNS records for the domain. See [DNS records](/docs/domains/dns-records/).

- `dns_records[].required` (boolean): `true` for the return-path MX, SPF and DKIM records, which are needed for verification. DMARC, tracking and inbound records are optional.

- `dns_records[].type` (string): `MX`, `TXT` or `CNAME`.

- `dns_records[].name` (string): Host name of the record.

- `dns_records[].value` (string): Value to publish.

- `dns_records[].priority` (integer | null): MX priority, or `null` for other types.

- `dns_records[].ttl` (string): Always `auto`.

- `dns_records[].status` (string): Result of the last DNS check: `pending`, `ok`, `missing` or `invalid`.

- `dns_records[].error` (string | null): Why the last check failed, or `null`.

---
Source: https://emailit.com/docs/webhooks/events/domain/domain-updated/

## domain.deleted

> Sent when a sending domain is deleted from the workspace. The payload is the domain as it was before deletion.

# domain.deleted

Sent when a sending domain is deleted, for example with [Delete a domain](/docs/api-reference/domains/delete/). The payload is the domain as it was before it was deleted.

Webhook requests carry a JSON array of events like this one; see [Webhook requests](/docs/webhooks/webhook-requests/).

```json
{
  "event_id": "evt_2xLc9Rr4Tn6Wb1Qm8Ks3Vf0Hd7a",
  "type": "domain.deleted",
  "object": {
    "id": "dom_2xLh4Dy9Ts6Zp1Ve3Ao8Lf5Mu0h",
    "object": "domain",
    "name": "acme.com",
    "verified_at": "2026-09-28T08:40:19.226000+00:00",
    "tracking_key": null,
    "inbound_key": null,
    "track_loads": true,
    "track_clicks": true,
    "dns_checked_at": "2026-10-01T03:00:07.512000+00:00",
    "created_at": "2026-09-28T08:31:52.690000+00:00",
    "dns_records": [
      {
        "required": true,
        "type": "MX",
        "name": "emailit.acme.com",
        "value": "feedback-smtp.ffdc-1.emailit.com",
        "priority": 10,
        "ttl": "auto",
        "status": "ok",
        "error": null
      },
      {
        "required": true,
        "type": "TXT",
        "name": "emailit.acme.com",
        "value": "v=spf1 include:_spf.emailit.com ~all",
        "priority": null,
        "ttl": "auto",
        "status": "ok",
        "error": null
      },
      {
        "required": true,
        "type": "TXT",
        "name": "emailit._domainkey.acme.com",
        "value": "v=DKIM1; t=s; h=sha256; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu4Vd1kQ…IDAQAB;",
        "priority": null,
        "ttl": "auto",
        "status": "ok",
        "error": null
      },
      {
        "required": false,
        "type": "TXT",
        "name": "_dmarc.acme.com",
        "value": "v=DMARC1; p=none;",
        "priority": null,
        "ttl": "auto",
        "status": "pending",
        "error": null
      },
      {
        "required": false,
        "type": "CNAME",
        "name": "go.acme.com",
        "value": "go.emailitmail.com",
        "priority": null,
        "ttl": "auto",
        "status": "pending",
        "error": null
      },
      {
        "required": false,
        "type": "MX",
        "name": "inbound.acme.com",
        "value": "inbound.emailitmail.com",
        "priority": 10,
        "ttl": "auto",
        "status": "pending",
        "error": null
      }
    ]
  },
  "data": {
    "object": {
      "id": "dom_2xLh4Dy9Ts6Zp1Ve3Ao8Lf5Mu0h",
      "object": "domain",
      "name": "acme.com",
      "verified_at": "2026-09-28T08:40:19.226000+00:00",
      "tracking_key": null,
      "inbound_key": null,
      "track_loads": true,
      "track_clicks": true,
      "dns_checked_at": "2026-10-01T03:00:07.512000+00:00",
      "created_at": "2026-09-28T08:31:52.690000+00:00",
      "dns_records": [
        {
          "required": true,
          "type": "MX",
          "name": "emailit.acme.com",
          "value": "feedback-smtp.ffdc-1.emailit.com",
          "priority": 10,
          "ttl": "auto",
          "status": "ok",
          "error": null
        },
        {
          "required": true,
          "type": "TXT",
          "name": "emailit.acme.com",
          "value": "v=spf1 include:_spf.emailit.com ~all",
          "priority": null,
          "ttl": "auto",
          "status": "ok",
          "error": null
        },
        {
          "required": true,
          "type": "TXT",
          "name": "emailit._domainkey.acme.com",
          "value": "v=DKIM1; t=s; h=sha256; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu4Vd1kQ…IDAQAB;",
          "priority": null,
          "ttl": "auto",
          "status": "ok",
          "error": null
        },
        {
          "required": false,
          "type": "TXT",
          "name": "_dmarc.acme.com",
          "value": "v=DMARC1; p=none;",
          "priority": null,
          "ttl": "auto",
          "status": "pending",
          "error": null
        },
        {
          "required": false,
          "type": "CNAME",
          "name": "go.acme.com",
          "value": "go.emailitmail.com",
          "priority": null,
          "ttl": "auto",
          "status": "pending",
          "error": null
        },
        {
          "required": false,
          "type": "MX",
          "name": "inbound.acme.com",
          "value": "inbound.emailitmail.com",
          "priority": 10,
          "ttl": "auto",
          "status": "pending",
          "error": null
        }
      ]
    }
  }
}
```

## Fields

- `event_id` (string): Event ID (`evt_…`). A retried request carries the same ID, so use it to skip events you already handled. You can also look the event up with [Retrieve an event](/docs/api-reference/events/get/).

- `type` (string): Always `domain.deleted`.

- `object` (object): The domain the event describes. Its fields are listed below.

- `data.object` (object): The same object again, in the shape that the [Events API](/docs/api-reference/events/get/) returns in `data`.

### Domain object

- `id` (string): Domain ID (`dom_…`).

- `object` (string): Always `domain`.

- `name` (string): Domain name, for example `acme.com`.

- `verified_at` (string | null): When the domain was verified, or `null` if it isn't verified.

- `tracking_key` (string | null): Custom subdomain for the tracking CNAME, or `null` for the default `go`.

- `inbound_key` (string | null): Custom subdomain for the inbound MX record, or `null` for the default `inbound`.

- `track_loads` (boolean): Whether open tracking is on by default for emails from this domain.

- `track_clicks` (boolean): Whether click tracking is on by default for emails from this domain.

- `dns_checked_at` (string | null): When Emailit last checked the DNS records.

- `created_at` (string): When the domain was added, in ISO 8601 with a UTC offset.

- `dns_records` (object[]): DNS records for the domain. See [DNS records](/docs/domains/dns-records/).

- `dns_records[].required` (boolean): `true` for the return-path MX, SPF and DKIM records, which are needed for verification. DMARC, tracking and inbound records are optional.

- `dns_records[].type` (string): `MX`, `TXT` or `CNAME`.

- `dns_records[].name` (string): Host name of the record.

- `dns_records[].value` (string): Value to publish.

- `dns_records[].priority` (integer | null): MX priority, or `null` for other types.

- `dns_records[].ttl` (string): Always `auto`.

- `dns_records[].status` (string): Result of the last DNS check: `pending`, `ok`, `missing` or `invalid`.

- `dns_records[].error` (string | null): Why the last check failed, or `null`.

---
Source: https://emailit.com/docs/webhooks/events/domain/domain-deleted/
