Skip to main content
Access Broadcasts endpoints via client.broadcasts (BroadcastsClient).

Methods

add_chat_moderator

POST /2/broadcasts/chat/moderators Add a Chat Moderator Adds a moderator to the authenticated broadcaster’s persistent list and returns the updated moderator user IDs. The list applies to all current and future broadcast chats.

Parameters

AddChatModeratorRequest
required
Request payload.
Returns: AddChatModeratorResponse

create_broadcast

POST /2/broadcasts Go Live on a Source Takes one or more of the authenticated user’s sources live and returns 201 with the new broadcast. Several sources (source_id plus additional_source_ids, one per video format) go live together as one broadcast; they must all be RTMP sources in one region, and when one of them is already live its broadcast is returned only if it holds every listed source. The broadcast goes live immediately (state RUNNING), even before the encoder sends video, and is ended (TIMED_OUT) if no video arrives within 5 minutes. It is announced in a Post unless should_not_tweet is true. When the source already has a live broadcast, returns 200 with that broadcast unchanged and ignores the request’s title, locale, chat_option and should_not_tweet. A missing tweet_id means the Post hasn’t been created yet, was suppressed with should_not_tweet, or could not be created; read it later with GET /2/broadcasts/:id. A 409 conflict means the source can’t go live right now: either it can’t take video before the encoder connects (external HLS sources, or regions where this isn’t available), so retry once video is flowing, or another broadcast is live on it, so END that broadcast first. The detail says which, and names the live broadcast when known.

Parameters

CreateBroadcastRequest
required
Request payload.
Returns: CreateBroadcastResponse

create_scheduled_broadcast

POST /2/broadcasts/scheduled Create a Scheduled Broadcast Schedules a broadcast for the authenticated user on one of their sources: source_id is required. Passing a stream key as source_id is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source’s id from GET /2/sources instead.

Parameters

CreateScheduledBroadcastRequest
required
Request payload.
Returns: CreateScheduledBroadcastResponse

create_source

POST /2/sources Create a Stream Source Creates a persistent RTMP/RTMPS ingest point for the authenticated user. Push an encoder to rtmps_url with the returned stream_key. This is the only response that includes the stream key; read it later with GET /2/sources/:id/stream_key.

Parameters

CreateSourceRequest
required
Request payload.
Returns: CreateSourceResponse

create_user_broadcast

POST /2/users/{id}/broadcasts Create a Broadcast on a User’s Source Creates a broadcast on one of the authenticated user’s sources. id must be the authenticated user. The broadcast is NOT_STARTED and posts nothing until it is published with PUT /2/users/:id/broadcasts/:broadcast_id/state; one that is never published is deleted after 7 days. When the source already has a running broadcast, that broadcast is returned.

Parameters

schemas.UserId
required
id (path parameter).
CreateUserBroadcastRequest
required
Request payload.
Returns: CreateUserBroadcastResponse

create_user_source

POST /2/users/{id}/sources Create a Stream Source for a User Creates a persistent RTMP/RTMPS ingest point for the authenticated user. id must be the authenticated user.

Parameters

schemas.UserId
required
id (path parameter).
CreateUserSourceRequest
required
Request payload.
Returns: CreateUserSourceResponse

delete_broadcast

DELETE /2/broadcasts/{id} Delete a Broadcast Deletes one of the authenticated user’s broadcasts, scheduled or ended, including its replay. A running broadcast must be ended first.

Parameters

str
required
id (path parameter).
Returns: DeleteBroadcastResponse

delete_broadcast_chat_message

DELETE /2/broadcasts/{id}/chat/{message_id} Remove a Chat Message from a Live Broadcast Removes a specific chat message from a running broadcast where the authenticated user is the host or a moderator.

Parameters

str
required
id (path parameter).
str
required
message_id (path parameter).
Returns: DeleteBroadcastChatMessageResponse

delete_scheduled_broadcast

DELETE /2/broadcasts/scheduled/{id} Delete a Scheduled Broadcast Deletes a scheduled broadcast by its alphanumeric broadcast id.

Parameters

str
required
id (path parameter).
Returns: DeleteScheduledBroadcastResponse

delete_source

DELETE /2/sources/{id} Delete a Stream Source Deletes one of the authenticated user’s stream sources.

Parameters

str
required
Source id (19 digits), from GET /2/sources.
Returns: DeleteSourceResponse

delete_user_broadcast

DELETE /2/users/{id}/broadcasts/{broadcast_id} Delete a User’s Broadcast Deletes one of the authenticated user’s broadcasts. id must be the authenticated user. Deprecated: use DELETE /2/broadcasts/:id.

Parameters

schemas.UserId
required
id (path parameter).
str
required
broadcast_id (path parameter).
Returns: DeleteUserBroadcastResponse

delete_user_source

DELETE /2/users/{id}/sources/{source_id} Delete a User’s Stream Source Deletes one of the authenticated user’s stream sources. id must be the authenticated user. Success is an empty object.

Parameters

schemas.UserId
required
id (path parameter).
str
required
source_id (path parameter).
Returns: DeleteUserSourceResponse

get_broadcast

GET /2/broadcasts/{id} Get a Broadcast Returns a broadcast owned by the authenticated user.

Parameters

str
required
id (path parameter).
Returns: GetBroadcastResponse

get_broadcast_chat

GET /2/broadcasts/{id}/chat Paginated Get Broadcast Chat History Returns newest-first chat messages for a broadcast owned by the authenticated user.

Parameters

str
required
id (path parameter).
Returns: Iterator[GetBroadcastChatResponse]

get_chat_moderators

GET /2/broadcasts/chat/moderators Get Chat Moderators Returns the authenticated broadcaster’s persistent moderators as User resources. The list applies to all of their current and future broadcast chats.

Parameters

Returns: GetChatModeratorsResponse

get_chat_muted_users

GET /2/broadcasts/chat/mutes Paginated Get Muted Chat Users Returns the users muted in the authenticated broadcaster’s chat, with the expiry time of timed mutes. Mutes apply to all of their broadcasts. Expired timed mutes are omitted. Use expansions=user_id to include the muted users.

Parameters

Returns: Iterator[GetChatMutedUsersResponse]

get_region

GET /2/region Get the Ingest Region Returns the ingest region nearest the server handling the request. Pass it as region when creating a stream source to ingest there.
Returns: GetRegionResponse

get_scheduled_broadcast

GET /2/broadcasts/scheduled/{id} Get a Scheduled Broadcast Returns a single scheduled broadcast by its alphanumeric broadcast id.

Parameters

str
required
id (path parameter).
Returns: GetScheduledBroadcastResponse

get_source

GET /2/sources/{id} Get a Stream Source Returns one of the authenticated user’s stream sources. Poll it after starting an encoder and wait for is_stream_active before going live. The stream key is not included; read it with GET /2/sources/:id/stream_key.

Parameters

str
required
Source id (19 digits), from GET /2/sources.
Returns: GetSourceResponse

get_source_stream_key

GET /2/sources/{id}/stream_key Get a Stream Source’s Stream Key Returns the stream key of one of the authenticated user’s stream sources. The stream key is a credential: anyone with it can stream to the source, so keep it out of logs, URLs and client-side code.

Parameters

str
required
Source id (19 digits), from GET /2/sources.
Returns: GetSourceStreamKeyResponse

get_user_broadcast

GET /2/users/{id}/broadcasts/{broadcast_id} Get a User’s Broadcast Returns one of the authenticated user’s broadcasts. id must be the authenticated user. Deprecated: use GET /2/broadcasts/:id.

Parameters

schemas.UserId
required
id (path parameter).
str
required
broadcast_id (path parameter).
Returns: GetUserBroadcastResponse

get_user_source

GET /2/users/{id}/sources/{source_id} Get a User’s Stream Source Returns one of the authenticated user’s stream sources. id must be the authenticated user.

Parameters

schemas.UserId
required
id (path parameter).
str
required
source_id (path parameter).
Returns: GetUserSourceResponse

go_live_scheduled_broadcast

POST /2/broadcasts/scheduled/{id}/live Go Live on a Scheduled Broadcast Publishes a schedule that was created or updated with manual_publish: true. Without that flag the coordinator auto-publishes at start and this call is rejected.

Parameters

str
required
id (path parameter).
Returns: GoLiveScheduledBroadcastResponse

list

GET /2/broadcasts Paginated List Broadcasts Returns the authenticated user’s live-video broadcasts, or selected owned broadcasts when ids are provided. At most one of ids, max_results may be provided. At most one of ids, pagination_token may be provided.

Parameters

Returns: Iterator[ListResponse]

list_live_categories

GET /2/broadcasts/categories List Live Categories Returns the live categories a host can pick when going live, in display order. Pass a category’s id as live_category_id on POST /2/broadcasts. Ids are permanent; names can change, so store the id and show the current name. The whole list is returned in one response, without paging.
Returns: ListLiveCategoriesResponse

list_scheduled

GET /2/broadcasts/scheduled Paginated List Scheduled Broadcasts Returns scheduled broadcasts owned by the authenticated user.

Parameters

Returns: Iterator[ListScheduledResponse]

list_sources

GET /2/sources List Stream Sources Returns the authenticated user’s RTMP/RTMPS stream sources. A source’s id is the source_id that POST /2/broadcasts and scheduled broadcasts take. Stream keys are not included; read one with GET /2/sources/:id/stream_key.
Returns: ListSourcesResponse

list_user

GET /2/users/{id}/broadcasts Paginated List a User’s Broadcasts Returns the authenticated user’s broadcasts, 100 per page. id must be the authenticated user. Deprecated: use GET /2/broadcasts.

Parameters

schemas.UserId
required
id (path parameter).
Returns: Iterator[ListUserResponse]

list_user_sources

GET /2/users/{id}/sources List a User’s Stream Sources Returns the authenticated user’s RTMP/RTMPS stream sources (empty array if none). id must be the authenticated user.

Parameters

schemas.UserId
required
id (path parameter).
Returns: ListUserSourcesResponse

mute_broadcast_chat_user

POST /2/broadcasts/{id}/chat/mutes Mute or Time Out a User in a Broadcast Chat Prevents a user from posting further messages in a running broadcast chat. When end_at_ms is provided, the mute expires at that time. The authenticated user must be the broadcast host or a moderator.

Parameters

str
required
id (path parameter).
MuteBroadcastChatUserRequest
required
Request payload.
Returns: MuteBroadcastChatUserResponse

mute_chat_user

POST /2/broadcasts/chat/mutes Mute or Time Out a User in Chat Prevents a user from posting messages in all of a broadcaster’s chats. Without broadcast_id, the user is muted in the authenticated user’s own chats. Moderators pass broadcast_id to mute the user in that broadcast host’s chats. When end_at_ms is provided, the mute expires at that time.

Parameters

MuteChatUserRequest
required
Request payload.
Returns: MuteChatUserResponse

remove_chat_moderator

DELETE /2/broadcasts/chat/moderators/{user_id} Remove a Chat Moderator Removes a moderator from the authenticated broadcaster’s persistent list and returns the updated moderator user IDs.

Parameters

str
required
A 64-bit signed integer.
Returns: RemoveChatModeratorResponse

send_broadcast_chat

POST /2/broadcasts/{id}/chat Send a Chat Message to a Live Broadcast Posts a chat message to a running broadcast, attributed to the authenticated user.

Parameters

str
required
id (path parameter).
SendBroadcastChatRequest
required
Request payload.
Returns: SendBroadcastChatResponse

unmute_broadcast_chat_user

DELETE /2/broadcasts/{id}/chat/mutes/{user_id} Unmute a User in a Broadcast Chat Allows a muted user to post messages in a running broadcast chat again. The authenticated user must be the broadcast host or a moderator.

Parameters

str
required
id (path parameter).
str
required
A 64-bit signed integer.
Returns: UnmuteBroadcastChatUserResponse

unmute_chat_user

DELETE /2/broadcasts/chat/mutes/{user_id} Unmute a User in Chat Allows a muted user to post messages in a broadcaster’s chats again. Without broadcast_id, the user is unmuted in the authenticated user’s own chats. Moderators pass broadcast_id to unmute the user in that broadcast host’s chats.

Parameters

str
required
A 64-bit signed integer.
Returns: UnmuteChatUserResponse

update_broadcast

PUT /2/broadcasts/{id} Update a Broadcast Changes the title, chat option or live category of one of the authenticated user’s broadcasts and returns the broadcast. Send at least one of title, chat_option and live_category_id; fields left out keep their values. A broadcast can be updated before it starts, while it is live and after it has ended. A 409 conflict means the broadcast can’t be edited, for example because it was deleted or moderated.

Parameters

str
required
id (path parameter).
UpdateBroadcastRequest
required
Request payload.
Returns: UpdateBroadcastResponse

update_broadcast_state

PUT /2/broadcasts/{id}/state End a Broadcast Ends one of the authenticated user’s broadcasts. Only state: END is supported.

Parameters

str
required
id (path parameter).
UpdateBroadcastStateRequest
required
Request payload.
Returns: UpdateBroadcastStateResponse

update_scheduled_broadcast

PUT /2/broadcasts/scheduled/{id} Update a Scheduled Broadcast Updates a scheduled broadcast. Path :id is the broadcast id; the body must include scheduled_broadcast_id. Re-send every field that should be kept. Passing a stream key as source_id is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source’s id from GET /2/sources instead.

Parameters

str
required
id (path parameter).
UpdateScheduledBroadcastRequest
required
Request payload.
Returns: UpdateScheduledBroadcastResponse

update_source

PUT /2/sources/{id} Rename a Stream Source Renames one of the authenticated user’s stream sources.

Parameters

str
required
Source id (19 digits), from GET /2/sources.
UpdateSourceRequest
required
Request payload.
Returns: UpdateSourceResponse

update_user_broadcast_state

PUT /2/users/{id}/broadcasts/{broadcast_id}/state Publish or End a User’s Broadcast Publishes or ends one of the authenticated user’s broadcasts. id must be the authenticated user. PUBLISH takes a broadcast created with POST /2/users/:id/broadcasts live once its source is receiving video, and posts it unless should_not_tweet is true. END ends the broadcast. Deprecated: use PUT /2/broadcasts/:id/state to end a broadcast.

Parameters

schemas.UserId
required
id (path parameter).
str
required
broadcast_id (path parameter).
UpdateUserBroadcastStateRequest
required
Request payload.
Returns: UpdateUserBroadcastStateResponse

update_user_source

PUT /2/users/{id}/sources/{source_id} Rename a User’s Stream Source Renames one of the authenticated user’s stream sources. id must be the authenticated user.

Parameters

schemas.UserId
required
id (path parameter).
str
required
source_id (path parameter).
UpdateUserSourceRequest
required
Request payload.
Returns: UpdateUserSourceResponse