POST /2/users/:user_id/sources
Path parameters
Request body
Example request
Success response (200)
Notes
- On this route,
idis the source’s stream key (rtmp_stream_key == id). Treat it as a secret: anyone with the key can stream to your source. The/2/sourcesroutes identify the same source by a separate, non-secret source id instead; look it up with Get Sources. - Both
rtmp_urlandrtmps_urlare RTMPS (TLS) URLs. Configure your encoder withrtmps_urlandrtmp_stream_key. rtmp_regionis the region of the X ingest location serving the source (us-east-1orus-west-2), which can differ from theregionyou requested (for example,eu-central-1is served fromus-east-1).is_stream_activeistruewhile the source is receiving video from your encoder.owner_idis a JSON number, not a string — for real (19-digit) X user IDs it exceeds the safe-integer range of many languages (e.g. JavaScript) and loses precision when parsed normally. Do not rely onowner_id; use your authenticated numeric user id (or a broadcast’stwitter_user_id, which is a string).- Sources don’t currently include recommended encoder settings (
recommended_configuration), detected stream settings (stream_attributes) orcompatibility_info. - Sources created before October 31, 2026 can also include the classification fields
video_serviceandcreation_origin({ value, name, original_name }objects) and their original ingest hostnames. You can safely ignore the classification fields.