Skip to content

Developers

Schedule posts from your own code

A REST API at /api/v1, an MCP server at https://postbert.com/mcp, and the postbert CLI. On Pro.

REST API

Create a post for one or more connected accounts.

curl https://postbert.com/api/v1/posts \
  -H "Authorization: Bearer $POSTBERT_API_KEY" \
  -H "Idempotency-Key: launch-post-0001" \
  -H "Content-Type: application/json" \
  -d '{"caption":"Hello from the API","accountIds":["<account id>"],"scheduledFor":null}'

The base URL is https://postbert.com/api/v1. Send an API key as Authorization: Bearer. Create the key in Postbert under Settings after you sign in. API access is part of the Pro plan, and the free Pro trial counts.

Postbert REST API endpoints
MethodPathWhat it does
GET/accountsList connected accounts: id, provider, nickname and reconnect state.
GET/posts?limit=25List recent non-cancelled posts. The limit is 1 to 100.
POST/postsCreate a post now or at a scheduled time. Needs an Idempotency-Key header.
GET/posts/{postId}Read a post's status and per-account results.

A create request takes caption, accountIds, optional mediaUrls and scheduledFor (an ISO 8601 time, or null to publish when the post is accepted). Repeating a request with the same Idempotency-Key returns the original response.

MCP server

Connect Claude or another MCP client.

{
  "mcpServers": {
    "postbert": {
      "type": "streamable-http",
      "url": "https://postbert.com/mcp"
    }
  }
}

The server URL is https://postbert.com/mcp. A client signs in with OAuth or sends an API key. Like the REST API, it needs a Pro plan or the Pro trial. The tools can attach media from your library, and every publish or cancel follows a preview that you approve.

Add it to Claude, Cursor, Codex, VS Code and other MCP clients as a remote server at that URL. The ChatGPT app is covered on the ChatGPT page, including that it is not listed in the ChatGPT directory yet.

Actions an agent can take through the Postbert MCP server
ToolTypeWhat it does
list_accountsReadList connected accounts, their reconnect state and text support.
list_postsReadList recent non-cancelled posts, optionally by status.
get_postReadRead one post's saved status, text, destinations and schedule.
search_mediaReadList media in your library that can still be attached, optionally by file name, with upload IDs.
start_media_uploadWriteStart uploading an image or video to your library. Returns signed PUT URLs for each part.
complete_media_uploadWriteFinish an upload after the parts are PUT and get the upload ID to attach.
prepare_text_postPreviewValidate and preview a post for one account, with optional attached media in order. Flags expired media and unsupported destinations. Saves and publishes nothing.
publish_text_postWritePublish or schedule exactly the previewed post and its media, after explicit user approval. Media is checked again.
prepare_cancel_postPreviewPreview the cancellation of a scheduled post. Cancels nothing.
cancel_postWriteCancel the scheduled post from an approved preview.
prepare_save_draftPreviewPreview a new or updated draft with old and new text. Saves nothing.
save_draftWriteSave the previewed draft. Never posts to a platform; fails if the draft changed since the preview.
prepare_edit_scheduled_postPreviewPreview new text for a scheduled post, with old and new values in your timezone. Changes nothing.
edit_scheduled_postWriteApply the previewed text. Blocked if the post changed or started sending since the preview.
prepare_reschedule_postPreviewPreview moving a scheduled post, with old and new time in your timezone. Moves nothing.
reschedule_postWriteMove the scheduled post to the previewed time, keeping its ID. Blocked if it changed since the preview.
prepare_recoveryPreviewPreview the exact composer step to recover a failed, cancelled or published post: retry one destination or part, reconnect, new draft, or linked copy. Sends nothing.
confirm_recoveryWriteReturn the approved composer link. Makes no publishing call.

Good to know

One result per account

Each account in a post reports its own status.

Retries

A retry targets one failed account. Published accounts are left alone.

Idempotency

Repeat a create request with the same Idempotency-Key and you get the original response.

Command-line client

The same API from a terminal or a script.

The postbert CLI reads POSTBERT_API_KEY and calls the REST API. Set POSTBERT_URL to point it at another host. It is not published to npm yet. Its source is the packages/cli folder of the Postbert repository.

Postbert CLI commands
CommandWhat it does
postbert accountsList your connected accounts.
postbert posts --limit 10List recent posts, 1 to 100 (default 25).
postbert post --account <id> --text "Hello" --at 2026-12-01T09:00:00ZCreate a post. Leave out --at to publish now. Repeat --media <library URL> to attach media in order.
export POSTBERT_API_KEY=pb_live_...
postbert accounts
postbert post --account <account id> --text "Hello from the CLI"

See the API and MCP entry in the features list or compare plans on the pricing page.

Frequently asked questions

Which plan includes API and MCP access?

Pro. The 14-day Pro trial counts as Pro, so you can try the API and MCP server during it. On Free, requests are refused with a plan_required error.

See pricing

How do I authenticate?

The REST API and the CLI use an API key sent as a Bearer token. The MCP server accepts either an API key or an OAuth sign-in from the client. Create a key in Postbert under Settings after you sign in.

Can I post video or images through the MCP server?

Yes. The MCP tools search your library and attach media by upload ID. To add a new file, start_media_upload returns signed PUT URLs for an image (JPEG, PNG, WebP or GIF, up to 20 MB) or a video (MP4, MOV or WebM, up to 4 GB); you PUT the bytes, then complete_media_upload returns the upload ID. The URLs expire after 15 minutes and nothing is posted by an upload. The REST API and CLI accept library media URLs, and you can also upload in the Postbert studio.

Is the CLI published to npm?

Not yet. The CLI source is in the packages/cli folder of the Postbert repository and is built with the TypeScript compiler. It is a thin wrapper over the REST API.

Is the ChatGPT app listed in the ChatGPT directory?

Not yet. The integration is being prepared for public directory review and works only in private testing until it is listed. You can add the MCP server to ChatGPT as a custom MCP server.

Postbert for ChatGPT

Can an agent publish without my approval?

The MCP tools are built around a preview and an approval. prepare_text_post shows the exact text, destination and time, and publish_text_post sends only that approved preview.

Create an API key

API access is on Pro. Try it for 14 days with no card.

Free plan: 3 accounts, 30 posts a month. No card.