X Livestream API Moves to New Routes, Old Ones Return 404 on January 1, 2027

X (Twitter)

Written by:

Vira Larionova

3

min read

Date:

November 24, 2026

Date modified:

November 24, 2026

The X Livestream API has new routes, and the old ones have an end date. Since November 5, 2026, sources and broadcasts live under /2/sources and /2/broadcasts, and from January 1, 2027 the user-scoped routes return 404, according to X's Livestream API migration guide. Most of the migration is a find-and-replace of paths, with one catch around stream keys. The new routes also wrap responses in data and return errors in the standard X API problem format, so response parsing and error handling need an update too (X API changelog, November 5, 2026).

In Short

  • Since November 5, 2026, the X Livestream API has top-level /2/sources and /2/broadcasts routes.
  • POST /2/broadcasts now creates and starts a broadcast in one call.
  • From January 1, 2027, /2/users/:user_id/sources and /2/users/:user_id/broadcasts return 404.
  • On the same date, scheduled broadcasts stop accepting a stream key as source_id.
  • Rate limits don't change: 450 requests per 15 minutes per user for each source route.

What Changed in the X Livestream API?

X moved Livestream API sources and broadcasts out from under the user path. In the X Livestream API, a source is the stream input your encoder sends video to, and a broadcast is the live event published on X.

Old route New route
/2/users/:user_id/sources /2/sources
/2/users/:user_id/sources/:source_id /2/sources/:id
POST /2/users/:user_id/broadcasts + PUBLISH (PUT /2/users/:user_id/broadcasts/:broadcast_id/state with {"state":"PUBLISH"}) POST /2/broadcasts
GET /2/users/:user_id/broadcasts GET /2/broadcasts
/2/users/:user_id/broadcasts/:broadcast_id /2/broadcasts/:id
PUT /2/users/:user_id/broadcasts/:broadcast_id/state with {"state":"END"} PUT /2/broadcasts/:id/state with {"state":"END"}
The source's id / rtmp_stream_key field (on the old routes, the source ID is the stream key) GET /2/sources/:id/stream_key (new)

After January 1, 2027, no fallback keeps the user-scoped routes alive: every call returns 404.

Why Stream Keys Can Break Your Integration

Each source now has a source ID that is separate from its stream key. The source ID identifies the source in API calls and isn't secret, while the stream key authorizes video ingest and should stay private (Stream Source Management). The new /2/sources/:id and POST /2/broadcasts routes already return 400 if they receive a stream key where a source ID is expected. On January 1, 2027, scheduled broadcast routes stop accepting a stream key as source_id (scheduled broadcasts overview). Code that stored one value and used it for both breaks that day, even if it never touched the old paths.

How to Migrate before January 1, 2027

  1. Find every call to the old routes with a quick search over your code (example below).
  2. Move source and broadcast calls to the new routes from the table above.
  3. Replace the create plus PUBLISH sequence with one POST /2/broadcasts call.
  4. Store the source ID (from GET /2/sources) separately and fetch the key through /2/sources/:id/stream_key only when the encoder needs it.
  5. Point scheduled broadcasts at the source ID.
grep -rnE "/2/users/[^/]+/(sources|broadcasts)" ./src

If your app streams to X, the deadline is January 1, 2027. If it only reads public posts and profiles, nothing in this change affects you. For that side of X, see our X API v2 overview, our explainer on the X streaming API for real-time post data, and options for collecting public X data.

This is the second X API change in a month that means rewriting paths and parsers. If your product only reads public posts and profiles, the Data365 API for X gives you that data in one stable format, without tracking X's route changes yourself.

Test it with a 14-day free trial.

What We Don't Know Yet

  • The exact cutoff time: the guide gives the date but no time zone.
  • Whether X will run test outages on the old routes before January 1.

Extract data from top social media networks with Data365 API

Request a free 14-day trial and get 20+ data types

Contact us
Table of Content
Need an API to extract data from this social media?
Contact us and get a free trial of Data365 API
Request a free trial

Need to extract data from social media?

Request a free trial of Data365 API for extracting data

Major social networks in 1 place
Fair pricing
Email support
Detailed API documentation
Comprehensive data of any volume
No downtimes, uptime of at least 99%

FAQ

When Do the Old X Livestream API Routes Stop Working?

On January 1, 2027. From that date, /2/users/:user_id/sources and /2/users/:user_id/broadcasts return 404.

Can I Still Use a Stream Key as source_id in the X Livestream API?

Only on the scheduled broadcast routes, and only until January 1, 2027. After that, scheduled broadcast routes accept only a source ID. POST /2/broadcasts already accepts only a source ID and returns 400 for a stream key.

Did X Livestream API Rate Limits Change?

No. The migration guide keeps 450 requests per 15 minutes per user for each source route.

Need an API to extract real-time data from Social Media?

Submit a form to get a free trial of the Data365 Social Media API.
0/255

By submitting this form, you acknowledge that you have read, understood, and agree to our Terms and Conditions, which outline how your data will be collected, used, and protected. You can review our full Privacy Policy here.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Trusted by