API operation · mail group
DELETE
/domains/{name}/mail/accounts/{local}
First published 3 Oct 2026
0.1.0Unchanged since publicationDelete a mailbox
Who may call it
AdministratorResellerCustomer
Token scope, any of
mailallAnswers200 OK
Removes the mailbox and its Roundcube contacts, contact groups and identities. By default, UrbeStack keeps the Maildir and its messages in the customer's home. Set purge=true to delete them as well.
The 200 response contains the mailbox's email address in address, sets deleted to true and reports whether the Maildir was deleted in purged. The API returns 404 if the mailbox does not exist on the domain.
Administrators, the domain's owner and the owner's reseller can call this operation with a token that has the mail scope.
As a command
Run as root on the serverParameters
Example
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X DELETE "$API/domains/example.com/mail/accounts/info?purge=1" \ -H "Authorization: Bearer $TOKEN"
Response ·
200 OK{
"address": "info@example.com",
"deleted": true,
"purged": 1
}Errors
16 errors, each a status and a sentence400--address is required400<what> must be text without control characters, 1 to <max> characters400Domain name required400Domain name too long400Invalid IPv4 address400Invalid IPv6 address400Invalid boolean400Invalid domain name400Invalid mail address: local part over 64 characters400Invalid mail address: no local part400Invalid mail address: the local part may hold letters, digits, dots, _ + and -400Invalid port400Invalid setting key401Authentication required404No such mail account: <address>404Setting '<key>' not foundNo error of this operation matches.
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-domains-name-mail-accounts-local/