Get your free beta license ↗
API operation · users group
DELETE

/users/{name}

First published 3 Oct 20260.1.0Unchanged since publication

Delete a user account and its resources

Who may call it
AdministratorResellerCustomer
Token scope, any of
usersall
Answers200 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

Run as root on the server

Parameters

namepath ·UsernameRequired

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X DELETE "$API/users/alice" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
The response body is the file itself.

Errors

16 errors, each a status and a sentence
400Cannot delete the last admin
400Domain name required
400Domain name too long
400Invalid IPv4 address
400Invalid IPv6 address
400Invalid domain name
400Invalid port
400Invalid setting key
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Username '<value>' is reserved
400You cannot delete your own account
401Authentication required
404Domain '<name>' not found
404Setting '<key>' not found
404User '<name>' not found
409<name> owns <owned>
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/delete-users-name/