Edit a Published Post
Update caption or metadata on a post that is already live. Fields you omit are left unchanged.
Platform support
| Platform | Edit | Notes |
|---|---|---|
| ✅ | message, pin, scheduled time. Only posts published through Upload-Post. | |
| ✅ | commentary (or text). Accepts LinkedIn mentions. | |
| X | ✅ | Premium, inside X's edit window (X documents both 30 minutes and 1 hour; the post's edit_controls.editable_until is the real deadline), fewer than 5 edits. The post ID changes. |
| YouTube | ✅ | title, description, tags, privacy, category, publishAt, paid promotion (hasPaidProductPlacement), default language, embeddable, license, public stats, made for kids, altered or synthetic content, recording date, translations and brand partner (see below). |
| Google Business | ✅ | localPosts.patch. |
| ❌ | No edit API for published media. | |
| TikTok | ❌ | |
| Threads | ❌ | |
| Telegram | ✅ | Text or caption, buttons, pin/unpin, replace the media, stop a poll, move or stop a live location. See Telegram. |
Credential channels that implement edit (Discord, Telegram, Mastodon, Hashnode, Whop, …) are also accepted.
Endpoint
POST /api/uploadposts/posts/edit
Alias: POST /api/uploadposts/posts/action with "action": "edit" (LinkedIn).
Headers
| Name | Value | Description |
|---|---|---|
| Authorization | Apikey your-api-key-here | Your API key for authentication |
| Content-Type | application/json | Request body format |
Body Parameters (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
platform | String | Yes | facebook, linkedin, x, youtube, google_business, plus credential channels that support edit. |
user | String | Yes | Profile username. |
post_id | String | Yes | Platform post ID (YouTube also accepts video_id). |
message / text / commentary | String | No | New caption. Facebook: message. X: text. LinkedIn: commentary. |
is_pinned | Boolean | No | Facebook: pin/unpin. |
scheduled_publish_time | String | No | Facebook. Unix timestamp in seconds. |
facebook_page_id | String | No | Facebook Page if not the profile default. |
linkedin_visibility | String | No | LinkedIn visibility on edit. |
linkedin_disable_reshare | Boolean | No | LinkedIn. |
title / description / tags / privacyStatus / categoryId / publishAt | — | No | YouTube. Aliases with youtube_* prefix are accepted. |
hasPaidProductPlacement | Boolean | No | YouTube. Sets or clears the "Includes paid promotion" declaration (paidProductPlacementDetails). The cross-network paid_partnership is accepted as an alias. The response echoes paidProductPlacementDetails as YouTube stored it. A value that is not true/false returns error_code: commercial_disclosure_invalid_value. See Paid Partnership Disclosure. |
summary, cta_type, cta_url, event_*, offer_* | — | No | Google Business. |
media_url / scheduled_time / recurrence* | — | No | Google Business, not generally available yet (ignored until then): replace the media, change Google's publish time, or change the recurrence. See Google Business Posts. |
defaultLanguage | String | No | YouTube. Language of the title and description (BCP-47, e.g. en, es-419, pt-BR). |
embeddable / publicStatsViewable / selfDeclaredMadeForKids / containsSyntheticMedia | Boolean | No | YouTube. selfDeclaredMadeForKids and containsSyntheticMedia only change when you send them. |
license | String | No | YouTube. youtube or creativeCommon. |
recordingDate | String | No | YouTube. ISO 8601 date or datetime. |
localizations | Object | No | YouTube. Translations to add or replace, keyed by BCP-47 code: {"es": {"title": "...", "description": "..."}}. Languages you do not send stay as they are. The video needs a defaultLanguage (already set or sent in the same call). |
localizations_remove | Array | No | YouTube. Languages to delete, e.g. ["fr"]. |
brand_partner | String | No | YouTube. Brand partner channel ID (UC…, 24 characters; handles are not accepted), for creator-initiated brand partner access. Checked against YouTube's answer: if YouTube does not keep it, the answer says so in not_applied and warnings. |
YouTube fields beyond title, description, tags, privacy, category and publishAt: an empty string counts as not sent (it never clears a value). When the same call also changes one of those six original fields, the original fields are always applied; if a new field has a wrong value or cannot be used right now, it is skipped and the answer explains it in warnings.
Example Request
curl -X POST https://api.upload-post.com/api/uploadposts/posts/edit \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"platform": "facebook",
"user": "my-profile",
"post_id": "1234567890",
"message": "Updated caption"
}'
X:
curl -X POST https://api.upload-post.com/api/uploadposts/posts/edit \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"platform": "x",
"user": "my-profile",
"post_id": "1234567890123456789",
"text": "Corrected tweet"
}'
YouTube, translations and license:
curl -X POST https://api.upload-post.com/api/uploadposts/posts/edit \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"platform": "youtube",
"user": "my-profile",
"post_id": "dQw4w9WgXcQ",
"localizations": {"es": {"title": "Mi vídeo", "description": "Descripción"}},
"localizations_remove": ["fr"],
"license": "creativeCommon"
}'
YouTube's update replaces whole sections of the video, so Upload-Post reads the video first and only changes the fields you send: everything else (other translations, recording date, settings) stays as it was.
Two edits in a row: YouTube serves reads from replicas that can lag a few seconds behind. Two edits of the same video less than a few seconds apart can overwrite each other (the second one reads the video before the first change is visible). Wait about 10 seconds between edits of the same video.
Altered or synthetic content: YouTube does not return
containsSyntheticMediawhen reading a video, so Upload-Post cannot show it back. According to YouTube's reference it only changes when you send it explicitly; check it in YouTube Studio if it matters.
Successful Response (200 OK)
Facebook:
{
"success": true,
"platform": "facebook",
"post_id": "1234567890",
"updated": ["message"]
}
X returns a new post_id. Use that id from now on; the previous id stays in edit_history_post_ids.
An edit on X is a new post, so it follows the same rules as X replies: URLs in text are removed unless the X Links add-on is active (the response then carries a warnings array; a text made only of links answers 400 x_links_not_allowed), and it counts against the X account's daily cap of replies, edits and reposts (20 on the Free plan, 200 on paid plans, per UTC day; 429 x_daily_write_limit with a Retry-After header).
{
"success": true,
"platform": "x",
"post_id": "9876543210987654321",
"previous_post_id": "1234567890123456789",
"edit_history_post_ids": ["1234567890123456789", "9876543210987654321"],
"url": "https://x.com/handle/status/9876543210987654321",
"message": "X assigns a new post id to every edit. Use the returned post_id from now on; the previous id stays in edit_history_post_ids."
}
YouTube (with new fields the answer also echoes the sections you changed; not_applied and warnings appear only when YouTube accepted the call but did not keep a value):
{
"success": true,
"platform": "youtube",
"post_id": "dQw4w9WgXcQ",
"updated_fields": ["license", "localizations", "localizations_remove"],
"changes": [],
"snippet": {"title": "My video", "description": "…", "tags": ["a"], "categoryId": "22", "defaultLanguage": "en"},
"status": {"privacyStatus": "public", "publishAt": null, "license": "creativeCommon", "embeddable": true,
"publicStatsViewable": true, "selfDeclaredMadeForKids": false, "containsSyntheticMedia": false},
"localizations": {"es": {"title": "Mi vídeo", "description": "Descripción"}}
}
LinkedIn:
{
"success": true,
"message": "LinkedIn post updated.",
"post_id": "urn:li:share:123",
"url": "https://www.linkedin.com/feed/update/urn:li:share:123/"
}
Telegram
post_id is the numeric message id returned when you published.
| Name | Type | Description |
|---|---|---|
text / caption | String | New text (text posts) or caption (media posts). media: true/false forces which one. |
telegram_parse_mode, telegram_reply_markup, telegram_link_preview, telegram_show_caption_above_media | — | Same as when publishing. telegram_reply_markup alone only changes the buttons. |
action | String | pin / unpin (or telegram_pin: true/false), stop_poll, edit_live_location, stop_live_location. stop_poll can't be combined with a new text. |
telegram_pin_notify | Boolean | With action: "pin": notify the members. A pin is silent by default; Telegram never notifies a pin in channels or private chats, so this only matters in groups. |
telegram_media | String / file | Replace the photo, video, animation, audio or document (editMessageMedia): a public URL, a Telegram file_id, or a file in a multipart/form-data request. Requires caption (or text) or telegram_remove_caption: true, see below. |
telegram_remove_caption | Boolean | With telegram_media: publish the new media without caption. |
telegram_media_type | String | photo, video, animation, audio, document or live_photo. Needed for a file_id; otherwise taken from the file extension. |
telegram_media_options | Object | Extra InputMedia fields: video width, height, duration, supports_streaming, start_timestamp, cover; animation width, height, duration; audio duration, performer, title; document disable_content_type_detection. |
telegram_has_spoiler | Boolean | Spoiler on the new photo/video/animation. |
telegram_thumbnail, telegram_cover | file | Multipart only: thumbnail (JPEG ≤ 200 kB, 320 px) and video cover. |
telegram_live_photo_photo | String / file | live_photo only: the still photo (file or file_id; Telegram does not take live photos by URL). |
telegram_location | Object | edit_live_location: latitude, longitude, optional horizontal_accuracy (0-1500), heading (1-360), proximity_alert_radius, live_period. |
Telegram replaces the whole message when the media changes, and bots cannot read the current
caption. So a media replacement must say what the caption becomes: send caption (repeat the
current one to keep it) or telegram_remove_caption: true; otherwise the API answers 400
without touching the post.
Inside an album, Telegram only lets a photo/video be replaced by a photo, live photo or video, an audio by an audio and a document by a document. Uploads go up to 10 MB for photos and 50 MB for the rest; by URL Telegram downloads up to 5 MB (photos) or 20 MB.
curl -X POST https://api.upload-post.com/api/uploadposts/posts/edit \
-H 'Authorization: Apikey your-api-key-here' \
-F platform=telegram -F user=my-profile -F post_id=812 \
-F [email protected] -F caption='Fixed version'
{ "success": true, "post_id": 812, "url": "https://t.me/c/1234567890/812", "media_type": "video", "message": "Telegram post media replaced." }
stop_poll returns the final Poll (votes per option) in poll.
Telegram errors carry an error_code: telegram_invalid_parameter (400, e.g. post_id is not a
numeric message id or there is nothing to edit), telegram_message_not_found (404), telegram_forbidden
(403, see required_right), telegram_rate_limited (429, with retry_after), telegram_reconnect_required
and telegram_api_error (502); the media replacement uses the codes of
Telegram chat management. A body that is not valid JSON answers 400
invalid_json.
Error Responses
- 400 Bad Request — missing fields, nothing to update, or an unsupported platform (e.g.
instagram,tiktok). - 400 Bad Request —
error_code: "x_links_not_allowed"(X): the new text only contained links and the account has no active X Links add-on quota. Nothing is changed. - 403 Forbidden — the connected account is not authorized to edit the post. On X: X refused the edit (it needs X Premium, your own post, inside X's edit window and fewer than 5 edits; polls, community and promoted posts cannot be edited).
- X errors carry
x_statuswith X's status code. X errors other than400,401,403,404and429are returned as 502. - 404 Not Found — no post found for the given
post_id. - 429 Too Many Requests —
error_code: "x_daily_write_limit"(X): the X account reached its daily cap of replies, edits and reposts. The body carrieslimitandretry_after, and theRetry-Afterheader says how many seconds until 00:00 UTC. - 400 Bad Request — YouTube, calls with only new fields:
error_code: "invalid_field"(a new field has a wrong value) or"youtube_default_language_required"(translations needdefaultLanguage). Nothing is sent to YouTube. - 429 Too Many Requests — YouTube, only when the call uses nothing but new fields (anything beyond title, description, tags, privacy, category and publishAt): the daily YouTube allowance for management features is used up.
error_codeisyoutube_daily_budget_exhausted(your account),youtube_shared_budget_exhaustedoryoutube_quota_exhausted; the body carriesretry_afterandresets_at(midnight Pacific Time). Uploads are never affected. See YouTube videos. - 500 Internal Server Error