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

## Common use cases

<iframe src="https://developers.devsite.google/frame/youtube/data/live/reference/rest/v3/liveBroadcasts/update_71b82c376d5e398488ab428da230d793e5c0386fa0ec53b8e9e87b56a45a0e55.frame" class="framebox inherit-locale " allow="clipboard-write https://developers.devsite.google" allowfullscreen is-upgraded></iframe>

## 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](https://developers.google.com/youtube/data/live/authentication.md.txt).

| 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` | `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`, `monetizationDetails`, 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](https://developers.google.com/youtube/data/live/authentication.md.txt). **Note:** This parameter is intended exclusively for YouTube content partners. The `onBehalfOfContentOwner` parameter 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` | `string` This parameter can only be used in a properly [authorized request](https://developers.google.com/youtube/data/live/authentication.md.txt). **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](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) in the request body.
For that resource:

- You must specify a value for these properties:

  <br />

  - `id`
  - `snippet.scheduledStartTime`
  - `contentDetails.monitorStream.enableMonitorStream`
  - `contentDetails.monitorStream.broadcastStreamDelayMs`

  <br />

- You can set values for these properties:

  <br />

  - `snippet.title`
  - `snippet.description`
  - `snippet.categoryId`
  - `snippet.scheduledStartTime`
  - `snippet.scheduledEndTime`
  - `status.privacyStatus`
  - `contentDetails.monitorStream.enableMonitorStream`
  - `contentDetails.monitorStream.broadcastStreamDelayMs`
  - `contentDetails.enableAutoStart`
  - `contentDetails.enableAutoStop`
  - `contentDetails.enableClosedCaptions`
  - `contentDetails.enableDvr`
  - `contentDetails.enableEmbed`
  - `contentDetails.recordFromStart`
  - `contentDetails.availabilityConfig`
  - `monetizationDetails.adsMonetizationStatus`
  - `monetizationDetails.cuepointSchedule.enabled`
  - `monetizationDetails.cuepointSchedule.pauseAdsUntil`
  - `monetizationDetails.cuepointSchedule.ytOptimizedCuepointConfig`
  - `monetizationDetails.cuepointSchedule.creatorCuepointConfig.scheduleStrategy`
  - `monetizationDetails.cuepointSchedule.creatorCuepointConfig.repeatIntervalSecs`

  <br />

  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](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#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](https://developers.google.com/youtube/data/live/reference/rest/v3/errors.md.txt).

| Error type | Error detail | Description |
|---|---|---|---|
| `backendError (503)` | `backendError` | Some settings cannot be applied yet. This is likely because the broadcast is just created. Please retry in a few seconds. |
| `forbidden (403)` | `closedCaptionsTypeModificationNotAllowed` | The `contentDetails.closedCaptionsType` value can only be modified when the broadcast is in the `created` or `ready` status. |
| `forbidden (403)` | `monetizationDetailsModificationNotAllowed` | Channels that are not part of the YouTube Partner Program (YPP) cannot modify `monetizationDetails` for a video. |
| `forbidden (403)` | `pauseAdsUntilModificationNotAllowed` | The `pauseAdsUntil` field cannot be modified. This error can occur for the following reasons: - The `monetizationDetails.cuepointSchedule.enabled` field is not set to `true`. This field can only be set using YouTube Studio. - The broadcast is not live. |
| `forbidden (403)` | `enableAutoStartModificationNotAllowed` | The `contentDetails.enableAutoStart` value can only be modified when the stream is inactive and the broadcast is in the `created` or `ready` status. |
| `forbidden (403)` | `enableClosedCaptionsModificationNotAllowed` | The `contentDetails.enableClosedCaptions` value can only be modified 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`. |
| `insufficientPermissions` | `insufficientLivePermissions` | The request is not authorized to update the specified live broadcast. For more information, see [Implementing OAuth2 authentication](https://developers.google.com/youtube/data/live/authentication.md.txt). |
| `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>. |
| `invalidArgument` | `missingAdsMonetizationStatus` | `ads_monetization_status` must be specified as either `ON` or `OFF`. |
| `invalidValue (400)` | `invalidAutoStart` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) contained an invalid value for the `contentDetails.enableAutoStart` property. You cannot modify the `enableAutoStart` setting for a persistent broadcast. |
| `invalidValue (400)` | `invalidAutoStop` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) contained an invalid value for the `contentDetails.enableAutoStop` property. You cannot modify the `enableAutoStop` setting for a persistent broadcast. |
| `invalidValue (400)` | `invalidDescription` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) did not specify a valid value for the `snippet.description` property. `snippet.description` can contain up to 5000 characters. |
| `invalidValue (400)` | `invalidEmbedSetting` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) contained an invalid value for the `contentDetails.enable_embed` property. You cannot embed this broadcast. |
| `invalidValue (400)` | `invalidEnableClosedCaptions` | In the [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource), the value of the `contentDetails.enableClosedCaptions` property is incompatible with the value of the `contentDetails.closedCaptionType` setting. Modify the resource to only include one of the two properties, and then resubmit the request. |
| `invalidValue (400)` | `invalidLatencyPreferenceOptions` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) contained an invalid value for the `contentDetails.latencyPreference` property. Not all settings are supported with this latency preference. |
| `invalidValue (400)` | `invalidEligibleForAdsMonetization` | `eligible_for_ads_monetization` is read-only and cannot be specified in the `monetization_details` field. |
| `invalidValue (400)` | `invalidCuepointSchedule` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) contains an invalid value for the `monetizationDetails.cuepointSchedule` property. This error can occur for the following reasons: - `cuepoint_schedule` cannot be specified if `ads_monetization_status` is `OFF`. - `cuepoint_schedule` must be specified if `ads_monetization_status` is `ON`. | `cuepoint_schedule` cannot be specified if `ads_monetization_status` is OFF. |
| `invalidValue (400)` | `invalidEnabled` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) contains an invalid or conflicting value for the `monetizationDetails.cuepointSchedule.enabled` property. This error can occur for the following reasons: - `enabled` must be specified in the `cuepoint_schedule` field. - `pause_ads_until`, `yt_optimized_cuepoint_config` or `creator_cuepoint_config` cannot be specified if `enabled` is false. - Only one of `yt_optimized_cuepoint_config` and `creator_cuepoint_config` can be specified if `enabled` is true. |
| `invalidValue (400)` | `invalidCreatorCuepointConfig` | Must specify both `schedule_strategy` and `repeat_interval_secs`. |
| `invalidValue (400)` | `invalidRepeatIntervalSecs` | The `repeat_interval_secs` property value must be within the range \[360, 3600\]. |
| `invalidValue (400)` | `invalidPauseAdsUntil` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) contains an invalid value for the `monetizationDetails.cuepointSchedule.pauseAdsUntil` property. This error can occur for the following reasons: - The `monetizationDetails.cuepointSchedule.pauseAdsUntil` value is not specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. - The `monetizationDetails.cuepointSchedule.pauseAdsUntil` value is not in the future. - The `monetizationDetails.cuepointSchedule.pauseAdsUntil` value is farther than 10 minutes from current time. |
| `invalidValue (400)` | `invalidPrivacyStatus` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) did not specify a valid privacy status. See [valid `privacyStatus` values](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#privacyStatus). |
| `invalidValue (400)` | `invalidProjection` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) contained an invalid value for the `contentDetails.projection` property. A persistent broadcast's projection cannot be set to 360. |
| `invalidValue (400)` | `invalidScheduledEndTime` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#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](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#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](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#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](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) did not identify a broadcast. |
| `preconditionFailed (412)` | `videoNotEligibleForAdsMonetization` | The video is not eligible for ads monetization. This can occur if the channel is not eligible for monetization. |
| `required (400)` | `broadcastStreamDelayMsRequired` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) did not specify the `contentDetails.monitorStream.broadcastStreamDelayMs` property. |
| `required (400)` | `enableMonitorStreamRequired` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) did not specify the `contentDetails.monitorStream.enableMonitorStream` property. |
| `required (400)` | `idRequired` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) must include and specify a value for the `id` property. |
| `required (400)` | `scheduledEndTimeRequired` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) did not specify the `snippet.scheduledEndTime` property. |
| `required (400)` | `scheduledStartTimeRequired` | The [liveBroadcast resource](https://developers.google.com/youtube/data/live/reference/rest/v3/liveBroadcasts.md.txt#resource) did not specify the `snippet.scheduledStartTime` property. |

## Try it!

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