Skip to main content
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_STARTEDRUNNING. The broadcast becomes publicly visible on X. By default an announcement post is created. (Set should_not_tweet: true to suppress it.)

Request body

Chat option values

chat_option is an integer enum controlling who can participate in chat: If you omit chat_option when publishing, it defaults to 3 (verified accounts). Set it explicitly if you want a different audience.

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: when present, an empty string means the post succeeded and a non-empty value describes why it failed (the broadcast still goes live regardless). This field may be absent from the response entirely.
  • language defaults to "en" if you don’t send locale.

End (state: “END”)

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

Example request

Response

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