Replace post media
replace_post_mediaReplaces the video or image behind a not-yet-published post (draft, ready, scheduled or failed) with another upload from the same workspace, like the dashboard's "Replace media". The post keeps its schedule, captions, first comments and platform settings; only the media file changes. Set apply_to_batch: true to also swap every other post in the same batch (same media, same status and, for scheduled posts, the same scheduled time), which is what you want when one upload was scheduled to several platforms at once. Upload the new file first with create_video_upload_from_url or create_video_upload + finalize_video_upload, then pass its id here. Refuses text posts, carousels, and posts that are queued, processing or published. Platform compatibility of the new file is not re-checked, so pick media that suits every platform in the batch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| video_post_id | Yes | The video_posts.id whose media you want to replace. Get it from list_scheduled_posts or create_post_draft. | |
| apply_to_batch | No | Also swap the other posts in this post's batch (same media, same status, same scheduled time). Default false: only this post is changed. | |
| idempotency_key | No | Optional client-generated key (e.g., a UUID) to make retries safe. Identical calls with the same key within 10 minutes return the original result instead of running the write twice. | |
| new_video_upload_id | Yes | The video_uploads.id of the replacement video or image (from list_video_uploads or finalize_video_upload). Must be in the same workspace as the post; text posts and carousels can't be swapped in. |