Add and verify sending domains
Before sending email from your own domain, you must add and verify it with DNS records (DKIM, SPF, DMARC).
/v1/send/domainsList all domains with their verification status and DNS records.
statusstringpendingverifiedfailedcurl "https://api.do.dev/v1/send/domains" \
-H "Authorization: Bearer YOUR_API_KEY"{
"domains": [
{
"id": "domain_abc123",
"domain": "mail.example.com",
"status": "verified",
"dkimStatus": "success",
"isActive": true,
"dnsRecords": [
{
"type": "CNAME",
"name": "token._domainkey.mail.example.com",
"value": "token.dkim.amazonses.com",
"purpose": "dkim",
"verified": true
}
]
}
],
"stats": { "total": 2, "verified": 1, "pending": 1, "failed": 0 }
}/v1/send/domainsAdd a new domain for email sending. Returns DNS records that must be configured.
domainstringrequiredorganizationIdstringcurl -X POST "https://api.do.dev/v1/send/domains" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "domain": "mail.example.com" }'{
"id": "domain_abc123",
"domain": "mail.example.com",
"status": "pending",
"dnsRecords": [
{ "type": "CNAME", "name": "xxx._domainkey.mail.example.com", "value": "xxx.dkim.amazonses.com", "purpose": "dkim" },
{ "type": "TXT", "name": "mail.example.com", "value": "v=spf1 include:amazonses.com ~all", "purpose": "spf" },
{ "type": "TXT", "name": "_dmarc.mail.example.com", "value": "v=DMARC1; p=none;", "purpose": "dmarc" }
]
}After adding a domain, configure the DNS records shown in the response, then call the verify endpoint.
/v1/send/domains/{id}/verifyCheck DNS records and update domain verification status.
/v1/send/domains/{id}Remove a domain and its SES identity.