unsent
unsent.dev
API Reference

Domains

The Domains API allows you to manage and verify sending domains for your email campaigns.

Base URL

https://api.unsent.dev/v1/domains

Features

Add sending domains

Register new domains for email sending

Domain verification

Automate DNS setup for DKIM, SPF, and DMARC

DNS management

Get DNS records needed for verification

Domain monitoring

Check verification status and health

Regional settings

Configure domains for different AWS regions

Tracking options

Enable open and click tracking per domain

Quick Start

Add a new domain

curl -X POST https://api.unsent.dev/v1/domains \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "yourdomain.com",
    "region": "us-east-1"
  }'

List all domains

curl -X GET https://api.unsent.dev/v1/domains \
  -H "Authorization: Bearer your-api-key"

Verify a domain

curl -X PUT https://api.unsent.dev/v1/domains/{domainId}/verify \
  -H "Authorization: Bearer your-api-key"

DNS Configuration

When you add a domain, Unsent provides DNS records that you need to configure:

Required DNS Records

  1. TXT Record for SPF

    v=spf1 include:amazonses.com ~all
  2. TXT Record for DKIM

    k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...
  3. MX Record (optional)

    10 mail.yourdomain.com

Verification Process

Add domain via API

Configure DNS records with your domain provider

Verify domain via API or automatic check

Start sending emails from your verified domain

API Endpoints

Domain Status

Status Codes

  • NOT_STARTED - Domain added but DNS not configured
  • PENDING - DNS records are being verified
  • SUCCESS - Domain fully verified and ready for sending
  • FAILED - DNS verification failed
  • TEMPORARY_FAILURE - Temporary DNS issues, retry later

Supported Regions

  • us-east-1 - US East (N. Virginia)
  • us-west-2 - US West (Oregon)
  • eu-west-1 - Europe (Ireland)
  • ap-southeast-1 - Asia Pacific (Singapore)

Best Practices

  1. Use a custom domain for better deliverability
  2. Configure all DNS records properly
  3. Monitor domain health regularly
  4. Use separate domains for different types of email
  5. Enable DKIM signing for authentication
  6. Set up DMARC to prevent spoofing
  7. Test with small volumes before scaling

Security Considerations

  • Domains must be owned by your organization
  • DNS records should be kept secure and updated
  • Monitor for unauthorized DNS changes
  • Use TLS for all API communications