Skip to main content

Authentication

The ZenFlow API uses API Keys to authenticate requests. You can manage your API keys from the ZenFlow dashboard.

Getting an API Key

  1. Log in to your ZenFlow Dashboard
  2. Navigate to Settings > API Keys
  3. Click Create API Key
  4. Configure your key:
    • Name: A descriptive name (e.g., “ERP Integration”)
    • Scopes: Select the permissions your key needs
    • Expiration: Optional expiration date
  5. Click Create
  6. Copy your API key immediately - it won’t be shown again
Store your API key securely. Never commit it to version control or expose it in client-side code.

Using Your API Key

Include your API key in the X-API-Key header with every request:

API Key Format

ZenFlow API keys follow this format:
  • zenflow_live_*: Production keys
  • zenflow_test_*: Test/sandbox keys (coming soon)

Scopes

API keys are scoped to specific permissions. Available scopes:

Scope Presets

For common use cases, we offer preset scope combinations:

Error Responses

Invalid API Key

Missing API Key

Insufficient Permissions

Expired API Key

Security Best Practices

Use Environment Variables

Store API keys in environment variables, not in code

Minimum Permissions

Only request the scopes you actually need

Rotate Regularly

Rotate your API keys periodically

Monitor Usage

Review API key usage logs for suspicious activity

Example: Environment Variables

Rotating API Keys

To rotate an API key:
  1. Create a new API key with the same scopes
  2. Update your application to use the new key
  3. Verify the new key is working
  4. Revoke the old key
You can have multiple active API keys. This allows for zero-downtime rotation.

IP Whitelisting (Optional)

For additional security, you can restrict API key usage to specific IP addresses:
  1. Go to Settings > API Keys
  2. Select your API key
  3. Add allowed IP addresses or CIDR ranges
  4. Save changes

Rate Limits

See Rate Limits for details on API rate limiting.