# Save a human-corrected extraction for a FILE document.

`PUT /api/plugins/docs/documents/{id}/extracted-text`

Authentication: no security requirement declared for this operation.

Parameters:

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

Request body: application/json (required)

Type: object

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

- `extractedText` (required)
  Type: string
  
  The corrected extraction markdown (≤ 5 MiB)

Responses:

- 200: Extracted text saved.

- 409: Not a FILE document.

## Examples

### cURL

```bash
curl -X PUT 'http://localhost:3000/api/plugins/docs/documents/string/extracted-text' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "extractedText": "string"
}'
```

### JavaScript

```javascript
const body = `{
  "extractedText": "string"
}`;

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

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

### Python

```python
import requests

body = '''{
  "extractedText": "string"
}'''

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