---
title: "Upload files to S3"
method: POST
path: "/api/assets/upload"
tags: ["Assets - Admin"]
---

# Upload files to S3

`POST /api/assets/upload`

Upload one or more files to the S3 bucket associated with the given website (STAGING).

- Images (PNG, JPG, JPEG, GIF, BMP, TIFF, WEBP) are limited to 1MB and auto-converted to WebP
- Videos (MP4, WEBM, MOV, AVI) are limited to 30MB (nginx body cap)
- PDFs are limited to 10MB. Every other type is refused.

Returns `{"uploaded": [url, ...], "failed": [{"filename", "erro"}, ...]}`.
Validation (type/size/count) is all-or-nothing and happens BEFORE any write,
so a rejected file leaves nothing in S3; `failed` only carries per-file S3
errors that occur mid-write.

## Query parameters

- `prefix` string — Folder prefix to upload into (relative, must start with 'assets')

## Headers

- `x-website-token` string, nullable
- `x-api-token` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

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