This endpoint is available by whitelist only. To request access, fill out the contact form.
POST /2/users/:user_id/sources
Path parameters
Request body
Example request
Success response (200)
Notes
- Newly created sources have no
stream_attributesorcompatibility_info(those appear after the source first receives video). rtmp_stream_key == id. Use thertmps_url(port 443) in production for TLS.- The
recommended_configurationtells you ideal encoder settings (bitrate, resolution, keyframe interval, etc.). is_stream_activebecomestruewhile the source is currently receiving an RTMP feed.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).video_service,creation_origin(and similar{ value, name, original_name }objects) are classification fields.valueis a stable integer;name/original_nameare opaque labels. You can safely ignore these unless you need the integer code.