Create a new chapter that binds a player and video together.
IMPORTANT CHANGE TO ENDPOINT: this endpoint should only be used with an existing player where the player_type equals playlist.
If you want to create a new player altogether, use the player endpoint to create a new player and directly include the videos/chapters it should contain.
| Code | Description |
|---|---|
| 400 | Bad Request: body has wrong syntax or unable to handle request |
| 401 | Unauthorized: auth_token omitted or authentication failed |
| 403 | Forbidden: This action cannot be performed |
| 404 | Not Found: The requested resource could not be found |
| 406 | Not Acceptable: Accept or Content-Type headers must be application/json, text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
| 422 | Unprocessable Entity: body has wrong attributes |
REQUEST
Content-Type: application/json
{
"player_id": 1085,
"position": 0,
"video_id": 20234
}
RESPONSE
201 (Created)
{
"player_id": 1085,
"position": 0,
"video_id": 20234
"id": 52523,
"created_at": 1346961610,
"updated_at": 1346961610
}
| Param name | Description |
|---|---|
|
auth_token optional |
API token needed to authorize requests Validations:
|
|
position required |
The position this chapter appears in the player Validations:
|
|
player_id required |
The player the chapter will be added to Validations:
|
|
video_id required |
The id of the video the chapter will contain Validations:
|