---
title: "Create a library item"
method: POST
path: "/library-items"
tags: ["Library"]
---

# Create a library item

`POST /library-items`

Create a library item. Either file or url must be provided but not both.

## Headers

- `X-Company-ID` string, required

## Request body

- LibraryItem — Mixin to delegate create, update, and destroy operations to a service class.
  - `id` string, uuid, required
  - `name` string, required
  - `url` string, uri, nullable
  - `file` string, uri, nullable
  - `folder_id` integer, nullable
  - `sharing_scheme` string
  - `shared_with` string[]
  - `created_by` integer, required
  - `company_id` string, uuid, required
  - `created_at` string, date-time, required

## Response `201`

- LibraryItem — Mixin to delegate create, update, and destroy operations to a service class.
  - `id` string, uuid, required
  - `name` string, required
  - `url` string, uri, nullable
  - `file` string, uri, nullable
  - `folder_id` integer, nullable
  - `sharing_scheme` string
  - `shared_with` string[]
  - `created_by` integer, required
  - `company_id` string, uuid, required
  - `created_at` string, date-time, required

## Other responses

- `400` — Bad request. Validation error.
- `401` — Unauthorized
- `403` — Forbidden. Request was valid, but you do not have necessary permissions.

---

[API](https://skmtc.net/cubesoftware/apis/cube-api.md) · [All operations](https://skmtc.net/cubesoftware/apis/cube-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cubesoftware/cube-api/revisions/67d9f45bb99b/schema)
