Skip to main content
POST
/
domains
Create Domain
curl --request POST \
  --url https://api.unosend.co/domains \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.unosend.co/llms.txt

Use this file to discover all available pages before exploring further.

name
string
required
The domain name to add (e.g., “yourdomain.com”).

Request

curl -X POST https://api.unosend.co/domains \
  -H "Authorization: Bearer un_xxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "yourdomain.com"
  }'

Response

201
{
  "success": true,
  "data": {
    "id": "dom_123",
    "domain": "yourdomain.com",
    "status": "pending",
    "dns_records": [
      {
        "type": "TXT",
        "name": "_unosend",
        "value": "unosend-verification=abc123",
        "purpose": "verification"
      },
      {
        "type": "TXT",
        "name": "@",
        "value": "v=spf1 include:_spf.unosend.co ~all",
        "purpose": "spf"
      },
      {
        "type": "CNAME",
        "name": "unosend._domainkey",
        "value": "dkim.unosend.co",
        "purpose": "dkim"
      }
    ],
    "created_at": "2024-01-15T10:30:00.000Z"
  }
}
After creating a domain, add the provided DNS records to your domain provider, then call the verify endpoint.
All plans include unlimited domains. Domain creation is rate limited to 10 per hour per organization to prevent abuse.