- [HTTP request](https://developers.google.com/youtube/data/reference/rest/v3/liveBroadcasts/insertCuepoint.md.txt#body.HTTP_TEMPLATE)
- [Query parameters](https://developers.google.com/youtube/data/reference/rest/v3/liveBroadcasts/insertCuepoint.md.txt#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/youtube/data/reference/rest/v3/liveBroadcasts/insertCuepoint.md.txt#body.request_body)
  - [JSON representation](https://developers.google.com/youtube/data/reference/rest/v3/liveBroadcasts/insertCuepoint.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/youtube/data/reference/rest/v3/liveBroadcasts/insertCuepoint.md.txt#body.response_body)
  - [JSON representation](https://developers.google.com/youtube/data/reference/rest/v3/liveBroadcasts/insertCuepoint.md.txt#body.Cuepoint.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/youtube/data/reference/rest/v3/liveBroadcasts/insertCuepoint.md.txt#body.aspect)
- [Try it!](https://developers.google.com/youtube/data/reference/rest/v3/liveBroadcasts/insertCuepoint.md.txt#try-it)

Inserts an ad cuepoint into a broadcast, replacing the Content-Owner-only [`liveCuepoints.insert`](https://developers.google.com/youtube/partner/reference/rest/v1/liveCuepoints/insert.md.txt) method without requiring Content Owner authorization. In the `Cuepoint` request body, `cueType` is required (`cueTypeAd`), and `durationSecs`, `insertionOffsetTimeMs`, and `walltimeMs` are optional (`insertionOffsetTimeMs` and `walltimeMs` are mutually exclusive).

For method-specific error responses, see [liveBroadcasts.insertCuepoint errors](https://developers.google.com/youtube/data/reference/rest/v3/errors.md.txt#liveBroadcasts_youtube.liveBroadcasts.insertCuepoint).

### HTTP request

`POST https://youtube.googleapis.com/youtube/v3/liveBroadcasts/cuepoint`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Query parameters

| Parameters ||
|---|---|
| `id` | `string` Required. Unique ID of the broadcast into which the cuepoint is inserted. |
| `onBehalfOfContentOwner` | `string` Intended exclusively for YouTube content partners and valid only in an [authorized request](https://developers.google.com/youtube/data/guides/authentication.md.txt). Indicates that the request's authorization credentials identify a YouTube CMS user acting on behalf of the specified content owner, allowing partners that manage multiple channels to authenticate once and access data for linked channels. The CMS account must be linked to the specified YouTube content owner. |
| `onBehalfOfContentOwnerChannel` | `string` Intended exclusively for YouTube content partners and valid only in an [authorized request](https://developers.google.com/youtube/data/guides/authentication.md.txt). Specifies the YouTube channel ID of the channel to act on behalf of for this broadcast request. Required whenever `onBehalfOfContentOwner` is set, and usable only in conjunction with that parameter. The CMS account must be linked to the content owner specified by `onBehalfOfContentOwner`, and that content owner must link the channel specified by `onBehalfOfContentOwnerChannel`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "id": string, "durationSecs": integer, "insertionOffsetTimeMs": string, "walltimeMs": string, "cueType": enum, "etag": string } ``` |

| Fields ||
|---|---|
| `id` | `string` Output only. Unique identifier assigned by YouTube for the inserted cuepoint resource. |
| `durationSecs` | `integer (uint32 format)` Duration of the cuepoint in seconds. Defaults to `30` for broadcasts with fixed-duration ad breaks and `60` otherwise. |
| `insertionOffsetTimeMs` | `string (int64 format)` Non-negative offset in milliseconds from the beginning of the broadcast's monitor stream (including the `testing` phase, if applicable) at which to insert the cuepoint; see [Setting time offsets](https://developers.google.com/youtube/data/live/getting-started.md.txt#Setting_Time_Offsets). Setting this field (including `0`) requires `enableMonitorStream` to be `true`. Omit both `insertionOffsetTimeMs` and `walltimeMs` to insert the cuepoint immediately without requiring a monitor stream. Mutually exclusive with `walltimeMs`. |
| `walltimeMs` | `string` Unix epoch time in milliseconds (`> 0`) at which to insert the cuepoint. Mutually exclusive with `insertionOffsetTimeMs`. |
| `cueType` | `enum` Required. The cuepoint type. Valid value is `cueTypeAd` (inserts an ad break). This enum field has the one valid value: - `cueTypeAd` |
| `etag` | `string` Etag of this resource. |

### Response body

Represents an ad cuepoint inserted into a live broadcast. Because of HLS segment boundaries, the actual insertion point can shift by up to 5 seconds from the requested time.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "id": string, "durationSecs": integer, "insertionOffsetTimeMs": string, "walltimeMs": string, "cueType": enum, "etag": string } ``` |

| Fields ||
|---|---|
| `id` | `string` Output only. Unique identifier assigned by YouTube for the inserted cuepoint resource. |
| `durationSecs` | `integer (uint32 format)` Duration of the cuepoint in seconds. Defaults to `30` for broadcasts with fixed-duration ad breaks and `60` otherwise. |
| `insertionOffsetTimeMs` | `string (int64 format)` Non-negative offset in milliseconds from the beginning of the broadcast's monitor stream (including the `testing` phase, if applicable) at which to insert the cuepoint; see [Setting time offsets](https://developers.google.com/youtube/data/live/getting-started.md.txt#Setting_Time_Offsets). Setting this field (including `0`) requires `enableMonitorStream` to be `true`. Omit both `insertionOffsetTimeMs` and `walltimeMs` to insert the cuepoint immediately without requiring a monitor stream. Mutually exclusive with `walltimeMs`. |
| `walltimeMs` | `string` Unix epoch time in milliseconds (`> 0`) at which to insert the cuepoint. Mutually exclusive with `insertionOffsetTimeMs`. |
| `cueType` | `enum` Required. The cuepoint type. Valid value is `cueTypeAd` (inserts an ad break). This enum field has the one valid value: - `cueTypeAd` |
| `etag` | `string` Etag of this resource. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/youtube`
- `https://www.googleapis.com/auth/youtubepartner`
- `https://www.googleapis.com/auth/youtube.force-ssl`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).