Skip to content

Domain Verification

Verifying your domain proves to receiving mail servers that you’ve authorized RelayPost to send on your behalf. This significantly improves inbox placement.

When you add a domain, RelayPost generates:

  • A DKIM key pair — used to cryptographically sign your emails
  • DNS records — that you add to your domain’s DNS settings

Once the records are in place, RelayPost verifies them and marks your domain as verified.

  1. Add the domain

    POST /api/v1/domains

    Terminal window
    curl -X POST https://relaypost.dev/api/v1/domains \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '{ "domain": "yourapp.com" }'

    Response:

    {
    "data": {
    "id": "dom_abc123",
    "domain": "yourapp.com",
    "is_verified": false,
    "spf_verified": false,
    "dkim_verified": false,
    "dkim_selector": "relaypost",
    "dkim_public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4...",
    "dns_records": [
    {
    "type": "TXT",
    "name": "relaypost._domainkey.yourapp.com",
    "value": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4..."
    },
    {
    "type": "TXT",
    "name": "yourapp.com",
    "value": "v=spf1 include:relaypost.dev ~all"
    }
    ],
    "created_at": "2025-01-15T10:30:00.000Z"
    }
    }

    The response includes the dkim_selector and dkim_public_key you’ll need for DNS.

  2. Add DNS records

    Add these records at your DNS provider (Cloudflare, Route 53, Namecheap, etc.):

    DKIM record (TXT)

    FieldValue
    TypeTXT
    Name{dkimSelector}._domainkey.yourapp.com
    Valuev=DKIM1; k=rsa; p={dkimPublicKey}

    SPF record (TXT)

    FieldValue
    TypeTXT
    Nameyourapp.com
    Valuev=spf1 include:relaypost.dev ~all
  3. Trigger verification

    DNS propagation can take up to 48 hours, but usually completes within minutes. Once propagated:

    GET /api/v1/domains/:id/verify

    Terminal window
    curl "https://relaypost.dev/api/v1/domains/dom_abc123/verify" \
    -H "Authorization: Bearer YOUR_API_KEY"

    Response:

    {
    "data": {
    "id": "dom_abc123",
    "domain": "yourapp.com",
    "is_verified": true,
    "spf_verified": true,
    "dkim_verified": true,
    "dkim_selector": "relaypost",
    "dkim_public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4...",
    "verified_at": "2025-01-15T11:00:00.000Z",
    "created_at": "2025-01-15T10:30:00.000Z"
    }
    }

    The response shows which checks passed. Both spf_verified and dkim_verified must be true for full verification.

GET /api/v1/domains

Terminal window
curl "https://relaypost.dev/api/v1/domains" \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
"data": [
{
"id": "dom_abc123",
"domain": "yourapp.com",
"is_verified": true,
"spf_verified": true,
"dkim_verified": true,
"dkim_selector": "relaypost",
"dkim_public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4...",
"verified_at": "2025-01-15T11:00:00.000Z",
"created_at": "2025-01-15T10:30:00.000Z"
}
]
}
IssueSolution
SPF failsMake sure include:relaypost.dev is in your SPF record and you don’t have multiple SPF records
DKIM failsCheck the selector name matches exactly: {selector}._domainkey.yourapp.com
Both failDNS may not have propagated yet — wait 15-30 minutes and try again
Still failingSome DNS providers add quotes around TXT values automatically — make sure there aren’t double quotes