Authentication & API Keys
How to authenticate with the Internal Newsletter API. API key generation, scopes (read, write, send_preview), security best practices, and rate limits.
Every API request must include a valid team-scoped API key.
Getting an API key
- Sign in to Internal Newsletter and go to Team Settings
- Scroll to the API Keys section
- Enter a name (e.g. "Claude Agent", "Zapier") and select scopes
- Click Create API key
- Copy the key immediately — it starts with
inl_and won't be shown again
Using your key
Include it in the Authorization header:
Authorization: Bearer inl_abc123def456...
Or as a query parameter (not recommended for production):
https://your-app.com/api/v1/team?api_key=inl_abc123def456...
Scopes
API keys have granular scopes that control what they can do:
| Scope | Permissions |
|---|---|
read |
List and view newsletters, content blocks, templates, events, team info |
write |
Create, update, and delete newsletters and content blocks. Includes AI drafting. |
send_preview |
Send preview emails to team members |
A key with only read scope cannot create or modify any resources. This is useful for monitoring dashboards or read-only integrations.
Rate limits
- 60 requests per minute per API key
- Rate-limited responses return
429 Too Many Requestswith aRetry-Afterheader - AI draft generation has a separate plan-based limit (check
GET /api/v1/teamfor current usage)
Security best practices
- Never commit API keys to source control. Use environment variables.
- Use the minimum scopes needed for each integration.
- Rotate keys regularly — revoke old keys and generate new ones from Team Settings.
- Set expiry dates for temporary integrations.
- Monitor usage — each key tracks its last-used timestamp, visible in Team Settings.
Revoking a key
Go to Team Settings → API Keys and click Revoke next to the key. Revocation is immediate — any in-flight requests using that key will fail.
Error responses
| Status | Meaning |
|---|---|
401 Unauthorized |
Missing, invalid, revoked, or expired API key |
403 Forbidden |
Key is valid but missing the required scope |
429 Too Many Requests |
Rate limit exceeded |