Method: playlists.insert

Creates a playlist.

In the Playlist request body, specify snippet.title (required). You can also set snippet.description, snippet.defaultLanguage, status.privacyStatus (defaults to private when omitted), and localizations (requires snippet.defaultLanguage and localizations in part). Every resource part included in the request body must also be listed in the part parameter. You can't set status.podcastStatus when creating a playlist; use playlists.update after uploading a square playlist image.

For method-specific error responses, see playlists.insert errors. For code examples, see playlists.insert code snippets.

HTTP request

POST https://youtube.googleapis.com/youtube/v3/playlists

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
part[]

string

Required. Identifies the playlist resource properties that the write operation sets as well as the properties that the API response includes.

Valid values are contentDetails, id, localizations, player, snippet, and status. You must include snippet and any other writable part (status or localizations) provided in the request body.

onBehalfOfContentOwner

string

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 act on behalf of linked channels.

You must also specify onBehalfOfContentOwnerChannel when using this parameter.

onBehalfOfContentOwnerChannel

string

Intended exclusively for YouTube content partners and valid only in an authorized request. Specifies the YouTube channel ID of the channel for which the playlist is being created.

This parameter is required when onBehalfOfContentOwner is specified, and can only be used together with it. Both the authenticating CMS account and the specified channel must be linked to the content owner identified by onBehalfOfContentOwner.

Request body

The request body contains an instance of Playlist.

Response body

If successful, the response body contains a newly created instance of Playlist.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/youtube
  • https://www.googleapis.com/auth/youtubepartner
  • https://www.googleapis.com/auth/youtube.force-ssl

For more information, see the OAuth 2.0 Overview.