LiveBroadcasts: update

Updates a broadcast. For example, you could modify the broadcast settings defined in the liveBroadcast resource's contentDetails object. Try it now.

Request

HTTP request

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

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/youtube

Parameters

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

Parameter name Value Description
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 part properties that you can include in the parameter value are id, snippet, contentDetails, and status.

Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a broadcast's privacy status is defined in the status part. As such, if your request is updating a private or unlisted broadcast, and the request's part parameter value includes the status part, the broadcast's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the broadcast will revert to the default privacy setting.
Optional parameters
onBehalfOfContentOwner string This parameter can only be used in a properly authorized request. Note: This parameter 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.
onBehalfOfContentOwnerChannel string This parameter can only be used in a properly authorized request. This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.

The onBehalfOfContentOwnerChannel parameter 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 the onBehalfOfContentOwner parameter, 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 the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter 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 liveBroadcast resource in the request body. For that resource:

  • You must specify a value for these properties:

    • id
    • snippet.title
    • snippet.scheduledStartTime
    • status.privacyStatus
    • contentDetails.monitorStream.enableMonitorStream
    • contentDetails.monitorStream.broadcastStreamDelayMs
    • contentDetails.enableDvr
    • contentDetails.enableContentEncryption
    • contentDetails.enableEmbed
    • contentDetails.recordFromStart
    • contentDetails.startWithSlate

  • You can set values for these properties:

    • snippet.title
    • snippet.description
    • snippet.scheduledStartTime
    • snippet.scheduledEndTime
    • status.privacyStatus
    • contentDetails.monitorStream.enableMonitorStream
    • contentDetails.monitorStream.broadcastStreamDelayMs
    • contentDetails.enableDvr
    • contentDetails.enableContentEncryption
    • contentDetails.enableEmbed
    • contentDetails.recordFromStart
    • contentDetails.startWithSlate
    • contentDetails.enableClosedCaptions

    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 liveBroadcast resource in the response body.

Errors

The table below 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
forbidden (403) enableClosedCaptionsModificationNotAllowed The contentDetails.enableClosedCaptions value can only be modified when the broadcast is in the created or ready status.
forbidden (403) enableContentEncryptionModificationNotAllowed The contentDetails.enableContentEncryption value can be modified only when the broadcast's status is created or ready.
forbidden (403) enableDvrModificationNotAllowed The contentDetails.enableDvr value can be modified only when the broadcast's status is created or ready.
forbidden (403) enableMonitorStreamModificationNotAllowed The contentDetails.monitorStream.enableMonitorStream value can be modified only when the broadcast's status is created or ready.
forbidden (403) recordFromStartModificationNotAllowed The contentDetails.recordFromStart value can be modified only when the broadcast's status is created or ready.
forbidden (403) startWithSlateModificationNotAllowed The contentDetails.startWithSlate value can be modified only when the broadcast's status is created or ready.
insufficientPermissions insufficientLivePermissions The request is not authorized to update the specified live broadcast. For more information, see Implementing OAuth2 authentication.
invalidValue (400) invalidDescription The liveBroadcast resource did not specify a valid value for the snippet.description property. snippet.description can contain up to 5000 characters.
invalidValue (400) invalidPrivacyStatus The liveBroadcast resource did not specify a valid privacy status. See valid privacyStatus values.
invalidValue (400) invalidScheduledEndTime The liveBroadcast resource contained an invalid value for the snippet.scheduledEndTime property. The scheduled end time must follow the scheduled start time.
invalidValue (400) invalidScheduledStartTime The liveBroadcast resource contained an invalid value for the snippet.scheduledStartTime property. The scheduled start time must be in the future.
invalidValue (400) invalidTitle The liveBroadcast resource did not specify a valid value for the snippet.title property. snippet.title must be between 1 and 100 characters long.
notFound (404) liveBroadcastNotFound The id property specified in the liveBroadcast resource did not identify a broadcast.
required (400) broadcastStreamDelayMsRequired The liveBroadcast resource did not specify the contentDetails.monitorStream.broadcastStreamDelayMs property.
required (400) enableContentEncryptionRequired The liveBroadcast resource did not specify the contentDetails.enableContentEncryption property.
required (400) enableDvrRequired The liveBroadcast resource did not specify the contentDetails.enableDvr property.
required (400) enableEmbedRequired The liveBroadcast resource did not specify the contentDetails.enableEmbed property.
required (400) enableMonitorStreamRequired The liveBroadcast resource did not specify the contentDetails.monitorStream.enableMonitorStream property.
required (400) idRequired The liveBroadcast resource must include and specify a value for the id property.
required (400) privacyStatusRequired The liveBroadcast resource did not specify a privacy status. See for valid privacyStatus values.
required (400) recordFromStartRequired The liveBroadcast resource did not specify the contentDetails.recordFromStart property.
required (400) scheduledEndTimeRequired The liveBroadcast resource did not specify the snippet.scheduledEndTime property.
required (400) scheduledStartTimeRequired The liveBroadcast resource did not specify the snippet.scheduledStartTime property.
required (400) startWithSlateRequired The liveBroadcast resource did not specify the contentDetails.startWithSlate property.
required (400) titleRequired The liveBroadcast resource did not specify the snippet.title property.

Try it!

Use the API Explorer to call this method on live data and see the API request and response.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.