/botmail/domains/{name}
0.2.15Unchanged since publicationEnable BotMail for a domain or change its BotMail hostname
mailallThe domain's mail must be hosted on this server, and the customer's package must allow BotMail. The label sets the hostname in the form LABEL.DOMAIN. UrbeStack trims surrounding whitespace and converts the label to lowercase. It accepts up to 32 letters, digits, and hyphens, with a letter or digit at each end. An invalid or reserved label returns 400. If label is omitted or empty, UrbeStack tries mcp, then mcp2 through mcp20. Choose another label if a site, domain alias, or DNS record already uses the hostname.
If the domain is already ready at the requested hostname, the API returns 200 with the domain. When it queues setup, it returns 202 with the domain and job. A queued or running setup job for the domain must finish before you can submit another. Changing the hostname disables the previous hostname immediately.
The job publishes DNS records if the zone is hosted on or distributed from this server. It checks once whether the hostname resolves to this server. If the check fails, the job stops and reports which A or AAAA records to add or update. After correcting the records, submit PUT /botmail/domains/{name} again. Retries are manual.
UrbeStack uses the domain's wildcard certificate if it covers the hostname. Otherwise it obtains a dedicated certificate using HTTP-01. Apache serves the hostname over HTTPS on port 443. Once the domain is ready, you can create bot keys for its mailboxes. Bots connect only through that hostname.
As a command
Run as root on the serverParameters
namepath ·DomainNameRequiredlabelstringExample
See the API overview for how to set $API and $TOKEN.curl -sS -X PUT "$API/botmail/domains/example.com" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"label": "my laptop"
}'200 OK{
"domain": {
"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
},
"job": {
"created_at": "2026-09-09T10:15:00Z",
"created_by": 1,
"created_by_name": "text",
"dismissed_at": "text",
"finished_at": "2026-09-09T10:15:04Z",
"id": 1,
"lane": "short",
"log": "",
"params": {},
"progress": 100,
"result": {},
"started_at": "2026-09-09T10:15:01Z",
"status": "queued",
"type": "rebuild",
"usual_seconds": 1
}
}Errors
18 errors, each a status and a sentence400--name is required400<value> is kept for the domain's own use; pick another name, like mcp400A name is letters, digits and hyphens, up to 32, like mcp400A new job is queued or running400Domain name required400Domain name too long400Invalid IPv4 address400Invalid IPv6 address400Invalid domain name400Invalid port400Invalid setting key400Job parameters must be an object400Unknown job type401Authentication required403The package <p.name> does not include <SWITCH_WHAT>{<switch>}404Setting '<key>' not found409<why>; pick another name409BotMail is being turned on for <name> alreadyurbestack.com/docs/api/put-botmail-domains-name/