API Keys
API keys are used to authenticate your requests to the Fileloom API. Each key is tied to a workspace and has specific permissions.Creating an API Key
1
Go to Settings
Navigate to Settings → API Keys in your dashboard.
2
Click Create
Click the Create API Key button.
3
Configure the Key
- Name - Give it a descriptive name (e.g., “Production Server”, “Staging”)
- Permissions - Select what the key can do
- Expiration - Optional expiration date
4
Copy and Store
Copy your API key immediately. It will only be shown once.
Using Your API Key
Include your API key in theX-API-Key header with every request:
API Key Format
Fileloom API keys follow this format:| Part | Description |
|---|---|
fl | Fileloom prefix |
live | Environment (live or test) |
xxx... | 32-character random string |
Permissions
Each API key can have one or more permissions:| Permission | Description |
|---|---|
pdf.generate | Generate PDFs from HTML or templates |
pdf.read | View and download generated files |
pdf.delete | Delete generated files |
template.read | View templates |
template.write | Create, update, and delete templates |
For most use cases,
pdf.generate and pdf.read are sufficient.Permission Examples
Backend Server (Full Access)Security Best Practices
Use Environment Variables
Use Environment Variables
Never hardcode API keys in your source code:
Use Different Keys per Environment
Use Different Keys per Environment
Create separate keys for development, staging, and production:
Development API Key- For local developmentStaging API Key- For staging/test environmentsProduction API Key- For production only
Limit Permissions
Limit Permissions
Only grant the permissions each key actually needs. A key that only generates PDFs doesn’t need
template.write.Set Expiration Dates
Set Expiration Dates
For temporary integrations or contractors, set an expiration date on the key.
Never Expose in Client-Side Code
Never Expose in Client-Side Code
API keys should only be used server-side. Never include them in:
- Browser JavaScript
- Mobile app code
- Public repositories
Rate Limits
API keys are subject to rate limits based on your plan:| Plan | Requests/Minute |
|---|---|
| Free | 10 |
| Starter | 120 |
| Growth | 200 |
| Scale | 400 |
| Scale Business | 1,000 |
| Scale Enterprise | Unlimited |
429 Too Many Requests response.
API Key Errors
| Error Code | Description | Solution |
|---|---|---|
INVALID_API_KEY | Key doesn’t exist or is incorrect | Check your key is correct |
API_KEY_EXPIRED | Key has passed its expiration date | Create a new key |
API_KEY_REVOKED | Key was manually revoked | Create a new key |
INSUFFICIENT_PERMISSIONS | Key lacks required permission | Update key permissions |