---
title: "Release or permanently fail a claim"
method: POST
path: "/v1/indexer/work/{runId}/fail"
tags: ["Indexer work"]
---

# Release or permanently fail a claim

`POST /v1/indexer/work/{runId}/fail`

## Request

- Base URL: `https://brain.inite.ai`
- URL: `https://brain.inite.ai/v1/indexer/work/{runId}/fail`
- Auth: HTTP bearer

Default RELEASES the item back to 'pending' (transient trouble, shutdown mid-work); `permanent: true` marks the run 'failed' — no longer offered. Part of the document pipeline — answers `503 feature_disabled` until `DOCUMENT_INGEST_ENABLED=1`.

Required scope: `indexer:write`.

## Path parameters

- `runId` string, required

## Request body

- FailWorkRequest
  - `claimToken` string, required
  - `error` string: Optional diagnostic recorded on the run row (truncated server-side).
  - `permanent` boolean: Default (false/absent) RELEASES the item back to 'pending'; true marks the run 'failed' — no longer offered, still claimable by runId.

## Response `201`

The outcome.

- FailWorkResponse
  - `runId` string, required
  - `status` 'released' | 'failed', required

## Other responses

- `401`: Missing or unknown bearer key.
- `403`: The key lacks the required scope.
- `404`: No such resource in this tenant.
- `409`: State conflict — e.g. a lost/mismatched claim token, an already claimed work item, or an immutable-version republish.
- `503`: The document pipeline is dark (DOCUMENT_INGEST_ENABLED off).

---

[API](https://skmtc.dev/inite/apis/inite-brain-platform-api.md) · [All operations](https://skmtc.dev/inite/apis/inite-brain-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/inite/apis/inite-brain-platform-api/revisions/c7c3eb5e304b?raw)
