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
          • POSTUpload Media: https://api.x.com/2/media/upload
LogoLogo
CloudflareSocial Media PostingXUpload Image

Upload Media: https://api.x.com/2/media/upload

||View as Markdown|
POST
/2/media/upload
POST
/2/media/upload
$curl -X POST https://graph.facebook.com/2/media/upload \
> -H "Content-Type: multipart/form-data" \
> -F media=@string \
> -F media_type="string" \
> -F media_category="string"
200Social Media Posting_X_Upload Image_Upload Media: https://api.x.com/2/media/upload_example
1{
2 "data": {
3 "id": "2035550163079516160",
4 "size": 665484,
5 "image": {
6 "h": 2134,
7 "w": 3823,
8 "image_type": "image/jpeg"
9 },
10 "media_key": "3_2035550163079516160",
11 "expires_after_secs": 86400
12 }
13}
Was this page helpful?
Previous

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

Next

3. Publish Post: https://api.linkedin.com/rest/posts

Built with

Request

This endpoint expects a multipart form containing a file.
mediafileRequired
media_typestringRequired
media_categorystringRequired

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. Finalize Media upload: https://api.x.com/2/media/upload/{video_id}/finalize
  1. Publish Post: https://api.linkedin.com/rest/posts