# DELETE /domains/{name}

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

UrbeStack release 0.2.35 API operation in the domains group.

Delete a domain and its subdomains

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

UrbeStack removes the Apache virtual hosts, PHP-FPM pools, mailboxes, certificates and statistics for the domain and its subdomains. It clears current logs, removes rotated logs and preserves files in the document roots. It also updates DNS and mail configuration.

An unknown domain returns 404. Access to an existing domain is limited to administrators, the domain owner and the owner's reseller. Other callers receive 403.

## As a command

- [urbestack-domain-del](https://urbestack.com/docs/commands/urbestack-domain-del.md): Deletes a domain and its subdomains, along with their Apache virtual hosts, PHP-FPM pools, mailboxes, certificates and statistics.

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

Response, 200 OK:

The response body is the file itself.

## Errors

- 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
- 403: Insufficient privileges
- 404: Domain '<name>' not found
- 404: Setting '<key>' not found
