---
title: "Update Video"
method: POST
path: "/library/{libraryId}/videos/{videoId}"
tags: ["Manage Videos"]
---

# Update Video

`POST /library/{libraryId}/videos/{videoId}`

## Request

- Base URL: `https://video.bunnycdn.com`
- URL: `https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}`
- Auth: API key in header `AccessKey`
- TypeScript: <https://skmtc.dev/bunny/apis/stream-api/docs/library/:libraryId/videos/:videoId/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `libraryId` integer, required
- `videoId` string, required

## Request body

- UpdateVideoModel
  - `title` string, nullable: The title of the video
  - `collectionId` string, nullable: The ID of the collection where the video belongs. Omit/null to leave the current collection unchanged; send an empty string to remove the video from its collection.
  - `chapters` ChapterModel[], nullable: The list of chapters available for the video, up to 200. Omit/null to leave existing chapters unchanged; providing a list, including an empty one, fully replaces all existing chapters.
    - `title` string, required: The title of the chapter, up to 255 characters.
    - `start` integer: The start time of the chapter in seconds. Must be less than End and within the video's duration; chapters must not overlap each other.
    - `end` integer: The end time of the chapter in seconds. Must be greater than Start and within the video's duration; chapters must not overlap each other.
  - `moments` MomentModel[], nullable: The list of moments available for the video, up to 200. Omit/null to leave existing moments unchanged; providing a list, including an empty one, fully replaces all existing moments.
    - `label` string, required: The text description label for the moment, up to 255 characters.
    - `timestamp` integer: The timestamp of the moment in seconds. Must be within the video's duration.
  - `metaTags` MetaTagModel[], nullable: The meta tags added to the video, up to 50. Omit/null to leave existing tags unchanged; providing a list, including an empty one, fully replaces all existing tags. Setting a tag with Property "description" also updates the video's Description field.
    - `property` string, nullable: The meta tag key. Must match ^[A-Za-z0-9._:'"-]+$. Setting a tag with the property "description" also updates the video's Description field.
    - `value` string, nullable: The meta tag value. HTML/markup is stripped and the value is stored as plain text.

## Response `200`

The video was successfully updated

- StatusModel
  - `success` boolean: Determines if the request was successful
  - `message` string, nullable: Human-readable message describing the result, typically populated with error details when Success is false.
  - `statusCode` integer: The HTTP status code corresponding to the result of the request.

## Other responses

- `401`: The request authentication failed
- `403`: The request authorization failed
- `404`: The requested video was not found
- `500`: Internal Server Error

## Changes

- **2026-11-12** `83116184952f`: 4 info
  - added the media type `application/json` for the response with the status `401`
  - added the media type `application/json` for the response with the status `403`
  - added the media type `application/json` for the response with the status `404`
  - added the media type `application/json` for the response with the status `500`

[Operation history](https://skmtc.dev/bunny/apis/stream-api/changes/library/:libraryId/videos/:videoId/post.md)

---

[API](https://skmtc.dev/bunny/apis/stream-api.md) - [All operations](https://skmtc.dev/bunny/apis/stream-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/stream-api/revisions/83116184952f?raw)
