PostWing

Developers

PostWing Agent API

Schedule, edit, and manage social posts for the authenticated PostWing user from Muse, Claude, ChatGPT, or any REST client. Every write is scoped to that user and uses a preview → confirm flow.

Base URLs

  • API: https://postwing.io/api/v1
  • OpenAPI: https://postwing.io/api/v1/openapi.json
  • Discovery: GET https://postwing.io/api/v1
  • Muse guide: postwing.io/muse

Authentication

Send a Bearer token on every request. Prefer OAuth for third-party agents. API keys work for simple connectors and scripts.

MethodHow
API keyCreate a key in Dashboard → AI & API. Use Authorization: Bearer pw_live_…
OAuth (PKCE)Resource https://postwing.io/api/v1. Authorize at /oauth/authorize, tokens at /oauth/token. Dynamic client registration is supported for trusted hosts including muse.ai.

Scopes

ScopeAccess
accounts:readList connected accounts and Pinterest boards
accounts:writeConnect, sync, and disconnect social accounts
posts:readList posts, get a post, schedule summary
posts:writePreview, confirm, edit, cancel, and import media
workspaces:readList workspaces
workspaces:writeCreate workspaces and switch the active one

Write safety (required)

Scheduling and edits never run in one shot. Agents must preview first, show the user the draft, then confirm with the returned token.

  1. POST /posts/preview with caption, time, and targets
  2. Show the preview. Wait for the user to approve.
  3. POST /posts/confirm with confirmation_token (expires in 5 minutes)
  • Always call preview before confirm. Never invent a confirmation token.
  • Show the preview to the user and wait for explicit approval before confirm.
  • Confirmation tokens expire in 5 minutes and are bound to that user.
  • Cancel or disconnect only after the user agrees (confirm: true).
  • Only operate on accounts and posts returned by the API for the authenticated user.
  • Use the user’s PostWing timezone for relative times like “tomorrow at 9am”.

Endpoints

Paths are relative to https://postwing.io/api/v1. Full schemas live in the OpenAPI document.

MethodPathScopeSummary
GET/accountsaccounts:readList connected social accounts
POST/accountsaccounts:writeStart connect (returns browser OAuth URL)
POST/accounts/syncaccounts:writeImport accounts after OAuth
DELETE/accountsaccounts:writeDisconnect (confirm: true)
GET/accounts/pinterest-boardsaccounts:readList Pinterest boards
GET/workspacesworkspaces:readList workspaces
POST/workspacesworkspaces:writeCreate a workspace (Scale)
POST/workspaces/activeworkspaces:writeSwitch active workspace
GET/postsposts:readList scheduled posts
GET/posts/{id}posts:readGet one post
POST/posts/previewposts:writePreview schedule (returns confirmation_token)
POST/posts/confirmposts:writeConfirm schedule
POST/posts/edit/previewposts:writePreview edits
POST/posts/edit/confirmposts:writeConfirm edits
DELETE/posts/{id}posts:writeCancel post (confirm: true)
POST/mediaposts:writeImport media from public HTTPS URLs
GET/schedule/summaryposts:readSchedule counts and patterns

Platform options

Pass these on targets[].platform_options when scheduling or editing via REST or MCP. Same capabilities as the dashboard. X quote posts use quote_tweet_url for a native quote card (not a plain link in the caption).

X (Twitter)

x

FieldTypeDescription
quote_tweet_urlstringTweet URL or status ID to quote. Creates a native X quote post. Example: https://x.com/user/status/123
reply_settingsstring | nullWho can reply: null (everyone), following, mentionedUsers, subscribers, verified

Instagram

instagram

FieldTypeDescription
placementstringSet automatically: reels for video, timeline for image/text
share_to_feedbooleanVideo/Reels only. If true, also share the Reel to the main feed (default true)
trial_reel_typestring | nullVideo only. null, manual, or performance (trial reels; 1000+ followers)

Facebook

facebook

FieldTypeDescription
placementstringtimeline or reels (video defaults to reels)

YouTube

youtube

FieldTypeDescription
titlestringRequired for YouTube. Shorts/long-form title
made_for_kidsbooleanWhether the video is made for kids (default false)

TikTok

tiktok

FieldTypeDescription
titlestringImage posts only (not used for video)
privacy_statusstringpublic or private (default public)
allow_commentbooleanAllow comments (default true)
allow_duetbooleanAllow duets (default true)
allow_stitchbooleanAllow stitch (default true)
is_ai_generatedbooleanMark as AI-generated content (default false)
is_draftbooleanSave as draft in the TikTok app (default false)

Pinterest

pinterest

FieldTypeDescription
board_idsstring[]Required. Board IDs from GET /accounts/pinterest-boards or list_pinterest_boards
titlestringPin title
linkstringDestination URL for the pin

LinkedIn

linkedin

FieldTypeDescription
(none)n/aCaption only; no extra platform options

Threads

threads

FieldTypeDescription
(none)n/aCaption only; no extra platform options

Example: X quote post

curl -s -X POST https://postwing.io/api/v1/posts/preview \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "caption": "Adding my take",
    "scheduled_at": "2026-09-21T15:00:00Z",
    "targets": [{
      "account_id": "YOUR_X_ACCOUNT_UUID",
      "platform_options": {
        "quote_tweet_url": "https://x.com/someone/status/1234567890"
      }
    }]
  }'

Example: schedule a post

# 1) Preview
curl -s -X POST https://postwing.io/api/v1/posts/preview \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "caption": "Hello from Muse",
    "scheduled_at": "2026-09-21T09:00:00Z",
    "platforms": ["instagram", "linkedin"]
  }'

# 2) After the user approves, confirm with the token from preview
curl -s -X POST https://postwing.io/api/v1/posts/confirm \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{"confirmation_token": "…"}'

Confirmed posts appear on the user’s PostWing calendar in the active workspace, same as the dashboard.

MCP tools

Claude and ChatGPT connect over MCP at https://postwing.io/api/mcp. Same auth scopes and preview → confirm rules as the REST API. Pass targets with platform_options on schedule/edit tools.

ToolScopeSummary
list_connected_accountsaccounts:readList accounts in the active workspace
connect_accountaccounts:writeStart OAuth connect; returns browser URL
sync_accountsaccounts:writeImport accounts after the user finishes OAuth
disconnect_accountaccounts:writeDisconnect an account (user_confirmed: true)
list_pinterest_boardsaccounts:readList boards for a Pinterest account
list_workspacesworkspaces:readList workspaces and the active one
create_workspaceworkspaces:writeCreate a workspace (Scale plan)
switch_workspaceworkspaces:writeSet the active workspace
list_scheduled_postsposts:readPaginated list of posts
get_scheduled_postposts:readFull detail for one post
get_schedule_summaryposts:readCounts and patterns across posts
preview_schedule_postposts:writePreview schedule; returns confirmation_token
confirm_schedule_postposts:writeConfirm schedule after user approval
preview_edit_postsposts:writePreview edits for up to 20 posts
confirm_edit_postsposts:writeConfirm edits after user approval
cancel_scheduled_postposts:writeCancel a post (user_confirmed: true)
request_media_uploadposts:writeOpen in-chat media upload widget
upload_mediaposts:writeImport media from public HTTPS URLs

Access requirements

  • Active PostWing subscription (7-day free trial available)
  • Connected social accounts in the user’s workspace (or connect via the API)
  • API key or OAuth token with the scopes you need
  • Platforms: Instagram, TikTok, YouTube, LinkedIn, X, Facebook, Pinterest, Threads

Schedule with Muse

Prefer chat? Connect Muse to PostWing and schedule with a preview you approve before anything goes live.