---
title: "Reprocess Attachment"
method: POST
path: "/v1/attachments/{attachment_id}/reprocess"
tags: ["attachments"]
---

# Reprocess Attachment

`POST /v1/attachments/{attachment_id}/reprocess`

Re-run the full attachment pipeline on an existing attachment.

Two use cases:
  1. Recover a 'failed' row — extraction or a later step crashed, leaving
     the attachment in a permanent error state. Reprocess re-extracts,
     re-classifies, and re-indexes from scratch.
  2. Re-run after schema change — template goals or classifier behavior
     changed and the attachment's file_role / document_kind should be
     recomputed.

The endpoint flips status to 'processing', runs the same `_process_attachment`
background-task body the upload path uses, and returns the freshly-updated
file_role + document_kind + form_structure.

## Path parameters

- `attachment_id` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/roxels/apis/interviewer.md) · [All operations](https://skmtc.dev/roxels/apis/interviewer/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/roxels/interviewer/revisions/4ef48ed226e1/schema)
