API Reference
Complete API reference for Flipswitch Admin and Flag APIs
API Reference
Flipswitch provides two main APIs:
Admin API
Manage projects, flags, environments, and users
Flag API (OFREP)
Evaluate feature flags using the OpenFeature protocol
Authentication
Admin API
The Admin API uses JWT Bearer tokens for authentication:
To obtain a token, authenticate via the /api/v1/auth/login endpoint or through the dashboard.
Flag API
The Flag API uses API keys via the X-API-Key header:
API keys are generated per-environment in the dashboard.
Base URLs
| Environment | URL |
|---|---|
| Production | https://api.flipswitch.dev |
| Self-hosted | Your configured server URL |
Rate Limits
| API | Limit |
|---|---|
| Admin API | 1000 requests/minute |
| Flag API | 10000 requests/minute |
Rate limit headers are included in responses:
Error Responses
All errors follow a consistent format:
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST | 400 | Malformed request or validation error |
UNAUTHORIZED | 401 | Missing or invalid authentication |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
CONFLICT | 409 | Resource already exists |
RATE_LIMITED | 429 | Rate limit exceeded |
INTERNAL_ERROR | 500 | Server error |