Multi-tenant

API key isolation

Every PostFrame API key belongs to one workspace. The workspace comes from the key, never from the request, and every query runs under that workspace's row-level security. Keys are shown once and can be rolled, disabled or set to expire.

What a key can and cannot do

  • Bound to one workspace

    A key resolves to a single workspace on the server. Nothing in the request can point it at another one.

  • Shown once, stored hashed

    The full key is returned when you create it and never again. PostFrame keeps a hash and a short prefix to find it.

  • Roll, disable or expire

    Rolling issues a new secret with the same name, scopes and expiry, and the old secret stops working at once. A key can be disabled, and given an expiry date when it is created.

  • Scopes: two are checked today

    A key is created with send, read or admin scope. The admin scope is checked on platform administration and cannot be granted to an ordinary workspace. The send scope is checked on the SMTP relay. Other routes do not check a key's scope yet, so treat every key as able to read and send for its workspace.

Keys at a glance

Format
pf_live_ or pf_test_, then a short prefix and the secret.
Test-mode keys
A pf_test_ key marks its sends as test mode. They are simulated and never fire your webhooks.
Last used
Each key records when it was last used. Failed sign-ins are logged with the key prefix only.
Workspace
Fixed by the key. Row-level security applies to every query it makes.
Questions

PostFrame, answered

What scopes can an API key have?

send, read and admin. Today the admin scope is checked on platform administration, and an ordinary workspace cannot create an admin key. The send scope is checked on the SMTP relay. Other routes do not check read or send yet.

Can I see the full key again later?

No. The full key is shown once, when you create or roll it. If you lose it, roll the key to get a new secret.

What do I do if a key leaks?

Disable it or roll it from the API keys page. Both take effect at once, and rolling keeps the key's name and scopes and issues a new secret.

How is the workspace enforced on the database?

The workspace ID is taken from the authenticated key and set inside each database transaction, under Postgres row-level security, so a query for another workspace's rows returns nothing.

Run your business from one place.

Five plans, 25 launch apps, one dashboard. Change tiers any time.

From $0 · Basic $9.95/mo · Upgrade or downgrade any time