Domains

Add a sending domain

Add a new domain for sending emails. Returns DNS records that must be configured before the domain can be verified.

Required DNS records:

  • SPF - TXT record for sender authentication
  • DKIM - TXT record for email signing
  • Return Path - CNAME for bounce handling

After adding DNS records, call POST /domains/{id}/verify to verify.

post/domains

Request body

namestring required

Domain name (e.g., "mail.example.com")

Example request

{
  "name": "mail.mycompany.com"
}

Response

Domain added

successtrue required

Example response

{
  "data": {
    "id": 123,
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "name": "example.com",
    "verified": true,
    "verifiedAt": "2024-01-15T10:30:00Z",
    "dnsRecords": {
      "spf": {
        "type": "TXT",
        "name": "@",
        "value": "v=spf1 include:spf.arkhq.io ~all",
        "status": "OK"
      },
      "dkim": {
        "type": "TXT",
        "name": "@",
        "value": "v=spf1 include:spf.arkhq.io ~all",
        "status": "OK"
      },
      "returnPath": {
        "type": "TXT",
        "name": "@",
        "value": "v=spf1 include:spf.arkhq.io ~all",
        "status": "OK"
      }
    },
    "createdAt": "2024-01-10T08:00:00Z"
  },
  "meta": {
    "requestId": "req_V1StGXR8_Z5jdHi6"
  }
}

Changes