Skip to main content
PUT
/
libraries
/
{libraryId}
/
videos
/
{videoId}
/
chapters
Upsert Chapter
curl --request PUT \
  --url https://api.tenbyte.io/v1/stream/libraries/{libraryId}/videos/{videoId}/chapters \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "chapters": [
    {
      "title": "Introduction",
      "start_time": 1,
      "end_time": 30,
      "order_index": 0
    },
    {
      "title": "What is CDN?",
      "start_time": 30,
      "end_time": 60,
      "order_index": 1
    },
    {
      "title": "Next Steps",
      "start_time": 60,
      "end_time": 70
    }
  ]
}
'
{
  "data": [
    {
      "id": "03061150-2c72-40e4-9ac5-e5cd16083292",
      "video_id": "7f7a8d67-d552-4436-bc0e-1fdc62b9210a",
      "title": "Introduction",
      "start_time": 1,
      "end_time": 30,
      "order_index": 0
    },
    {
      "id": "3fc10b86-56c6-414c-ae5e-2ae40ecb15da",
      "video_id": "7f7a8d67-d552-4436-bc0e-1fdc62b9210a",
      "title": "What is Vidinfra CDN?",
      "start_time": 30,
      "end_time": 60,
      "order_index": 1
    },
    {
      "id": "e8835784-3410-435b-b075-c8834112c6dd",
      "video_id": "7f7a8d67-d552-4436-bc0e-1fdc62b9210a",
      "title": "Next Steps",
      "start_time": 60,
      "end_time": 70,
      "order_index": 2
    }
  ],
  "message": "Video Chapters Updated Successfully",
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

libraryId
string
required

Unique identifier of the library.

videoId
string
required

Unique identifier of the targeted video resource.

Body

application/json
chapters
object[]
required

List of chapters to create or update within the video. Each chapter defines a time range and title.

Response

data
object[]
required
message
string
required
success
boolean
required