---
title: "Initiate batch GCS async upload"
method: POST
path: "/api/users/files/upload/initiate-batch"
tags: ["users/files"]
---

# Initiate batch GCS async upload

`POST /api/users/files/upload/initiate-batch`

## Request

- Base URL: `https://localhost:8080`
- URL: `https://localhost:8080/api/users/files/upload/initiate-batch`
- Auth: `bearer` (a scheme the document does not define)

Creates pending document records and signed PUT URLs for multiple files in one folder

## Request body

- InitiateBatchFileUploadDto
  - `folderId` string, required: Target folder ID
  - `files` InitiateBatchFileMetadataDto[], required
    - `fileName` string, required: Original file name
    - `mimeType` string, required: File MIME type
    - `fileSize` number, required: File size in bytes
  - `versionOfDocumentId` string: Attach this upload as a new version of the given document (its version stack).

## Response `200`

documents[] and optional per-file errors

## Other responses

- `400`: All files failed validation
- `401`: Unauthorized
- `404`: Folder not found

---

[API](https://skmtc.dev/opencase/apis/opencase-backend-api.md) · [All operations](https://skmtc.dev/opencase/apis/opencase-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/opencase/apis/opencase-backend-api/revisions/c66ef2d8dc00?raw)
