Skip to main content
POST
/
v1
/
domains
Create Domain
curl --request POST \
  --url https://api.example.com/v1/domains \
  --header 'Content-Type: application/json' \
  --data '
{
  "domain": "<string>"
}
'
domain
string
required
The domain name to add (e.g., “yourdomain.com”).

Request

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

Response

200
{
  "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.