Documentation Index
Fetch the complete documentation index at: https://docs.foxreach.io/llms.txt
Use this file to discover all available pages before exploring further.
API Key Authentication
The FoxReach API uses API keys to authenticate requests. All API requests must include your API key in theX-API-Key header.
Creating an API Key
Navigate to Settings
Open the dashboard and go to Settings > API Keys.
Create a new key
Click Create API Key, give it a descriptive name (e.g., “CRM Integration”), and select the scopes you need.
Key Format
API keys follow the formatotr_ followed by a random string:
otr_ prefix helps you identify FoxReach API keys in your codebase.
Scopes
Each API key has one or more scopes that control what actions it can perform:| Scope | Description |
|---|---|
read | Read access to all resources (leads, campaigns, accounts, templates, webhooks) |
write | Create, update, and delete resources |
read and write scopes.
Workspace Scoping
API keys are scoped to a specific workspace. All resources accessed through an API key are limited to that workspace’s data. This means:- A key created in Workspace A cannot access data in Workspace B
- Resources created via the API are automatically assigned to the key’s workspace
Security Best Practices
Never expose keys in client-side code
Never expose keys in client-side code
API keys should only be used in server-side code. Never include them in JavaScript bundles, mobile apps, or any code that runs in the browser.
Use environment variables
Use environment variables
Store your API key in environment variables rather than hardcoding it:
Rotate keys regularly
Rotate keys regularly
Create new keys periodically and revoke old ones. You can have multiple active keys at once to enable zero-downtime rotation.
Use least-privilege scopes
Use least-privilege scopes
If your integration only needs to read data, create a key with only the
read scope.Error Responses
If authentication fails, the API returns a403 error:
- Missing
X-API-Keyheader - Invalid or revoked API key
- Expired API key