Skip to content

Developers and AI

API Workflows

See how Postly API fits into app backends, CMS pipelines, automations, and custom publishing systems.

Postly API is best when your app, backend, CMS, or automation is driving the publishing workflow.

Plan availability

API Access unlocks REST API and MCP access to capabilities included in your plan; it does not unlock Pro/Enterprise-only features. New activations retain their base plan limits for AI text, team members, and workspaces. Existing purchases with unlimited benefits retain those benefits. API keys and supported video upload benefits remain included.

Choose a key’s workspace access

Create an account-owned key in API access > API keys. Name it for its integration, such as Client A — Claude.

  • All workspaces is the default. It includes existing and future workspaces owned by this account.
  • Selected workspaces limits the key to a fixed selection. New workspaces are not added automatically.

Use Workspace access beside an existing key to change its selection. Existing keys keep their permissions until you edit them. Ownership, billing, usage limits, the secret and usage history stay at the account level. Changes apply to subsequent REST and MCP requests, including connections already using the key.

For example, select only Client A’s workspace for “Client A — Claude.” A request for Client B’s workspace is rejected. The error identifies allowed workspace names or IDs and explains how to select the matching key or edit access; it does not reveal another client’s workspace name.

Discover permitted destinations with GET /v1/workspaces or postly.list_workspaces. When listing posts, scheduled posts or publishing activity with a restricted key, include an allowed workspace ID (workspaceId in REST; workspace_id in MCP). Postly does not substitute a different workspace. Workspace restrictions also apply to channels, analytics, media and publishing. Historical media without a trustworthy workspace association is available only to unrestricted keys.

What the API is designed for

  • discovering accessible workspaces
  • resolving connected publishing targets
  • importing media from uploads, URLs, or base64
  • creating drafts, scheduled posts, or recurring posts
  • reading scheduled activity and analytics
  • fitting governed publishing into a larger business system

The standard API shape

Confirm that the intended publishing destinations are connected before creating posts. The API can prepare a private connection link for supported platforms; the client must still authorize the provider and select destinations where required. A generated link does not mean the account is connected. Other platforms use Channels setup. See supported connection links.

Fetch current targets after connecting or reconnecting accounts. For create/update post requests, use target_platforms with returned channel IDs for specific destinations, or platform names for all matching connected channels. On update, supply the complete desired selection to add or remove channels; omitting target_platforms keeps the existing selection.

Bulk Post and Google Sheets support social publishing only. Blogs use the ordinary post API; Email uses its separate campaign API. CSV templates use platforms without a channels column. Google Sheets discovers workspaces/channels with the API key and sends reviewed destinations through the bulk import flow. Users can add or remove connected destinations in CSV preview or Sheets Review / Edit Posts before confirming. See the bulk guide.

Check character counts for each selected platform, including any platform-specific text overrides. Correct validation errors by shortening the text or supplying a platform-specific version, then validate again after text or destination changes. For X, select the intended publishing mode explicitly when using the API. An accepted or queued response is not confirmation of publication.

  1. Resolve the workspace.
  2. Fetch the connected targets or audience groups.
  3. Import or attach the media.
  4. Create or update the post.
  5. Choose how the post should be handled.

Choose a publishing mode

Set publishing_mode in POST /v1/posts or in the MCP Create Post action.

ModeWhat happens
draftSaves the post in Postly’s Drafts without queuing delivery. Destinations are optional.
publish_nowSubmits the post for immediate delivery. Choose destinations and leave out the schedule.
scheduleSubmits the post for delivery at the requested time. Choose destinations and send a valid future time and timezone for a one-off post.

For example, send {"workspace":"<workspace-id>","text":"We open early on Friday.","publishing_mode":"draft"} to save an announcement for review. You can edit it in Drafts. To send it later through the API, update that post with its destinations and publishing_mode: schedule. Editing a draft without an explicit mode keeps it in Drafts.

If the workspace requires approval, a request to publish now or schedule goes to Pending approval. An author with approval permission can review and approve their own post in the dashboard or white-label portal. MCP Create Post saves a draft when the mode is omitted. Existing REST create requests that omit the mode keep their current behavior. See the Postly API reference for request schemas.

List saved drafts with GET /posts?workspaceId=YOUR_WORKSPACE_ID&status=draft. Read each post’s content_revision and send it as revision to POST /posts/draft-actions. Send one to 25 IDs from one workspace, each with its own edit, delete, schedule, or publish action. Check the result for every ID before you retry.

An eligible workspace Owner or Admin can send approve, request_changes, or edit_and_approve to POST /posts/{postId}/review. Include the current revision. Supply a reason when requesting changes. For a caption edit, send edited_text. It starts a new approval round and counts as your approval. Review endpoint 6. Read back activity or analytics as needed.

Where the API creates leverage

CMS and editorial systems

Turn approved content into scheduled social output without copy-pasting between tools.

Internal marketing tools

Let growth teams trigger publishing from launch systems, campaign builders, or reporting dashboards.

Automation platforms

Use Postly as the governed publishing layer behind low-code or no-code workflows.

AI-assisted apps

If your app generates content or media, the API can ingest it directly instead of requiring a separate hosting step first.

Important media note

One practical advantage of the API is media flexibility. It can accept:

  • binary uploads
  • public URLs
  • base64 payloads
  • data URLs
  • inline media imports during create or update flows

That is especially useful for generated media or assets that already exist in memory.

If a workflow depends on temporary generated media, keep media ingestion and post creation in the same request flow. That reduces the chance of losing short-lived file references before the post is created.

When to choose MCP instead

Use MCP when an AI agent, not your app backend, is the actor that needs governed access to Postly capabilities.

Where you create the linkSupported platforms
Dashboard Share link, API and MCPFacebook, Instagram, Threads, LinkedIn, Google Business Profile, YouTube, Pinterest, TikTok, WhatsApp and X (Twitter)
API and MCP onlyBlogger, WordPress.com, Discord and Slack

The second group supports connection-link creation through the API/MCP but does not currently show a Share link button on the Channels page. WordPress.com support refers to its OAuth connection, not a self-hosted WordPress credential form.

Other platforms, including Bluesky, Reddit, Telegram, Ghost, Hashnode and DEV.to, do not currently support this connection-link flow. Use their connection options on Channels instead. OAuth support alone does not mean a platform supports shared connection links.

The API or MCP can create the private connection link. The recipient does not need a Postly account or Postly sign-in to use it. A workspace invitation is optional and is only needed for access to the Postly workspace.

The recipient opens the link and approves access with the social platform. If they are not already signed in to that platform, it may ask them to sign in there. They select Pages, channels or locations where required. The link does not automate this consent.

Connection links expire after 10 minutes and are single-use. Send them privately. Your workflow should wait until a usable publishing destination is confirmed before creating or scheduling posts for it. Providers requiring manual credentials use their dashboard connection form.

Good next guides

Deletion and accidental live posts

Deleting a post in Postly is separate from removing published content. DELETE /posts/{postId} and postly_delete_post only remove the post in Postly; a successful response does not confirm live removal on any platform. In the dashboard, choose Delete on Platforms for supported destinations before removing the post, and review each result. Unsupported content needs manual action. DEV articles move to drafts rather than being permanently deleted.

Keep the post in Postly and live links until you have verified removal. Do not interpret a publishing notification or an absent post in Postly as a deletion receipt. See platform support, permissions, and the agency recovery workflow.

Custom replies

See Custom replies across CSV, Google Sheets, API and MCP for platform-specific numbered columns, attachment markers, supported destinations, and delays after parent publication.

Automate client onboarding

Create a workspace under an organization you own with POST /v1/workspaces, rename it with PATCH /v1/workspaces/{id}, or explicitly confirm permanent deletion with DELETE /v1/workspaces/{id}. Creation requires all-workspace write access. Existing workspace allowances and account ownership rules still apply.

Invite a client using POST /v1/workspaces/{id}/invitations with their email, an explicit role and confirm:true. Prepare provider authorization using POST /v1/workspaces/{id}/connection-links with the platform and confirm:true. The private, single-use link expires after 10 minutes. The recipient must authorize the provider and select publishing destinations where required. Creating the link does not itself connect a channel.

The same actions are available through MCP. OAuth connections must approve the relevant new scopes: workspace:manage, members:invite, or channels:connect. Existing grants are not expanded automatically. Save returned IDs in your CRM; inspect state rather than automatically retrying an uncertain mutation or email.

Use the client onboarding guide, live action directory and API reference to choose actions and check their inputs. The directory is generated from deployed MCP tools and also appears under AI agents > Explore actions in the dashboard.

Reorganize a client’s connected channels

If a client’s publishing connections are in the wrong workspace, use Move channels to review a move into another workspace under the same owner. Posts and analytics stay in the source. Finish or cancel unfinished publishing work, resolve uncertain delivery, and remove any selected CRM allocations before moving. Recheck destination access and audience groups afterward.

The API/MCP flow previews the exact selection, then requires approval before confirmation with the same request ID and review token. Both workspaces require write access; MCP additionally requires workspace

and channels
consent. See the API reference and examples, and check the live action catalog for connector availability.

Previous guide

Schedule Instagram Reels with Music and Feed Sharing

Schedule Instagram Reels to Feed, choose music and original sounds, and select a cover frame from your Reel in Postly.

Next guide

Blog Publishing through API and MCP

Publish and schedule blog articles with SEO details, featured images, team approvals and delivery checks through the editor, API and MCP.

Related guides