# DELETE /botmail/keys/{id}

First published 18 Oct 2026 (release 0.2.10) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the mail group.

Revoke a bot key

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

The key stops working immediately, and UrbeStack removes its webhook. The API returns 404 if the key is missing or the caller lacks access to it.

## As a command

- [urbestack-botmail-key-del](https://urbestack.com/docs/commands/urbestack-botmail-key-del.md): Revokes a bot key immediately and removes its webhook.

## Parameters

- `id` (path, integer, 1 or more, 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/keys/1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "address": "info@example.com",
  "id": 1,
  "ok": true
}
```

## Errors

- 400: --id 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 id
- 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: No such bot connector: <c.params>{id}
- 404: No such bot connector: <id>
- 404: No such domain: <domain>
- 404: Setting '<key>' not found
