---
title: "Upload a file or create resumable session"
method: POST
path: "/storage/{bucketName}/{path}"
tags: ["Storage Objects"]
---

# Upload a file or create resumable session

`POST /storage/{bucketName}/{path}`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/storage/{bucketName}/{path}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Unified endpoint for file uploads. Behavior depends on Content-Type and headers:

**Simple Upload (multipart/form-data):**
Upload a complete file in a single request. Best for files under 100MB.

**Create Resumable Session (application/json):**
Create a session for chunked uploads. Best for large files or unreliable networks.
Requires: `Content-Type: application/json` with body `{"filename": "...", "content_type": "...", "total_size": ...}`

**Complete Resumable Session:**
Complete a session after all parts are uploaded.
Requires: `X-Upload-Session` header with session ID and `X-Upload-Complete: true` header.

**Resumable Session Ownership:**
A session created with a user access token remains bound to that user. A session
created with an anon key remains bound to that exact anon key. Reuse the same
identity or anon key for part uploads, status, completion, and abort requests;
an ownership mismatch returns `404`.

## Path parameters

- `bucketName` string, required
- `path` string, required

## Headers

- `X-Upload-Session` string
- `X-Upload-Complete` 'true'

## Request body

- CreateUploadSessionRequest: Request to create a resumable upload session
  - `object_path` string, required: Target file path within the bucket
  - `content_type` string, required: MIME type of the file
  - `total_size` integer, required: Total file size in bytes (max 5TB)
  - `part_size` integer: Part size in bytes (default: 25MB, min: 5MB, max: 25MB)

## Response `200`

Resumable upload completed (when X-Upload-Complete=true)

- CompleteUploadSessionResponse: Response when completing an upload
  - `object` StorageObject
    - `id` string, uuid, required
    - `bucket_id` string, uuid, required
    - `name` string, required: Full path within bucket (e.g., "users/abc123/avatar.png")
    - `owner_id` string, uuid, nullable: Auth user who uploaded (null for anonymous/service)
    - `is_public` boolean, required: If true, the file can be downloaded with just an anon key (no user authentication). Files are private by default. Only the owner or a service key can change visibility.
    - `size` integer, required: File size in bytes
    - `mime_type` string, required: MIME type
    - `etag` string: Entity tag for cache validation
    - `metadata` object: Custom user metadata (key-value pairs). Limits: Maximum 50 keys, maximum 10KB total serialized size.
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `public_url` string, uri: Shareable public URL for this file (only set for public files with is_public=true). This URL requires NO authentication and can be embedded in HTML, shared via email, etc. The URL is properly URL-encoded by the server - use it as-is without additional encoding.

## Other responses

- `201`: File uploaded or session created
- `400`: Bad request. This can occur when: - MIME type is not in the bucket's allowed_mime_types list - File exceeds the bucket's configured file_size_limit - File exceeds the global maximum upload size (5GB) - Invalid request body or missing required fields
- `403`: Access denied by storage policy
- `404`: Resumable upload session not found or not owned by this credential
- `413`: File size exceeds plan-based limits. This occurs when: - File exceeds the plan-based maximum file size (HOBBY or SUPERAGENT tier) - The account on the HOBBY plan holds its file-storage allowance. Enforcement is eventual: uploads are accepted until Volcano's next allowance check sees the account at its allowance
- `429`: The platform user exceeded their billing-cycle bandwidth allowance (aggregate ingress + egress across owned projects). Enforcement is eventual: requests are rejected until the allowance increases or the next anniversary cycle begins.

## Changes

- **2026-09-19** `3a6f365f3f35`: 9 breaking, 20 info
  - added the new path request parameter `bucketName`
  - added the new required request property `content_type`
  - added the new required request property `object_path`
  - added the new required request property `total_size`
  - …25 more
- **2026-09-04** `c2ec82fb8ce8`: 1 info
  - added the non-success response with the status `404`
- **2026-08-27** `bb44e98aba2e`: 12 breaking, 17 warning
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `200`
  - the response's body type changed from `object` to no type for status `429`
  - the `oneOf[#/components/schemas/CreateUploadSessionResponse]/` response's property type changed from `object` to no type for status `201`
  - …25 more
- **2026-07-27** `bb52784e098a`: 1 info
  - added the optional property `code` to the response with the `429` status

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/storage/:bucketName/:path/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
