---
title: "Add a library to a project"
method: POST
path: "/projects/{project_id}/libraries/{library_id}"
tags: ["Project"]
---

# Add a library to a project

`POST /projects/{project_id}/libraries/{library_id}`

Enable a library for a project by creating an association.

## Path parameters

- `project_id` integer, required
- `library_id` integer, required

## Query parameters

- `cookie_name` string, nullable

## Response `201`

Successful Response

- ProjectLibrary
  - `created_at` string, date-time — UTC timestamp when the record was created.
  - `updated_at` string, date-time — UTC timestamp when the record was last updated.
  - `creator_user_id` integer, required — ID of the user who created the record.
  - `updater_user_id` integer, nullable — ID of the user who last updated the record, if any.
  - `project_id` integer, required — ID of the project.
  - `library_id` integer, required — ID of the library linked to the project.

## Other responses

- `401` — Missing or invalid authentication.
- `403` — Current user lacks access to the library or the project.
- `404` — Library or project not found.
- `422` — Validation Error

---

[API](https://skmtc.net/neulandai/apis/neuland-ai-hub-api.md) · [All operations](https://skmtc.net/neulandai/apis/neuland-ai-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neulandai/neuland-ai-hub-api/versions/b53e89b98c2b/schema)
