create_post
Creates a post and either queues it for a future slot or broadcasts it immediately. Targeting is the important decision here — targetAccounts names exact profiles, platforms fans out to every profile connected on that network. Every targeted profile is stored as its own post with its own id, so each can be edited, retried or cancelled on its own.
On this page
- Category
- Publishing
- REST
- POST/api/tools/create_post
Parameters
contentstringrequired
Text body of the post. Used for any profile that does not carry copy of its own.
targetAccountsarray<object>optionalpreferred
The exact profiles that should receive the post. Only these profiles are published to, and each becomes a separate post.
platformenumrequired
linkedin · twitter · facebook · instagram · threads · bluesky · youtube
profileIdstringoptional
Id returned by get_connected_accounts.
usernamestringoptional
Handle, carried through for readability.
userIdstringoptional
Platform-side user id, when the network needs it.
contentstringoptional
Copy for this profile only, overriding the shared content.
mediaUrlstringoptional
Media for this profile only, overriding the shared mediaUrl.
variantsobjectoptional
Per-platform copy keyed by platform name, or by "platform:profileId" for a single profile. e.g. { "twitter": "short version", "linkedin": "longer version" }.
platformsarray<enum>optional
Whole networks to publish to. Every connected profile on each network listed here receives the post.
publishImmediatelybooleanoptional
Broadcast right now instead of queueing.default: false
scheduleDatestringoptional
YYYY-MM-DD. Required when publishImmediately is false.
scheduleTimestringoptional
HH:MM, 24-hour. Required when publishImmediately is false.
timezonestringoptional
IANA zone the schedule above is written in, e.g. Asia/Kolkata. Pass the user’s own zone whenever wall-clock time matters.default: UTC
mediaUrlstringoptional
Public URL of an image or video to attach.
workspaceIdstringoptional
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/create_post" \
-H "Content-Type: application/json" \
-H "x-api-key: $POSTMCPAI_API_KEY" \
-d '{
"content": "Shipping the PostMCP AI integration for Claude Desktop and Cursor today. 🚀",
"targetAccounts": [
{
"platform": "linkedin",
"profileId": "lin_7741903"
},
{
"platform": "twitter",
"profileId": "tw_1293847",
"content": "PostMCP AI now plugs straight into Claude Desktop and Cursor. Ship posts from your editor. 🚀"
}
],
"publishImmediately": false,
"scheduleDate": "2026-08-02",
"scheduleTime": "10:00",
"timezone": "Asia/Kolkata",
"mediaUrl": "https://postmcpai.com/assets/banner.png"
}'Response
One post per targeted profile, each with the id you will need for update_post, publish_post_now, and delete_post. posts[0] is repeated as post for callers written against the older single-post response.
{
"success": true,
"message": "2 posts created successfully, one per profile",
"postIds": [
"66a50c89e4b019a2b72f",
"66a50c89e4b019a2b730"
],
"posts": [
{
"id": "66a50c89e4b019a2b72f",
"content": "Shipping the PostMCP AI integration for Claude Desktop and Cursor today. 🚀",
"targets": [
{
"platform": "linkedin",
"profileId": "lin_7741903",
"status": "pending"
}
],
"status": "scheduled",
"scheduleDate": "2026-08-02",
"scheduleTime": "10:00",
"timezone": "Asia/Kolkata"
},
{
"id": "66a50c89e4b019a2b730",
"content": "PostMCP AI now plugs straight into Claude Desktop and Cursor. Ship posts from your editor. 🚀",
"targets": [
{
"platform": "twitter",
"profileId": "tw_1293847",
"status": "pending"
}
],
"status": "scheduled",
"scheduleDate": "2026-08-02",
"scheduleTime": "10:00",
"timezone": "Asia/Kolkata"
}
]
}