# DELETE /mail/lists/{id}

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

UrbeStack release 0.2.35 API operation in the mail group.

Remove an entry from a server-wide mail sender list

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

Removes the server-wide list entry identified by id. The 200 response returns id and deleted set to true. An unknown id or an id for a domain list entry returns 404. Requires an administrator token with the mail scope.

## As a command

- [urbestack-mail-list-del](https://urbestack.com/docs/commands/urbestack-mail-list-del.md): Removes an entry from a domain's mail sender list or, with --server, from a server-wide list.

## Parameters

- `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/mail/lists/1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

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

## Errors

- 400: <what> must be text without control characters, 1 to <max> characters
- 400: Domain name required
- 400: Domain name too long
- 400: Give --allow ENTRY, --block ENTRY or --nogreylist ENTRY, one of them
- 400: Give --domain DOMAIN or --server
- 400: Invalid IPv4 address
- 400: Invalid IPv6 address
- 400: Invalid domain name
- 400: Invalid id
- 400: Invalid mail address
- 400: Invalid mail address: local part over 64 characters
- 400: Invalid mail address: no local part
- 400: Invalid mail address: the local part may hold letters, digits, dots, _ + and -
- 400: Invalid port
- 400: Invalid setting key
- 400: List type must be allow, block, or nogreylist.
- 401: Authentication required
- 404: <entry> is not on that <kind> list
- 404: List entry <id> not found
- 404: Setting '<key>' not found
