Skip to content

Authentication

All API requests require authentication via a Bearer token in the Authorization header.

MethodUse CaseLifetime
API TokenServer-to-server integrations, scripts, CI/CDLong-lived (until revoked)
Session TokenBrowser-based applicationsShort-lived (auto-refreshes)

For programmatic access, API tokens are recommended. See API Tokens for setup instructions.

Include your token in the Authorization header:

Authenticate a request

Terminal window
curl https://api.catalyzed.ai/me \
-H "Authorization: Bearer YOUR_API_TOKEN"

API tokens are scoped to a specific team. When you create a token, you select which team it belongs to. The token can only access resources within that team.

To work with multiple teams, create separate API tokens for each team.

Returned when the token is missing, invalid, or expired.

{
"error": "UNAUTHORIZED",
"message": "Invalid or expired token"
}

Returned when the token is valid but lacks permission for the requested resource.

{
"error": "FORBIDDEN",
"message": "Insufficient permissions for this resource"
}

For browser-based applications, users authenticate via email/password or magic link. Session tokens are:

  • Managed automatically via HTTP-only cookies
  • Short-lived with automatic refresh
  • Tied to a specific browser session

Login with email/password

Terminal window
curl -X POST https://api.catalyzed.ai/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "your-password"
}'
  1. Never expose tokens in client-side code - Use environment variables or secrets management
  2. Rotate tokens periodically - Create new tokens and revoke old ones
  3. Use minimal scope - Create tokens only for the teams that need access
  4. Revoke compromised tokens immediately - Via Settings > API Tokens in the app