# DELETE /users/{name}

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

UrbeStack release 0.2.35 API operation in the users group.

Delete a user account and its resources

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

Administrators can delete other accounts. Resellers can delete their own customers' accounts. A request to delete your own account returns 400. Deleting a reseller requires reassigning all their customers to the administrator or another reseller first. UrbeStack refuses to delete the last administrator.

Deletion removes the account's domains, subdomains, DNS zones, databases, database users, FTP accounts, SSH keys, protected folder access settings and cron jobs, and updates the mail configuration. Deleting a reseller also removes their packages. For customers and resellers, UrbeStack ends active sessions and removes the Linux account and its home directory. It stops any remaining processes under the account if they prevent removal.

The entire deletion fails if the Linux account has an unexpected home directory or lacks the marker identifying it as created by UrbeStack.

## As a command

- [urbestack-user-del](https://urbestack.com/docs/commands/urbestack-user-del.md): Deletes an UrbeStack account and its domains, subdomains, DNS zones, databases and database users.

## Parameters

- `name` (path, Username, 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/users/alice" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

The response body is the file itself.

## Errors

- 400: Cannot delete the last admin
- 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
- 400: You cannot delete your own account
- 401: Authentication required
- 404: Domain '<name>' not found
- 404: Setting '<key>' not found
- 404: User '<name>' not found
- 409: <name> owns <owned> 
