Skip to main content

Authentication

StateSet ResponseCX provides REST and GraphQL APIs. All requests must be authenticated with an API key.
Quick Start

API keys

  • Test keys (sk_test_) for sandbox development
  • Live keys (sk_live_) for production
Create keys in Dashboard → Settings → API Keys. Keys are shown only once—store them securely.
Never expose secret keys in client-side code or public repositories. Use environment variables.

Using your key

Troubleshooting

  • 401 Unauthorized: missing/invalid key or wrong environment.
  • 403 Forbidden: key lacks required permissions.

Rotating a key

Issue a separate key per consumer, so revoking one does not break the others:
  1. Create the replacement key in the dashboard.
  2. Deploy it to the one consumer that used the old key.
  3. Revoke the old key and watch for 401s — anything that breaks was sharing it.
A sk_live_ key is a credential for the whole workspace. Keep it server-side only; a key that has ever shipped in browser or mobile code should be treated as leaked and rotated.

Failed authentication