Skip to Content
API ReferenceSending Domains

Sending Domains API

Manage sending domains for your organization. Sending domains allow you to send emails directly through Mailpulse using your own domain.

List Domains

Retrieve all sending domains configured for your organization.

Endpoint

GET /api/sending-domains

Example Request

curl -X GET NEXT_PUBLIC_BASE_URL/api/sending-domains \ -H "x-api-key: your-api-key"

Example Response

{ "domains": [ { "id": "clx1234...", "domain": "yourdomain.com", "status": "verified", "records": [ { "type": "MX", "name": "send.yourdomain.com", "value": "feedback-smtp.us-east-1.amazonses.com", "status": "verified", "priority": 10 }, { "type": "TXT", "name": "send.yourdomain.com", "value": "v=spf1 include:amazonses.com ~all", "status": "verified" } ], "createdAt": "2026-02-11T10:00:00.000Z" } ] }

Add Domain

Register a new sending domain. This creates the domain in Resend and returns the DNS records that need to be configured.

Endpoint

POST /api/sending-domains

Request Body

FieldTypeRequiredDescription
domainstringYesDomain name (e.g. yourdomain.com)

Example Request

curl -X POST NEXT_PUBLIC_BASE_URL/api/sending-domains \ -H "x-api-key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "domain": "yourdomain.com" }'

Example Response

{ "id": "clx1234...", "domain": "yourdomain.com", "status": "pending", "records": [ { "type": "MX", "name": "send.yourdomain.com", "value": "feedback-smtp.us-east-1.amazonses.com", "status": "not_started", "priority": 10 }, { "type": "TXT", "name": "send.yourdomain.com", "value": "v=spf1 include:amazonses.com ~all", "status": "not_started" }, { "type": "CNAME", "name": "resend._domainkey.yourdomain.com", "value": "...", "status": "not_started" } ], "createdAt": "2026-02-11T10:00:00.000Z" }

Verify Domain

Trigger a DNS verification check for a sending domain.

Endpoint

POST /api/sending-domains/verify

Request Body

FieldTypeRequiredDescription
domainIdstringYesID of the sending domain to verify

Example Request

curl -X POST NEXT_PUBLIC_BASE_URL/api/sending-domains/verify \ -H "x-api-key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "domainId": "clx1234..." }'

Example Response

{ "id": "clx1234...", "domain": "yourdomain.com", "status": "verified", "records": [...], "verified": true }

Remove Domain

Delete a sending domain from your organization.

Endpoint

DELETE /api/sending-domains/:id

Example Request

curl -X DELETE NEXT_PUBLIC_BASE_URL/api/sending-domains/clx1234 \ -H "x-api-key: your-api-key"

Example Response

{ "success": true }

DNS Setup

After adding a domain, you’ll receive DNS records to configure with your DNS provider. Typically these include:

TypePurpose
MXMail exchange for bounce handling
TXT (SPF)Authorize Mailpulse to send on your behalf
CNAME (DKIM)Email authentication signature

DNS propagation can take up to 48 hours. The dashboard auto-checks verification status periodically.

Error Responses

StatusDescription
400 Bad RequestInvalid domain format or Resend API error
401 UnauthorizedInvalid or missing API key
404 Not FoundDomain not found
409 ConflictDomain already added
Last updated on
Mailpulse Documentation