# GET /botmail/domains

First published 22 Oct 2026 (release 0.2.15) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the mail group.

List domains with local mail and their BotMail status

- Who may call it: administrator, reseller, customer
- Token scope, any of: mail, read, all
- Answers: 200 OK

Administrators see all domains whose mail is hosted on this server. Resellers see their own domains and their customers' domains. Customers see their own domains. Results are ordered by domain name.

Each entry includes mailbox and bot key counts and shows whether BotMail is off, preparing, ready at the domain's BotMail hostname, or failed. When available, the entry includes the setup job ID, the reason setup failed, and certificate expiration or error details.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/botmail/domains" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "domains": [
    {
      "cert_error": "text",
      "cert_not_after": "text",
      "error": "Domain 'example.com' already exists",
      "host": "text",
      "job": {
        "id": 1,
        "status": "active"
      },
      "keys": 1,
      "label": "my laptop",
      "mailboxes": 1,
      "name": "alice",
      "records": [
        {
          "name": "alice",
          "type": "A",
          "value": 8443
        }
      ],
      "state": "off",
      "suggested": "text",
      "user": "alice",
      "wildcard": true
    }
  ]
}
```

## Errors

- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Username '<value>' is reserved
- 401: Authentication required
