# DELETE /domains/{name}/mail/filters/{id}

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the mail group.

Delete a mail filter from the domain

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

The id must be a positive integer of up to 10 digits, with no leading zero. The operation returns 404 if the filter does not exist or belongs to another domain. The 200 response contains the filter's id and deleted set to true.

Administrators, the customer who owns the domain and that customer's reseller can call this operation with a token that has the mail scope.

## As a command

- [urbestack-mail-filter-del](https://urbestack.com/docs/commands/urbestack-mail-filter-del.md): Removes the mail filter selected by --id.

## Parameters

- `name` (path, DomainName, required)
- `id` (path, integer, 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/domains/example.com/mail/filters/1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "deleted": true,
  "id": 1
}
```

## Errors

- 400: --id is required
- 400: <what> must be text without control characters, 1 to <max> characters
- 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
- 401: Authentication required
- 404: Filter <id> not found
- 404: No such filter: <id>
- 404: Setting '<key>' not found
