Skip to main content

API Keys

The Turen API uses API keys for authentication. Include your key in the X-API-Key header with every request:
API keys use the prefix sk_live_ and are scoped to a single organization. All data returned is filtered to your organization.

Creating an API Key

  1. Log in to the Turen dashboard
  2. Go to Org Settings > API Keys
  3. Click Create API Key
  4. Copy the key immediately: it’s only shown once

Key Types

Turen uses three credential types. Only API keys are used for the dashboard API:

Security Best Practices

  • Store keys in environment variables or a secrets manager, never in source code
  • Use one key per integration so you can revoke individually
  • Rotate keys regularly: create a new key, update your integration, then revoke the old one
  • Monitor key usage in Org Settings > API Keys (last-used timestamps)
  • Revoke unused keys promptly

Multi-Factor Authentication (MFA)

Turen accounts can add a TOTP (authenticator app) second factor. MFA applies to user sign-in (dashboard and desktop app), not to sk_live_ API keys, so these endpoints authenticate with a user session’s Supabase access token in the Authorization: Bearer header rather than the X-API-Key header.
You enroll and manage MFA factors in the dashboard under User Settings. The endpoints below are the ones the dashboard and desktop app call. Once a factor is enrolled, the desktop app prompts for the 6-digit code during sign-in (email/password and Google sign-in both support it).
All MFA endpoints are under /api/v1/auth/supabase/mfa and require a Bearer token: Enrollment returns the data you need to add the factor to an authenticator app, then you confirm it with a challenge plus a verify:
Sign-in with MFA: when an account has a verified factor, sign-in returns a session at assurance level aal1 (password only) and indicates a second factor is needed. Create a challenge for the factor, then verify the 6-digit code to upgrade to a fully authenticated (aal2) session:

Health Check

The health endpoint does not require authentication: