REST Resource: channelSections

Resource: ChannelSection

A channelSection resource contains information about a set of videos that a channel has chosen to feature. For example, a section can feature a channel's latest uploads, most popular uploads, or videos from one or more playlists.

A channel can create a maximum of 10 channel sections.

JSON representation
{
  "kind": string,
  "etag": string,
  "id": string,
  "snippet": {
    "type": enum,
    "channelId": string,
    "title": string,
    "position": integer
  },
  "contentDetails": {
    "playlists": [
      string
    ],
    "channels": [
      string
    ]
  }
}
Fields
kind

string

Identifies what kind of resource this is. Value: the fixed string "youtube#channelSection".

etag

string

Etag of this resource.

id

string

The ID that YouTube uses to uniquely identify the channel section.

snippet

object

The snippet object contains basic details about the channel section, such as its type, title, and position.

snippet.type

enum

The channel section's type.

channelsectionTypeUndefined is returned in read responses for channel section types that the API doesn't represent and can't be set in channelSections.insert or channelSections.update requests.

Valid values of this enum field are:

  • channelsectionTypeUndefined
  • singlePlaylist
  • multiplePlaylists
  • popularUploads
  • recentUploads
  • allPlaylists
  • liveEvents
  • upcomingEvents
  • completedEvents
  • multipleChannels
  • subscriptions
snippet.channelId

string

Output only. The ID that YouTube uses to uniquely identify the channel that published the channel section.

snippet.title

string

The section's title. This property should be set when snippet.type is multiplePlaylists or multipleChannels and has a maximum length of 100 bytes.

snippet.position

integer (uint32 format)

The section's position on the channel page. This property uses a 0-based index, where 0 identifies the first section, 1 identifies the second section, and so forth.

When omitted in a channelSections.insert request, the new section is appended to the end of the channel's sections; however, if the channel already has sections, the insert response returns the first existing section (position 0) instead of the newly created section. When omitted in a channelSections.update request, the section keeps its existing position.

contentDetails

object

The contentDetails object contains details about the channel section's content, such as a list of playlists or channels featured in the section.

contentDetails.playlists[]

string

A list of one or more unique public playlist IDs featured in a channel section. Specify this property only when snippet.type is singlePlaylist or multiplePlaylists. The API returns playlistsNotExpected for multipleChannels sections and ignores the property for other section types.

For singlePlaylist, specify exactly one playlist ID. For multiplePlaylists, specify between 1 and 100 playlist IDs.

contentDetails.channels[]

string

A list of 1 to 100 unique public channel IDs featured in a channel section. Specify this property only when snippet.type is multipleChannels. The API returns channelsNotExpected for singlePlaylist and multiplePlaylists sections and ignores the property for other section types.

Methods

delete

Deletes a channel section.

insert

Adds a channel section to the authenticated user's channel.

list

Returns a list of channelSection resources that match the API request criteria.

update

Updates a channel section.