Skip to content

Domains

Fetch the list of available email domains. Use these domains when creating a new mailbox.

List Available Domains

GET /api/domains

No authentication required.

Request

bash
curl https://api.mail.cx/api/domains

Response 200

json
{
  "domains": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "domain": "mail.cx",
      "default": true,
      "sort_order": 0
    },
    {
      "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "domain": "fexbox.org",
      "default": false,
      "sort_order": 1
    }
  ]
}

Fields

FieldTypeDescription
iduuidDomain ID
domainstringDomain name
defaultbooleanWhether this is the default domain
sort_orderintegerDisplay order (lower = first)

TIP

Cache the domain list — it rarely changes. Fetch it once when your application starts.

Mail.cx API Documentation