API Reference
Videos
Text tracks
Create

Create Text Tracks

You can create text tracks to provide subtitles and/or captions for your video audience. Ignite uses the WebVTT format for all text tracks. The WebVTT format is used by YouTube, Vimeo, and many more and is widely supported by all browsers and players. You can find out more about the WebVTT format here (opens in a new tab).

Create texttracks object

Creating texttracks is done by sending a PUT request to the /videos/:videoId/texttracks 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 PUT https://app.ignitevideo.cloud/api/videos/[VIDEO_ID]/texttracks \
-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 PUT https://app.ignitevideo.cloud/api/videos/[VIDEO_ID]/texttracks \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "language=en" \
-F "type=captions" \
-F "file=@[PATH_TO_VTT_FILE]"

Response

The newly created text track object.

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