Developers

Postbing API

Manage your sites from your own tools. Included with the Agency plan.

Authentication

Create a key in Settings, Profile, API access (account owner on the Agency plan). It is shown once; store it like a password. Send it on every request in the Authorization header:

Authorization: Bearer pb_your_key

The X-API-Key: pb_your_key header works too. Keys in the URL are not accepted. Generating a new key replaces the old one, and revoking it stops it at once.

Base URL: https://www.postbing.com/api/v1. Requests and responses are JSON.

Errors and limits

StatusMeaning
401No key, a malformed key, or a key that does not exist.
403The plan does not include API access, the subscription is not active, or a plan limit was reached.
404The site does not exist or is not yours.
429Too many requests. Reads allow 60 a minute; creating and deleting sites allow 10 a minute.

Errors return {"error": "a plain explanation"}.

GET/api/v1/meThe account the key belongs to
curl https://www.postbing.com/api/v1/me \
  -H "Authorization: Bearer pb_your_key"
{"id": 42, "email": "you@agency.com", "plan": "agency"}
GET/api/v1/projectsEvery site you own
curl https://www.postbing.com/api/v1/projects \
  -H "Authorization: Bearer pb_your_key"
{"count": 2, "projects": [
  {"id": 7, "project_name": "Acme Roofing", "domain_name": "acmeroofing.com", "location": "United States"},
  {"id": 9, "project_name": "Bright Dental", "domain_name": "brightdental.co.uk", "location": "United Kingdom"}
]}
POST/api/v1/projectsAdd a site

name and domain are required; location defaults to United States. The site then appears in Postbing, ready for you to finish setting up and connect.

curl -X POST https://www.postbing.com/api/v1/projects \
  -H "Authorization: Bearer pb_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Roofing", "domain": "acmeroofing.com", "location": "United States"}'
201 {"project": {"id": 11, "project_name": "Acme Roofing", "domain_name": "acmeroofing.com", ...}}
DELETE/api/v1/projects/<id>Delete a site you own

Removes the site and everything Postbing stored for it. Posts already published on the site stay there. This cannot be undone.

curl -X DELETE https://www.postbing.com/api/v1/projects/11 \
  -H "Authorization: Bearer pb_your_key"
{"message": "Project deleted"}