API Keys
The Turen API uses API keys for authentication. Include your key in theX-API-Key header with every request:
sk_live_ and are scoped to a single organization. All data returned is filtered to your organization.
Creating an API Key
- Log in to the Turen dashboard
- Go to Org Settings > API Keys
- Click Create API Key
- 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 tosk_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).
/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:
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: