Skip to main content

API Key Types

All Partner API requests require an API key passed as a Bearer token:
There are three key types:

Secret vs Public Keys

Secret keys (sk_personal_*, sk_branch_*) have full read/write access — they can create orders, register clients, and manage webhooks. Public keys (pk_*) are read-only and can only access the Public endpoints:
  • GET /partner/public/exchanges
  • GET /partner/public/currencies
  • GET /partner/public/rates
  • POST /partner/public/estimate
Public keys are designed for embedding in client-facing applications (e.g., landing pages, rate widgets) where you want to display exchange rates without exposing write access. If a pk_* key is used on a write endpoint, the API returns 403 Forbidden.
Secret keys (sk_*) can also access all public endpoints — you don’t need a separate public key if you already have a secret key.

Creating API Keys

API keys are managed via the staff panel or via the management API (requires JWT session):
The response includes the raw key exactly once:
Save the rawKey value immediately. It is hashed and stored server-side and cannot be retrieved again.

Key Expiry

Pass expiresAt (ISO 8601) to create a key with an expiry date:
Expired keys return 401 Unauthorized.

Revoking Keys

Multi-Tenancy Guarantee

A personal key resolves to the creating user. All order/client queries are automatically scoped to that user’s permitted exchanges — a key from Branch X cannot access Branch Y data. A branch key resolves to a branch-level principal that spans all exchanges within that branch. A public key resolves to a read-only branch-level principal — it can view exchange data within its branch but cannot create or modify any resources.