Skip to main content

Create Domain

Register a domain to send from and get the DNS records to publish at its DNS provider. The domain starts pending and becomes verified once the required records are found.

The call is idempotent: registering a domain your organization already has returns its current state, so it responds 200 OK rather than 201 Created.

After publishing the records, call Verify Domain to check them straight away. Arsel also checks every pending domain about every 15 minutes. See Domain Verification for how to add the records at your DNS provider.

Endpoint​

POST /email/domains

Returns: 200 OK

Headers​

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes
Content-Typeapplication/jsonYes

Request Body​

ParameterTypeRequiredDescription
namestringYesThe domain to send from, e.g. mail.acme.com. Max 255 characters. Stored lowercased.
{
"name": "mail.acme.com"
}

Register one domain at a time. A second registration sent while another is still in progress for your organization is refused with 409.

Response​

{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"name": "mail.acme.com",
"status": "pending",
"verified_at": null,
"created_at": "2026-03-08T12:00:00.000Z",
"records": [
{
"type": "CNAME",
"name": "4hbfxq3v2nkd6wz5ymtj7ra2ue3lc5po._domainkey.mail.acme.com",
"value": "4hbfxq3v2nkd6wz5ymtj7ra2ue3lc5po.dkim.amazonses.com",
"purpose": "dkim",
"required": true,
"status": "pending"
},
{
"type": "CNAME",
"name": "s7kq2mwx9pzr4tbv6ny3hd8cgj5fa2le._domainkey.mail.acme.com",
"value": "s7kq2mwx9pzr4tbv6ny3hd8cgj5fa2le.dkim.amazonses.com",
"purpose": "dkim",
"required": true,
"status": "pending"
},
{
"type": "CNAME",
"name": "zt5c8rjd2wqy7mhn4xkb9vp3ga6fe2us._domainkey.mail.acme.com",
"value": "zt5c8rjd2wqy7mhn4xkb9vp3ga6fe2us.dkim.amazonses.com",
"purpose": "dkim",
"required": true,
"status": "pending"
},
{
"type": "TXT",
"name": "mail.acme.com",
"value": "v=spf1 include:amazonses.com ~all",
"purpose": "spf",
"required": false,
"status": "pending"
},
{
"type": "TXT",
"name": "_dmarc.mail.acme.com",
"value": "v=DMARC1; p=none;",
"purpose": "dmarc",
"required": false,
"status": "pending"
}
]
}

Domain fields​

FieldTypeDescription
idstringThe domain ID
namestringThe domain name
statusstringpending, verified or failed. Only a verified domain can send.
verified_atstring | nullWhen the domain was verified (ISO 8601)
created_atstringWhen the domain was added (ISO 8601)
recordsarrayThe DNS records to publish at the domain's DNS provider

Record fields​

FieldTypeDescription
typestringDNS record type, e.g. CNAME or TXT
namestringThe record's host name, fully qualified. Some DNS providers want only the part before your domain.
valuestringThe record's value
purposestringdkim, spf, dmarc or mail_from
requiredbooleanThe domain cannot become verified until every required record is published. The others are recommended for deliverability.
statusstringpending or verified, as of the last check

Examples​

curl -X POST "https://api.arsel.sa/v1/email/domains" \
-H "Authorization: Bearer $ARSEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "mail.acme.com"
}'

Rate Limit​

This endpoint allows 10 requests per 60-second window per organization, separate from the default limit.

Error Responses​

{
"status_code": 422,
"name": "validation_error",
"message": "name must be a valid domain name"
}