API Reference
Authentication
How to authenticate with the EpicContext API using API keys.
The EpicContext API uses API keys for authentication. Each key is scoped to a specific project and grants full read/write access to that project's data.
Generating an API Key
- Navigate to your project Settings > General
- Scroll to the API Keys section
- Click Generate API Key
- Copy the key immediately — it won't be shown again
Store your key securely
API keys grant full access to your project data. Never commit them to version control, share them in chat, or expose them in client-side code.
Using Your API Key
Include the key in the X-API-Key header with every request:
curl -H "X-API-Key: ec_live_abc123..." \
https://epiccontext.com/api/v1/projects/YOUR_PROJECT_ID/blocks
Key Format
API keys follow this format:
ec_live_[random-string] # Production keys
ec_test_[random-string] # Test/development keys
Revoking Keys
To revoke an API key:
- Go to Settings > General > API Keys
- Find the key you want to revoke
- Click Revoke
Revoked keys are immediately invalidated and cannot be restored.
Error Responses
| Status Code | Meaning |
|---|---|
401 | Missing or invalid API key |
403 | Key does not have access to this project |
429 | Rate limit exceeded |
Example error response:
{
"data": null,
"error": "Invalid API key"
}
Best Practices
- Use environment variables to store API keys
- Generate separate keys for different environments (dev, staging, production)
- Rotate keys periodically
- Revoke keys immediately if compromised
Next Steps
- See the full endpoint reference
- Learn about export formats
Last updated: 2026-02-21