Domain Status
Pending
DNS records not yet configured
Verified
Domain is verified and ready
Failed
Verification failed
Add a Domain
POST/v1/domains
Add a new sending domain to your account. Returns DNS records to configure.
Request Body
Domain name (e.g., yourdomain.com)
curl -X POST https://www.unosend.co/api/v1/domains \
-H "Authorization: Bearer un_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"domain": "yourdomain.com"
}'
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"domain": "yourdomain.com",
"status": "pending",
"dns_records": [
{
"type": "CNAME",
"name": "mail.yourdomain.com",
"value": "mail.unosend.co",
"status": "pending",
"purpose": "mail_cname"
},
{
"type": "CNAME",
"name": "s1._domainkey.yourdomain.com",
"value": "s1.domainkey.unosend.co",
"status": "pending",
"purpose": "dkim1"
},
{
"type": "CNAME",
"name": "s2._domainkey.yourdomain.com",
"value": "s2.domainkey.unosend.co",
"status": "pending",
"purpose": "dkim2"
}
],
"created_at": "2024-01-15T10:30:00.000Z"
}
List Domains
GET/v1/domains
Get a list of all domains in your account.
curl https://www.unosend.co/api/v1/domains \
-H "Authorization: Bearer un_your_api_key"
Response
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"domain": "yourdomain.com",
"status": "verified",
"dns_records": [...],
"verified_at": "2024-01-15T12:00:00.000Z",
"created_at": "2024-01-15T10:30:00.000Z"
}
]
}
Verify Domain
POST/v1/domains/:id/verify
Trigger DNS verification for a domain. Call this after configuring your DNS records.
curl -X POST https://www.unosend.co/api/v1/domains/550e8400-e29b-41d4-a716-446655440000/verify \
-H "Authorization: Bearer un_your_api_key"
DNS Configuration
Add the returned DNS records to your domain provider. The records typically include:
| Record Purpose | Type | Description |
|---|
mail_cname | CNAME | Routes mail through Unosend |
dkim1 | CNAME | First DKIM key for authentication |
dkim2 | CNAME | Second DKIM key for rotation |
DNS changes can take up to 48 hours to propagate. You can verify your domain once the records are live.
Delete Domain
DELETE/v1/domains/:id
Remove a domain from your account. You will no longer be able to send from this domain.
curl -X DELETE https://www.unosend.co/api/v1/domains/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer un_your_api_key"