> ## Documentation Index
> Fetch the complete documentation index at: https://bunnynet-cb9733c2-support-migration.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Collection



## OpenAPI

````yaml https://video.bunnycdn.com/openapi/bunnynet-video-api.public.json post /library/{libraryId}/collections
openapi: 3.0.0
info:
  title: Stream API
  termsOfService: https://bunny.net/tos
  contact:
    name: bunny.net
    url: https://docs.bunny.net
    email: support@bunny.net
  version: 1.5.3
servers:
  - url: https://video.bunnycdn.com
security: []
tags:
  - name: Manage Collections
  - name: Manage Videos
paths:
  /library/{libraryId}/collections:
    post:
      tags:
        - Manage Collections
      summary: Create Collection
      operationId: Collection_CreateCollection
      parameters:
        - name: libraryId
          in: path
          required: true
          schema:
            type: integer
            format: int64
          x-position: 1
      requestBody:
        x-name: model
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCollectionModel'
        required: true
        x-position: 2
      responses:
        '200':
          description: The collection was successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionModel'
        '401':
          description: The request authentication failed
        '403':
          description: The request authorization failed
        '500':
          description: Internal Server Error
      security:
        - AccessKey: []
components:
  schemas:
    UpdateCollectionModel:
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
          description: The name of the collection
          nullable: true
    CollectionModel:
      type: object
      additionalProperties: false
      properties:
        videoLibraryId:
          type: integer
          description: The video library ID that contains the collection
          format: int64
        guid:
          type: string
          description: The unique ID of the collection
          nullable: true
        name:
          type: string
          description: The name of the collection
          nullable: true
        videoCount:
          type: integer
          description: The number of videos that the collection contains
          format: int64
        totalSize:
          type: integer
          description: The total storage size of the collection
          format: int64
        previewVideoIds:
          type: string
          description: The IDs of videos to be used as preview icons
          nullable: true
        previewImageUrls:
          type: array
          description: The URLs of preview images of videos in the collection
          nullable: true
          items:
            type: string
  securitySchemes:
    AccessKey:
      type: apiKey
      description: AccessKey based authentication
      name: AccessKey
      in: header

````