fluxgatedocs
Dashboard ↗GitHub

List batches the pipeline could not deliver.

GET/v1/dead-letters
Bearer API keyQuery serviceAPI 1.0.0

A batch answered with 202 is delivered to the aggregator through the broker. When every delivery attempt fails, the broker sets the message aside in a dead-letter queue, and it stops being retried. This lists those messages for the tenant owning the credential, newest first: what each carried, why it could not be delivered as far as its payload can say, and whether its data reached the rollups after all.

Reasons. invalid_envelope means the payload does not decode, so it was rejected on every attempt and replaying it unchanged would fail again. delivery_exhausted means the payload is valid and something outside it failed each time -- storage was unavailable, the aggregator was at capacity, or an acknowledgement was lost. The broker does not record which.

States. A dead letter is open while any window it feeds is missing from the rollups, and resolved once every one of them is committed, which happens when an operator replays it or when the data had in fact been committed before the message was set aside. An invalid_envelope names no windows and stays open until it expires. windows_committed of windows says how much of an open one is already stored.

What this is not. It is a description of each message, not the message: the payload stays in the broker, which is where a replay is made from, and nothing here can replay or discard anything. Entries expire with the broker's dead-letter retention (seven days by default), so the list never shows a message that could no longer be replayed.

Trusting an empty list. summary.checked_at is when the pipeline last confirmed it was reading the dead-letter queue. A list with no entries means there are none only while that is recent; when it is absent or old, nothing is looking.

Base URL

These addresses are for local development. Replace them with your own deployed service URLs.

http://localhost:8082 Local query API; replace with the deployed query URL.

Request example

Replace credential and batch-key placeholders before running. JavaScript examples use Node.js 24; Python examples use the standard library. Browser clients need a same-origin proxy or suitable CORS configuration. See safe retries for production retry handling.

bash
curl --request GET 'http://localhost:8082/v1/dead-letters' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'

Authentication

An API key in the form fxg_<key id>_<secret>, sent as Authorization: Bearer fxg_....

The server stores only a SHA-256 digest of the secret. Every authentication failure returns an identical 401 regardless of cause, so a probing client cannot use the response to tell a valid key ID from an invalid one.

Credentials select the tenant. See tenant provisioning and key rotation.

Parameters

statequery · stringoptional

Restrict the list to open or resolved. Omit for both.

"open" "resolved"
limitquery · integeroptional

Page size. Defaults to 50 for absent, malformed or nonpositive input; capped at 200.

Maximum 200Default 50
cursorquery · stringoptional

The next_cursor of the previous page. Opaque; a value this API did not issue is rejected with 422. Pages do not repeat or skip an entry even when new dead letters arrive between them.

Max length 128

Responses

Expand a response to inspect its headers and complete schema.

200A page of dead letters and the tenant-wide summary.

A page of dead letters and the tenant-wide summary.

application/json

DeadLetterPage ↗
dead_lettersDeadLetter[]required
Array items · DeadLetterDeadLetter ↗

One message the broker stopped delivering, as described by the pipeline. A property that is absent is unknown: the broker does not always report how often it tried, and a payload that could not be read has no received time or point timestamps.

Object properties
idstringrequired

Stable for the life of the entry. Not the batch ID -- a batch dead-lettered twice has two.

Pattern ^[0-9a-f]{32}$
statestringrequired

resolved once every window the batch feeds is committed, so nothing is missing. open otherwise.

"open" "resolved"
reasonstringrequired

invalid_envelope: the payload does not decode and cannot be replayed as it is. delivery_exhausted: the payload is valid and every delivery attempt failed; it can be replayed.

"invalid_envelope" "delivery_exhausted"
detailstringrequired

For an invalid_envelope, what the decoder objected to. For a delivery_exhausted, a fixed sentence: the broker does not record why delivery failed. Human-readable; do not branch on it.

batch_idstringoptional

The batch_id the ingest API returned for this batch.

request_idstringoptional

The X-Request-Id of the ingest request, for finding it in logs and traces.

dead_lettered_atstringrequired

When the broker set the message aside.

Format date-time
published_atstringoptional

When the ingest API published the batch.

Format date-time
received_atstringoptional

When the ingest API accepted the batch. Known only for a readable payload.

Format date-time
resolved_atstringoptional

When the pipeline found every window committed.

Format date-time
delivery_attemptsintegeroptional

Deliveries the broker attempted before giving up.

payload_bytesintegerrequired
pointsintegerrequired

Points in the batch. For an invalid_envelope this is the count its publisher declared, or 0 when there is none.

first_point_atstringoptional

The earliest point timestamp in the batch.

Format date-time
last_point_atstringoptional

The latest point timestamp in the batch.

Format date-time
windowsintegerrequired

Aggregation windows the batch feeds. 0 for an invalid_envelope.

windows_committedintegerrequired

How many of those windows are stored. Equal to windows when resolved.

metricsobject[]required

The batch's metrics by number of points, largest first.

Max items 20
Array items · object
Object properties
metricstringrequired
kindstringrequired
"gauge" "counter" "histogram"
pointsintegerrequired
metrics_truncatedbooleanoptional

True when the batch carries more than 20 distinct metrics.

next_cursorstringoptional

Pass as cursor for the next page. Absent on the last page.

summaryDeadLetterSummaryrequired
DeadLetterSummary ↗

Counts over every dead letter the tenant has, whatever page or filter the request used.

Object properties
openintegerrequired

Dead letters with data missing from the rollups.

resolvedintegerrequired

Dead letters whose data is fully committed.

open_unreadableintegerrequired

How many of the open ones are invalid_envelope and cannot be replayed as they are.

open_pointsintegerrequired

Points carried by the open dead letters.

newest_atstringoptional

When the most recent dead letter, open or resolved, was set aside.

Format date-time
oldest_open_atstringoptional

When the oldest open dead letter was set aside.

Format date-time
checked_atstringoptional

When the pipeline last confirmed it was reading the dead-letter queue. Absent when it never has. An empty list is only good news while this is recent.

Format date-time

Nothing has been dead-lettered, and the queue is being read

json
{
  "dead_letters": [],
  "summary": {
    "open": 0,
    "resolved": 0,
    "open_unreadable": 0,
    "open_points": 0,
    "checked_at": "2026-09-04T01:36:40Z"
  }
}

One batch whose data is missing

json
{
  "dead_letters": [
    {
      "id": "5f0c1d0a8a7b4c3e9d2f1a0b6c7d8e9f",
      "state": "open",
      "reason": "delivery_exhausted",
      "detail": "The payload is valid; every delivery attempt failed before its data could be committed.",
      "batch_id": "9f2c1a4be6d84f0fa1c3e7b25d908146",
      "request_id": "6b1f0d2c9a3e4f5d",
      "dead_lettered_at": "2026-09-04T01:30:12Z",
      "published_at": "2026-09-04T01:29:40Z",
      "received_at": "2026-09-04T01:29:40Z",
      "delivery_attempts": 20,
      "payload_bytes": 18234,
      "points": 200,
      "first_point_at": "2026-09-04T01:28:00Z",
      "last_point_at": "2026-09-04T01:29:39Z",
      "windows": 2,
      "windows_committed": 0,
      "metrics": [
        {
          "metric": "http.request.duration_ms",
          "kind": "histogram",
          "points": 180
        },
        {
          "metric": "http.requests",
          "kind": "counter",
          "points": 20
        }
      ]
    }
  ],
  "summary": {
    "open": 1,
    "resolved": 0,
    "open_unreadable": 0,
    "open_points": 200,
    "newest_at": "2026-09-04T01:30:12Z",
    "oldest_open_at": "2026-09-04T01:30:12Z",
    "checked_at": "2026-09-04T01:36:40Z"
  }
}
401Missing or invalid credentials.

Missing or invalid credentials.

Response headers

WWW-Authenticatestring

The Bearer challenge.

application/problem+json

Problem ↗
typestringrequired
Format uri
titlestringrequired
statusintegerrequired
detailstringoptional

Human-readable explanation. Do not branch on this.

codestringrequired

Stable machine-readable identifier. Branch on this.

"bad_request" "validation_failed" "unauthorized" "forbidden" "not_found" "method_not_allowed" "conflict" "payload_too_large" "unsupported_media_type" "rate_limited" "timeout" "service_unavailable" "internal_error"
request_idstringoptional
errorsFieldError[]optional
Array items · FieldErrorFieldError ↗
Object properties
fieldstringrequired

Dotted path to the offending value, including the batch index.

messagestringrequired

What the submitter must change.

422The state or cursor was not valid.

The state or cursor was not valid.

Response headers

X-Request-Idstring

Correlation ID, echoed on every response. Quote it when reporting a problem.

application/problem+json

Problem ↗
typestringrequired
Format uri
titlestringrequired
statusintegerrequired
detailstringoptional

Human-readable explanation. Do not branch on this.

codestringrequired

Stable machine-readable identifier. Branch on this.

"bad_request" "validation_failed" "unauthorized" "forbidden" "not_found" "method_not_allowed" "conflict" "payload_too_large" "unsupported_media_type" "rate_limited" "timeout" "service_unavailable" "internal_error"
request_idstringoptional
errorsFieldError[]optional
Array items · FieldErrorFieldError ↗
Object properties
fieldstringrequired

Dotted path to the offending value, including the batch index.

messagestringrequired

What the submitter must change.

500An RFC 9457 problem document.

An RFC 9457 problem document.

Response headers

X-Request-Idstring

Correlation ID, echoed on every response. Quote it when reporting a problem.

application/problem+json

Problem ↗
typestringrequired
Format uri
titlestringrequired
statusintegerrequired
detailstringoptional

Human-readable explanation. Do not branch on this.

codestringrequired

Stable machine-readable identifier. Branch on this.

"bad_request" "validation_failed" "unauthorized" "forbidden" "not_found" "method_not_allowed" "conflict" "payload_too_large" "unsupported_media_type" "rate_limited" "timeout" "service_unavailable" "internal_error"
request_idstringoptional
errorsFieldError[]optional
Array items · FieldErrorFieldError ↗
Object properties
fieldstringrequired

Dotted path to the offending value, including the batch index.

messagestringrequired

What the submitter must change.

503Capacity exhausted; respect Retry-After before retrying.

Capacity exhausted; respect Retry-After before retrying.

Response headers

X-Request-Idstring

Correlation ID, echoed on every response. Quote it when reporting a problem.

application/problem+json

Problem ↗
typestringrequired
Format uri
titlestringrequired
statusintegerrequired
detailstringoptional

Human-readable explanation. Do not branch on this.

codestringrequired

Stable machine-readable identifier. Branch on this.

"bad_request" "validation_failed" "unauthorized" "forbidden" "not_found" "method_not_allowed" "conflict" "payload_too_large" "unsupported_media_type" "rate_limited" "timeout" "service_unavailable" "internal_error"
request_idstringoptional
errorsFieldError[]optional
Array items · FieldErrorFieldError ↗
Object properties
fieldstringrequired

Dotted path to the offending value, including the batch index.

messagestringrequired

What the submitter must change.

504An RFC 9457 problem document.

An RFC 9457 problem document.

Response headers

X-Request-Idstring

Correlation ID, echoed on every response. Quote it when reporting a problem.

application/problem+json

Problem ↗
typestringrequired
Format uri
titlestringrequired
statusintegerrequired
detailstringoptional

Human-readable explanation. Do not branch on this.

codestringrequired

Stable machine-readable identifier. Branch on this.

"bad_request" "validation_failed" "unauthorized" "forbidden" "not_found" "method_not_allowed" "conflict" "payload_too_large" "unsupported_media_type" "rate_limited" "timeout" "service_unavailable" "internal_error"
request_idstringoptional
errorsFieldError[]optional
Array items · FieldErrorFieldError ↗
Object properties
fieldstringrequired

Dotted path to the offending value, including the batch index.

messagestringrequired

What the submitter must change.

Something to improve? Edit this page View source

Search the complete documentation.