Upload Video Chapters
This endpoint uploads a chapter(s) for a specified video. Posting chapters replaces all existing chapters a video contains. There can be multiple chapter titles and start times. The endpoint requires the user have edit rights to the video.
Path Parameters
| Parameter | Type | Validations |
|---|---|---|
| videoId | string, required | ID of video to upload chapters to |
Request Body
application/json
{
{
"chapters": [
{
"title": "chart001",
"time": "00:00:01",
"imageFile": "chart001.png"
},
{
"title": "photo001",
"time": "00:00:40",
"imageFile": "photo001.png"
},
{
"title": "chart002",
"time": "00:00:59",
"imageFile": "chart002.png"
},
{
"title": "photo002",
"time": "00:01:29",
"imageFile": "photo002.png"
},
{
"title": "chart003",
"time": "00:01:45",
"imageFile": "chart003.png"
},
{
"title": "photo003",
"time": "00:02:40",
"imageFile": "photo003.png"
},
{
"title": "chart004",
"time": "00:03:01",
"imageFile": "chart004.png"
},
{
"title": "photo004",
"time": "00:03:40",
"imageFile": "photo004.jpg"
},
{
"title": "chart005",
"time": "00:04:01",
"imageFile": "chart005.png"
},
{
"title": "photo005",
"time": "00:04:33",
"imageFile": "photo005.png"
},
{
"title": "THE END",
"time": "00:04:48",
"imageFile": "theend.png"
}
]
}
}
| Parameter | Type | Validations |
|---|---|---|
| chapters | object [ ], required | Video chapters metadata object. |
| title | string, required | The chapter title |
| time | string, required | Chapter start time using timespan format: 00:00:00. This must be unique and cannot be the same as other start times. |
| imageFile | string, optional |
Image file for the chapter. Must be one of the media types listed here. Please provide Content-Type header for the uploaded image file. Note that when you do specify an imageFile, it must be unique. |
Response Messages
Successful response
Bad request
- code = “ChaptersRequired” = “Request needs to have one or more chapters to associate to a video.”
- code = “ChapterTimeRequired” = “Chapter start time is not specified.”
- code = “ChapterTitleRequired” = “Chapter title is not specified.”
- code = “StartTimeNotValid” = “Chapter Start time not valid.”
- code = “StartTimeOutOfRange” = “Chapter Start time cannot be greater than the video duration.”
- code = “DuplicateImageFilename” = “Chapter imageFile reference should be unique.”
- code = “DuplicateStartTime” = “Chapter Start Time should be unique.”
- code = “FileNotSent” = “Image file did not match the metadata.”
- code = “InvalidFileType” = “Image file uploaded is not supported.”
Unauthorized error
user does not have edit rights
Internal server error