# DELETE /botmail/domains/{name}

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

UrbeStack release 0.2.35 API operation in the mail group.

Disable BotMail for a domain

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

UrbeStack immediately revokes every bot key for the domain's mailboxes. It removes the BotMail hostname from the DNS zone and Apache and removes any certificate issued specifically for that hostname. The 200 response includes name, state, and revoked, the number of keys revoked.

## As a command

- [urbestack-botmail-domain-off](https://urbestack.com/docs/commands/urbestack-botmail-domain-off.md): Turns off BotMail for a domain and immediately revokes every BotMail key for its mailboxes.

## Parameters

- `name` (path, DomainName, required)

## 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 DELETE "$API/botmail/domains/example.com" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "name": "alice",
  "revoked": 1,
  "state": "text"
}
```

## Errors

- 400: --name is required
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid IPv4 address
- 400: Invalid IPv6 address
- 400: Invalid domain name
- 400: Invalid port
- 400: Invalid setting key
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Username '<value>' is reserved
- 401: Authentication required
- 404: BotMail is not on for <name>
- 404: No such domain: <domain>
- 404: Setting '<key>' not found
