Skip to content

API Authentication

Generate API keys in your workspace settings:

  1. Go to Settings → API Keys
  2. Click Create API Key
  3. Copy the key (shown only once)
TypePrefixUse Case
Publicpk_Client-side tracking
Secretsk_Server-side API calls

Include in the Authorization header:

Terminal window
curl -X GET \
https://analyze-api.thismatters.workers.dev/api/v1/analytics/overview \
-H "Authorization: Bearer sk_live_xxxxx"

To rotate a key:

  1. Create a new key
  2. Update your applications
  3. Delete the old key
  • Never expose secret keys in client-side code
  • Use public keys only for tracking
  • Rotate keys if compromised