Appearance
Domains
Fetch the list of available email domains. Use these domains when creating a new mailbox.
List Available Domains
GET /api/domainsNo authentication required.
Request
bash
curl https://api.mail.cx/api/domainsResponse 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
| Field | Type | Description |
|---|---|---|
id | uuid | Domain ID |
domain | string | Domain name |
default | boolean | Whether this is the default domain |
sort_order | integer | Display order (lower = first) |
TIP
Cache the domain list — it rarely changes. Fetch it once when your application starts.