Overview
All Firstwork API requests must be authenticated using an API key passed in theAuthorization header.
API Key Authentication
Include your API key as a Bearer token in theAuthorization header of every request:
Obtaining an API Key
API keys are generated in the Firstwork dashboard:Generate a new key
Click Generate New Key and give it a descriptive name (e.g., “Production Integration”, “Zapier Connector”).
Best Practices
Use environment variables
Use environment variables
Never hardcode API keys in source code. Use environment variables or a secrets manager to store them securely.
Rotate keys regularly
Rotate keys regularly
Rotate API keys periodically. Create a new key, update your integrations, then revoke the old key.
Use separate keys per integration
Use separate keys per integration
Create separate API keys for each integration. This allows you to revoke access for a specific integration without affecting others.
Monitor usage
Monitor usage
Review API key usage logs to detect unauthorized access or unusual patterns.
Company Context
After authentication, all API calls are automatically scoped to the company associated with your API key. This ensures all data access is isolated to your organization — you cannot accidentally access another company’s data.Permissions
API access respects your organization’s permission model:- Read permissions control which data can be queried
- Write permissions control which data can be modified
- Some endpoints require admin-level API keys