Skip to main content

API keys

Parlay uses Stripe-style API keys. Every request carries a Bearer token in the Authorization header.

Two environments

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://api.goparlay.io
Three names, one signal. API responses + the MCP echo_ping expose three aliases for the same environment marker so you can use whichever suits your code:All three carry the same signal. pk_live_…environment: "production"live: true.

Key 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

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.
The MCP server handles idempotency for you — fresh UUID per tool call, automatic.

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

See the full errors reference for remediation guidance.