Skip to main content
This route is deprecated and will be removed on January 1, 2027, after which it returns 404. To go live, use Go Live (POST /2/broadcasts), which creates and publishes a broadcast in one call. To end a broadcast, use End Broadcast (PUT /2/broadcasts/:id/state). See the migration guide.
Both actions use the same endpoint with different state values. Endpoint: PUT /2/users/:user_id/broadcasts/:broadcast_id/state

Publish (state: “PUBLISH”)

Transitions NOT_STARTED → RUNNING. The broadcast becomes publicly visible on X. By default an announcement post is created. (Set should_not_tweet: true to suppress it.) You can publish before your encoder connects: the response shows RUNNING right away, and video appears once the source is receiving it. Start your encoder before or right after publishing.

Request body

Chat option values

chat_option is an integer enum controlling who can participate in chat: Set chat_option explicitly to choose who can chat.

Example request

Response (on success)

  • start_ms is set when it becomes live.
  • The announcement post is created asynchronously. tweet_id is typically not present in this publish response — re-fetch the broadcast (GET .../broadcasts/:broadcast_id) a moment later to read tweet_id once the post exists.
  • tweet_error: present, next to broadcast, only when the announcement post failed; it describes why. The broadcast still goes live.
  • language is present only when you send locale.

End (state: “END”)

Transitions RUNNING → ENDED. Irreversible; you cannot restart a broadcast.

Request body (strict)

Do not include title, should_not_tweet, locale, or chat_option when ending. The server explicitly rejects them with 400 if any of these fields are present (for example, "title must not be set").
Ending a broadcast that isn’t running returns 400 with error_type: "badRequest".

Example request

Response

After ending, stop your encoder. A replay may be available later if available_for_replay was true (or per platform policy).