Skip to content

X append video segment API: POST /2/media/upload/{id}/append

When PubNio calls X's append video segment request, POST /2/media/upload/{id}/append: the scopes it needs, the errors PubNio handles for it, and its pinned spec revision.

PubNio calls X’s POST /2/media/upload/{id}/append (appendMediaUpload) to send a video to X in segments. Values checked 2026-12-05.

How PubNio calls it

  • Publishing: POST /api/v1/posts (unless it saves a draft), POST /api/v1/posts/{postId}/publish, or POST /api/v1/posts/{postId}/targets/{targetId}/retry starts the delivery.
  • PubNio sends the stored video in 4 MiB segments, each read from storage by byte range, with segment_index set to the segment’s offset divided by 4 MiB.
  • Each send step appends at most sixteen segments, 64 MiB, and records every appended segment in the upload session, so a retried step sends only what is missing.
  • A video longer than 140 seconds never gets here: when the length measured at intake is known, validation refuses it as media_duration.
Value Official value Source Checked
Chunk size 5MB recommended, 8MB maximum X API: Chunked Media Upload 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

appendMediaUpload in the pinned spec, revision 2.175.

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

Limits

  • A segment X refuses fails the delivery as provider_rejected, before any post exists; another error retries the step from the last recorded segment.

Sources

Type to search…

↑↓ navigate↵ selectEsc close