Skip to main content
The X Livestream API enables authorized third-party applications and services to create and manage live video broadcasts on X. It provides a complete set of endpoints for the broadcast lifecycle:
  • Managing persistent RTMP/RTMPS stream sources (ingest points)
  • Going live, monitoring, and ending broadcasts
  • Creating and managing scheduled broadcasts
  • Reading live chat via the X Activity API
  • Sending chat messages to live broadcasts
  • Moderating live chat by removing messages and muting users
Endpoints are hosted under https://api.x.com.

Get started

Prerequisites and credentials.

Typical workflow

From stream source to live broadcast, step by step.

Core concepts

Two resources form the core of the API:
  • Stream Source — A persistent RTMP/RTMPS ingest point (an ingest URL plus a unique stream key). You create a source once for an encoder/region and reuse it across many broadcasts. A source exists independently of any broadcast. See Stream Source Management.
  • Broadcast — An ephemeral live session bound to a source. A broadcast goes live (RUNNING), then ends (ENDED), and represents a single “go live” event that viewers watch on X. See Broadcast Lifecycle.
The typical flow is: create a source with POST /2/sources → start your encoder → go live with POST /2/broadcasts → end with PUT /2/broadcasts/:id/state. Sources are reusable; broadcasts are one-time sessions. See the typical workflow.
The original /2/users/:user_id/sources and /2/users/:user_id/broadcasts routes are deprecated and will be removed on January 1, 2027. See the migration guide.
You can also schedule broadcasts in advance with the Livestream Scheduling API. Scheduled broadcasts publish automatically at their scheduled start time or wait for an explicit go-live request.

Key identifiers