Skip to content
CirrusDocs

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

  • namestringrequired

    The domain name, such as mail.example.com. Internationalised names in their ASCII (punycode) form.

Responses

  • 201Domain

    The domain with its DNS records.

    object

    • dataDomainrequired

      A sending domain.

      Show fields (8)
      • iduuidrequired
      • namestringrequired
      • statusstringrequired

        verified once every DNS record was found and the email provider agrees.

        One ofpendingverified
      • sending_enabledbooleanrequired

        Whether email can be sent from the domain now; verified and not disabled.

      • verified_atdate-timerequiredcan be null
      • last_checked_atdate-timerequiredcan be null
      • created_atdate-timerequired
      • dns_recordsDnsRecord[]optional

        The records to publish. Left out of lists.

        Show fields (9)
        • purposestringrequired
          One ofownershipdkimspfmxdmarc
        • typestringrequired
          One ofTXTCNAMEMX
        • namestringrequired

          The full record name, ending in the domain.

        • valuestringrequired
        • priorityintegeroptional

          MX records only.

        • statusstringrequired
          One ofpendingverified
        • last_checked_atdate-timerequiredcan be null
        • problemstringoptional

          What the last check found wrong, in words safe to show. Absent when nothing is.

        • problem_codestringoptional

          Why 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: details names each invalid field.

    The body is the error envelope.

  • 429RateLimited
    • rate_limited: too many requests. Wait Retry-After seconds.
    • Retry-After header: How many seconds to wait before trying again.
    • RateLimit-Limit header: How many requests the limit that stopped this one allows per period.
    • RateLimit-Remaining header: How many requests are left in the current period.

    The body is the error envelope.

Example

Request
curl -X POST https://api.cirrusmail.example/v1/domains \
  -H "Authorization: Bearer $CIRRUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "shop.example"
  }'
Response 201
{
  "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

  • domainIDpathrequired

    uuid

Responses

  • 200Domain

    The domain with its DNS records.

    object

    • dataDomainrequired

      A sending domain.

      Show fields (8)
      • iduuidrequired
      • namestringrequired
      • statusstringrequired

        verified once every DNS record was found and the email provider agrees.

        One ofpendingverified
      • sending_enabledbooleanrequired

        Whether email can be sent from the domain now; verified and not disabled.

      • verified_atdate-timerequiredcan be null
      • last_checked_atdate-timerequiredcan be null
      • created_atdate-timerequired
      • dns_recordsDnsRecord[]optional

        The records to publish. Left out of lists.

        Show fields (9)
        • purposestringrequired
          One ofownershipdkimspfmxdmarc
        • typestringrequired
          One ofTXTCNAMEMX
        • namestringrequired

          The full record name, ending in the domain.

        • valuestringrequired
        • priorityintegeroptional

          MX records only.

        • statusstringrequired
          One ofpendingverified
        • last_checked_atdate-timerequiredcan be null
        • problemstringoptional

          What the last check found wrong, in words safe to show. Absent when nothing is.

        • problem_codestringoptional

          Why 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. Wait Retry-After seconds.
    • Retry-After header: How many seconds to wait before trying again.
    • RateLimit-Limit header: How many requests the limit that stopped this one allows per period.
    • RateLimit-Remaining header: How many requests are left in the current period.

    The body is the error envelope.

Example

Request
curl https://api.cirrusmail.example/v1/domains/b3c1f5a4-7d2e-4c8a-9a1b-0e6f2d4a8c11 \
  -H "Authorization: Bearer $CIRRUS_API_KEY"
Response 200
{
  "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

  • domainIDpathrequired

    uuid

Responses

  • 200DnsRecords

    The records to publish, with the result of each one's last check. A short list, returned whole (see "Envelopes").

    object

    • dataDnsRecord[]required
      Show fields (9)
      • purposestringrequired
        One ofownershipdkimspfmxdmarc
      • typestringrequired
        One ofTXTCNAMEMX
      • namestringrequired

        The full record name, ending in the domain.

      • valuestringrequired
      • priorityintegeroptional

        MX records only.

      • statusstringrequired
        One ofpendingverified
      • last_checked_atdate-timerequiredcan be null
      • problemstringoptional

        What the last check found wrong, in words safe to show. Absent when nothing is.

      • problem_codestringoptional

        Why 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. Wait Retry-After seconds.
    • Retry-After header: How many seconds to wait before trying again.
    • RateLimit-Limit header: How many requests the limit that stopped this one allows per period.
    • RateLimit-Remaining header: How many requests are left in the current period.

    The body is the error envelope.

Example

Request
curl https://api.cirrusmail.example/v1/domains/b3c1f5a4-7d2e-4c8a-9a1b-0e6f2d4a8c11/dns \
  -H "Authorization: Bearer $CIRRUS_API_KEY"
Response 200
{
  "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"
    }
  ]
}