---
title: "Create a library in this organization."
method: POST
path: "/organizations/{organizationId}/libraries"
tags: ["Libraries"]
---

# Create a library in this organization.

`POST /organizations/{organizationId}/libraries`

## Request

- Base URL: `https://api.raster.app`
- URL: `https://api.raster.app/organizations/{organizationId}/libraries`
- Auth: HTTP bearer

Creates an empty library. Requires a write-scoped credential; a read-only key returns API_KEY_READ_ONLY, and the free plan returns LIBRARY_LIMIT_EXCEEDED once its library allowance is used up.

## Path parameters

- `organizationId` string, required

## Headers

- `Api-Version` string, required

## Request body

- object
  - `name` string, required
  - `slug` string

## Response `201`

Created

- object
  - `data` Library, required: Represents a collection of assets.
    - `id` string, required
    - `name` string, nullable, required
    - `assetsCount` integer, nullable, required
    - `photosCount` integer, nullable, required
    - `trashCount` integer, nullable, required
    - `tags` Tag[], nullable, required
      - `id` string, required
      - `count` integer, nullable, required
      - `type` string, nullable, required

## Other responses

- `400`: Invalid input (BAD_USER_INPUT), quota, or API-version error.
- `401`: Missing or invalid API key or access token.
- `403`: The credential may not perform this operation, or the organization's plan does not allow it. A key without access to a library gets 404, not 403.
- `404`: Resource not found, or the credential is not authorized for it.
- `429`: Rate limit exceeded. Wait for the number of seconds in `Retry-After` before retrying.
- `500`: Unexpected server fault (INTERNAL_SERVER_ERROR). Safe to retry an idempotent operation.

---

[API](https://skmtc.dev/raster/apis/raster-rest-api.md) · [All operations](https://skmtc.dev/raster/apis/raster-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/raster/apis/raster-rest-api/revisions/5e1b9d912d01?raw)
