---
title: "Create Collection"
method: POST
path: "/library/{libraryId}/collections"
tags: ["Manage Collections"]
---

# Create Collection

`POST /library/{libraryId}/collections`

## Path parameters

- `libraryId` integer, required

## Request body

- UpdateCollectionModel
  - `name` string, nullable — The name of the collection

## Response `200`

The collection was successfully created

- CollectionModel
  - `videoLibraryId` integer — The video library ID that contains the collection
  - `guid` string, nullable — The unique ID of the collection
  - `name` string, nullable — The name of the collection
  - `videoCount` integer — The number of videos that the collection contains
  - `totalSize` integer — The total storage size of the collection
  - `previewVideoIds` string, nullable — The IDs of videos to be used as preview icons
  - `previewImageUrls` string[], nullable — The URLs of preview images of videos in the collection

## Other responses

- `401` — The request authentication failed
- `403` — The request authorization failed
- `500` — Internal Server Error

---

[API](https://skmtc.net/bunny/apis/bunny-net-cdn-logging.md) · [All operations](https://skmtc.net/bunny/apis/bunny-net-cdn-logging/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bunny/bunny-net-cdn-logging/revisions/9e622620664b/schema)
