New Domain Webhooks

Receive real-time notifications when domains are created, updated, or deleted.

Vitor CapretzVitor Capretz

Domains are a critical part of email deliverability. They are used to authenticate your messages and protect your reputation.

Some companies allow their users to configure emails in their own apps using custom domains. This feature is essential for deliverability, white-labeling, and branding purposes.

Previously, you had to manually check the dashboard to see if a domain was verified or implement a pulling mechanism using the API to get this information.

Now, you can receive real-time notifications when domains are created, updated, or deleted.

What are the event types?

The new domain webhooks support the following event types:

  • domain.created
  • domain.updated
  • domain.deleted

How to consume these events?

Let's say you want to be notified when a domain is verified.

You can set up webhooks in the dashboard to listen for the domain.updated event type.

Once these webhooks are configured, you will receive a HTTP request with a payload that looks like this:

{
"type": "domain.updated",
"created_at": "2024-11-17T19:32:22.980Z",
"data": {
"id": "d91cd9bd-1176-453e-8fc1-35364d380206",
"name": "example.com",
"status": "verified",
"created_at": "2024-04-26T20:21:26.347412+00:00",
"region": "us-east-1",
"records": [
{
"record": "SPF",
"name": "send",
"type": "MX",
"ttl": "Auto",
"status": "verified",
"value": "feedback-smtp.us-east-1.amazonses.com",
"priority": 10
},
{
"record": "SPF",
"name": "send",
"value": "\"v=spf1 include:amazonses.com ~all\"",
"type": "TXT",
"ttl": "Auto",
"status": "verified"
},
{
"record": "DKIM",
"name": "resend._domainkey",
"value": "p=MIGfMA0c13GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDsc4Lh8xilsngyKEgN2S84+21gn+x6SEXtjWvPiAAmnmggr5FWG42WnqczpzQ/mNblqHz4CDwUum6LtY6SdoOlDmrhvp5khA3cd661W9FlK3yp7+jVACQElS7d9O6jv8VsBbVg4COess3gyLE5RyxqF1vYsrEXqyM8TBz1n5AGkQIDAQA2",
"type": "TXT",
"status": "verified",
"ttl": "Auto"
}
]
}
}

What's next?

We are excited to see what you build with these new webhooks.

Check the webhooks documentation to learn more about each event and its payload.

If you have any questions or ideas to make them better, please let us know.