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

  1. Navigate to your project Settings > General
  2. Scroll to the API Keys section
  3. Click Generate API Key
  4. 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:

  1. Go to Settings > General > API Keys
  2. Find the key you want to revoke
  3. Click Revoke

Revoked keys are immediately invalidated and cannot be restored.

Error Responses

Status CodeMeaning
401Missing or invalid API key
403Key does not have access to this project
429Rate 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

Last updated: 2026-02-21