API keys
Parlay uses Stripe-style API keys. Every request carries a Bearer token in theAuthorization header.
Two environments
- Sandbox
- Live
Prefix:
pk_sandbox_…Sandbox keys hit the same infrastructure as live keys, against test data. AI-cost operations are billed at $0 — use them freely while integrating.Mock recording URLs (mock://perfect-pitch, mock://average-pitch, mock://poor-pitch) return deterministic test analyses in under a second. Use these for unit tests and demos.Base URL: https://parlay-api-dev-o7nogixtqq-uc.a.run.appKey safety
- Server-side only. Never embed an API key in a mobile app, browser, or anywhere a customer can extract it. Use a thin proxy on your backend instead.
- One key per environment per service. Don’t share live keys across staging + prod; rotate immediately if leaked.
- Rotate via the dashboard. Revoking a key is instant — every request after that returns
key_revoked.
Required headers
| Header | Required on | Purpose |
|---|---|---|
Authorization: Bearer <key> | Every request | Identifies the partner + scopes |
Content-Type: application/json | Mutating requests with a body | Standard JSON body |
Idempotency-Key: <uuid> | All POST, PATCH, PUT, DELETE | Lets you safely retry on transient failures without duplicate effects |
Idempotency
Generate a fresh UUID v4 per logical request. Retries with the same key return the cached response. A different key on the same payload creates a duplicate.Scopes
Sandbox keys can hit every read + mutate endpoint. Admin operations (creating partners, minting keys, suspending partners) require an admin key — those are not exposed via the MCP server intentionally.Common auth errors
| Code | Status | Meaning |
|---|---|---|
authentication_required | 401 | Missing or malformed Authorization header |
invalid_api_key | 401 | Key doesn’t exist or is malformed |
key_revoked | 401 | Key was revoked via dashboard — rotate to a new one |
key_environment_mismatch | 403 | Live key used against sandbox URL or vice versa |
scope_required | 403 | Action requires a scope your key doesn’t have |

