For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Cloudflare
    • GETpayload example
    • POSThttps://social-media-posting-dev.deao.workers.dev/post
        • POSTCreate Post: https://api.x.com/2/tweets
        • POSTRefresh Token: https://api.x.com/2/oauth2/token
          • GET4. Get Media upload status: https://api.x.com/2/media/upload?media_id={video_id}
          • POST1. Initialize media upload: https://api.x.com/2/media/upload/initialize
          • POST2. Append Media upload: https://api.x.com/2/media/upload/{video_id}/append
          • POST3. Finalize Media upload: https://api.x.com/2/media/upload/{video_id}/finalize
LogoLogo
CloudflareSocial Media PostingXUpload Video

  1. Append Media upload: https://api.x.com/2/media/upload/{video_id}/append

||View as Markdown|
POST
/2/media/upload/:video_id/append
POST
/2/media/upload/:video_id/append
$curl -X POST https://graph.facebook.com/2/media/upload/2035553946807222272/append \
> -H "Content-Type: multipart/form-data" \
> -F media=@string \
> -F segment_index="string"
200Social Media Posting_X_Upload Video_2. Append Media upload: https://api.x.com/2/media/upload/{video_id}/append_example
1{
2 "data": {
3 "expires_at": 1774233642414
4 }
5}
Was this page helpful?
Previous

1. Initialize media upload: https://api.x.com/2/media/upload/initialize

Next

3. Finalize Media upload: https://api.x.com/2/media/upload/{video_id}/finalize

Built with

Path parameters

video_idstringRequired

Request

This endpoint expects a multipart form containing a file.
mediafileRequired
Chunks of 4MB
segment_indexstringRequired

Response headers

perfstring
CF-RAYstring
x-served-bystring
Cache-Controlstring
origin-cf-raystring
x-access-levelstring
cf-cache-statusstring
x-frame-optionsstring
x-response-timestring
x-transaction-idstring
x-xss-protectionstring
x-rate-limit-limitstring
x-rate-limit-resetstring
content-dispositionstring
x-content-type-optionsstring
x-rate-limit-remainingstring
strict-transport-securitystring

Response

OK
dataobject
  1. Initialize media upload: https://api.x.com/2/media/upload/initialize
  1. Finalize Media upload: https://api.x.com/2/media/upload/{video_id}/finalize