Add a sending domain

Registers a domain for sending and returns it with the DNS records required to verify ownership and configure DKIM.

POST
/v1/email/domains

Registers a domain for sending and returns it with the DNS records required to verify ownership and configure DKIM. Responds with 201. Supplying a connection attaches the domain to that DNS account; the domain must sit inside the zone given with it. Adding a domain also commits the provider setup that converges it, so a provider at its identity limit refuses here with 429 and no domain is created.

x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

domain*string
connection?|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/email/domains" \  -H "Content-Type: application/json" \  -d '{    "domain": "string"  }'
{  "id": "string",  "domain": "string",  "phase": "dns-setup",  "dkimSelector": "string",  "dkimPublicKey": "string",  "dnsRecords": [    {      "type": "A",      "name": "string",      "value": "string",      "ttl": "string",      "description": "string",      "priority": 0    }  ],  "verifiedAt": "string",  "isDefault": true,  "defaultSenderId": "string",  "deliverability": {    "bounceRate": 0,    "complaintRate": 0,    "windowSends": 0,    "sendingStatus": "enabled"  },  "createdAt": "string",  "updatedAt": "string"}

Related documentation