Create Domain
Add a sending domain to the organization. DNS records (SPF, DKIM, DMARC) are automatically generated.
POST
/domainsResend Compatibility: Compatible
Requires a full_access API key.
Body Parameters
namestringrequiredThe domain name to add (e.g. example.com).
Response Fields
objectstringAlways "domain".
idstringThe domain ID.
namestringThe domain name.
statusstringThe domain verification status (e.g. pending, verified).
created_atstringISO 8601 timestamp.
recordsarrayArray of DNS records to configure.
typestringDNS record type (SPF, DKIM, or DMARC).
namestringDNS record name.
valuestringExpected DNS record value.
statusstringVerification status of this record.
prioritynumber | nullDNS record priority (if applicable).
curl -X POST 'https://api.postflare.app/domains' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"name": "example.com"
}'import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.domains.create({
name: 'example.com',
});Response
{
"object": "domain",
"id": "d91cd9bd-1176-453e-8fc1-35364d380206",
"name": "example.com",
"status": "pending",
"created_at": "2026-01-01T00:00:00.000Z",
"records": [
{
"type": "SPF",
"name": "example.com",
"value": "v=spf1 include:_spf.postflare.com ~all",
"status": "pending",
"priority": null
},
{
"type": "DKIM",
"name": "postflare._domainkey.example.com",
"value": "v=DKIM1; k=rsa; p=MIGf...",
"status": "pending",
"priority": null
},
{
"type": "DMARC",
"name": "_dmarc.example.com",
"value": "v=DMARC1; p=none; rua=mailto:dmarc@postflare.com",
"status": "pending",
"priority": null
}
]
}