API reference
Publish and schedule posts to Bluesky, Mastodon, LinkedIn and X from your own code: one request, every account, each in its language. AI agents post through the MCP server. Threads, Instagram and Facebook are coming soon (awaiting Meta's approval).
OpenAPI schema, with every request and response: /v1/openapi.json
Getting started
Postcove is invite-only until launch (join the waitlist). With an account, create an API key in your dashboard, under API keys, and send it as a bearer token. All requests and responses are JSON, except image uploads.
curl https://postcove.net/v1/accounts \
-H "Authorization: Bearer pc_..."
Publish to two accounts now, with a different text for the second:
curl https://postcove.net/v1/posts \
-H "Authorization: Bearer pc_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6f1c2a9e" \
-d '{"text": "Olá!", "account_ids": [1, 2], "overrides": {"2": "Hello!"}}'
Schedule it instead with "scheduled_at": "2026-10-09T09:30", "timezone": "Europe/Lisbon". With images, upload them first and pass their ids:
curl https://postcove.net/v1/media \
-H "Authorization: Bearer pc_..." \
-F file=@photo.jpg -F alt_text="The harbour at dawn"
# → {"id": 7, ...}, then "media_ids": [7] in the post
Errors and limits
Errors have a stable code and a readable message:
{"error": {"code": "invalid_post", "message": "Not valid for some accounts.",
"accounts": {"2": "Bluesky allows 300 characters; this has 342."}}}
Each key may make 120 requests a minute; past that, requests get 429 rate_limited. Text is checked against every account's limits when you create the post, so a post that is accepted fits everywhere.
Checking a post first
POST /v1/posts/validate takes the same body as POST /v1/posts and publishes nothing: it says, per account, whether the post would go out (errors) and what's worth knowing (warnings), with the text's length as that network counts it. Or add "dry_run": true to a create or update.
{"valid": false, "errors": [], "scheduled_at": "2026-10-09T08:30:00+00:00",
"accounts": [{"account_id": 2, "platform": "bluesky", "valid": false, "length": 342, "max_chars": 300,
"errors": [{"code": "invalid_for_platform", "message": "Bluesky allows 300 characters; this has 342."}],
"warnings": []}]}
A post that failed can be published again with POST /v1/posts/{id}/retry: its failed copies go out now, the published ones are left alone.
Networks
GET /v1/platforms has each network's limits. Images per post: Bluesky, Mastodon and X 4 (a Mastodon server can allow more: see the account's max_images), Instagram and Facebook 10, Threads and LinkedIn 20.
A post with a link and no images gets a link preview card on Bluesky and LinkedIn, made from the page's title, description and image.
Accounts have a status: ok; expiring when our access ends soon and the network doesn't let us renew it (LinkedIn, every 60 days), with the date in token_expires_at; needs_reconnect when the network refuses our access. Postcove checks every account daily, renews what can be renewed, and tells you (webhook and email) before scheduled posts would fail. Reconnect with a connect link.
Exactly once
Send an Idempotency-Key header with POST /v1/posts: retrying a request with the same key returns the first post instead of creating a second one.
Publishing is exactly-once too. If a platform times out or our server restarts mid-publish, the retry finds the post already there instead of publishing it twice (on X and LinkedIn, which keep no key of ours, by looking for it, or from the platform's refusal of a duplicate). Temporary errors are retried for about an hour; a post the platform rejects fails at once, with the platform's reason in error. Instagram's limit of posts per day holds a post until there's room, instead of failing it.
Languages
Every account posts in one language, so its posts are tagged correctly on the platform. A workspace has a list of languages (GET /v1/workspace); the first is the default for new accounts. To post in several languages, connect one account per language and send each one its text in overrides.
Connecting accounts
Let your users connect their own accounts without you ever handling a password: create a connect link and send them to it.
curl https://postcove.net/v1/connect-links \
-H "Authorization: Bearer pc_..." -H "Content-Type: application/json" \
-d '{"platform": "mastodon", "redirect_url": "https://example.com/connected"}'
# → {"url": "https://postcove.net/connect/…", "expires_at": "…"}
They sign in on the platform, and come back to redirect_url?status=connected&account_id=12 (or status=cancelled). A link works once, for an hour.
Webhooks
Add an https URL with POST /v1/webhooks (or in the dashboard) to hear about post.published and post.failed, one per account, and account.needs_reconnect (data.reason: expiring or failed; data.fails_from: when its scheduled posts start failing). Each event is a POST:
{"id": "evt_3b1f…", "type": "post.published", "created_at": "2026-10-09T08:30:02+00:00",
"data": {"post_id": 41,
"variant": {"id": 88, "account_id": 2, "status": "published",
"url": "https://bsky.app/profile/…/post/…", "error": null},
"account": {"id": 2, "platform": "bluesky", "handle": "ana.bsky.social"}}}
Answer with any 2xx within 10 seconds. Otherwise we retry after 1 and 5 minutes, then 30 minutes, 2 and 6 hours. The same event can arrive twice: use its id to ignore repeats.
Verifying the signature
Every request carries Postcove-Signature: t=<unix time>,v1=<hex>: the HMAC-SHA256 of <t>.<raw body> with your webhook's secret (whsec_…, shown once when you add it). Check it, and reject old timestamps:
import hashlib, hmac, time
def verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:
parts = dict(item.split("=", 1) for item in header.split(","))
signed = f"{parts['t']}.".encode() + body
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
fresh = abs(time.time() - int(parts["t"])) <= tolerance
return fresh and hmac.compare_digest(expected, parts["v1"])
Plan limits
Requests beyond what your plan includes answer 402 (or 403 for something the plan doesn't include) with the limit's code and where to upgrade:
{"error": {"code": "post_limit_reached",
"message": "Your plan includes 30 posts a month, all used. Upgrade for unlimited posts.",
"upgrade_url": "https://postcove.net/app/settings#plan"}}
Codes: account_limit_reached (connecting one more account), account_limit_exceeded (more accounts connected than the plan includes, after a downgrade), post_limit_reached (posts a month; drafts don't count, and editing a post doesn't count it again), language_limit_reached (posting languages), workspace_limit_reached. The free plan allows 30 requests a minute per key; paid plans 120.
MCP (AI agents)
Postcove is an MCP server at https://postcove.net/mcp (Streamable HTTP). Agents list your accounts and check, create, list, retry and cancel posts, with the same rules and limits as the API.
Claude, ChatGPT and other connectors
Add https://postcove.net/mcp as a custom connector. You sign in to Postcove and approve access (OAuth 2.1); the agent then works in your workspaces. You can revoke it any time.
With an API key
Clients that take headers can send an API key instead; the agent works in that key's workspace:
{"mcpServers": {"postcove": {
"type": "http",
"url": "https://postcove.net/mcp",
"headers": {"Authorization": "Bearer pc_..."}}}}
Tools
list_workspaces,list_accounts,get_platform_limitsconnect_account: a one-time link for the user to connect an accountvalidate_post: checks a post without saving it, asPOST /v1/posts/validate(text per network, images, time, accounts to reconnect, plan limits; warnings such as X's link fee)create_post: now, scheduled (scheduled_at,timezone) or as a draft to review; text per account (overrides) or per network (platform_texts);idempotency_keymakes retries safelist_posts,get_post,cancel_postretry_post: publishes a failed post's failed copies again, asPOST /v1/posts/{id}/retry
Reference
Get the workspace
GET /v1/workspace
Its languages, in order: the first is the default for new accounts.
Response 200
| Field | Type | Description |
|---|---|---|
| id | integer | |
| name | string | |
| languages | array of Language | In order; the first is the default |
| default_language | string | |
| timezone | string | IANA name; the default for posts without one |
Responses: 200, 401, 429. Errors are {"error": {"code", "message"}}.
Set the workspace's languages
PATCH /v1/workspace
Replace the list of languages; the first becomes the default.
| Field | Type | Description |
|---|---|---|
| languages | array of string | Language tags; the first is the default |
| timezone | string | An IANA name, e.g. Europe/Lisbon: the default for posts that don't give one |
Response 200
| Field | Type | Description |
|---|---|---|
| id | integer | |
| name | string | |
| languages | array of Language | In order; the first is the default |
| default_language | string | |
| timezone | string | IANA name; the default for posts without one |
Responses: 200, 401, 402, 429. Errors are {"error": {"code", "message"}}.
List platforms and their limits
GET /v1/platforms
The platforms accounts can be connected on, and what each accepts: characters (Mastodon servers can allow more: see each account's max_chars), images (requires_image: Instagram posts need one), and how an account is connected.
Response 200
| Field | Type | Description |
|---|---|---|
| platforms | array of PlatformOut |
Responses: 200, 401, 429. Errors are {"error": {"code", "message"}}.
Connect a Bluesky account
POST /v1/accounts/bluesky
Connect with the account's handle and an app password (created in Bluesky under Settings → Privacy and security → App passwords). To let your users connect their own accounts without handling passwords, use a connect link instead.
| Field | Type | Description |
|---|---|---|
| handle * | string | e.g. ana.bsky.social |
| app_password * | string | An app password, not the account's |
| language | string | What the account posts in Default:en-US |
Response 201
| Field | Type | Description |
|---|---|---|
| id | integer | |
| platform | string | |
| handle | string | |
| display_name | string | |
| avatar_url | string | |
| language | string | What this account posts in |
| status | "ok" | "expiring" | "needs_reconnect" | "disconnected" |
|
| profile_url | string | |
| max_chars | integer | This account's text limit |
| max_images | integer | This account's image limit |
| token_expires_at | datetime | When our access ends unless renewed (null: doesn't expire, or is renewed automatically) |
| created_at | datetime |
Responses: 201, 400, 401, 402, 429, 502. Errors are {"error": {"code", "message"}}.
List connected accounts
GET /v1/accounts
Every connected account, with its language, its limits and its status: ok, expiring (our access ends at token_expires_at and the network doesn't let us renew it: reconnect before then) or needs_reconnect (posts to it fail until it's reconnected, with a connect link).
Response 200
| Field | Type | Description |
|---|---|---|
| accounts | array of AccountOut |
Responses: 200, 401, 429. Errors are {"error": {"code", "message"}}.
Change an account's language
PATCH /v1/accounts/{account_id}
The language this account's posts are published in.
| Field | Type | Description |
|---|---|---|
| account_id * | integer (path) | |
| language * | string | A language tag, e.g. pt-PT |
Response 200
| Field | Type | Description |
|---|---|---|
| id | integer | |
| platform | string | |
| handle | string | |
| display_name | string | |
| avatar_url | string | |
| language | string | What this account posts in |
| status | "ok" | "expiring" | "needs_reconnect" | "disconnected" |
|
| profile_url | string | |
| max_chars | integer | This account's text limit |
| max_images | integer | This account's image limit |
| token_expires_at | datetime | When our access ends unless renewed (null: doesn't expire, or is renewed automatically) |
| created_at | datetime |
Responses: 200, 401, 404, 429. Errors are {"error": {"code", "message"}}.
Disconnect an account
DELETE /v1/accounts/{account_id}
Deletes the account's credentials now and cancels what is still scheduled for it. The row stays (without secrets) for the post history.
| Field | Type | Description |
|---|---|---|
| account_id * | integer (path) |
Responses: 204, 401, 404, 429. Errors are {"error": {"code", "message"}}.
Create a connect link
POST /v1/connect-links
A one-time page on postcove.net where a person connects an account (Bluesky or Mastodon) to this workspace. Send them to url; it works once, for an hour. Afterwards they go to redirect_url with ?status=connected&account_id=… (or status=cancelled).
| Field | Type | Description |
|---|---|---|
| platform | string | bluesky, mastodon, threads, instagram, facebook, linkedin or x; omit to let the person choose |
| language | string | What the account will post in; default: the workspace's default |
| redirect_url | string | Where to send the person afterwards: https (or http on localhost) |
Response 201
| Field | Type | Description |
|---|---|---|
| url | string | Send the person here; works once |
| expires_at | datetime |
Responses: 201, 401, 402, 429. Errors are {"error": {"code", "message"}}.
Create a post
POST /v1/posts
One post for one or more accounts, now or at scheduled_at. Each account gets its own copy (a variant), with its text from overrides if given. Send an Idempotency-Key header to make retries safe: the same key returns the first post (200) instead of creating another. With dry_run, nothing is created: the answer (200) is what POST /v1/posts/validate returns.
| Field | Type | Description |
|---|---|---|
| idempotency-key | string (header) | |
| text | string | May be empty when there are images |
| account_ids | array of integer | The accounts to publish to (a draft may have none yet) |
| scheduled_at | datetime | ISO 8601. With an offset (2026-10-07T09:00:00+01:00) it's exact; without one it's read in |
| timezone | string | An IANA name, e.g. Europe/Lisbon; default: the workspace's |
| overrides | object | Text per account: {"<account id>": "text"}, e.g. a translation |
| media_ids | array of integer | Images from POST /v1/media, in order; every account gets them. Each network has its own limit ( |
| draft | boolean | Keep it as a draft: saved, never published until updated with draft false Default:False |
| dry_run | boolean | Only check it: nothing is saved or published, and the answer is the validation result (as POST /v1/posts/validate) Default:False |
Response 201
| Field | Type | Description |
|---|---|---|
| id | integer | |
| text | string | |
| status | "draft" | "scheduled" | "published" | "partially_failed" | "failed" | "cancelled" | |
| scheduled_at | datetime | |
| timezone | string | |
| draft | boolean | |
| created_at | datetime | |
| media | array of MediaOut | |
| variants | array of VariantOut | One per account |
Responses: 200, 201, 401, 402, 404, 429. Errors are {"error": {"code", "message"}}.
List posts
GET /v1/posts
Newest first. Pass next_cursor as cursor for the next page.
| Field | Type | Description |
|---|---|---|
| limit | integer (query) | |
| cursor | integer (query) | The |
Response 200
| Field | Type | Description |
|---|---|---|
| posts | array of PostOut | |
| next_cursor | integer | Pass as |
Responses: 200, 401, 429. Errors are {"error": {"code", "message"}}.
Check a post without publishing it
POST /v1/posts/validate
Takes the same body as POST /v1/posts and says, per account, whether it would publish: errors (text too long as that network counts it, too many images for it, an image shape it refuses, an account to reconnect...) and warnings (X's fee for links, no link card next to images...). Nothing is saved and no network is called. valid is true when every account would take it. Always 200, even when invalid.
| Field | Type | Description |
|---|---|---|
| text | string | May be empty when there are images |
| account_ids | array of integer | The accounts to publish to (a draft may have none yet) |
| scheduled_at | datetime | ISO 8601. With an offset (2026-10-07T09:00:00+01:00) it's exact; without one it's read in |
| timezone | string | An IANA name, e.g. Europe/Lisbon; default: the workspace's |
| overrides | object | Text per account: {"<account id>": "text"}, e.g. a translation |
| media_ids | array of integer | Images from POST /v1/media, in order; every account gets them. Each network has its own limit ( |
| draft | boolean | Keep it as a draft: saved, never published until updated with draft false Default:False |
| dry_run | boolean | Only check it: nothing is saved or published, and the answer is the validation result (as POST /v1/posts/validate) Default:False |
Response 200
| Field | Type | Description |
|---|---|---|
| valid | boolean | True when it would publish to every account |
| errors | array of Issue | Problems with the post as a whole |
| scheduled_at | datetime | When it would be published (UTC) |
| accounts | array of AccountCheck |
Responses: 200, 401, 429. Errors are {"error": {"code", "message"}}.
Get a post
GET /v1/posts/{post_id}
A post with each account's variant: status, attempts, error and the link to the published post.
| Field | Type | Description |
|---|---|---|
| post_id * | integer (path) |
Response 200
| Field | Type | Description |
|---|---|---|
| id | integer | |
| text | string | |
| status | "draft" | "scheduled" | "published" | "partially_failed" | "failed" | "cancelled" | |
| scheduled_at | datetime | |
| timezone | string | |
| draft | boolean | |
| created_at | datetime | |
| media | array of MediaOut | |
| variants | array of VariantOut | One per account |
Responses: 200, 401, 404, 429. Errors are {"error": {"code", "message"}}.
Edit a draft or scheduled post
PATCH /v1/posts/{post_id}
Replaces its text, accounts, images and time, as a whole. Only before publishing starts (409 not_editable after). Set draft to false to publish a draft. With dry_run, nothing changes: the answer is the validation result.
| Field | Type | Description |
|---|---|---|
| post_id * | integer (path) | |
| text | string | May be empty when there are images |
| account_ids | array of integer | The accounts to publish to (a draft may have none yet) |
| scheduled_at | datetime | ISO 8601. With an offset (2026-10-07T09:00:00+01:00) it's exact; without one it's read in |
| timezone | string | An IANA name, e.g. Europe/Lisbon; default: the workspace's |
| overrides | object | Text per account: {"<account id>": "text"}, e.g. a translation |
| media_ids | array of integer | Images from POST /v1/media, in order; every account gets them. Each network has its own limit ( |
| draft | boolean | Keep it as a draft: saved, never published until updated with draft false Default:False |
| dry_run | boolean | Only check it: nothing is saved or published, and the answer is the validation result (as POST /v1/posts/validate) Default:False |
Response 200
| Field | Type | Description |
|---|---|---|
| id | integer | |
| text | string | |
| status | "draft" | "scheduled" | "published" | "partially_failed" | "failed" | "cancelled" | |
| scheduled_at | datetime | |
| timezone | string | |
| draft | boolean | |
| created_at | datetime | |
| media | array of MediaOut | |
| variants | array of VariantOut | One per account |
Responses: 200, 401, 402, 404, 409, 429. Errors are {"error": {"code", "message"}}.
Cancel a post
DELETE /v1/posts/{post_id}
Cancels every variant still scheduled. One being published right now finishes; published ones stay published.
| Field | Type | Description |
|---|---|---|
| post_id * | integer (path) |
Response 200
| Field | Type | Description |
|---|---|---|
| id | integer | |
| text | string | |
| status | "draft" | "scheduled" | "published" | "partially_failed" | "failed" | "cancelled" | |
| scheduled_at | datetime | |
| timezone | string | |
| draft | boolean | |
| created_at | datetime | |
| media | array of MediaOut | |
| variants | array of VariantOut | One per account |
Responses: 200, 401, 404, 429. Errors are {"error": {"code", "message"}}.
Retry a failed post
POST /v1/posts/{post_id}/retry
Publishes the post's failed copies again, now (the published ones are left alone). 409 nothing_to_retry if none failed; 409 needs_reconnect (with error.accounts) if an account has to be reconnected first. Fix the cause before retrying a post the network rejected for its content: it would fail the same way.
| Field | Type | Description |
|---|---|---|
| post_id * | integer (path) |
Response 200
| Field | Type | Description |
|---|---|---|
| id | integer | |
| text | string | |
| status | "draft" | "scheduled" | "published" | "partially_failed" | "failed" | "cancelled" | |
| scheduled_at | datetime | |
| timezone | string | |
| draft | boolean | |
| created_at | datetime | |
| media | array of MediaOut | |
| variants | array of VariantOut | One per account |
Responses: 200, 401, 404, 409, 429. Errors are {"error": {"code", "message"}}.
Upload an image
POST /v1/media
Upload an image to attach to posts with media_ids. It is re-encoded: orientation applied, metadata (such as location) removed, at most 4096 pixels a side.
| Field | Type | Description |
|---|---|---|
| file * | string | A JPEG, PNG, WebP or GIF image, up to 15 MB |
| alt_text | string |
Sent as multipart/form-data.
Response 201
| Field | Type | Description |
|---|---|---|
| id | integer | |
| content_type | string | |
| size | integer | Bytes, after re-encoding |
| width | integer | |
| height | integer | |
| alt_text | string | |
| created_at | datetime |
Responses: 201, 401, 429. Errors are {"error": {"code", "message"}}.
Get an image
GET /v1/media/{media_id}
An uploaded image's details: size after re-encoding, dimensions and alt text.
| Field | Type | Description |
|---|---|---|
| media_id * | integer (path) |
Response 200
| Field | Type | Description |
|---|---|---|
| id | integer | |
| content_type | string | |
| size | integer | Bytes, after re-encoding |
| width | integer | |
| height | integer | |
| alt_text | string | |
| created_at | datetime |
Responses: 200, 401, 404, 429. Errors are {"error": {"code", "message"}}.
Delete an image
DELETE /v1/media/{media_id}
Deletes the image and its file. 409 in_use while a draft or scheduled post still uses it. Images are also deleted on their own, 30 days after the last post using them is done.
| Field | Type | Description |
|---|---|---|
| media_id * | integer (path) |
Responses: 204, 401, 404, 409, 429. Errors are {"error": {"code", "message"}}.
Add a webhook
POST /v1/webhooks
Events: post.published, post.failed (per account) and account.needs_reconnect (an account's access is gone, or ends soon: data.reason is failed or expiring, data.fails_from when its posts start failing). The response's secret signs every request (Postcove-Signature); it is shown only here.
| Field | Type | Description |
|---|---|---|
| url * | string | An https URL |
| description | string | A name for it |
Response 201
| Field | Type | Description |
|---|---|---|
| id | integer | |
| url | string | |
| description | string | |
| events | array of string | |
| created_at | datetime | |
| secret | string | Signs every request ( |
Responses: 201, 401, 429. Errors are {"error": {"code", "message"}}.
List webhooks
GET /v1/webhooks
The workspace's webhook endpoints (their secrets aren't shown again).
Response 200
| Field | Type | Description |
|---|---|---|
| webhooks | array of WebhookOut |
Responses: 200, 401, 429. Errors are {"error": {"code", "message"}}.
Remove a webhook
DELETE /v1/webhooks/{endpoint_id}
Removes the endpoint and its delivery log; nothing more is sent to it.
| Field | Type | Description |
|---|---|---|
| endpoint_id * | integer (path) |
Responses: 204, 401, 404, 429. Errors are {"error": {"code", "message"}}.
List a webhook's deliveries
GET /v1/webhooks/{endpoint_id}/deliveries
The 50 most recent deliveries (kept for 30 days).
| Field | Type | Description |
|---|---|---|
| endpoint_id * | integer (path) |
Response 200
| Field | Type | Description |
|---|---|---|
| deliveries | array of DeliveryOut |
Responses: 200, 401, 404, 429. Errors are {"error": {"code", "message"}}.
Send a test event
POST /v1/webhooks/{endpoint_id}/test
Queues a ping event for this endpoint (sent within a minute).
| Field | Type | Description |
|---|---|---|
| endpoint_id * | integer (path) |
Response 202
| Field | Type | Description |
|---|---|---|
| queued | boolean |
Responses: 202, 401, 404, 429. Errors are {"error": {"code", "message"}}.