Skip to Content

Update Text Tracks

Update texttracks object

Updating texttracks is done by sending a PATCH request to the /videos/:videoId/texttracks/:texttrackId endpoint with either an attached VTT file or by passing the VTT content as a string.

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

The updated text track object.

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