---
title: "Add Caption"
method: POST
path: "/library/{libraryId}/videos/{videoId}/captions/{srclang}"
tags: ["Manage Videos"]
---

# Add Caption

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

## Path parameters

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

## Request body

- CaptionModelAdd
  - `srclang` string, nullable — The unique srclang shortcode for the caption
  - `label` string, nullable — The text description label for the caption
  - `captionsFile` string, nullable — Base64 encoded captions file

## Response `200`

The caption was successfully uploaded

- StatusModelOfCaptionValidationModel
  - `success` boolean — Determines if the request was successful
  - `message` string, nullable — Response message description
  - `statusCode` integer — The response status code
  - `data` CaptionValidationModel
    - `valid` boolean — Denotes whether uploaded captions file was valid
    - `errorList` string[], nullable — When uploaded file was invalid, will contain errors found
    - `warningList` string[], nullable — When uploaded file was valid but non-breaking issues were found, will contain issues found
    - `warningMessage` string, nullable — UI-friendly summary of warnings found in the uploaded captions file

## Other responses

- `400` — Failed uploading the captions
- `401` — The request authentication failed
- `403` — The request authorization failed
- `404` — The requested video was not found
- `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)
