Skip to main content
POST
/
media
/
chapters
Create chapter
curl --request POST \
  --url https://api.thehaystack.ai/v2/haystack/media/chapters \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "itemId": 123,
  "mediaAssetId": 123,
  "title": "<string>",
  "startMs": 123,
  "suggested": true,
  "accepted": true
}
'
{
  "chapter": {
    "id": 123,
    "itemId": 123,
    "mediaAssetId": 123,
    "title": "Introduction",
    "startMs": 123,
    "suggested": true,
    "accepted": true,
    "hidden": true
  }
}

Authorizations

Authorization
string
header
required

Enter your API token from the Haystack dashboard

Body

application/json
itemId
integer
required
mediaAssetId
integer
required
title
string
required
startMs
integer
required

Start offset in milliseconds from the start of the media

suggested
boolean | null

True if AI-suggested, awaiting acceptance

accepted
boolean | null

Response

200 - application/json

Created chapter

chapter
object