Authentication
Every request carries an organisation API key as a bearer token:
GET /v1/organisation HTTP/1.1
Host: api.postbuddy.nl
Authorization: Bearer pb_live_AbCdEfGh…Keys are created in the portal under Developers by members with the apikeys.manage permission. A key has a mode and scopes.
Modes
pb_live_…keys create real items that are printed and posted.pb_test_…keys create test items: they follow the full lifecycle, trigger webhooks and never reach production or billing. Test keys only see test resources plus shared read-only ones such as products and templates.
Scopes
Scopes mirror the portal permissions, for example templates.read, templates.write, postflows.write, items.write. A scope can include a narrower one: items.write includes test_runs.write, the scope of the test run simulation. The reference lists the scope each operation needs. A call without the scope answers 403 insufficient_scope.
Some scopes belong to a part of PostBuddy your plan includes or not: postflows.read and postflows.write to Postflows, postbatches.write and postbatches.approve to Postbatches, contacts.manage to Contacts and pixel.manage to the website pixel. A new key only takes scopes of parts your plan includes (422 with the code feature_not_entitled otherwise). A key keeps its scopes when a part is switched off, but a call that needs one of them answers 403 feature_not_entitled until the part is switched on again.
Personal data
Names, addresses and field values of cards need the scope personal_data.read. Keys created before 2026-10-24 with items.read hold it; a new key gets it only when it is ticked. Without it:
- the recipient is masked: the name to its initial (
A. ***), the address lines to***, the postal code to its digits (1234 **); city and country stay; - field values (
variables, the fields of a card, import rows) become[hidden]; - a card's preview and PDF, a Postbatch proof and exports answer
403 personal_data_required; - searching cards matches the external id and the id only, not names or addresses;
- a journey webhook step that sends card fields (a
{{...}}placeholder in its address, body or headers) cannot be saved or published with the key.
Operations that mask answer with x-personal-data: masked in the reference, operations that refuse with x-personal-data: refused. Webhook payloads hold no personal data, so they are the same for every endpoint.
What GET /v1/organisation returns
Every key gets the organisation's id, name, slug, locale, status, billingMode, effectiveRateLimits and createdAt, plus its own role and permissions. settings is added for a key with organisation.read and admin (credit limit, payment term, priority, rate limit overrides) for a key with billing.read. The billing profile is at GET /v1/organisation/billing-profile and needs billing.read.
Other answers
| Status | Code | Meaning |
|---|---|---|
| 401 | api_key_invalid | The key is malformed or unknown. |
| 401 | api_key_revoked | The key was revoked in the portal. |
| 403 | organisation_suspended | The organisation is suspended; reads still work. |
| 404 | not_found | Also returned for portal-only routes that keys cannot use. |
Keep keys out of client-side code; rotate them from the portal when in doubt. Every response carries X-Request-Id; quote it when you contact support.