Skip to main content

API Key Authentication

All API requests require authentication using a workspace API key.

Obtaining an API Key

  1. Navigate to SettingsWorkspacesYour WorkspaceAPI Keys in your dashboard
  2. Click Create API Key
  3. Give your key a descriptive name
  4. Copy and securely store your API key - it will only be shown once
Keep your API key secret! Never expose it in client-side code or public repositories.

Using Your API Key

Authenticate requests using either header:
HeaderFormat
AuthorizationBearer wsk_your_api_key
X-API-Keywsk_your_api_key

API Key Format

wsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Prefix: wsk_ (Workspace Key)
  • Body: 32 random alphanumeric characters

Authentication Errors

StatusError
401Missing API key
401Invalid API key
401API key is deactivated

Best Practices

  • Store API keys in environment variables
  • Use separate keys for development and production
  • Rotate keys periodically
  • Monitor API key usage in your dashboard