Skip to content

API reference

Seventeen tools, reachable three ways: as native Model Context Protocol tools, as plain JSON over REST, or through a generated OpenAPI spec. Same handlers, same payloads, whichever door you use.

On this page
  1. Base URLs
  2. A first request
  3. All tools

Base URLs

Endpoints by transport
TransportEndpointUse it for
MCPhttps://mcp.postmcpai.com/mcpClaude, ChatGPT, Cursor, Claude Code and any streamable-HTTP MCP client.
RESThttps://api.postmcpai.com/api/tools/:namePlain JSON from your own code, scripts or automations.
OpenAPIhttps://api.postmcpai.com/openapi.jsonImport into a ChatGPT Custom GPT or any OpenAPI tooling.

Every request needs an API key from the AI Integration tab of the dashboard. See Authentication for where it goes.

A first request

Schedule a post to two named profiles. The ids come from get_connected_accounts; the response returns one post per profile, each with its own id.

POST /api/tools/create_post
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"
  }'

All tools

Read tools are safe to call unattended. Write tools change the queue and, for create_post and publish_post_now, spend credits.

Account

Who the key belongs to and which workspaces it can reach.

Channels

Connected profiles and their health.

Publishing

The queue: read it, dry-run against it, and create, move, retry or cancel posts.

Analytics

How a post did, or how a profile stands, read from its network on request.

Media

Generate images to attach to posts.

Batching

Run several tools in one request.