API operation · mail group
DELETE
/mail/queue/{id}
First published 3 Oct 2026
0.1.0Unchanged since publicationDelete a message from the Postfix queue
Who may call it
AdministratorResellerCustomer
Token scope, any of
mailallAnswers200 OK
Deletes the queued message without notifying the sender. The 200 response returns the queue ID in id and the deletion result in deleted.
The id must contain 6 to 20 uppercase hexadecimal characters. An invalid id returns 400. Requires an administrator token with the mail scope.
As a command
Run as root on the serverParameters
idpath ·string, matching ^[A-F0-9]{6,20}$RequiredExample
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X DELETE "$API/mail/queue/1" \ -H "Authorization: Bearer $TOKEN"
Response ·
200 OK{
"deleted": 1,
"id": 1
}Errors
15 errors, each a status and a sentence400--id, --all or --sender is required400A queue id is 6 to 20 uppercase hexadecimal characters400At most 1000 messages are removed in one call400Domain name required400Domain name too long400Invalid domain name400Invalid mail address400Invalid mail address: local part over 64 characters400Invalid mail address: no local part400Invalid mail address: the local part may hold letters, digits, dots, _ + and -400No queue id was given400The mail stack is not installed on this server401Authentication required404No mailbox <sender> here404No such user: <owner>No 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-mail-queue-id/