API reference
Domains
Register a sending domain and read the DNS records it needs.
Register a sending domain.
POST/v1/domains
Needs an API key with the domain:write scope. Operation createDeveloperDomain
Returns the DNS records to publish.
Request body
CreateDomainRequestCreateDomainRequest
namestringrequiredThe domain name, such as
mail.example.com. Internationalised names in their ASCII (punycode) form.
Responses
- 201Domain
The domain with its DNS records.
object
dataDomainrequiredA sending domain.
Show fields (8)Fields (8)
iduuidrequirednamestringrequiredstatusstringrequiredverifiedonce every DNS record was found and the email provider agrees.One ofpendingverifiedsending_enabledbooleanrequiredWhether email can be sent from the domain now; verified and not disabled.
verified_atdate-timerequiredcan be nulllast_checked_atdate-timerequiredcan be nullcreated_atdate-timerequireddns_recordsDnsRecord[]optionalThe records to publish. Left out of lists.
Show fields (9)Fields (9)
purposestringrequiredOne ofownershipdkimspfmxdmarctypestringrequiredOne ofTXTCNAMEMXnamestringrequiredThe full record name, ending in the domain.
valuestringrequiredpriorityintegeroptionalMX records only.
statusstringrequiredOne ofpendingverifiedlast_checked_atdate-timerequiredcan be nullproblemstringoptionalWhat the last check found wrong, in words safe to show. Absent when nothing is.
problem_codestringoptionalWhy the last check did not pass, for programs. Absent together with
problem.not_found: nothing of this type is published at the name yet.wrong_value: a record is
published there, but not with the value required.
lookup_failed: DNS could not be asked, which says nothing about the record.One ofnot_foundwrong_valuelookup_failed
- 400BadRequest
invalid_json: the body is not one JSON object, or has a field this endpoint does not accept.
The body is the error envelope.
- 401InvalidApiKey
unauthenticated: no API key was sent.invalid_api_key: the key is unknown, revoked or expired.
The body is the error envelope.
- 403InsufficientScope
insufficient_scope: the API key does not hold the scope this operation needs.account_suspended: the organisation is suspended; none of its keys work until that is lifted.account_closed: the organisation has been closed; none of its keys will work again.
The body is the error envelope.
- 409DomainConflict
domain_exists: the organisation has already registered this domain.domain_claimed: another organisation has already verified it.
The body is the error envelope.
- 422ValidationFailed
validation_failed:detailsnames each invalid field.
The body is the error envelope.
- 429RateLimited
rate_limited: too many requests. WaitRetry-Afterseconds.
Retry-Afterheader: How many seconds to wait before trying again.RateLimit-Limitheader: How many requests the limit that stopped this one allows per period.RateLimit-Remainingheader: How many requests are left in the current period.
The body is the error envelope.
Example
curl -X POST https://api.cirrusmail.example/v1/domains \
-H "Authorization: Bearer $CIRRUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "shop.example"
}'{
"data": {
"id": "b3c1f5a4-7d2e-4c8a-9a1b-0e6f2d4a8c11",
"name": "shop.example",
"status": "pending",
"sending_enabled": false,
"verified_at": "2026-01-15T09:30:00Z",
"last_checked_at": "2026-01-15T09:30:00Z",
"created_at": "2026-01-15T09:30:00Z",
"dns_records": [
{
"purpose": "ownership",
"type": "TXT",
"name": "shop.example",
"value": "v=spf1 include:example.net ~all",
"priority": 0,
"status": "pending",
"last_checked_at": "2026-01-15T09:30:00Z",
"problem": "string",
"problem_code": "not_found"
}
]
}
}Set CIRRUS_API_KEY to your key. The values are examples.
Get a domain with its DNS records.
GET/v1/domains/{domainID}
Needs an API key with the domain:read scope. Operation getDeveloperDomain
Parameters
domainIDpathrequireduuid
Responses
- 200Domain
The domain with its DNS records.
object
dataDomainrequiredA sending domain.
Show fields (8)Fields (8)
iduuidrequirednamestringrequiredstatusstringrequiredverifiedonce every DNS record was found and the email provider agrees.One ofpendingverifiedsending_enabledbooleanrequiredWhether email can be sent from the domain now; verified and not disabled.
verified_atdate-timerequiredcan be nulllast_checked_atdate-timerequiredcan be nullcreated_atdate-timerequireddns_recordsDnsRecord[]optionalThe records to publish. Left out of lists.
Show fields (9)Fields (9)
purposestringrequiredOne ofownershipdkimspfmxdmarctypestringrequiredOne ofTXTCNAMEMXnamestringrequiredThe full record name, ending in the domain.
valuestringrequiredpriorityintegeroptionalMX records only.
statusstringrequiredOne ofpendingverifiedlast_checked_atdate-timerequiredcan be nullproblemstringoptionalWhat the last check found wrong, in words safe to show. Absent when nothing is.
problem_codestringoptionalWhy the last check did not pass, for programs. Absent together with
problem.not_found: nothing of this type is published at the name yet.wrong_value: a record is
published there, but not with the value required.
lookup_failed: DNS could not be asked, which says nothing about the record.One ofnot_foundwrong_valuelookup_failed
- 401InvalidApiKey
unauthenticated: no API key was sent.invalid_api_key: the key is unknown, revoked or expired.
The body is the error envelope.
- 403InsufficientScope
insufficient_scope: the API key does not hold the scope this operation needs.account_suspended: the organisation is suspended; none of its keys work until that is lifted.account_closed: the organisation has been closed; none of its keys will work again.
The body is the error envelope.
- 404NotFound
not_found: the resource does not exist, or belongs to an organisation the caller is not a member of.
The two are not told apart, so IDs cannot be probed.
The body is the error envelope.
- 429RateLimited
rate_limited: too many requests. WaitRetry-Afterseconds.
Retry-Afterheader: How many seconds to wait before trying again.RateLimit-Limitheader: How many requests the limit that stopped this one allows per period.RateLimit-Remainingheader: How many requests are left in the current period.
The body is the error envelope.
Example
curl https://api.cirrusmail.example/v1/domains/b3c1f5a4-7d2e-4c8a-9a1b-0e6f2d4a8c11 \
-H "Authorization: Bearer $CIRRUS_API_KEY"{
"data": {
"id": "b3c1f5a4-7d2e-4c8a-9a1b-0e6f2d4a8c11",
"name": "shop.example",
"status": "pending",
"sending_enabled": false,
"verified_at": "2026-01-15T09:30:00Z",
"last_checked_at": "2026-01-15T09:30:00Z",
"created_at": "2026-01-15T09:30:00Z",
"dns_records": [
{
"purpose": "ownership",
"type": "TXT",
"name": "shop.example",
"value": "v=spf1 include:example.net ~all",
"priority": 0,
"status": "pending",
"last_checked_at": "2026-01-15T09:30:00Z",
"problem": "string",
"problem_code": "not_found"
}
]
}
}Get only the DNS records a domain needs.
GET/v1/domains/{domainID}/dns
Needs an API key with the domain:read scope. Operation getDeveloperDomainDnsRecords
Parameters
domainIDpathrequireduuid
Responses
- 200DnsRecords
The records to publish, with the result of each one's last check. A short list, returned whole (see "Envelopes").
object
dataDnsRecord[]requiredShow fields (9)Fields (9)
purposestringrequiredOne ofownershipdkimspfmxdmarctypestringrequiredOne ofTXTCNAMEMXnamestringrequiredThe full record name, ending in the domain.
valuestringrequiredpriorityintegeroptionalMX records only.
statusstringrequiredOne ofpendingverifiedlast_checked_atdate-timerequiredcan be nullproblemstringoptionalWhat the last check found wrong, in words safe to show. Absent when nothing is.
problem_codestringoptionalWhy the last check did not pass, for programs. Absent together with
problem.not_found: nothing of this type is published at the name yet.wrong_value: a record is
published there, but not with the value required.
lookup_failed: DNS could not be asked, which says nothing about the record.One ofnot_foundwrong_valuelookup_failed
- 401InvalidApiKey
unauthenticated: no API key was sent.invalid_api_key: the key is unknown, revoked or expired.
The body is the error envelope.
- 403InsufficientScope
insufficient_scope: the API key does not hold the scope this operation needs.account_suspended: the organisation is suspended; none of its keys work until that is lifted.account_closed: the organisation has been closed; none of its keys will work again.
The body is the error envelope.
- 404NotFound
not_found: the resource does not exist, or belongs to an organisation the caller is not a member of.
The two are not told apart, so IDs cannot be probed.
The body is the error envelope.
- 429RateLimited
rate_limited: too many requests. WaitRetry-Afterseconds.
Retry-Afterheader: How many seconds to wait before trying again.RateLimit-Limitheader: How many requests the limit that stopped this one allows per period.RateLimit-Remainingheader: How many requests are left in the current period.
The body is the error envelope.
Example
curl https://api.cirrusmail.example/v1/domains/b3c1f5a4-7d2e-4c8a-9a1b-0e6f2d4a8c11/dns \
-H "Authorization: Bearer $CIRRUS_API_KEY"{
"data": [
{
"purpose": "ownership",
"type": "TXT",
"name": "shop.example",
"value": "v=spf1 include:example.net ~all",
"priority": 0,
"status": "pending",
"last_checked_at": "2026-01-15T09:30:00Z",
"problem": "string",
"problem_code": "not_found"
}
]
}