---
title: "Upload an asset for an app"
method: POST
path: "/app/{id}/assets"
---

# Upload an asset for an app

`POST /app/{id}/assets`

## Request

- Base URL: `https://charm.ing`
- URL: `https://charm.ing/app/{id}/assets`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Multipart upload of a single file asset. Auth posture: `requireAppAccess` (app token, user token, render token, or claim cookie). Hard caps: 10 MiB/asset, 50 assets/app, 100 MiB/app total.

## Response `201`

Asset uploaded.

- AssetUploadResponse: Confirmation that an asset was stored, with a signed URL for direct access.
  - `ok` true, required
  - `key` string, required
  - `url` string, required: Signed URL for direct access.
  - `sizeBytes` integer, required

## Other responses

- `400`: Missing or invalid field. Error kinds: `invalid_request`, `asset_invalid_key`, `asset_invalid_content_type`.
- `401`: Authentication required.
- `403`: Token does not authorize this app.
- `404`: App not found.
- `413`: File or quota exceeded. Error kinds: `asset_too_large` (file > 10 MiB), `asset_count_exceeded` (50 asset cap), `asset_quota_exceeded` (100 MiB app cap).
- `429`: Asset write rate limit exceeded. Error kind: `too_many_requests`.

---

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