Skip to Content

Authentication

Authenticate with API keys or a portal session.

Postbound accepts two customer auth mechanisms on most routes.

Send the key as a Bearer token:

Authorization: Bearer pb_…

Keys are created in the portal or via POST /api-keys (full-access key or session required). Each key belongs to exactly one workspace.

Permissions

ValueAccess
sending_accessOnly POST /emails and POST /emails/batch. Optional domain_id restricts the key to that domain.
full_accessManage domains, keys, webhooks, audiences, billing (read / checkout flows), list and retrieve emails, receiving API, and other manage routes.

If a sending key calls a manage route, the API responds with a restricted-key error.

Portal session

The Postbound portal uses an HTTP-only cookie (pb_session) after login, OAuth, or passkey sign-in. Session requests must come from an allowed portal origin.

Sessions behave like full access for the selected workspace, and also unlock user-scoped routes such as profile, appeals, and privacy exports. API keys cannot call those user-only routes.

Switch workspace (session only):

POST /auth/workspace
Content-Type: application/json

{ "workspace_id": "…" }

Choosing the right credential

Use caseUse
Application servers sending mailAPI key (sending_access when possible)
Backend admin tooling / sync jobsAPI key (full_access)
Browser portal UISession cookie
CI scriptsAPI key stored as a secret

Missing or invalid credentials

Unauthenticated calls receive an error such as missing_api_key or invalid_api_key. See Errors.

On this page