---
title: "Upload a file"
method: POST
path: "/v1/utilities/uploads"
tags: ["Media"]
---

# Upload a file

`POST /v1/utilities/uploads`

Upload a file and receive an `upload_id`. Pass this ID in the `media` array when creating or updating a product.

Files must be sent as `multipart/form-data`. Maximum size is **20 MB**.

## Response `201`

Upload created

- UploadResponse
  - `upload_id` string
  - `provider` string
  - `file_name` string
  - `mime_type` string
  - `file_size_bytes` integer
  - `url` string, nullable
  - `linked_resource_type` string, nullable — Resource type this upload is attached to, e.g. `product`.
  - `linked_resource_id` string, nullable — ID of the resource this upload is attached to.
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — unresolved $ref
- `401` — Unauthorized - Invalid, missing, or expired API key. Verify your API key is correctly formatted and included in the Authorization header as `Bearer sk_sandbox_...` or `Bearer sk_live_...`. Check that your key hasn't been revoked.

---

[API](https://skmtc.dev/bachs/apis/bachs-api.md) · [All operations](https://skmtc.dev/bachs/apis/bachs-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bachs/bachs-api/revisions/f29efa8a22df/schema)
