Skip to content

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
  1. Parameters
  2. Example request
  3. Response
Category
Publishing
REST
POST/api/tools/create_post

Parameters

content
stringrequired
Text body of the post. Used for any profile that does not carry copy of its own.
targetAccounts
array<object>optionalpreferred
The exact profiles that should receive the post. Only these profiles are published to, and each becomes a separate post.
platform
enumrequired
linkedin · twitter · facebook · instagram · threads · bluesky · youtube
profileId
stringoptional
Id returned by get_connected_accounts.
username
stringoptional
Handle, carried through for readability.
userId
stringoptional
Platform-side user id, when the network needs it.
content
stringoptional
Copy for this profile only, overriding the shared content.
mediaUrl
stringoptional
Media for this profile only, overriding the shared mediaUrl.
variants
objectoptional
Per-platform copy keyed by platform name, or by "platform:profileId" for a single profile. e.g. { "twitter": "short version", "linkedin": "longer version" }.
platforms
array<enum>optional
Whole networks to publish to. Every connected profile on each network listed here receives the post.
publishImmediately
booleanoptional
Broadcast right now instead of queueing.default: false
scheduleDate
stringoptional
YYYY-MM-DD. Required when publishImmediately is false.
scheduleTime
stringoptional
HH:MM, 24-hour. Required when publishImmediately is false.
timezone
stringoptional
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
mediaUrl
stringoptional
Public URL of an image or video to attach.
workspaceId
stringoptional
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.

200 · application/json
{
  "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"
    }
  ]
}