Get a processing
SDK platic.files.job()
Check whether file content is ready after creating, replacing or reprocessing it, or automatically refreshing a page. Poll its uploadId every few seconds until terminal is true. If you can only read the agent that uses the file, use the agent’s route.
Example
curl "https://api.platic.ai/v1/files/$FILE_ID/jobs/$UPLOAD_ID" \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.files.job("file_123", "upload_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
fileId | string | The file | ✓ |
uploadId | string | The processing (uploadId from the 202 response, or the file's latestUploadId) | ✓ |
Response
{
"status": "success",
"data": {
"fileId": "fH3kL9mQ2xR7",
"uploadId": "up_4Tn8Vb2Kc1",
"status": "ready",
"terminal": true,
"hasUsableContent": true,
"activeVersionId": "vr_2Lp9Qs",
"error": null,
"createdAt": "2026-11-01T10:00:00.000Z",
"updatedAt": "2026-11-01T10:01:12.000Z",
"moderation": {
"status": "approved",
"reasonCode": null,
"message": null,
"checkedAt": "2026-11-01T10:00:58.000Z",
"policyVersion": "ingestion_common_v1"
},
"trigger": "create",
"result": "updated"
}
} A processing that failed answers 200 with its reason in data.error:
{
"status": "success",
"data": {
"fileId": "kP7wQ2sN5tY1",
"uploadId": "up_9Rf3Jd6Hx2",
"status": "failed",
"terminal": true,
"hasUsableContent": false,
"activeVersionId": null,
"error": { "code": "UPLOAD_EXPIRED", "message": "The upload did not finish in time" },
"createdAt": "2026-11-01T10:00:00.000Z",
"updatedAt": "2026-11-01T11:00:04.000Z",
"moderation": {
"status": "pending",
"reasonCode": "INPUT_NOT_CHECKED",
"message": null,
"checkedAt": null,
"policyVersion": null
},
"trigger": "create",
"result": null
}
} The response’s status ("success") means the query succeeded. data.status is the processing job’s state.
Response fields
| Field | Type | Description |
|---|---|---|
fileId, uploadId | string | The file and the processing. |
status | string | awaiting_upload, queued, parsing, chunking, embedding, ready or failed (see processing). |
terminal | boolean | true with ready or failed. Stop asking. |
hasUsableContent | boolean | The file has content agents can use (from this processing or an earlier one). |
activeVersionId | string | null | The content agents use now. |
error | object | null | Only with failed: code and message. See the table below. |
moderation | object | The security review: status (pending, approved or rejected), reasonCode, message, checkedAt and policyVersion. |
trigger | string | What opened it: create, replace, reprocess, refresh (automatic page refresh) or migration. |
result | string | null | With ready: updated (agents use the new content) or unchanged (the text was the same; nothing changed). null until it finishes. |
createdAt, updatedAt | string | Dates in UTC. |
Why a processing fails
error.code | What happened | What to do |
|---|---|---|
PROCESSING_FAILED | The content could not be processed. | Reprocess it. |
PROCESSING_TIMEOUT | It took too long. | Reprocess it. |
SOURCE_INVALID | The document or the page cannot be read. | Check the source and replace it. |
UPLOAD_EXPIRED | The bytes of an upload did not arrive within an hour. | Replace it with a new upload. |
AUTHORITY_REVOKED | The permission of whoever requested it changed before it finished. | Request it again with permission. |
SOURCE_LIMIT_EXCEEDED | The content is too large. | Split it into several files. |
SOURCE_PAGE_LIMIT_EXCEEDED | It has too many pages. | Split it. |
SOURCE_DERIVED_LIMIT_EXCEEDED | The resulting text is too long. | Split it. |
STORAGE_LIMIT_EXCEEDED | The workspace reached its storage limit. | Delete files you no longer use. |
SOURCE_CONTENT_MISMATCH | The content does not match the declared type. | Send the correct contentType. |
SOURCE_FORMAT_REJECTED | That format cannot be used. | Convert it to one from the list. |
SOURCE_CONTAINER_INVALID | The document is damaged inside. | Export it again. |
SOURCE_CONTAINER_LIMIT_EXCEEDED | The document has too much content inside. | Split it. |
SOURCE_INSPECTION_INCOMPLETE | The whole document could not be checked. | Reprocess it. |
CONTENT_POLICY_REJECTED | The content did not pass the security review (moderation.status: "rejected"). | Change the content. |
CONTENT_REVIEW_UNAVAILABLE | The review was not available. | Reprocess it later. |
CONTENT_REVIEW_INCOMPLETE | The review did not finish. | Reprocess it. |
If the file already had content, a failed processing does not touch it: agents keep using the previous one.
Errors
| Status | details.code | When |
|---|---|---|
403 | RESOURCE_NOT_ACCESSIBLE | You do not have Integrations nor can you edit all the agents that use it. |
404 | RESOURCE_NOT_ACCESSIBLE | That file or that processing does not exist. |
410 | JOB_GONE | The processing is old and no longer stored. Read the file. |
The ones that apply to all operations are in common errors.
Notes
- In the SDK,
platic.files.job(fileId, uploadId)reads the state once. If you want to wait until it finishes without writing your own loop, useawait platic.files.waitForJob(fileId, uploadId)(it returns the job even ifstatusisfailed).