# Batch Request Presigned Upload URLs

Reserve Cloud Storage records and get pre-signed upload URLs.
- **Preconditions**: the team must have a Cloud Storage record and it must not be expired. Each base file name is limited to 60 characters and must be unique both within the request and against every existing file in the team — **matched on the name without its extension**, so `a.png` collides with an existing `a.mp4`.
- **Limits**: at most 100 uploads may sit unconfirmed at once across the team.
- **Effect**: inserts one file record per name with an uploading status and a zero size, and returns `{id, fileName, presignedUrl}` for each.
- **Quota**: **space is not checked here.** It is charged when you confirm the upload, so init can succeed and complete can still fail for lack of space.
- **Completion**: synchronous. **Each pre-signed URL is valid for one hour**; `PUT` the bytes to it, then call `/cloudstorage/upload/complete`.

Documented business errors: `39001`, `39037`, `39044`, `39045`, `39047`, `39050`, `39051`. See [Error Codes](../Getting%20Started/error-codes.md) for what each code means. Any operation can additionally return the common codes.

Endpoint: POST /api/cloudstorage/upload/init
Version: 2026-09-05

## Request fields (application/json):

  - `fileNames` (array, required)
    List of file names to upload (with extensions), e.g. photo.jpg, video.mp4.
    Example: ["photo.jpg","video.mp4"]

## Response 200 fields (application/json):

  - `code` (integer, required)
    Return result code. `0` means success; other codes indicate exceptions.
    Example: 0

  - `msg` (string | null, required)
    Error message.
    Example: null

  - `requestId` (string)
    Operation request ID. This field may be present when the request passes through the API gateway.
    Example: 1d4f3ea968664593860b94b35d4ebf5e

  - `data` (array, required)

  - `data.id` (string)
    Cloud storage file ID.
    Example: 1800000000000001

  - `data.fileName` (string)
    File name (with extension).
    Example: photo.jpg

  - `data.presignedUrl` (string)
    S3 presigned upload URL. Use HTTPS PUT to upload the file content.
    Example: https://example.com/presigned-upload-url

