Method: channelSections.insert

Adds a channel section to the authenticated user's channel. A channel can create a maximum of 10 channel sections.

In the request body, provide a channelSection resource. You must specify snippet.type. Depending on snippet.type, you must also specify contentDetails.playlists (for singlePlaylist or multiplePlaylists) or contentDetails.channels (for multipleChannels), and you should specify snippet.title (for multiplePlaylists or multipleChannels). You can set values for snippet.type, snippet.title, snippet.position, contentDetails.playlists, and contentDetails.channels.

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

HTTP request

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

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
part[]

string

Required. Serves two purposes in this operation: identifies the properties that the write operation sets and the properties that the API response includes.

Valid values are contentDetails, id, and snippet. You must include snippet, and you must also include contentDetails when snippet.type is singlePlaylist, multiplePlaylists, or multipleChannels.

onBehalfOfContentOwner

string

This parameter can only be used in a properly authorized request, and is intended exclusively for YouTube content partners.

The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.

To add a channel section to a channel managed by the content owner, also specify the onBehalfOfContentOwnerChannel parameter.

onBehalfOfContentOwnerChannel

string

This parameter can only be used in a properly authorized request, and is intended exclusively for YouTube content partners.

The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which the channel section is being added. Specify this parameter together with onBehalfOfContentOwner to target a channel managed by the content owner; without it, the request targets the authenticated user's own channel. This parameter can only be used with onBehalfOfContentOwner, the authenticating CMS account must be linked to that content owner, and the specified channel must be linked to that content owner.

This parameter allows content owners to authenticate once and perform actions on behalf of the specified channel without providing authentication credentials for each separate channel.

Request body

The request body contains an instance of ChannelSection.

Response body

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

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.