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