Reprocess a file
Read a file’s source again or retry failed processing. Send its fileId, with no body or with {}:
- On a
urlfile, it re-reads the page now (in the platform, Update now). - On a
fileortextfile, it reprocesses the original that was stored (Reprocess). - On a file whose last processing failed, it tries again (Retry).
While it is processing, agents keep using the previous content. If the resulting text is the same as the one already in use, it ends in ready with result: "unchanged" and nothing changes.
Example
curl -X POST "https://api.platic.ai/v1/files/$FILE_ID/reprocess" \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.files.reprocess("file_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
fileId | string | The file | ✓ |
Request body
Empty. You can send no body or an empty object:
{} Response
202 Accepted:
{
"status": "success",
"data": {
"accepted": true,
"fileId": "fH3kL9mQ2xR7",
"uploadId": "up_3Hs8Kq1Vm5",
"link": null,
"statusUrl": "/v1/files/fH3kL9mQ2xR7/jobs/up_3Hs8Kq1Vm5"
}
} Response fields
The response uses the fields from Create a file, with link: null because connections do not change. Poll the processing job until terminal is true. Its trigger is reprocess; result shows whether the content changed. For a url file, completion updates refresh.lastRunAt, lastResult and nextRunAt.
Errors
| Status | details.code | When |
|---|---|---|
403 | RESOURCE_NOT_ACCESSIBLE | You do not have Integrations nor can you edit all the agents that use it. |
409 | FILE_JOB_IN_PROGRESS | There is already an open processing on this file. Wait for it to finish. |
409 | SOURCE_UNAVAILABLE | There is no stored original or page to read (for example, an upload that never finished). Replace it with new content. |
410 | FILE_DELETED | The file was already deleted. |
429 | QUOTA_EXCEEDED | There are already 30 open processings in the workspace. |
The ones that apply to all operations are in common errors.
Reprocessing does not change the title, the description or the page. To change the source, use replace the content. To have a page read itself every so often, keep it up to date.