# Reprocess a FILE document from the extract stage.

`POST /api/plugins/docs/documents/{id}/reprocess`

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (path, string, required)
  Type: string

Request body: application/json (required)

Type: object

Schema: [ReprocessDocumentDTO](https://sourcey-gauzy.pages.dev/api-reference/models/reprocessdocumentdto/index.md)

- `force` (optional)
  Type: boolean

- `ocr` (optional)
  Type: boolean

- `overwriteEdited` (optional)
  Type: boolean

Responses:

- 200: Reprocess enqueued.

- 409: Human-edited extraction would be overwritten.

## Examples

### cURL

```bash
curl -X POST 'http://localhost:3000/api/plugins/docs/documents/string/reprocess' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "force": true,
  "ocr": true,
  "overwriteEdited": true
}'
```

### JavaScript

```javascript
const body = `{
  "force": true,
  "ocr": true,
  "overwriteEdited": true
}`;

const response = await fetch('http://localhost:3000/api/plugins/docs/documents/string/reprocess', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "force": true,
  "ocr": true,
  "overwriteEdited": true
}'''

response = requests.post(
    'http://localhost:3000/api/plugins/docs/documents/string/reprocess',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
