Planagram API

The Planagram API lets an app work with a Planagram user's social media posts: list their connected accounts, create, schedule, edit and delete posts, and read their plan and best posting times. It is the API the Planagram Zapier integration and AI assistants (Claude, Grok, Perplexity, Le Chat) use.

1. Overview

  • Base URL: https://mcp.getplanagram.com
  • Authentication: OAuth 2.0 authorization code flow with PKCE (S256). Every API call carries Authorization: Bearer <access_token>.
  • API endpoint: POST https://mcp.getplanagram.com/mcp, JSON-RPC 2.0 over HTTPS (the Model Context Protocol "Streamable HTTP" transport). Each action is a named tool.
  • All data is the signed-in user's own: a token only ever sees and changes that user's accounts and posts.
  • Format: JSON in, JSON out. Times are ISO 8601; a time without an offset is read in the user's Planagram timezone.

2. Authentication (OAuth 2.0)

Planagram uses OAuth 2.0 (RFC 6749) with PKCE (RFC 7636). Clients are registered with dynamic client registration (RFC 7591), then send the user through the authorization code flow. Discovery metadata lists every endpoint:

GET https://mcp.getplanagram.com/.well-known/oauth-authorization-server

{
  "issuer": "https://mcp.getplanagram.com",
  "authorization_endpoint": "https://mcp.getplanagram.com/oauth/authorize",
  "token_endpoint": "https://mcp.getplanagram.com/oauth/token",
  "registration_endpoint": "https://mcp.getplanagram.com/oauth/register",
  "revocation_endpoint": "https://mcp.getplanagram.com/oauth/revoke",
  "response_types_supported": ["code"],
  "grant_types_supported": ["authorization_code", "refresh_token"],
  "code_challenge_methods_supported": ["S256"],
  "token_endpoint_auth_methods_supported": ["none", "client_secret_post"],
  "scopes_supported": ["posts:read", "posts:write"]
}

Endpoints

MethodPathWhat it does
GET/.well-known/oauth-authorization-serverOAuth 2.0 server metadata (RFC 8414): every endpoint below, supported grants, scopes and PKCE methods.
GET/.well-known/oauth-protected-resourceProtected resource metadata (RFC 9728) for the API endpoint.
POST/oauth/registerClient registration (RFC 7591). JSON body: client_name, redirect_uris (HTTPS), token_endpoint_auth_method ("none" or "client_secret_post"). Returns client_id, plus client_secret for client_secret_post.
GET/oauth/authorizeStarts sign-in. Query: response_type=code, client_id, redirect_uri, state, scope, code_challenge, code_challenge_method=S256. The user signs in to Planagram and approves access; Planagram redirects to redirect_uri with code and state.
POST/oauth/tokenForm-encoded. grant_type=authorization_code with code, client_id, redirect_uri, code_verifier (and client_secret for client_secret_post); or grant_type=refresh_token with refresh_token.
POST/oauth/revokeForm-encoded token=<access or refresh token>. Revokes it.

Scopes

  • posts:read: read connected accounts, posts, plan and best times.
  • posts:write: create, schedule, edit and delete posts.

Flow

  1. Register once: POST /oauth/register with your redirect URI.
  2. Send the user to /oauth/authorize. They sign in to Planagram and click Allow.
  3. Planagram redirects to your redirect URI with code and state. Codes expire after 10 minutes and work once.
  4. Exchange the code at /oauth/token.
  5. Access tokens last 1 hour. Refresh tokens last 30 days and rotate: each refresh returns a new pair and retires the old refresh token.
POST https://mcp.getplanagram.com/oauth/token
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code&code=AUTH_CODE&client_id=CLIENT_ID
&redirect_uri=https%3A%2F%2Fyour-app.example.com%2Foauth%2Fcallback
&code_verifier=PKCE_VERIFIER

200 OK
{
  "access_token": "…",
  "refresh_token": "…",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "posts:read posts:write"
}
POST https://mcp.getplanagram.com/oauth/token
Content-Type: application/x-www-form-urlencoded

grant_type=refresh_token&refresh_token=REFRESH_TOKEN

3. Making requests

Send JSON-RPC 2.0 to POST https://mcp.getplanagram.com/mcp with the access token. Use tools/list to see every action with its JSON input schema, andtools/call to run one. A request without a valid token gets 401 with a WWW-Authenticate header pointing to the metadata above.

POST https://mcp.getplanagram.com/mcp
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
Accept: application/json, text/event-stream

{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }
POST https://mcp.getplanagram.com/mcp
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "create_post",
    "arguments": {
      "account_ids": ["ACCOUNT_ID"],
      "text": "New arrivals are in! Shop the drop this weekend.",
      "media_urls": ["https://example.com/photo.jpg"],
      "scheduled_at": "2026-12-01T09:30:00-05:00"
    }
  }
}

200 OK
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [{ "type": "text", "text": "{\"post\":{\"id\":\"…\",\"status\":\"scheduled\", …}}" }],
    "structuredContent": { "post": { "id": "…", "status": "scheduled", … } }
  }
}

The action's JSON response is in result.structuredContent (and as text in result.content), shown for each action below.

4. Actions

list_social_accountsposts:read

Arguments: none

Returns: accounts[]: id, platform, display_name, handle, status

list_postsposts:read

Arguments: status (draft | scheduled | published | failed, or a list), account_id, from, to (YYYY-MM-DD), limit (default 20, max 100), timezone

Returns: posts[]: id, accounts[], text_preview, media_count, scheduled_at, status

get_postposts:read

Arguments: post_id (required), timezone

Returns: post: id, status, text, accounts[], scheduled_at, media_count, media_urls[], post_type, notes

create_postposts:write

Arguments: account_ids[] (required), text (required), media_urls[], scheduled_at (ISO 8601 with offset, e.g. 2026-12-01T09:30:00-05:00), publish_now (boolean), platform_options (instagram.post_type = "reel", instagram.location, linkedin.link_url, facebook.link_url)

Returns: post: id, status (draft or scheduled), text, accounts[], scheduled_at, media_count. Without scheduled_at or publish_now the post is saved as a draft.

update_postposts:write

Arguments: post_id (required); any of account_ids[], text, media_urls[], scheduled_at (null moves it back to draft), platform_options

Returns: The updated post. Published posts cannot be edited.

delete_postposts:write

Arguments: post_id (required)

Returns: deleted: true. Published posts cannot be deleted.

get_account_planposts:read

Arguments: none

Returns: plan, posts_used_this_month, post_limit, accounts_connected, account_limit, manage_plan_url

get_best_timesposts:read

Arguments: account_id, timezone

Returns: timezone, accounts[]: account_id, platform, handle, based_on, best_slots[] (day, time, score, next_date, next_time)

5. Errors and limits

  • 401: missing, expired or revoked access token. Refresh it, or send the user through sign-in again.
  • OAuth errors use the standard shape: { "error": "invalid_grant", "error_description": "code expired" }.
  • Action errors come back as a tool result with isError: true and a readable message, for example an unknown account, text too long for a network, or a plan limit reached.
  • Plan limits: the Free plan allows 1 social account and 25 posts a month; paid plans raise these. get_account_plan shows the current usage.
  • Rate limit: 60 API calls per minute per user. Over the limit the API answers 429.
  • Per-network limits: text length and media count are checked against each network's rules before a post is saved.

6. How posts reach the social networks

API clients, including the Zapier integration, only ever call the Planagram API described here. They never call Instagram, Facebook, TikTok, LinkedIn, YouTube or any other network directly. Planagram publishes scheduled posts itself, through its publishing partner Zernio, which holds the approved developer apps for those networks. Users connect their social accounts inside Planagram, not through the API.

7. Support

Questions, or need API access for a new integration? Email support@getplanagram.com. See also Privacy.