# Get the status of a file batch
Source: https://docs.file.ai/api-reference/uploads/get-the-status-of-a-file-batch

> One handle to poll for a batch registered with POST /files/upload/batch: per-file states and a roll-up of counts, instead of polling every uploadId.

get /prod/v1/files/upload/batch/{batchId}

One handle to poll for a batch registered with POST /files/upload/batch: per-file states and a roll-up of counts, instead of polling every uploadId.

`state` stays `in_progress` until every registered file is settled (`succeeded`, `failed`
or `expired`), then becomes `completed` (all succeeded), `failed` (none succeeded) or
`partially_failed` (mixed). Files rejected at registration are counted in `counts.rejected`
and as failures. `counts` always covers the whole batch, on every page.

A batch in which every file was rejected is settled at once as `failed`, with an empty
`files[]`, and its callback is sent like any other.

`settlement` is saved once, when the batch first settles, and never changes after that;
it is null until then. A background job also settles batches that nobody polls.
`state` and `counts` stay live.

`callback` reports delivery to `defaults.batchCallbackURL` (null when the batch has none):
one POST of `{ event: "upload.batch.settled", batchId, uploadType, state, counts, settledAt,
failures }` after the batch settles. A non-2xx answer, timeout or network error is retried
after 1 min, 5 min, 30 min, 2 h and 12 h, then `failed`. A URL that resolves to a private
address fails without retrying. Delivery is at least once, so use `batchId` to drop duplicates.

`files[]` is paged in request order: `limit` 1-100 (default 100), then follow
`pagination.nextCursor`. An invalid `limit`, or a cursor that is malformed or from another
batch, answers 400.

A file registered but never uploaded is `expired` 30 minutes after its presigned URL
expired, and counts toward the roll-up so it never blocks the batch.

Only batches from POST /files/upload/batch. A multipart batch (POST
/files/upload/multipart/batch) has its own status at GET
/files/upload/multipart/batch/{batchId} and answers 404 here, the same 404 as a batchId
that does not exist or belongs to another project.
