API Reference
Videos
Text tracks
Update

Update Text Tracks

Update texttrack

Updating a single texttrack is done by sending a PATCH request to the /videos/:videoId/texttracks/:texttrackId endpoint with the desired changes.

Option 1: Provide VTT content as string

curl -X PATCH https://app.ignitevideo.cloud/api/videos/[VIDEO_ID]/texttracks/[TEXTTRACK_ID] \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"language": "en", "type": "captions", "content": "[VTT_CONTENT]"}'

Option 2: Provide VTT file

Content-Type has to be multipart/form-data and not application/json. The file and language have to be sent as part of the form data.

curl -X PATCH https://app.ignitevideo.cloud/api/videos/[VIDEO_ID]/texttracks/[TEXTTRACK_ID] \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "language=en" \
-F "type=captions" \
-F "file=@[PATH_TO_VTT_FILE]"

Response

Updated text track object.

{
  "id": string,
  "language": "en""de" | "it" | "fr""...",
  "type": "subtitles" | "captions",
  "filename": string,
  "url": string,
  "content": string
}