Add a domain
POST/api/v1/email/domains
POST /email/domains
curl -X POST 'https://www.unitpost.com/api/v1/email/domains' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{
"name": "yourdomain.com"
}'Response · 201
{
"object": "domain",
"id": "id_123",
"name": "Example",
"status": "pending",
"records": [
{
"type": "string",
"name": "Example",
"value": "string",
"priority": 0
}
],
"dkim_selector": "string",
"open_tracking": false,
"click_tracking": false,
"tls": "opportunistic",
"tracking_subdomain": "string",
"tracking_verified_at": "2026-01-01T00:00:00.000Z",
"capabilities": {
"sending": "enabled",
"receiving": "enabled"
},
"receiving": {
"status": "disabled",
"record": {
"type": "string",
"name": "Example",
"value": "string",
"priority": 0
},
"checks": {
"mx_found": false,
"mx_lowest_priority": false,
"other_mx_found": false
},
"checked_at": "2026-01-01T00:00:00.000Z"
},
"verified_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}Add a domain you'll send email from. The response includes the DNS records (SPF, DKIM, and so on) to publish with your DNS provider. Once they're published, trigger a check with Verify a domain — sending from the domain is blocked until it verifies. Requires the domains:write capability.
Request body1 field
| Field | Type | Description |
|---|---|---|
namerequired | string | — |
Response · 201 fields16 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
namerequired | string | — |
statusrequired | enumpending | verifying | verified | degraded | failed | — |
recordsrequired | object[] | null | — |
dkim_selectorrequired | string | null | — |
open_trackingrequired | boolean | null | — |
click_trackingrequired | boolean | null | — |
tlsrequired | enumopportunistic | enforced | — |
tracking_subdomainrequired | string | null | — |
tracking_verified_atrequired | string | null | When tracked links and open pixels started using the custom tracking host (`tracking_subdomain`). Non-null only while sends actually use it: the domain is verified (or degraded) and the host's last check proved it answers over HTTPS. Otherwise null, and links use the default tracking host. A host that stops answering, or a domain that's no longer verified, goes back to null. |
capabilitiesrequired | object | — |
receivingrequired | object | Receiving setup: the MX record to publish and the last check of it. |
verified_atrequired | string | null | — |
created_atrequired | string | — |
updated_atrequired | string | — |
201401409422