update_post
Patches an existing post. Only the fields you send are changed — everything omitted keeps its current value. Supplying targetAccounts replaces the target list outright rather than adding to it.
- Access
- write
- Category
- Publishing
- Endpoint
POST/api/tools/update_post
On this page
Parameters
idstringrequired
ObjectId of the post to update.
contentstring
Replacement text body.
targetAccountsarray<object>
Replacement profile list. The post is re-pointed at exactly these profiles.
platformenumrequired
linkedin · twitter · facebook · instagram · threads · bluesky · youtube
profileIdstring
Id returned by get_connected_accounts.
usernamestring
Handle, carried through for readability.
platformsarray<enum>
Replacement network list; each network expands to all of its connected profiles.
scheduleDatestring
YYYY-MM-DD.
scheduleTimestring
HH:MM, 24-hour.
timezonestring
IANA zone for the schedule above.default: UTC
mediaUrlstring
Replacement single attachment. Replaces the whole set with this one file.
mediaUrlsarray<string>
Replacement attachment set — add, remove or reorder carousel slides. An empty array removes all media.
youtubeobject
Replacement upload details for a post going to a YouTube channel: title (≤100), description (≤5000) and privacyStatus (public · unlisted · private). Fields you omit keep their current value.
statusenum
scheduled · draft · failed — use draft to pull a post out of the queue without deleting it.
workspaceIdstring
Workspace to act on, from list_workspaces. Omit to use the default workspace on the key.
Example request
curl -X POST "https://api.postmcpai.com/api/tools/update_post" \
-H "Content-Type: application/json" \
-H "x-api-key: $POSTMCPAI_API_KEY" \
-d '{
"id": "66a50c89e4b019a2b72f",
"content": "Updated announcement with the launch link included. 🌟",
"scheduleTime": "11:30",
"timezone": "Asia/Kolkata"
}'Response
The post as it stands after the patch.
{
"success": true,
"message": "Post updated successfully",
"post": {
"id": "66a50c89e4b019a2b72f",
"content": "Updated announcement with the launch link included. 🌟",
"scheduleDate": "2026-08-02",
"scheduleTime": "11:30",
"status": "scheduled"
}
}