Design & Architecture

Partner API Access & API Keys

Advanced

When other businesses integrate with us through code, we expose APIs and give them credentials. Each partner key is a powerful, long-lived secret that grants access to our data. So how we issue, scope, rotate, and revoke these credentials, and how we isolate and limit partners, is a core part of keeping the platform safe.

Partner and machine access is different from human login. It is often a long-lived API key or client credential used by another system, with no MFA and no human watching. So scoping and lifecycle management are critical: a leaked or over-privileged partner key can expose a lot. Prefer standard machine auth (OAuth client-credentials via the IdP) over custom API keys where you can (see Identity Provider & SSO).

Treat each partner as a tenant boundary and an untrusted caller. They see only their own data, they are rate-limited and have quotas, and their access can be turned off instantly.

Issue and manage credentials well

Isolate and limit partners

Shared god key, tenant from request // one API key for all partners, full access, stored in plaintext
var partnerId = request.Query["partnerId"]; // caller picks!

A single leaked key exposes everything. And if the caller names the partner, any partner can read any other partner's data. No isolation, no rotation, no audit.

Scoped credential, derived identity // OAuth client-credentials; token carries partnerId + scopes
var partnerId = ctx.PartnerId; // from validated token
// queries filtered to partnerId; per-partner rate limit; revocable

Each partner has its own scoped, revocable credential. Identity comes from the token. Data is isolated, and access is limited and audited.

Self-review checklist

Why it matters: Partner credentials are high-value, long-lived keys to our data, used by systems with no human oversight. A single over-privileged or leaked one can cause a major breach or outage. Standard machine auth, least-privilege scoping, strict per-partner isolation and limits, and fast revocation keep partner access from becoming a liability.