Skip to main content
All API endpoints require authentication unless explicitly marked as public.

API Key Authentication

Include your API key in the X-API-Key header:

Key Format

The checksum enables client-side format validation before making a request:

Key Types

Every key belongs to exactly one organization and acts only on that organization, at the role it was given when it was minted. The person who created the key is recorded for the audit trail; their other memberships never extend the key’s reach, and a key created by an Owner is not an Owner. To act on two organizations you need two keys. Publishable keys (cpk) differ from the other types in that they are:
  • Scoped to a single organization (returns org context, not user context)
  • Limited to a lower default rate (100 requests/minute) suited to client-side use
Per-key rate limits (rate_limit_per_minute, rate_limit_per_day) and optional expiration (expires_at) apply to every key type, not just publishable ones — see Rate Limits.

Key Lifecycle

Keys are shown once at creation time. The raw key is never stored — only its SHA-256 hash.

Organization Roles (RBAC)

Users belong to organizations through memberships, each with a role: Roles are evaluated per-organization. A user can be an Owner of one organization and an Editor of another. An API key has its own role (manager, editor or readonly), evaluated the same way but only ever on the key’s own organization. A readonly key minted by an Owner can read that organization and nothing more.

Permission Reference

organization.tombstone_organization gates DELETE /organizations/{id} itself — the reversible 90-day tombstone (C-6197). organization.delete_organization is the narrower, still fully human-only permission behind the truly irreversible operations: fast-purge and restore.
The four permissions marked No are reachable only from a signed-in browser session. An API key is refused with 403 even when the person who created it holds the role — changing who belongs to an organization, moving money, minting further keys, and the operations that follow a tombstone (fast-purge, restore) all require a human at a keyboard.This is a property of the credential, not of the person: it applies to keys created by owners and by staff alike, and to OAuth bearer tokens. It exists so that a leaked key is bounded by what a key can do, rather than by whoever happened to create it. Automate these five against the Dashboard instead.

Session Authentication

Browser-based access (Dashboard, admin) uses Django session cookies. This is automatic when logged in and is primarily for internal use. API integrations should always use API key authentication.

Security Best Practices

  • Never expose csb keys in client-side code — use cpk publishable keys instead
  • Store keys in environment variables, not in source code
  • Rotate keys periodically and revoke unused ones
  • Use per-key rate limits on publishable keys to prevent abuse
  • Set expiration dates on keys used for temporary integrations