API Keys
To authenticate your API requests to Emalc, you need to generate an API key from your dashboard or organizational settings.
Getting your first API key#
- Navigate to Settings > API Keys in your Emalc dashboard.
- Click Create API Key.
- Provide a memorable name (e.g.
Production Mailer). - Select the permissions scope needed for your application.
- Copy and securely store the generated secret key.
Using the API key#
Include your key in the Authorization header of every HTTP request:
bash
curl -X POST https://api.emalc.com/v1/emails \
-H "Authorization: Bearer emalc_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"to": "user@example.com", "subject": "Hello"}'Security best practices#
- Never commit your API keys into version control or client-side bundles.
- Use environment variables (e.g.,
EMALC_API_KEY) to load keys dynamically. - Rotate keys periodically or immediately if you suspect a leak.