---
title: "Upload a section of file data"
method: PUT
path: "/api/fleet/uploads/{id}/{chunkNum}"
---

# Upload a section of file data

`PUT /api/fleet/uploads/{id}/{chunkNum}`

Upload portions of the intended file in a piecewise fashion. This route is idempotent in that any successive calls will overwrite previous ones for the same URL parameters. Chunks may be uploaded in any order, and may be uploaded in parallel. The body is the raw contents of the file at the given position matching the chunk number. The body must be the exact chunk size returned from the upload initiation response. All chunks must be this size except for the final one, which is naturally the file remainder.

## Path parameters

- `id` string, required
- `chunkNum` integer, required

## Headers

- `X-Chunk-SHA2` string, required
- `X-Request-Id` string
- `Elastic-Api-Version` string

## Response `200`

Successful chunk upload

## Other responses

- `400` — A 400 response for receiving an invalid User-Agent, Elastic-Api-Version header or version number (checkin and enroll endpoints). In the case where an invalid or unsupported Elastic-Api-Version header is requested, the response will contain the default version number. Or any other undefined error encounted by the fleet-server. May be returned by any endpoint except /api/fleet/status.
- `401` — 401 response when the API key is not enabled on any endpoint except /api/fleet/status. Or when there are issues updating an inactive agent on the ack endpoint.
- `408` — 408 request timeout.
- `500` — A 500 response for encountering not expected bahavior.
- `503` — 503 response when the server is not available for some reason. Such as if a context is cancelled or the connection (to ES) is refused. May be returned by any endpoint.

---

[API](https://skmtc.net/elastic/apis/fleet-server-api.md) · [All operations](https://skmtc.net/elastic/apis/fleet-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/fleet-server-api/versions/e1c8da877dd8/schema)
