Sender Domains
Get the sender domain
Get the sending domain configured for the current service provider, or null when none is configured. A service provider may configure at most one sender domain.
Request
curl -G https://YOUR_DOMAIN/api/notifications/serviceProviders/senderDomains \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"Register a sender domain
Register a sending domain for the current service provider and return the DNS records that must be published before it can be verified. Any existing sender domain for the service provider is replaced. The sending address must be on the registered domain, or on a domain that the registered domain is a subdomain of, so that DKIM signatures align with the From header.
Required attributes
- Name
domain- Type
- string
- Description
- The domain to register for sending. A dedicated subdomain such as mg.example.com is recommended so that sending reputation is isolated. mg.example.com
- Name
from_email- Type
- string
- Description
- The address notifications are sent from. Must be aligned with the registered domain. info@example.com
Request
curl -X POST https://YOUR_DOMAIN/api/notifications/serviceProviders/senderDomains \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"domain": "mg.example.com",
"from_email": "info@example.com"
}'Update the sending address
Change the address notifications are sent from without re-registering the domain or republishing DNS records. The address must remain aligned with the registered domain.
Required attributes
- Name
from_email- Type
- string
- Description
- The address notifications are sent from. Must be aligned with the registered domain. noreply@example.com
Request
curl -X PATCH https://YOUR_DOMAIN/api/notifications/serviceProviders/senderDomains \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"from_email": "noreply@example.com"
}'Delete the sender domain
Remove the sender domain for the current service provider. Notifications fall back to being sent from the service provider's support email afterwards.
Request
curl -X DELETE https://YOUR_DOMAIN/api/notifications/serviceProviders/senderDomains \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"Verify the sender domain
Force an immediate check of the sender domain's DNS records and return the updated status. Verification is also retried automatically in the background after registration, so this is only needed to check sooner.
Request
curl -X POST https://YOUR_DOMAIN/api/notifications/serviceProviders/senderDomains/verify \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"