Skip to main content
POST
/
library
/
{libraryId}
/
videos
/
{videoId}
/
captions
/
{srclang}
Add Caption
curl --request POST \
  --url https://video.bunnycdn.com/library/{libraryId}/videos/{videoId}/captions/{srclang} \
  --header 'AccessKey: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "srclang": "<string>",
  "label": "<string>",
  "captionsFile": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "statusCode": 123
}

Authorizations

AccessKey
string
header
required

AccessKey based authentication

Path Parameters

libraryId
integer<int64>
required
videoId
string
required
srclang
string
required

Body

application/json
srclang
string | null

The unique srclang shortcode for the caption

label
string | null

The text description label for the caption

captionsFile
string | null

Base64 encoded captions file

Response

The caption was successfully uploaded

success
boolean

Determines if the request was successful

message
string | null

Response message description

statusCode
integer<int32>

The response status code