The FlagPilot REST API gives you direct, low-level access to flag management. Use it to automate flag lifecycle events from CI/CD pipelines, server-side scripts, or any environment without an official SDK.
Authentication
All API requests must include your API key in the Authorization header:
Terminal
curl -X GET \ https://api.tryflagpilot.com/v1/flags \ -H "Authorization: Bearer fk_secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json"
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/flags | List all flags in the project |
| POST | /v1/flags | Create a new feature flag |
| GET | /v1/flags/:key | Get a single flag by key |
| PATCH | /v1/flags/:key | Update flag settings, rollout, or toggle state |
| DELETE | /v1/flags/:key | Permanently delete a flag |
| GET | /v1/flags/:key/evaluate | Evaluate a flag for a specific user context |
| GET | /v1/flags/:key/users | List targeted users for a flag |
| POST | /v1/flags/:key/users | Add user IDs to the target list |
| DELETE | /v1/flags/:key/users/:id | Remove a user from the target list |
| GET | /v1/flags/:key/sdk-health | Get SDK health telemetry for a flag |
Example: Toggle a flag
Use the PATCH /v1/flags/:key endpoint to toggle a flag on or off:
Terminal
curl -X PATCH \
https://api.tryflagpilot.com/v1/flags/checkout-redesign \
-H "Authorization: Bearer fk_secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'Rate limits
FlagPilot does not enforce a per-minute request rate limit. Instead, the Free plan has a monthly flag-evaluation quota:
| Plan | Monthly Evaluation Quota |
|---|---|
| Free | 50,000 / mo (105% grace buffer, then 403 quota_exceeded) |
| Solo | 500,000 / mo, then metered overage |
| Pro | 2,000,000 / mo, then metered overage |
| Business | 20,000,000 / mo, then metered overage |
