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

/mail/queue/{id}

First published 3 Oct 20260.1.0Unchanged since publication

Delete a message from the Postfix queue

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

Parameters

idpath ·string, matching ^[A-F0-9]{6,20}$Required

Example

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 sentence
400--id, --all or --sender is required
400A queue id is 6 to 20 uppercase hexadecimal characters
400At most 1000 messages are removed in one call
400Domain name required
400Domain name too long
400Invalid domain name
400Invalid mail address
400Invalid mail address: local part over 64 characters
400Invalid mail address: no local part
400Invalid mail address: the local part may hold letters, digits, dots, _ + and -
400No queue id was given
400The mail stack is not installed on this server
401Authentication required
404No mailbox <sender> here
404No such user: <owner>
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/