API ReferenceMedia Uploads
Presign an X (Twitter) video upload
Requires scope: `publish:write`. Returns a presigned URL to PUT a video (max 500 MB, `video/mp4`) directly to storage, plus the `r2_key` to reference afterward. At publish time the video is uploaded to X via the v2 chunked flow (`media_category=tweet_video`); X enforces a 140-second duration cap.
Authorization
ApiKey AuthorizationBearer <token>
A personal API key created in the dashboard (Starter, Pro, and Team plans).
In: header
Query Parameters
content_type*string
file_size*integer
File size in bytes.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/twitter/uploads/presign?content_type=string&file_size=0"{ "upload_url": "https://r2.example.com/put?sig=...", "r2_key": "twitter/4021/uuid.mp4"}