Skip to content

Inspect a message

Last updated 

POST /spools/{spool}/inspect

Reads the message the handle names, in whatever state it is, without moving it: the payload as the body, its attributes as headers, the same attributes a listing reports, present under the same conditions. An inspect grants no ownership and leaves the handle valid. The handle is fenced to the message as it was minted, so one that has since been delivered, settled, recovered or discarded answers 410 — the view is stale, list again. The state reported is the current one: a delayed message reads as visible once its delay elapsed. Responses carry Cache-Control no-store.

Sample ​

sh
curl -si -X POST "$SPOOLER_API/spools/<spool>/inspect" \
  -H "Authorization: Bearer $SPOOLER_KEY" \
  -H "Spooler-Handle: <handle>"

Parameters ​

NameInTypeRequiredDescription
spoolpathIdentName, 1–63 chars, ^[A-Za-z0-9_:-]+$yesThe spool name.
Spooler-HandleheaderHandle, 16–256 chars, ^[A-Za-z0-9_-]+$yesThe handle from a listing or a send, presented back.

Responses ​

StatusDescription
200The message. The body is the payload; Content-Length is its size.
400The request is malformed; the kind names the problem.
401The API key is missing or not recognized; the kind is unauthenticated.
402The account is suspended; the kind is account_suspended.
403The operation is refused; the kind names why: a plan limit (queue_limit, retention_limit), or account_blocked on any operation when the account is on an abuse hold.
404The spool or queue does not exist; the kind says which.
410The lease no longer settles anything: expired, already settled, or predates a primary change.
429The per-account request rate cap is exceeded. The body names the kind (rate_limited); the wait is the Retry-After header and is not repeated in the body. Headers are as structured as the body, and this one is the header HTTP defines for a wait.
503The spool is momentarily unavailable.

200 headers ​

HeaderDescription
Spooler-Message-IdThe message's id.
Spooler-Message-StateThe state the message is in.
Spooler-Message-RetriesRedeliveries so far.
Spooler-Message-Created-AtWhen the message was sent (RFC 3339, UTC).
Spooler-Message-Visible-AtWhen a delayed message becomes visible (RFC 3339, UTC); present only in the delayed state.
Spooler-Lease-Expires-AtWhen the current lease expires (RFC 3339, UTC); present only in the pending state on a queue with a lease timeout.
Spooler-Message-Expires-AtWhen retention discards the message (RFC 3339, UTC); absent when retention is off.

429 headers ​

HeaderDescription
Retry-AfterSeconds until the next request is admitted, whole and at least 1; always the delay-seconds form, never an HTTP-date.