---
title: "Assign a library to a tenant"
method: POST
path: "/tenants/{tenant_id}/libraries/{library_id}"
tags: ["Tenant"]
---

# Assign a library to a tenant

`POST /tenants/{tenant_id}/libraries/{library_id}`

## Request

- Base URL: `https://api.your-domain.com`
- URL: `https://api.your-domain.com/tenants/{tenant_id}/libraries/{library_id}`
- Auth: API key in header `X-API-KEY`
- TypeScript: <https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/docs/tenants/:tenant_id/libraries/:library_id/post.ts> (a function with typed inputs; its response is checked against the schema)

Assign a library to a tenant (library owner who is admin of that tenant).

## Path parameters

- `library_id` integer, required
- `tenant_id` integer, required: ID of the tenant.

## Query parameters

- `cookie_name` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `401`: Missing or invalid authentication.
- `403`: Library owner and tenant admin privileges required.
- `404`: Current user not found.
- `422`: Validation Error

---

[API](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api.md) - [All operations](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/revisions/b53e89b98c2b?raw)
