---
title: "Recover Transient Dead Letters"
method: POST
path: "/api/admin/health/extraction/recover-transient-dead-letters"
tags: ["admin-health"]
---

# Recover Transient Dead Letters

`POST /api/admin/health/extraction/recover-transient-dead-letters`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/admin/health/extraction/recover-transient-dead-letters`
- Auth: none declared

Demote DEAD_LETTER episodes whose failure was an infra transient.

The state-machine rule before the ``mark_transient_failure`` fix
burned an attempt on every OperationalError(AdminShutdown) the
extractor caught during savepoint release, so a 4-reconnect burst
on a managed Postgres would terminally retire a healthy chat (chat ``f9ebb5b1``
on 2026-05-28 was the prompting incident). The forward fix prevents
new occurrences; this endpoint clears the backlog.

Bounded to LIMIT 100 per call so a misclassified pattern can't
storm the whole table. Demotes status DEAD_LETTER → FAILED and
zeroes ``attempts`` so the sweep's normal retry budget applies.
Operates only on rows whose stored ``failure_reason`` matches a
transient-class prefix - logical failures stay terminal.

## Response `200`

Successful Response

- ExtractionRecoverResponse
  - `recovered` integer, required
  - `examined` integer, required

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/5387b4ded614?raw)
