Skip to content

X upload image API: POST /2/media/upload

When PubNio calls X's upload image request, POST /2/media/upload: the scopes it needs, the errors PubNio handles for it, and its pinned spec revision.

PubNio calls X’s POST /2/media/upload (mediaUpload) to upload an image or GIF before it creates the post. Values checked 2026-12-05.

How PubNio calls it

Value Official value Source Checked
Image limits 5MB; JPG, PNG, GIF, WEBP X API: Upload Media 2026-12-05
GIF size 15MB X API: Media best practices 2026-12-05

Scopes

  • The pinned spec lists one scope: media.write.
  • PubNio’s X sign-in requests every one of them.
  • Before a delivery makes this call, PubNio checks that the account granted tweet.write.

Errors

PubNio has no X error code pages yet. Provider error codes covers the providers that have them.

Spec and changes

mediaUpload in the pinned spec, revision 2.175.

Checked weekly; no change to POST /2/media/upload recorded since this revision. Change tracker.

Limits

  • Videos never use this single request; they go through the chunked initialize, append, and finalize steps.

Sources

Type to search…

↑↓ navigate↵ selectEsc close