---
title: "Bridge a Library asset into a project"
method: POST
path: "/workspaces/{workspaceId}/library/{uploadId}/add-to-project"
tags: ["Library"]
---

# Bridge a Library asset into a project

`POST /workspaces/{workspaceId}/library/{uploadId}/add-to-project`

## Request

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

Server-side copy of the asset into the project's media storage plus a role=staged upload row — the editor adopts it on reference instead of re-uploading bytes. Returns the project-side upload (media_id, file_hash, presigned URL).

## Path parameters

- `workspaceId` string, required
- `uploadId` string, required

## Request body

- TypesLibraryAddToProjectInput
  - `project_id` string, required

## Response `200`

OK

- object
  - `data` object: Success data
    - `duration` number
    - `error` string: Error says why a failed upload failed.
    - `file_hash` string
    - `media_id` string: MediaID is the upload's storage_key — the library media id the client should reuse when injecting a pending upload, so ids stay stable across backend and editor.
    - `mime_type` string
    - `original_file_name` string
    - `role` string
    - `status` string
    - `storage_url` string
  - `error` HttpResponseAPIError
    - `code` string
    - `fields` HttpResponseFieldError[]
      - `field` string
      - `message` string
    - `message` string
  - `meta` unknown

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found

---

[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)
