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

/mail/queue/{id}/hold

First published 14 Oct 20260.2.0Unchanged since publication

Hold a queued message

Who may call it
AdministratorResellerCustomer
Token scope, any of
mailall
Answers200 OK

Postfix suspends delivery attempts until you release the message with POST /mail/queue/{id}/release. A successful request returns MailQueueHold.

A reseller can hold the message only if its sender or a recipient belongs to one of the reseller's domains or one of their customers' domains. The API returns 400 if id falls outside the required format of 6 to 20 uppercase hexadecimal characters.

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 POST "$API/mail/queue/1/hold" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "count": 1,
  "held": true,
  "id": 1
}

Errors

6 errors, each a status and a sentence
400--id is required
400A queue id is 6 to 20 uppercase hexadecimal characters
400The mail stack is not installed on this server
401Authentication required
404Message <id> is not in the queue
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.2.0 on 14 Oct 2026.
urbestack.com/docs/api/post-mail-queue-id-hold/