---
title: "POST link-file-to-library"
method: POST
path: "link-file-to-library"
---

# POST link-file-to-library

`POST link-file-to-library`

## Request

- Base URL: `https://design.penpot.app/api/main/methods`
- URL: `https://design.penpot.app/api/main/methods/link-file-to-library`
- Auth: none declared

Link a file to a library. Returns the recursive list of libraries used by that library

## Request body

- object
  - `fileId` string, uuid, required: UUID formatted string
  - `libraryId` string, uuid, required: UUID formatted string

---

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