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.
| Method | How |
|---|---|
| API key | Create 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
| Scope | Access |
|---|---|
accounts:read | List connected accounts and Pinterest boards |
accounts:write | Connect, sync, and disconnect social accounts |
posts:read | List posts, get a post, schedule summary |
posts:write | Preview, confirm, edit, cancel, and import media |
workspaces:read | List workspaces |
workspaces:write | Create 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.
POST /posts/previewwith caption, time, and targets- Show the preview. Wait for the user to approve.
POST /posts/confirmwithconfirmation_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.
| Method | Path | Scope | Summary |
|---|---|---|---|
| GET | /accounts | accounts:read | List connected social accounts |
| POST | /accounts | accounts:write | Start connect (returns browser OAuth URL) |
| POST | /accounts/sync | accounts:write | Import accounts after OAuth |
| DELETE | /accounts | accounts:write | Disconnect (confirm: true) |
| GET | /accounts/pinterest-boards | accounts:read | List Pinterest boards |
| GET | /workspaces | workspaces:read | List workspaces |
| POST | /workspaces | workspaces:write | Create a workspace (Scale) |
| POST | /workspaces/active | workspaces:write | Switch active workspace |
| GET | /posts | posts:read | List scheduled posts |
| GET | /posts/{id} | posts:read | Get one post |
| POST | /posts/preview | posts:write | Preview schedule (returns confirmation_token) |
| POST | /posts/confirm | posts:write | Confirm schedule |
| POST | /posts/edit/preview | posts:write | Preview edits |
| POST | /posts/edit/confirm | posts:write | Confirm edits |
| DELETE | /posts/{id} | posts:write | Cancel post (confirm: true) |
| POST | /media | posts:write | Import media from public HTTPS URLs |
| GET | /schedule/summary | posts:read | Schedule 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
| Field | Type | Description |
|---|---|---|
| quote_tweet_url | string | Tweet URL or status ID to quote. Creates a native X quote post. Example: https://x.com/user/status/123 |
| reply_settings | string | null | Who can reply: null (everyone), following, mentionedUsers, subscribers, verified |
| Field | Type | Description |
|---|---|---|
| placement | string | Set automatically: reels for video, timeline for image/text |
| share_to_feed | boolean | Video/Reels only. If true, also share the Reel to the main feed (default true) |
| trial_reel_type | string | null | Video only. null, manual, or performance (trial reels; 1000+ followers) |
| Field | Type | Description |
|---|---|---|
| placement | string | timeline or reels (video defaults to reels) |
YouTube
youtube
| Field | Type | Description |
|---|---|---|
| title | string | Required for YouTube. Shorts/long-form title |
| made_for_kids | boolean | Whether the video is made for kids (default false) |
TikTok
tiktok
| Field | Type | Description |
|---|---|---|
| title | string | Image posts only (not used for video) |
| privacy_status | string | public or private (default public) |
| allow_comment | boolean | Allow comments (default true) |
| allow_duet | boolean | Allow duets (default true) |
| allow_stitch | boolean | Allow stitch (default true) |
| is_ai_generated | boolean | Mark as AI-generated content (default false) |
| is_draft | boolean | Save as draft in the TikTok app (default false) |
| Field | Type | Description |
|---|---|---|
| board_ids | string[] | Required. Board IDs from GET /accounts/pinterest-boards or list_pinterest_boards |
| title | string | Pin title |
| link | string | Destination URL for the pin |
| Field | Type | Description |
|---|---|---|
| (none) | n/a | Caption only; no extra platform options |
Threads
threads
| Field | Type | Description |
|---|---|---|
| (none) | n/a | Caption 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.
| Tool | Scope | Summary |
|---|---|---|
| list_connected_accounts | accounts:read | List accounts in the active workspace |
| connect_account | accounts:write | Start OAuth connect; returns browser URL |
| sync_accounts | accounts:write | Import accounts after the user finishes OAuth |
| disconnect_account | accounts:write | Disconnect an account (user_confirmed: true) |
| list_pinterest_boards | accounts:read | List boards for a Pinterest account |
| list_workspaces | workspaces:read | List workspaces and the active one |
| create_workspace | workspaces:write | Create a workspace (Scale plan) |
| switch_workspace | workspaces:write | Set the active workspace |
| list_scheduled_posts | posts:read | Paginated list of posts |
| get_scheduled_post | posts:read | Full detail for one post |
| get_schedule_summary | posts:read | Counts and patterns across posts |
| preview_schedule_post | posts:write | Preview schedule; returns confirmation_token |
| confirm_schedule_post | posts:write | Confirm schedule after user approval |
| preview_edit_posts | posts:write | Preview edits for up to 20 posts |
| confirm_edit_posts | posts:write | Confirm edits after user approval |
| cancel_scheduled_post | posts:write | Cancel a post (user_confirmed: true) |
| request_media_upload | posts:write | Open in-chat media upload widget |
| upload_media | posts:write | Import 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.