---
title: "Upload a file into the workspace Library (proxy transport)"
method: POST
path: "/workspaces/{workspaceId}/library"
tags: ["Library"]
---

# Upload a file into the workspace Library (proxy transport)

`POST /workspaces/{workspaceId}/library`

## Request

- Base URL: `https://api.rendley.com/v1`
- URL: `https://api.rendley.com/v1/workspaces/{workspaceId}/library`
- Auth: API key in header `Authorization`

Single-call upload: stream the raw file bytes as the request body. The server hashes while storing and returns the completed asset — no separate complete step. Metadata travels in query params. Content-Length is required; files above the proxy cap must use the multipart flow. If identical content already exists in the Library the existing asset is returned with deduplicated=true.

## Path parameters

- `workspaceId` string, required

## Query parameters

- `file_name` string
- `mime_type` string
- `duration` number
- `file_hash` string
- `source` string

## Response `200`

OK

- object
  - `data` object: Success data
    - `created_at` string
    - `deduplicated` boolean: Deduplicated marks a proxy-upload response that resolved to an existing asset with identical content instead of storing a second copy.
    - `download_url` string: DownloadUrl is a presigned GET that forces a browser download (Content-Disposition: attachment) under the original filename. Expires like Url.
    - `duration` number
    - `file_hash` string
    - `file_size` integer
    - `id` string
    - `media_id` string: MediaID is the upload's storage_key; clients reuse it as the editor media id when bridging a library asset into a project, so ids stay stable.
    - `mime_type` string
    - `original_file_name` string
    - `source` string
    - `status` 'uploading' | 'importing' | 'complete' | 'failed'
    - `tags` string[]
    - `thumbnail_url` string: ThumbnailUrl is a presigned GET for the server-generated poster (video first frame / GIF still). Empty when none exists. Expires like Url.
    - `url` string: Url is a presigned GET for the asset bytes. Expires — never persist it.
    - `workspace_id` string
  - `error` HttpResponseAPIError
    - `code` string
    - `fields` HttpResponseFieldError[]
      - `field` string
      - `message` string
    - `message` string
  - `meta` unknown

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `413`: Request Entity Too Large

---

[API](https://skmtc.dev/rendley/apis/rendley-api.md) - [All operations](https://skmtc.dev/rendley/apis/rendley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rendley/apis/rendley-api/revisions/7eb8713bbf78?raw)
