API reference
Authentication
How to authenticate with the Setback API.
API keys
All API requests require authentication via an API key passed in the Authorization header:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.setback.io/v1/documentsGetting an API key
- Log in to the Setback dashboard
- Navigate to Settings > API Keys
- Click Create New Key
- Copy and securely store your key
Security best practices
- Never expose API keys in client-side code
- Use environment variables to store keys
- Rotate keys periodically
- Use separate keys for development and production
Rate limiting
Requests are rate-limited based on your plan. Rate limit information is returned in response headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 1700000000When rate limited, the API returns 429 Too Many Requests.