---
title: "Upload file to batch"
method: PUT
path: "/v2/batches/{batch_id}/files/{filename}"
tags: ["batches"]
---

# Upload file to batch

`PUT /v2/batches/{batch_id}/files/{filename}`

Upload a file to a batch or update the contents of a previously uploaded file in a batch.

<Info>Files can be uploaded one at a time and the suggested max size for each file is 10 MB. For larger files, see [Multipart file upload](/api-sdk/api-reference/batches/create-multipart-upload-session).</Info>

<Note>If you upload a password-protected PDF, provide the password when you process the PDF with an AI Hub app. See instructions for configuring the `settings.runtime_config.instabase.pdf.passwords` property for the [Run deployment](/api-sdk/api-reference/runs/run-deployment#request.body.settings.runtime_config.instabase.pdf.passwords) or [Run app](/api-sdk/api-reference/runs/run-app#request.body.settings.runtime_config.instabase.pdf.passwords) operations.</Note>

## Path parameters

- `batch_id` integer, required
- `filename` string, required

## Headers

- `Authorization` string, required
- `IB-Context` string

## Response `204`

File uploaded successfully.

- object

## Other responses

- `404` — Batch with ID <BATCH-ID> does not exist.

---

[API](https://skmtc.net/instabase/apis/api-reference.md) · [All operations](https://skmtc.net/instabase/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/instabase/api-reference/revisions/3a4f46d48141/schema)
