Channels: update

The API now supports the ability to mark your channel or videos as "made for kids." In addition, channel and video resources also now contain a property that identifies the "made for kids" status of that channel or video. The YouTube API Services Terms of Service and Developer Policies were also updated on 10 January 2020. For more information, see the revision histories for the YouTube Data API Service and the YouTube API Services Terms of Service.

Updates a channel's metadata. Note that this method only supports updates to the channel resource's brandingSettings, invideoPromotion, and localizations objects and their child properties.

Quota impact: A call to this method has a quota cost of 50 units.

Common use cases

Request

HTTP request

PUT https://www.googleapis.com/youtube/v3/channels

Authorization

This request requires authorization with at least one of the following scopes. To read more about authentication and authorization, see Implementing OAuth 2.0 authorization.

Parameters

The following table lists the parameters that this query supports. All of the parameters listed are query parameters.

Parameters
Required parameters
part string
The part parameter 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 API only allows the parameter value to be set to either brandingSettings, invideoPromotion, or localizations. (You can only update any one of those parts with a single request.)

Note that this method overrides the existing values for all of the mutable properties that are contained in the part that the parameter value specifies.
Optional parameters
onBehalfOfContentOwner string
This parameter can only be used in a properly authorized request.

The onBehalfOfContentOwner parameter indicates that the authenticated user 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 actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.

This parameter must be provided if the request is authenticated with credentials for a CMS content owner user acting on a managed channel. If omitted, the request executes under the authenticated user's direct context and returns an HTTP 403 Forbidden error.

Request body

Provide a channel resource in the request body. For that resource:

  • You must specify a value for these properties:

    • id
  • You can set values for these properties:

    • brandingSettings.channel.country
    • brandingSettings.channel.description
    • brandingSettings.channel.defaultLanguage
    • brandingSettings.channel.keywords
    • brandingSettings.channel.trackingAnalyticsAccountId
    • brandingSettings.channel.unsubscribedTrailer
    • localizations.(key)
    • localizations.(key).title
    • localizations.(key).description
    • status.selfDeclaredMadeForKids

    If you are submitting an update request, and your request does not specify a value for a property that already has a value, the property's existing value will be deleted.

Response

If successful, this method returns a channel 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. Fore more details, see YouTube Data API - Errors.

Try it!

Use the APIs Explorer to call this API and see the API request and response.