API Authentication
API Keys
Generate API keys from Admin -> Settings -> API. Each key has configurable permissions and rate limits.
Token Authentication
Use Bearer tokens for authenticated requests:
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://your-domain.com/api/v1/coupons
Rate Limiting
Default rate limits:
- Authenticated: 60 requests/minute
- Unauthenticated: 20 requests/minute
Customize in .env:
API_RATE_LIMIT=60
API_RATE_LIMIT_GUEST=20
Rate limit headers (
X-RateLimit-Limit, X-RateLimit-Remaining) are included in all API responses.