Insert

Creates a broadcast

66 variables
63 variables

Creates a broadcast

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • Manage your YouTube account
  • See, edit, and permanently delete your YouTube videos, ratings, comments and captions

Input

This building block consumes 66 input parameters

  = Parameter name
  = Format

part STRING Required

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

onBehalfOfContentOwner STRING

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. 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

contentDetails OBJECT

Detailed settings of a broadcast

contentDetails.boundStreamId STRING

This value uniquely identifies the live stream bound to the broadcast

contentDetails.boundStreamLastUpdateTimeMs DATE_TIME

The date and time that the live stream referenced by boundStreamId was last updated

contentDetails.closedCaptionsType ENUMERATION

contentDetails.enableAutoStart BOOLEAN

This setting indicates whether auto start is enabled for this broadcast

contentDetails.enableClosedCaptions BOOLEAN

This setting indicates whether HTTP POST closed captioning is enabled for this broadcast. The ingestion URL of the closed captions is returned through the liveStreams API. This is mutually exclusive with using the closed_captions_type property, and is equivalent to setting closed_captions_type to CLOSED_CAPTIONS_HTTP_POST

contentDetails.enableContentEncryption BOOLEAN

This setting indicates whether YouTube should enable content encryption for the broadcast

contentDetails.enableDvr BOOLEAN

This setting determines whether viewers can access DVR controls while watching the video. DVR controls enable the viewer to control the video playback experience by pausing, rewinding, or fast forwarding content. The default value for this property is true.

Important: You must set the value to true and also set the enableArchive property's value to true if you want to make playback available immediately after the broadcast ends

contentDetails.enableEmbed BOOLEAN

This setting indicates whether the broadcast video can be played in an embedded player. If you choose to archive the video (using the enableArchive property), this setting will also apply to the archived video

contentDetails.enableLowLatency BOOLEAN

Indicates whether this broadcast has low latency enabled

contentDetails.latencyPreference ENUMERATION

If both this and enable_low_latency are set, they must match. LATENCY_NORMAL should match enable_low_latency=false LATENCY_LOW should match enable_low_latency=true LATENCY_ULTRA_LOW should have enable_low_latency omitted

contentDetails.mesh BINARY

contentDetails.monitorStream OBJECT

Settings and Info of the monitor stream

contentDetails.monitorStream.broadcastStreamDelayMs INTEGER

If you have set the enableMonitorStream property to true, then this property determines the length of the live broadcast delay

contentDetails.monitorStream.embedHtml STRING

HTML code that embeds a player that plays the monitor stream

contentDetails.monitorStream.enableMonitorStream BOOLEAN

This value determines whether the monitor stream is enabled for the broadcast. If the monitor stream is enabled, then YouTube will broadcast the event content on a special stream intended only for the broadcaster's consumption. The broadcaster can use the stream to review the event content and also to identify the optimal times to insert cuepoints.

You need to set this value to true if you intend to have a broadcast delay for your event.

Note: This property cannot be updated once the broadcast is in the testing or live state

contentDetails.projection ENUMERATION

The projection format of this broadcast. This defaults to rectangular

contentDetails.recordFromStart BOOLEAN

Automatically start recording after the event goes live. The default value for this property is true.

Important: You must also set the enableDvr property's value to true if you want the playback to be available immediately after the broadcast ends. If you set this property's value to true but do not also set the enableDvr property to true, there may be a delay of around one day before the archived video will be available for playback

contentDetails.startWithSlate BOOLEAN

This setting indicates whether the broadcast should automatically begin with an in-stream slate when you update the broadcast's status to live. After updating the status, you then need to send a liveCuepoints.insert request that sets the cuepoint's eventState to end to remove the in-stream slate and make your broadcast stream visible to viewers

contentDetails.stereoLayout ENUMERATION

etag STRING

Etag of this resource

id STRING

The ID that YouTube assigns to uniquely identify the broadcast

kind STRING

Identifies what kind of resource this is. Value: the fixed string "youtube#liveBroadcast"

snippet OBJECT

snippet.actualEndTime DATE_TIME

The date and time that the broadcast actually ended. This information is only available once the broadcast's state is complete. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.actualStartTime DATE_TIME

The date and time that the broadcast actually started. This information is only available once the broadcast's state is live. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.channelId STRING

The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast

snippet.description STRING

The broadcast's description. As with the title, you can set this field by modifying the broadcast resource or by setting the description field of the corresponding video resource

snippet.isDefaultBroadcast BOOLEAN

snippet.liveChatId STRING

The id of the live chat for this broadcast

snippet.publishedAt DATE_TIME

The date and time that the broadcast was added to YouTube's live broadcast schedule. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.scheduledEndTime DATE_TIME

The date and time that the broadcast is scheduled to end. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.scheduledStartTime DATE_TIME

The date and time that the broadcast is scheduled to start. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.thumbnails OBJECT

Internal representation of thumbnails for a YouTube resource

snippet.thumbnails.default OBJECT

A thumbnail is an image representing a YouTube resource

snippet.thumbnails.default.height INTEGER

(Optional) Height of the thumbnail image

snippet.thumbnails.default.url STRING

The thumbnail image's URL

snippet.thumbnails.default.width INTEGER

(Optional) Width of the thumbnail image

snippet.thumbnails.high OBJECT

A thumbnail is an image representing a YouTube resource

snippet.thumbnails.high.height INTEGER

(Optional) Height of the thumbnail image

snippet.thumbnails.high.url STRING

The thumbnail image's URL

snippet.thumbnails.high.width INTEGER

(Optional) Width of the thumbnail image

snippet.thumbnails.maxres OBJECT

A thumbnail is an image representing a YouTube resource

snippet.thumbnails.maxres.height INTEGER

(Optional) Height of the thumbnail image

snippet.thumbnails.maxres.url STRING

The thumbnail image's URL

snippet.thumbnails.maxres.width INTEGER

(Optional) Width of the thumbnail image

snippet.thumbnails.medium OBJECT

A thumbnail is an image representing a YouTube resource

snippet.thumbnails.medium.height INTEGER

(Optional) Height of the thumbnail image

snippet.thumbnails.medium.url STRING

The thumbnail image's URL

snippet.thumbnails.medium.width INTEGER

(Optional) Width of the thumbnail image

snippet.thumbnails.standard OBJECT

A thumbnail is an image representing a YouTube resource

snippet.thumbnails.standard.height INTEGER

(Optional) Height of the thumbnail image

snippet.thumbnails.standard.url STRING

The thumbnail image's URL

snippet.thumbnails.standard.width INTEGER

(Optional) Width of the thumbnail image

snippet.title STRING

The broadcast's title. Note that the broadcast represents exactly one YouTube video. You can set this field by modifying the broadcast resource or by setting the title field of the corresponding video resource

statistics OBJECT

Statistics about the live broadcast. These represent a snapshot of the values at the time of the request. Statistics are only returned for live broadcasts

statistics.concurrentViewers INTEGER

The number of viewers currently watching the broadcast. The property and its value will be present if the broadcast has current viewers and the broadcast owner has not hidden the viewcount for the video. Note that YouTube stops tracking the number of concurrent viewers for a broadcast when the broadcast ends. So, this property would not identify the number of viewers watching an archived video of a live broadcast that already ended

statistics.totalChatCount INTEGER

The total number of live chat messages currently on the broadcast. The property and its value will be present if the broadcast is public, has the live chat feature enabled, and has at least one message. Note that this field will not be filled after the broadcast ends. So this property would not identify the number of chat messages for an archived video of a completed live broadcast

status OBJECT

status.lifeCycleStatus ENUMERATION

The broadcast's status. The status can be updated using the API's liveBroadcasts.transition method

status.liveBroadcastPriority ENUMERATION

Priority of the live broadcast event (internal state)

status.privacyStatus ENUMERATION

The broadcast's privacy status. Note that the broadcast represents exactly one YouTube video, so the privacy settings are identical to those supported for videos. In addition, you can set this field by modifying the broadcast resource or by setting the privacyStatus field of the corresponding video resource

status.recordingStatus ENUMERATION

The broadcast's recording status

Output

This building block provides 63 output parameters

  = Parameter name
  = Format

contentDetails OBJECT

Detailed settings of a broadcast

contentDetails.boundStreamId STRING

This value uniquely identifies the live stream bound to the broadcast

contentDetails.boundStreamLastUpdateTimeMs DATE_TIME

The date and time that the live stream referenced by boundStreamId was last updated

contentDetails.closedCaptionsType ENUMERATION

contentDetails.enableAutoStart BOOLEAN

This setting indicates whether auto start is enabled for this broadcast

contentDetails.enableClosedCaptions BOOLEAN

This setting indicates whether HTTP POST closed captioning is enabled for this broadcast. The ingestion URL of the closed captions is returned through the liveStreams API. This is mutually exclusive with using the closed_captions_type property, and is equivalent to setting closed_captions_type to CLOSED_CAPTIONS_HTTP_POST

contentDetails.enableContentEncryption BOOLEAN

This setting indicates whether YouTube should enable content encryption for the broadcast

contentDetails.enableDvr BOOLEAN

This setting determines whether viewers can access DVR controls while watching the video. DVR controls enable the viewer to control the video playback experience by pausing, rewinding, or fast forwarding content. The default value for this property is true.

Important: You must set the value to true and also set the enableArchive property's value to true if you want to make playback available immediately after the broadcast ends

contentDetails.enableEmbed BOOLEAN

This setting indicates whether the broadcast video can be played in an embedded player. If you choose to archive the video (using the enableArchive property), this setting will also apply to the archived video

contentDetails.enableLowLatency BOOLEAN

Indicates whether this broadcast has low latency enabled

contentDetails.latencyPreference ENUMERATION

If both this and enable_low_latency are set, they must match. LATENCY_NORMAL should match enable_low_latency=false LATENCY_LOW should match enable_low_latency=true LATENCY_ULTRA_LOW should have enable_low_latency omitted

contentDetails.mesh BINARY

contentDetails.monitorStream OBJECT

Settings and Info of the monitor stream

contentDetails.monitorStream.broadcastStreamDelayMs INTEGER

If you have set the enableMonitorStream property to true, then this property determines the length of the live broadcast delay

contentDetails.monitorStream.embedHtml STRING

HTML code that embeds a player that plays the monitor stream

contentDetails.monitorStream.enableMonitorStream BOOLEAN

This value determines whether the monitor stream is enabled for the broadcast. If the monitor stream is enabled, then YouTube will broadcast the event content on a special stream intended only for the broadcaster's consumption. The broadcaster can use the stream to review the event content and also to identify the optimal times to insert cuepoints.

You need to set this value to true if you intend to have a broadcast delay for your event.

Note: This property cannot be updated once the broadcast is in the testing or live state

contentDetails.projection ENUMERATION

The projection format of this broadcast. This defaults to rectangular

contentDetails.recordFromStart BOOLEAN

Automatically start recording after the event goes live. The default value for this property is true.

Important: You must also set the enableDvr property's value to true if you want the playback to be available immediately after the broadcast ends. If you set this property's value to true but do not also set the enableDvr property to true, there may be a delay of around one day before the archived video will be available for playback

contentDetails.startWithSlate BOOLEAN

This setting indicates whether the broadcast should automatically begin with an in-stream slate when you update the broadcast's status to live. After updating the status, you then need to send a liveCuepoints.insert request that sets the cuepoint's eventState to end to remove the in-stream slate and make your broadcast stream visible to viewers

contentDetails.stereoLayout ENUMERATION

etag STRING

Etag of this resource

id STRING

The ID that YouTube assigns to uniquely identify the broadcast

kind STRING

Identifies what kind of resource this is. Value: the fixed string "youtube#liveBroadcast"

snippet OBJECT

snippet.actualEndTime DATE_TIME

The date and time that the broadcast actually ended. This information is only available once the broadcast's state is complete. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.actualStartTime DATE_TIME

The date and time that the broadcast actually started. This information is only available once the broadcast's state is live. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.channelId STRING

The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast

snippet.description STRING

The broadcast's description. As with the title, you can set this field by modifying the broadcast resource or by setting the description field of the corresponding video resource

snippet.isDefaultBroadcast BOOLEAN

snippet.liveChatId STRING

The id of the live chat for this broadcast

snippet.publishedAt DATE_TIME

The date and time that the broadcast was added to YouTube's live broadcast schedule. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.scheduledEndTime DATE_TIME

The date and time that the broadcast is scheduled to end. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.scheduledStartTime DATE_TIME

The date and time that the broadcast is scheduled to start. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.thumbnails OBJECT

Internal representation of thumbnails for a YouTube resource

snippet.thumbnails.default OBJECT

A thumbnail is an image representing a YouTube resource

snippet.thumbnails.default.height INTEGER

(Optional) Height of the thumbnail image

snippet.thumbnails.default.url STRING

The thumbnail image's URL

snippet.thumbnails.default.width INTEGER

(Optional) Width of the thumbnail image

snippet.thumbnails.high OBJECT

A thumbnail is an image representing a YouTube resource

snippet.thumbnails.high.height INTEGER

(Optional) Height of the thumbnail image

snippet.thumbnails.high.url STRING

The thumbnail image's URL

snippet.thumbnails.high.width INTEGER

(Optional) Width of the thumbnail image

snippet.thumbnails.maxres OBJECT

A thumbnail is an image representing a YouTube resource

snippet.thumbnails.maxres.height INTEGER

(Optional) Height of the thumbnail image

snippet.thumbnails.maxres.url STRING

The thumbnail image's URL

snippet.thumbnails.maxres.width INTEGER

(Optional) Width of the thumbnail image

snippet.thumbnails.medium OBJECT

A thumbnail is an image representing a YouTube resource

snippet.thumbnails.medium.height INTEGER

(Optional) Height of the thumbnail image

snippet.thumbnails.medium.url STRING

The thumbnail image's URL

snippet.thumbnails.medium.width INTEGER

(Optional) Width of the thumbnail image

snippet.thumbnails.standard OBJECT

A thumbnail is an image representing a YouTube resource

snippet.thumbnails.standard.height INTEGER

(Optional) Height of the thumbnail image

snippet.thumbnails.standard.url STRING

The thumbnail image's URL

snippet.thumbnails.standard.width INTEGER

(Optional) Width of the thumbnail image

snippet.title STRING

The broadcast's title. Note that the broadcast represents exactly one YouTube video. You can set this field by modifying the broadcast resource or by setting the title field of the corresponding video resource

statistics OBJECT

Statistics about the live broadcast. These represent a snapshot of the values at the time of the request. Statistics are only returned for live broadcasts

statistics.concurrentViewers INTEGER

The number of viewers currently watching the broadcast. The property and its value will be present if the broadcast has current viewers and the broadcast owner has not hidden the viewcount for the video. Note that YouTube stops tracking the number of concurrent viewers for a broadcast when the broadcast ends. So, this property would not identify the number of viewers watching an archived video of a live broadcast that already ended

statistics.totalChatCount INTEGER

The total number of live chat messages currently on the broadcast. The property and its value will be present if the broadcast is public, has the live chat feature enabled, and has at least one message. Note that this field will not be filled after the broadcast ends. So this property would not identify the number of chat messages for an archived video of a completed live broadcast

status OBJECT

status.lifeCycleStatus ENUMERATION

The broadcast's status. The status can be updated using the API's liveBroadcasts.transition method

status.liveBroadcastPriority ENUMERATION

Priority of the live broadcast event (internal state)

status.privacyStatus ENUMERATION

The broadcast's privacy status. Note that the broadcast represents exactly one YouTube video, so the privacy settings are identical to those supported for videos. In addition, you can set this field by modifying the broadcast resource or by setting the privacyStatus field of the corresponding video resource

status.recordingStatus ENUMERATION

The broadcast's recording status