Back to Developer Console

API Reference Documentation

v1.0.0

Public REST API and Hosted Model Context Protocol (MCP) server for multi-tenant social media scheduling across 10 networks.

Authentication

Authenticate all requests via the HTTP Authorization header using your workspace API key:

Authorization: Bearer pp_live_...
Rate Limits

Standard keys include 60 requests per minute sliding window with automatic HTTP headers:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
X-RateLimit-Reset: 60
AI Agents & MCP

Connect Cursor, Claude Desktop, and OpenAI tools directly via the hosted cloud endpoint at:

https://postplan.io/api/mcp

Endpoints

GET/api/v1/accounts
60 req/minBearer Auth

List Connected Accounts

Returns all connected social accounts with their platform type, unique account IDs, and connection status.

Response Example (200 OK)
{
  "workspaceId": "ws_abc123",
  "count": 2,
  "accounts": [
    {
      "id": "acc_x7y8z9",
      "platform": "instagram",
      "handle": "mybrand",
      "displayName": "My Brand Official",
      "status": "ACTIVE"
    },
    {
      "id": "acc_m1n2o3",
      "platform": "twitter",
      "handle": "mybrand_io",
      "displayName": "My Brand X",
      "status": "ACTIVE"
    }
  ]
}
POST/api/v1/posts
60 req/minBearer Auth

Create / Schedule Post

Publish immediately or schedule across one or more accounts. Strip URLs automatically for Twitter to protect from surcharges.

Request Payload (JSON)
{
  "content": "Excited to unveil our new product release today! 🚀",
  "accountIds": ["acc_x7y8z9", "acc_m1n2o3"],
  "scheduledFor": "2026-11-20T15:00:00Z",
  "mediaUrls": ["https://cdn.example.com/banner.jpg"],
  "firstComment": "Check the comments for early access!",
  "platformConfigurations": {
    "youtube": { "title": "Product Launch 2026", "privacy": "public" },
    "tiktok": { "privacyLevel": "public_to_everyone", "allowComments": true },
    "instagram": { "placement": "reel" }
  }
}
Response Example (200 OK)
{
  "postId": "post_live_998877",
  "status": "scheduled",
  "fanOutCount": 2,
  "errors": {}
}
GET/api/v1/posts
60 req/minBearer Auth

List Posts

Retrieve all posts belonging to the workspace, complete with schedule dates, content, and fan-out delivery records.

Response Example (200 OK)
{
  "workspaceId": "ws_abc123",
  "count": 1,
  "posts": [
    {
      "id": "post_live_998877",
      "content": "Excited to unveil our new product...",
      "status": "SCHEDULED",
      "scheduledFor": "2026-11-20T15:00:00.000Z",
      "mediaUrls": ["https://cdn.example.com/banner.jpg"]
    }
  ]
}
GET/api/v1/posts/:id
60 req/minBearer Auth

Get Post by ID

Fetch status, error diagnostics, and published URLs (e.g. x.com, instagram.com) for a single post.

Response Example (200 OK)
{
  "post": {
    "id": "post_live_998877",
    "status": "PUBLISHED",
    "content": "Excited to unveil...",
    "fanOuts": [
      {
        "platform": "twitter",
        "status": "PUBLISHED",
        "platformPostUrl": "https://x.com/i/status/189201928"
      }
    ]
  }
}
POST/api/v1/social-accounts/connect-link
60 req/minBearer Auth

Generate OAuth Connect Link

Create a white-label OAuth authorization URL allowing clients to link their social profiles without logging into PostPlan.

Request Payload (JSON)
{
  "platform": "instagram",
  "returnUrl": "https://yourapp.com/settings/social/connected"
}
Response Example (200 OK)
{
  "authUrl": "https://api.zernio.com/oauth/authorize?brandId=b_123&state=xyz...",
  "brandId": "b_123"
}
POST/api/mcp
60 req/minBearer Auth

Hosted Model Context Protocol (MCP)

Cloud JSON-RPC 2.0 and SSE endpoint enabling AI agents (Cursor, Claude, Copilot) to execute tool calls.

Request Payload (JSON)
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "postplan_create_post",
    "arguments": {
      "content": "Hello from an autonomous AI agent!",
      "accountIds": ["acc_x7y8z9"]
    }
  }
}
Response Example (200 OK)
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [{ "type": "text", "text": "Post created successfully (ID: post_live_123)" }]
  }
}