Adds a resource to a playlist.
In the PlaylistItem request body, specify values for snippet.playlistId and snippet.resourceId (with kind set to youtube#video and videoId set to the video ID). You can optionally set snippet.position if the playlist uses manual sorting. All other request body fields (including contentDetails.note, contentDetails.startAt, and contentDetails.endAt) are ignored; call playlistItems.update after inserting to set contentDetails.note.
For method-specific error responses, see playlistItems.insert errors. For code examples, see playlistItems.insert code snippets.
HTTP request
POST https://youtube.googleapis.com/youtube/v3/playlistItems
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
part[] |
Required. Identifies both the properties that the write operation sets and the properties that the API response includes. Valid values are |
onBehalfOfContentOwner |
Intended exclusively for YouTube content partners and valid only in an authorized request. Indicates that the request's authorization credentials identify a YouTube CMS user acting on behalf of the specified content owner, allowing partners that manage multiple channels to authenticate once and access data for linked channels. The authenticating CMS account must be linked to the specified content owner. |
Request body
The request body contains an instance of PlaylistItem.
Response body
If successful, the response body contains a newly created instance of PlaylistItem.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/youtubehttps://www.googleapis.com/auth/youtubepartnerhttps://www.googleapis.com/auth/youtube.force-ssl
For more information, see the OAuth 2.0 Overview.