---
docId: doc_ddf5e1e547b24c00a2a5c72ed6f2ad17
title: Get a processing
description: "Checks a file processing job’s state and failure reasons."
api:
  group: archivos
  auth: bearer
  operations:
    - operationId: getFileJob
      method: GET
      path: '/v1/files/{fileId}/jobs/{uploadId}'
      postmanName: Get a processing
---

<script>
  import { Ways, Collapsible } from '$lib/components';
</script>

# Get a processing

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](/api-reference/agents/files/processing).

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl "https://api.platic.ai/v1/files/$FILE_ID/jobs/$UPLOAD_ID" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.files.job("file_123", "upload_123");
```

</Ways.Way>
</Ways>

## 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

```json
{
  "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`:

```json
{
  "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](/api-reference/files#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

<Collapsible summary="Look up error.code and how to fix it">

| `error.code` | What happened | What to do |
|--------------|---------------|------------|
| `PROCESSING_FAILED` | The content could not be processed. | [Reprocess it](/api-reference/files/reprocess). |
| `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](/api-reference/files#limits). |
| `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.

</Collapsible>

## 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](/api-reference/files#common-errors).

## Notes

- In the [SDK](/sdk), `platic.files.job(fileId, uploadId)` reads the state once. If you want to wait until it finishes without writing your own loop, use `await platic.files.waitForJob(fileId, uploadId)` (it returns the job even if `status` is `failed`).
