API Reference · Domains

Add domain

Add a sending domain. Returns the DNS records to publish (SPF, DKIM, DKIM2, and a recommended DMARC).

POST/v1/domains

Headers

Authorizationstringrequired
Your API key as a bearer token: Bearer rk_your_api_key. You can also use the X-Api-Key header.

Body parameters

domainstringrequired
The domain you want to send from, e.g. acme.co.

Request

curl -X POST https://api.raanse.com/v1/domains \
  -H "Authorization: Bearer rk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
        "domain": "acme.co"
      }'

Response

201
{
  "success": true,
  "message": "Resource created",
  "statusCode": 201,
  "data": {
    "id": "01JABCDXYZ0000000000000000",
    "domain": "acme.co",
    "overallStatus": "Pending",
    "dnsRecords": [
      { "purpose": "SPF (TXT)", "type": "TXT", "name": "acme.co", "value": "v=spf1 include:...", "ttl": 3600 },
      { "purpose": "DKIM (CNAME)", "type": "CNAME", "name": "selector1._domainkey.acme.co", "value": "...", "ttl": 3600 }
    ],
    "verifiedAt": null
  }
}