Adds a channel section to the authenticated user's channel. A channel can create a maximum of 10 shelves.
Quota impact: A call to this method has a quota cost of 50 units.
Common use cases
Request
HTTP request
POST https://www.googleapis.com/youtube/v3/channelSections
Authorization
This request requires authorization with at least one of the following scopes (read more about authentication and authorization).
| Scope | 
|---|
| https://www.googleapis.com/auth/youtubepartner | 
| https://www.googleapis.com/auth/youtube | 
| https://www.googleapis.com/auth/youtube.force-ssl | 
Parameters
The following table lists the parameters that this query supports. All of the parameters listed are query parameters.
| Parameters | ||
|---|---|---|
| Required parameters | ||
| part | stringThe partparameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.The following list contains the partnames that you can include in the parameter value:
 | |
| Optional parameters | ||
| onBehalfOfContentOwner | stringThis parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwnerparameter 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. | |
| onBehalfOfContentOwnerChannel | stringThis parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwnerChannelparameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for theonBehalfOfContentOwnerparameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that theonBehalfOfContentOwnerparameter specifies. Finally, the channel that theonBehalfOfContentOwnerChannelparameter value specifies must be linked to the content owner that theonBehalfOfContentOwnerparameter specifies.This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel. | |
Request body
Provide a channelSection resource in the request body. For that resource:
- 
    You must specify a value for these properties: - snippet.type
 
- 
    You can set values for these properties: - snippet.type
- snippet.title
- snippet.position
- contentDetails.playlists[]
- contentDetails.channels[]
 
Response
If successful, this method returns a channelSection resource in the response body.
Errors
The following table identifies error messages that the API could return in response to a call to this method. Please see the error message documentation for more detail.
| Error type | Error detail | Description | 
|---|---|---|
| badRequest (400) | notEditable | This channel section cannot be created. | 
| badRequest (400) | typeRequired | The channelSectionresource must specify a value for thesnippet.typefield. | 
| forbidden (403) | channelSectionForbidden | The request is not properly authenticated or is not supported for this channel. | 
| invalidValue (400) | channelNotActive | At least one of the specified channels is not active. | 
| invalidValue (400) | channelsDuplicated | The request failed because it specified duplicate channels. | 
| invalidValue (400) | channelsNeeded | If the snippet.typeproperty has a value ofmultipleChannels, then thecontentDetails.channels[]property must be specified and must specify at least one channel. | 
| invalidValue (400) | channelsNotExpected | The resource provided with the request specified a value for the contentDetails.channels[]property, but channels are not expected for this type of channel section. | 
| invalidValue (400) | contentDetailsNeeded | The resource you are inserting must contain a contentDetailsobject for this type of channel section. | 
| invalidValue (400) | inValidPosition | The snippet.positionproperty contains an invalid value. | 
| invalidValue (400) | maxChannelSectionExceeded | The request cannot be completed because the channel already has the maximum number of channel sections. | 
| invalidValue (400) | maxChannelsExceeded | The request failed because it attempted to include too many channels in the channel section. | 
| invalidValue (400) | maxPlaylistExceeded | The request failed because it attempted to include too many playlists in the channel section. | 
| invalidValue (400) | onePlaylistNeeded | If the snippet.typeproperty has a value ofsinglePlaylist, then thecontentDetails.playlists[]property must specify exactly one playlist. | 
| invalidValue (400) | ownChannelInChannels | You cannot include your own channel in a channel section that appears on that channel. | 
| invalidValue (400) | playlistIsPrivate | One or more of the specified playlists are private and, therefore, cannot be included in the channel section. | 
| invalidValue (400) | playlistsDuplicated | The request failed because it specified duplicate playlists. | 
| invalidValue (400) | playlistsNeeded | If the snippet.typeproperty has a value ofsinglePlaylistormultiplePlaylists, then thecontentDetails.playlists[]property must be specified. | 
| invalidValue (400) | playlistsNotExpected | The resource provided with the request specified a value for the contentDetails.playlists[]property, but playlists are not expected for this type of channel section. | 
| invalidValue (400) | snippetNeeded | You must specify a snippetto create the channel section. | 
| invalidValue (400) | titleLengthExceeded | The value of the snippet.titleproperty is too long. | 
| invalidValue (400) | titleRequired | If the snippet.typeproperty has a value ofmultiplePlaylistsormultipleChannels, then you must set the section's title by specifying a value for thesnippet.titleproperty. | 
| notFound (404) | channelNotFound | One or more of the specified channels cannot be found. | 
| notFound (404) | playlistNotFound | One or more of the specified playlists cannot be found. | 
Try it!
Use the APIs Explorer to call this API and see the API request and response.