---
title: "X append video segment API: POST /2/media/upload/{id}/append"
description: "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."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

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

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`](https://pubnio.com/api/v1/docs#tag/posts/POST/api/v1/posts) (unless it saves a draft), [`POST /api/v1/posts/{postId}/publish`](https://pubnio.com/api/v1/docs#tag/posts/POST/api/v1/posts/{postId}/publish), or [`POST /api/v1/posts/{postId}/targets/{targetId}/retry`](https://pubnio.com/api/v1/docs#tag/posts/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](https://docs.x.com/x-api/media/quickstart/media-upload-chunked) | 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](https://pubnio.com/docs/errors/providers/) 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](https://pubnio.com/docs/changes/).

## 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

- [X API v2 OpenAPI document](https://api.x.com/2/openapi.json)
- [X API: Chunked Media Upload](https://docs.x.com/x-api/media/quickstart/media-upload-chunked), checked 2026-12-05

## Related

- [Provider API operations PubNio calls](https://pubnio.com/docs/providers/operations/)
- [X rate limits and quota](https://pubnio.com/docs/providers/x/quota/)

Source: https://pubnio.com/docs/providers/x/operations/append-media-upload/index.mdx
