---
title: "Upload Folder Media"
method: POST
path: "/api/folders/media"
tags: ["domains"]
---

# Upload Folder Media

`POST /api/folders/media`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/folders/media`
- Auth: none declared

Upload an image into a folder, or the caller's personal scope
(TOS-2452) - the visual editor's paste-to-upload target.

``library_id=None`` uploads into personal scope (identity-owned; no rung
check needed). Otherwise the caller needs edit+ on the folder
(``_check_kb_write_permission``). Image MIME-type and pixel-budget rules
are enforced by ``put_library_media_document`` itself; any ``ValueError``
it raises (unsupported type, too many pixels) maps to 400 with its message.

## Headers

- `x-impersonate-identity-id` string, nullable

## Request body

- UploadLibraryMediaRequest
  - `library_id` string, uuid, nullable
  - `filename` string, required
  - `mime_type` string, required
  - `content_base64` string, required
  - `title` string, nullable

## Response `201`

Successful Response

- LibraryMediaUploadResponse
  - `document_id` string, uuid, required
  - `slug` string, required
  - `filename` string, required
  - `mime_type` string, required
  - `size` integer, required
  - `render_path` string, required

## Other responses

- `422`: Validation Error

---

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