Quick start
- Create a key in Postbing under Settings, Developers, or run
npx postbing login(see the CLI). - 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:
| Scope | Allows |
|---|---|
read | Read sites, articles, topics, results and webhooks. |
write | Create and edit articles, topics and webhooks, and have Postbing write articles. |
publish | Publish, 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
- JSON everywhere. Single resources come back as the object itself. Lists come back as
{"data": [...], "next_cursor": "..."}. - Pagination. Pass
?limit=(1 to 100, default 50) and thenext_cursoryou got as?cursor=.next_cursorisnullon the last page. - Retries are safe. Send an
Idempotency-Keyheader (any unique string) on a POST. Repeating it with the same body within 24 hours returns the first answer withIdempotent-Replayed: trueinstead of doing the work again. - Times are ISO 8601 in UTC, dates are
YYYY-MM-DD. - Events. Instead of polling, subscribe to webhooks such as
article.publishedandpublish.failed.
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."}}| Status | Code | Meaning |
|---|---|---|
400 | invalid_request | A field is missing or wrong. The message says which. |
401 | unauthorized | No key, or the key is wrong or revoked. |
402 | quota_exhausted | No article credits left this period (generate only). |
403 | insufficient_scope | The key lacks the scope this call needs (read, write or publish). |
403 | plan_required | The account is on the free trial. API access comes with every paid plan. |
404 | not_found | No such site, article or webhook on this account. |
409 | refused | The action does not fit the current state (for example publishing an unconnected site). |
422 | idempotency_key_reused | The Idempotency-Key was used with a different request. |
429 | rate_limited | Too many requests this minute. Wait for Retry-After seconds. |
500 | server_error | Something 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.
| Plan | Requests a minute |
|---|---|
| BYOK Lite | 30 |
| Launch | 60 |
| Growth | 120 |
| Agency | 300 |
| Agency Pro | 600 |
Account
Check your key
/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"const res = await fetch("https://www.postbing.com/api/v1/auth/whoami", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/auth/whoami",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Article credits
/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"const res = await fetch("https://www.postbing.com/api/v1/usage", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/usage",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Your account (original)
/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"const res = await fetch("https://www.postbing.com/api/v1/me", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/me",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Sites
List sites
/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"const res = await fetch("https://www.postbing.com/api/v1/sites", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/sites",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Get a site
/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"const res = await fetch("https://www.postbing.com/api/v1/sites/34", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/sites/34",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Test the connection
/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"const res = await fetch("https://www.postbing.com/api/v1/sites/34/test-connection", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/sites/34/test-connection",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()List sites (original)
/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"const res = await fetch("https://www.postbing.com/api/v1/projects", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/projects",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Add a site (original)
/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"}'const res = await fetch("https://www.postbing.com/api/v1/projects", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"name": "Example Coffee", "domain": "example.com"})
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/projects",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"},
json={'name': 'Example Coffee', 'domain': 'example.com'})
data = res.json()Delete a site (original)
/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"const res = await fetch("https://www.postbing.com/api/v1/projects/34", {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.delete("https://www.postbing.com/api/v1/projects/34",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Topics and calendar
List topics
/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"const res = await fetch("https://www.postbing.com/api/v1/sites/34/topics", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/sites/34/topics",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Add a topic
/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"}'const res = await fetch("https://www.postbing.com/api/v1/sites/34/topics", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"name": "Espresso", "keyword": "espresso at home"})
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/sites/34/topics",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"},
json={'name': 'Espresso', 'keyword': 'espresso at home'})
data = res.json()Get the calendar
/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"const res = await fetch("https://www.postbing.com/api/v1/sites/34/calendar", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/sites/34/calendar",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Search results
/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"const res = await fetch("https://www.postbing.com/api/v1/sites/34/results", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/sites/34/results",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Articles
List articles
/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"const res = await fetch("https://www.postbing.com/api/v1/articles", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/articles",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Get an article
/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"const res = await fetch("https://www.postbing.com/api/v1/articles/4812", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/articles/4812",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Create an article from your text
/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."}'const res = await fetch("https://www.postbing.com/api/v1/articles", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"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."})
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/articles",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"},
json={'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.'})
data = res.json()Have Postbing write an article
/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"}'const res = await fetch("https://www.postbing.com/api/v1/articles/generate", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"site_id": 34, "keyword": "best espresso beans"})
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/articles/generate",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"},
json={'site_id': 34, 'keyword': 'best espresso beans'})
data = res.json()Update an article
/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."}'const res = await fetch("https://www.postbing.com/api/v1/articles/4812", {
method: "PATCH",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"meta_description": "A shorter, sharper description."})
});
const data = await res.json();import os, requests
res = requests.patch("https://www.postbing.com/api/v1/articles/4812",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"},
json={'meta_description': 'A shorter, sharper description.'})
data = res.json()Publish or schedule
/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"}'const res = await fetch("https://www.postbing.com/api/v1/articles/4812/publish", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"mode": "publish"})
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/articles/4812/publish",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"},
json={'mode': 'publish'})
data = res.json()Unpublish
/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"const res = await fetch("https://www.postbing.com/api/v1/articles/4812/unpublish", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/articles/4812/unpublish",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Move on the calendar
/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"}'const res = await fetch("https://www.postbing.com/api/v1/articles/4812/reschedule", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"date": "2026-12-15"})
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/articles/4812/reschedule",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"},
json={'date': '2026-12-15'})
data = res.json()Webhooks
List webhooks
/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"const res = await fetch("https://www.postbing.com/api/v1/webhooks", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/webhooks",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Create a webhook
/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"]}'const res = await fetch("https://www.postbing.com/api/v1/webhooks", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"url": "https://example.com/hooks/postbing", "events": ["article.published", "publish.failed"]})
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/webhooks",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"},
json={'url': 'https://example.com/hooks/postbing', 'events': ['article.published', 'publish.failed']})
data = res.json()Get a webhook
/api/v1/webhooks/{webhook_id}
Scope: read
One webhook.
curl https://www.postbing.com/api/v1/webhooks/7 \
-H "Authorization: Bearer $POSTBING_API_KEY"const res = await fetch("https://www.postbing.com/api/v1/webhooks/7", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/webhooks/7",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Update a webhook
/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}'const res = await fetch("https://www.postbing.com/api/v1/webhooks/7", {
method: "PATCH",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"active": true})
});
const data = await res.json();import os, requests
res = requests.patch("https://www.postbing.com/api/v1/webhooks/7",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"},
json={'active': True})
data = res.json()Delete a webhook
/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"const res = await fetch("https://www.postbing.com/api/v1/webhooks/7", {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.delete("https://www.postbing.com/api/v1/webhooks/7",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Send a test event
/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"const res = await fetch("https://www.postbing.com/api/v1/webhooks/7/test", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/webhooks/7/test",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Rotate the secret
/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"const res = await fetch("https://www.postbing.com/api/v1/webhooks/7/rotate-secret", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/webhooks/7/rotate-secret",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Delivery log
/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"const res = await fetch("https://www.postbing.com/api/v1/webhooks/7/deliveries", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/webhooks/7/deliveries",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()Redeliver
/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"const res = await fetch("https://www.postbing.com/api/v1/webhooks/7/deliveries/901/redeliver", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.post("https://www.postbing.com/api/v1/webhooks/7/deliveries/901/redeliver",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()List events
/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"const res = await fetch("https://www.postbing.com/api/v1/events", {
headers: { Authorization: `Bearer ${process.env.POSTBING_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get("https://www.postbing.com/api/v1/events",
headers={"Authorization": f"Bearer {os.environ['POSTBING_API_KEY']}"})
data = res.json()CLI sign in
Start a CLI sign in
/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"}'const res = await fetch("https://www.postbing.com/api/v1/cli/login", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"hostname": "my-laptop"})
});
const data = await res.json();import requests
res = requests.post("https://www.postbing.com/api/v1/cli/login",
json={'hostname': 'my-laptop'})
data = res.json()Finish a CLI sign in
/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_..."}'const res = await fetch("https://www.postbing.com/api/v1/cli/token", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"device_code": "pbdev_..."})
});
const data = await res.json();import requests
res = requests.post("https://www.postbing.com/api/v1/cli/token",
json={'device_code': 'pbdev_...'})
data = res.json()Prefer to work from an AI assistant? Use the MCP server. Guide for AI agents: /agents.md.