cURL
curl --request POST \ --url https://api.example.com/v1/domains \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "region": "<string>" } '
Add a new domain
example.com
us
eu
curl -X POST https://api.lettr.dev/v1/domains \ -H "Authorization: Bearer le_xxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "name": "example.com" }'
{ "id": "dom_123abc", "object": "domain", "name": "example.com", "status": "pending", "region": "us", "dnsRecords": [ { "type": "TXT", "host": "@", "value": "v=spf1 include:spf.lettr.dev ~all", "purpose": "spf" }, { "type": "CNAME", "host": "lettr._domainkey", "value": "dkim.lettr.dev", "purpose": "dkim" }, { "type": "TXT", "host": "_dmarc", "value": "v=DMARC1; p=none;", "purpose": "dmarc" } ], "spfStatus": "pending", "dkimStatus": "pending", "dmarcStatus": "pending", "createdAt": "2024-01-15T10:30:00Z" }