Add a video to a playlist

Add an existing video to the playlist, or move a video it already
holds. A video is never listed twice.

Without before_video_id, a new video is added at the top of the
playlist, and a video already in it stays where it is.

With before_video_id, the video moves to the index of that video and
the videos in between shift by one. Moved up, it ends just above
before_video_id; moved down, it ends just below it. A new video is
added at the top first, so it ends just below before_video_id.

When the order of the playlist is set by a rule, before_video_id is
ignored and the request changes nothing: it returns 201 without
adding or moving the video, even when before_video_id is not in the
playlist.

Returns 201 with an empty body. Answers 422 INVALID_FIELD
when before_video_id is not in the playlist, when the video cannot be
added to a playlist, when the playlist is full, or when its videos are
selected automatically. Requires playlist.manage
scope.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
📘

You are reading API v2 documentation

Still using the Legacy API? Access the Legacy API documentation.



Path Params
string
required

Parent resource ID

Body Params
string
required

Unique identifier of the video to add to the playlist.

Video of the playlist the video is moved next to.

The video ends just above it when it moves up, and just below it when
it moves down or is new to the playlist. Ignored when the order of the
playlist is set by a rule. Omit to add a new video at the top, or to
leave a video already in the playlist where it is.

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json