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-domainsExample 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-domainsRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | Domain 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/verifyRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
domainId | string | Yes | ID 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/:idExample 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:
| Type | Purpose |
|---|---|
| MX | Mail 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
| Status | Description |
|---|---|
400 Bad Request | Invalid domain format or Resend API error |
401 Unauthorized | Invalid or missing API key |
404 Not Found | Domain not found |
409 Conflict | Domain already added |
Last updated on