Updates a broadcast. For example, you could modify the broadcast settings defined in the liveBroadcast resource's contentDetails object.
Common use cases
Request
HTTP request
PUT https://www.googleapis.com/youtube/v3/liveBroadcasts
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.
| Scope | 
|---|
| 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 partproperties that you can include in the parameter value areid,snippet,contentDetails,monetizationDetails, andstatus.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 statuspart. As such, if your request is updating a private or unlisted broadcast, and the request'spartparameter value includes thestatuspart, 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 | 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 Content Management System (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 liveBroadcast resource in the request body. For that resource:
- 
    You must specify a value for these properties: - id
- snippet.scheduledStartTime
- contentDetails.monitorStream.enableMonitorStream
- contentDetails.monitorStream.broadcastStreamDelayMs
 
- 
    You can set values for these properties: - snippet.title
- snippet.description
- snippet.scheduledStartTime
- snippet.scheduledEndTime
- status.privacyStatus
- contentDetails.monitorStream.enableMonitorStream
- contentDetails.monitorStream.broadcastStreamDelayMs
- contentDetails.enableAutoStart
- contentDetails.enableAutoStop
- contentDetails.enableClosedCaptions
- contentDetails.enableDvr
- contentDetails.enableEmbed
- contentDetails.recordFromStart
- monetizationDetails.cuepointSchedule.pauseAdsUntil
 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 following table identifies error messages that the API could return in response to a call to this method. For more details, see error message.
| Error type | Error detail | Description | 
|---|---|---|
| forbidden (403) | closedCaptionsTypeModificationNotAllowed | The contentDetails.closedCaptionsTypevalue can only be modified when the broadcast is in thecreatedorreadystatus. | 
| forbidden (403) | enabledModificationNotAllowed | The enabledfield is read-only. | 
| forbidden (403) | scheduleStrategyModificationNotAllowed | The scheduleStrategyfield is read-only. | 
| forbidden (403) | repeatIntervalSecsModificationNotAllowed | The repeatIntervalSecsfield is read-only. | 
| forbidden (403) | pauseAdsUntilModificationNotAllowed | The pauseAdsUntilfield cannot be modified.
        This error can occur for the following reasons:
 | 
| forbidden (403) | enableAutoStartModificationNotAllowed | The contentDetails.enableAutoStartvalue can only be modified when the stream is inactive and the broadcast is in thecreatedorreadystatus. | 
| forbidden (403) | enableClosedCaptionsModificationNotAllowed | The contentDetails.enableClosedCaptionsvalue can only be modified when the broadcast's status iscreatedorready. | 
| forbidden (403) | enableDvrModificationNotAllowed | The contentDetails.value can be modified only when the broadcast's status iscreatedorready. | 
| forbidden (403) | enableMonitorStreamModificationNotAllowed | The contentDetails.value can be modified only when the broadcast's status iscreatedorready. | 
| forbidden (403) | recordFromStartModificationNotAllowed | The contentDetails.value can be modified only when the broadcast's status iscreatedorready. | 
| insufficientPermissions | insufficientLivePermissions | The request is not authorized to update the specified live broadcast. For more information, see Implementing OAuth2 authentication. | 
| insufficientPermissions | liveStreamingNotEnabled | The user that authorized the request is not enabled to stream live video on YouTube. The user can find more information at https://www.youtube.com/features. | 
| invalidValue (400) | invalidAutoStart | The liveBroadcast resource
        contained an invalid value for the contentDetails.enableAutoStartproperty.
        You cannot modify theenableAutoStartsetting for a persistent broadcast. | 
| invalidValue (400) | invalidAutoStop | The liveBroadcast resource
        contained an invalid value for the contentDetails.enableAutoStopproperty. You
        cannot modify theenableAutoStopsetting for a persistent broadcast. | 
| invalidValue (400) | invalidDescription | The liveBroadcast resource did not specify a valid value for the snippet.descriptionproperty.snippet.descriptioncan contain up to 5000 characters. | 
| invalidValue (400) | invalidEmbedSetting | The liveBroadcast resource contained an invalid value for the contentDetails.enable_embedproperty. You cannot embed this broadcast. | 
| invalidValue (400) | invalidEnableClosedCaptions | In the liveBroadcast resource, the value of the contentDetails.enableClosedCaptionsproperty is incompatible with the value of thecontentDetails.closedCaptionTypesetting. Modify the resource to only include one of the two properties, and then resubmit the request. | 
| invalidValue (400) | invalidLatencyPreferenceOptions | The liveBroadcast resource
        contained an invalid value for the contentDetails.latencyPreferenceproperty.
        Not all settings are supported with this latency preference. | 
| invalidValue (400) | invalidPauseAdsUntil | The liveBroadcast resource
        contains an invalid value for the monetizationDetails.cuepointSchedule.pauseAdsUntilproperty.
        This error can occur for the following reasons:
 | 
| invalidValue (400) | invalidPrivacyStatus | The liveBroadcast resource did not specify a valid privacy status. See valid privacyStatusvalues. | 
| invalidValue (400) | invalidProjection | The liveBroadcast resource contained an invalid value for the contentDetails.projectionproperty. A persistent broadcast's projection cannot be set to 360. | 
| invalidValue (400) | invalidScheduledEndTime | The liveBroadcast resource contained an invalid value for the snippet.scheduledEndTimeproperty. The scheduled end time must follow the scheduled start time. | 
| invalidValue (400) | invalidScheduledStartTime | The liveBroadcast resource contained an invalid value for the snippet.scheduledStartTimeproperty. The scheduled start time must be in the future. | 
| invalidValue (400) | invalidTitle | The liveBroadcast resource did not specify a valid value for the snippet.titleproperty.snippet.titlemust be between 1 and 100 characters long. | 
| notFound (404) | liveBroadcastNotFound | The idproperty specified in the liveBroadcast resource did not identify a broadcast. | 
| required (400) | broadcastStreamDelayMsRequired | The liveBroadcast resource did not specify the contentDetails.property. | 
| required (400) | enableMonitorStreamRequired | The liveBroadcast resource did not specify the contentDetails.property. | 
| required (400) | idRequired | The liveBroadcast resource must include and specify a value for the idproperty. | 
| required (400) | scheduledEndTimeRequired | The liveBroadcast resource did not specify the snippet.scheduledEndTimeproperty. | 
| required (400) | scheduledStartTimeRequired | The liveBroadcast resource did not specify the snippet.scheduledStartTimeproperty. | 
Try it!
Use the APIs Explorer to call this API and see the API request and response.