Skip to content

Release a message

Last updated 

POST /spools/{spool}/release

Returns the message to its queue without spending a retry — as if the receive never happened; Spooler-Delay postpones its visibility. Release asserts the message was not at fault (a shutdown, a wrong worker, a dependency briefly away); nack is the error path. A release never moves a message toward the failure queue, so a handler that releases on every error retries forever.

Sample

sh
curl -X POST "$SPOOLER_API/spools/<spool>/release" \
  -H "Authorization: Bearer $SPOOLER_KEY" \
  -H "Spooler-Lease: <lease>"

Parameters

NameInTypeRequiredDescription
spoolpathIdentName, 1–64 chars, ^[A-Za-z0-9_:-]+$yesThe spool name.
Spooler-LeaseheaderLeaseToken, 16–128 chars, ^[A-Za-z0-9_-]+$yesThe lease from a receive, presented back.
Spooler-DelayheaderDuration, ≤ 168hnoHow long until the released message becomes visible, at most a week (168h). Omitted or 0 means immediately visible.

Responses

StatusDescription
204Released.
400The request is malformed; the kind names the problem.
401The API key is missing or not recognized.
402The account is suspended.
403A plan limit refuses the operation; the kind names it.
404The spool or queue does not exist; the kind says which.
409Concurrent state refuses the operation; the kind names it.
410The lease no longer settles anything: expired, already settled, or predates a primary change.
429The per-account request rate cap is exceeded; retry after the Retry-After delay.
500The server failed; kind operation_unconfirmed means the write was accepted but its durability is unknown.
503The spool is momentarily unavailable.

429 headers

HeaderDescription
Retry-AfterSeconds until the next request is admitted.