Developer docs

Postbing REST API

Manage your sites, write or bring articles, and publish them to whichever platform each site is connected to: WordPress, Shopify, Webflow, Ghost, Notion, a webhook or the hosted Postbing blog. Included with every paid plan.

Quick start

  1. Create a key in Postbing under Settings, Developers, or run npx postbing login (see the CLI).
  2. Check it works:
curl https://www.postbing.com/api/v1/auth/whoami -H "Authorization: Bearer $POSTBING_API_KEY"

Base URL: https://www.postbing.com/api/v1. The full machine readable description is at /api/v1/openapi.json (OpenAPI 3.1), so you can generate a client or import it into Postman.

Keys and scopes

Send the key on every request as Authorization: Bearer pb_... (the X-API-Key header works too). Keys in the URL are refused. Each key has scopes you choose when you create it:

ScopeAllows
readRead sites, articles, topics, results and webhooks.
writeCreate and edit articles, topics and webhooks, and have Postbing write articles.
publishPublish, schedule and unpublish articles on your sites.

A key reaches your own sites and the team sites you were invited to, with the role you have there: viewers can read, editors can write and publish, admins can also test the connection. Article generation uses the site owner's normal article credits.

Conventions

Errors and limits

Errors share one shape. message is a plain sentence you can show to a person.

{"error": {"code": "not_found", "message": "Article not found."}}
StatusCodeMeaning
400invalid_requestA field is missing or wrong. The message says which.
401unauthorizedNo key, or the key is wrong or revoked.
402quota_exhaustedNo article credits left this period (generate only).
403insufficient_scopeThe key lacks the scope this call needs (read, write or publish).
403plan_requiredThe account is on the free trial. API access comes with every paid plan.
404not_foundNo such site, article or webhook on this account.
409refusedThe action does not fit the current state (for example publishing an unconnected site).
422idempotency_key_reusedThe Idempotency-Key was used with a different request.
429rate_limitedToo many requests this minute. Wait for Retry-After seconds.
500server_errorSomething broke on our side. Retry later.

Requests per minute, per key, by plan. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset.

PlanRequests a minute
BYOK Lite30
Launch60
Growth120
Agency300
Agency Pro600

Account

Check your key

GET/api/v1/auth/whoami Scope: read

The account, plan, key scopes and rate limit behind the credential. Use it to test a key.

curl https://www.postbing.com/api/v1/auth/whoami \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Article credits

GET/api/v1/usage Scope: read

Article credits used and left this period on the account's plan.

curl https://www.postbing.com/api/v1/usage \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Your account (original)

GET/api/v1/me Scope: read

The first API endpoint: id, email and plan. Kept for existing scripts; use /auth/whoami.

curl https://www.postbing.com/api/v1/me \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Sites

List sites

GET/api/v1/sites Scope: read

Sites this key can use (your own and team sites), each with its publishing connection.

  • limit: Page size, 1 to 100 (default 50).
  • cursor: next_cursor from the previous page.
curl https://www.postbing.com/api/v1/sites \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Get a site

GET/api/v1/sites/{site_id} Scope: read

One site and its connection.

curl https://www.postbing.com/api/v1/sites/34 \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Test the connection

POST/api/v1/sites/{site_id}/test-connection Scope: write

Checks Postbing can still publish to the site (signs in and, where possible, creates and deletes a private test draft). Needs the admin role on the site. One run per 10 seconds.

curl -X POST https://www.postbing.com/api/v1/sites/34/test-connection \
  -H "Authorization: Bearer $POSTBING_API_KEY"

List sites (original)

GET/api/v1/projects Scope: read

Kept for existing scripts: {"projects": [...], "count": n}. Use GET /sites.

curl https://www.postbing.com/api/v1/projects \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Add a site (original)

POST/api/v1/projects Scope: write

Adds a site within your plan's limit.

curl https://www.postbing.com/api/v1/projects \
  -H "Authorization: Bearer $POSTBING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Example Coffee", "domain": "example.com"}'

Delete a site (original)

DELETE/api/v1/projects/{project_id} Scope: write

Deletes a site you own.

curl -X DELETE https://www.postbing.com/api/v1/projects/34 \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Topics and calendar

List topics

GET/api/v1/sites/{site_id}/topics Scope: read

The themes Postbing plans articles around.

curl https://www.postbing.com/api/v1/sites/34/topics \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Add a topic

POST/api/v1/sites/{site_id}/topics Scope: write

Adds a topic. A name that already exists returns the existing topic with 200.

curl https://www.postbing.com/api/v1/sites/34/topics \
  -H "Authorization: Bearer $POSTBING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Espresso", "keyword": "espresso at home"}'

Get the calendar

GET/api/v1/sites/{site_id}/calendar Scope: read

Articles dated between from and to: planned, written, scheduled and published.

  • from: Start date (default today).
  • to: End date (default 30 days later).
curl https://www.postbing.com/api/v1/sites/34/calendar \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Search results

GET/api/v1/sites/{site_id}/results Scope: read

Google Search Console clicks, impressions, click rate and position, when connected.

  • days: Window in days, 7 to 90 (default 28).
curl https://www.postbing.com/api/v1/sites/34/results \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Articles

List articles

GET/api/v1/articles Scope: read

Newest change first. Skipped (archived) articles are left out unless you ask for that status. Every article includes its full body, so a site can sync with this call alone.

  • site_id: Only this site (default every site the key can use).
  • status: Only this status.
  • updated_since: Only articles changed at or after this time (ISO 8601).
  • limit: Page size, 1 to 100 (default 50).
  • cursor: next_cursor from the previous page.
curl https://www.postbing.com/api/v1/articles \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Get an article

GET/api/v1/articles/{article_id} Scope: read

One article with its body, SEO fields, FAQs, JSON-LD and live URL.

curl https://www.postbing.com/api/v1/articles/4812 \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Create an article from your text

POST/api/v1/articles Scope: write

Saves your own text as a draft. Nothing goes live and no article credit is used.

curl https://www.postbing.com/api/v1/articles \
  -H "Authorization: Bearer $POSTBING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"site_id": 34, "title": "How to brew pour over coffee", "markdown": "## What you need\n\nA kettle, a dripper and fresh beans.", "meta_description": "A simple pour over method for great coffee at home."}'

Have Postbing write an article

POST/api/v1/articles/generate Scope: write

Plans an article for a keyword and starts writing it in the site's voice. Uses one article credit. Poll GET /articles/{article_id} (or subscribe to article.generated) until status is draft, approved or scheduled. 402 quota_exhausted when no credits are left.

curl https://www.postbing.com/api/v1/articles/generate \
  -H "Authorization: Bearer $POSTBING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"site_id": 34, "keyword": "best espresso beans"}'

Update an article

PATCH/api/v1/articles/{article_id} Scope: write

Only the fields you send change; the previous version is kept in the history. A live article is updated on the site too (live_update says queued).

curl -X PATCH https://www.postbing.com/api/v1/articles/4812 \
  -H "Authorization: Bearer $POSTBING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"meta_description": "A shorter, sharper description."}'

Publish or schedule

POST/api/v1/articles/{article_id}/publish Scope: publish

Publishes now to the site's connected platform and returns the live URL, or schedules it for a date. Publishing again updates the same post, never a duplicate.

curl https://www.postbing.com/api/v1/articles/4812/publish \
  -H "Authorization: Bearer $POSTBING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode": "publish"}'

Unpublish

POST/api/v1/articles/{article_id}/unpublish Scope: publish

Takes a live article off the site. It becomes a draft in Postbing and keeps its text.

curl -X POST https://www.postbing.com/api/v1/articles/4812/unpublish \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Move on the calendar

POST/api/v1/articles/{article_id}/reschedule Scope: write

Moves an unpublished article to another date. Its status stays the same.

curl https://www.postbing.com/api/v1/articles/4812/reschedule \
  -H "Authorization: Bearer $POSTBING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date": "2026-12-15"}'

Webhooks

List webhooks

GET/api/v1/webhooks Scope: read

Endpoints that receive your account events.

  • site_id: Only webhooks for this site and the whole account.
curl https://www.postbing.com/api/v1/webhooks \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Create a webhook

POST/api/v1/webhooks Scope: write

Sends the events you choose as signed JSON. The response includes the signing secret once.

curl https://www.postbing.com/api/v1/webhooks \
  -H "Authorization: Bearer $POSTBING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/hooks/postbing", "events": ["article.published", "publish.failed"]}'

Get a webhook

GET/api/v1/webhooks/{webhook_id} Scope: read

One webhook.

curl https://www.postbing.com/api/v1/webhooks/7 \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Update a webhook

PATCH/api/v1/webhooks/{webhook_id} Scope: write

Change the address or events, or turn it off and on (turning on clears the failure count).

curl -X PATCH https://www.postbing.com/api/v1/webhooks/7 \
  -H "Authorization: Bearer $POSTBING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"active": true}'

Delete a webhook

DELETE/api/v1/webhooks/{webhook_id} Scope: write

Stops deliveries to this endpoint at once.

curl -X DELETE https://www.postbing.com/api/v1/webhooks/7 \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Send a test event

POST/api/v1/webhooks/{webhook_id}/test Scope: write

Sends a signed ping now and returns the delivery with your endpoint's answer.

curl -X POST https://www.postbing.com/api/v1/webhooks/7/test \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Rotate the secret

POST/api/v1/webhooks/{webhook_id}/rotate-secret Scope: write

Returns a new secret. The old one keeps signing (as a second v1= value) for 24 hours.

curl -X POST https://www.postbing.com/api/v1/webhooks/7/rotate-secret \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Delivery log

GET/api/v1/webhooks/{webhook_id}/deliveries Scope: read

Newest first: each delivery with its payload, attempts and your endpoint's answer.

  • status: pending, delivered or failed.
  • limit: Page size, 1 to 100 (default 50).
  • cursor: next_cursor from the previous page.
curl https://www.postbing.com/api/v1/webhooks/7/deliveries \
  -H "Authorization: Bearer $POSTBING_API_KEY"

Redeliver

POST/api/v1/webhooks/{webhook_id}/deliveries/{delivery_id}/redeliver Scope: write

Sends a past delivery again now, with the same event id.

curl -X POST https://www.postbing.com/api/v1/webhooks/7/deliveries/901/redeliver \
  -H "Authorization: Bearer $POSTBING_API_KEY"

List events

GET/api/v1/events Scope: read

Every event on the account in the last 30 days, whether or not a webhook received it. Newest first, or oldest first after a given event. postbing webhooks listen polls this.

  • event: Only this event.
  • site_id: Only this site.
  • after: An event id (evt_...) or sequence: everything newer, oldest first (for polling).
  • limit: Page size, 1 to 100 (default 50).
  • cursor: next_cursor from the previous page.
curl https://www.postbing.com/api/v1/events \
  -H "Authorization: Bearer $POSTBING_API_KEY"

CLI sign in

Start a CLI sign in

POST/api/v1/cli/login No key needed

No key needed. Open verification_url, approve, then poll /cli/token with device_code.

curl https://www.postbing.com/api/v1/cli/login \
  -H "Content-Type: application/json" \
  -d '{"hostname": "my-laptop"}'

Finish a CLI sign in

POST/api/v1/cli/token No key needed

Answers 400 authorization_pending until you approve in the browser, then returns a new API key named "CLI on <hostname>" once.

curl https://www.postbing.com/api/v1/cli/token \
  -H "Content-Type: application/json" \
  -d '{"device_code": "pbdev_..."}'

Prefer to work from an AI assistant? Use the MCP server. Guide for AI agents: /agents.md.