Skip to main content

API Reference

The FeatureSignals REST API provides programmatic access to all platform features. The API is organized into two main groups:

Base URL

https://api.featuresignals.com/v1

For self-hosted installations, replace with your own API server URL.

Authentication

The API uses two authentication methods:

MethodHeaderUse Case
JWT Bearer TokenAuthorization: Bearer <token>Management API (Flag Engine, admin)
API KeyX-API-Key: <key>Evaluation API (SDKs, clients)

See Authentication for details.

API Groups

Evaluation API (API Key Auth)

Endpoints for SDKs and client applications. Rate-limited to 1000 requests/minute per client.

MethodPathDescription
POST/v1/evaluateEvaluate a single flag
POST/v1/evaluate/bulkEvaluate multiple flags
GET/v1/client/{envKey}/flagsGet all flag values for an environment
GET/v1/stream/{envKey}SSE stream for real-time updates
POST/v1/trackTrack A/B impressions

Management API (JWT Auth)

Endpoints for the dashboard and administrative operations.

Read (All Roles)

MethodPathDescription
GET/v1/projectsList projects
GET/v1/projects/{id}Get project
GET/v1/projects/{id}/environmentsList environments
GET/v1/projects/{id}/flagsList flags
GET/v1/projects/{id}/flags/{key}Get flag
GET/v1/projects/{id}/flags/{key}/environments/{envId}Get flag state
GET/v1/projects/{id}/segmentsList segments
GET/v1/projects/{id}/segments/{key}Get segment
GET/v1/environments/{envId}/api-keysList API keys
GET/v1/auditList audit log
GET/v1/membersList team members
GET/v1/approvalsList approvals

Write (Owner, Admin, Developer)

MethodPathDescription
POST/v1/projectsCreate project
POST/v1/projects/{id}/environmentsCreate environment
POST/v1/projects/{id}/flagsCreate flag
PUT/v1/projects/{id}/flags/{key}Update flag
DELETE/v1/projects/{id}/flags/{key}Delete flag
PUT/v1/projects/{id}/flags/{key}/environments/{envId}Update flag state
POST/v1/projects/{id}/flags/{key}/promotePromote flag config
POST/v1/projects/{id}/flags/{key}/killKill switch
POST/v1/projects/{id}/segmentsCreate segment
PUT/v1/projects/{id}/segments/{key}Update segment
DELETE/v1/projects/{id}/segments/{key}Delete segment
POST/v1/approvalsCreate approval request

Admin (Owner, Admin)

MethodPathDescription
DELETE/v1/projects/{id}Delete project
DELETE/v1/projects/{id}/environments/{envId}Delete environment
POST/v1/environments/{envId}/api-keysCreate API key
DELETE/v1/api-keys/{keyId}Revoke API key
POST/v1/approvals/{id}/reviewReview approval
POST/v1/members/inviteInvite member
PUT/v1/members/{id}Update member role
DELETE/v1/members/{id}Remove member
GET/POST/v1/metrics/*Evaluation metrics
CRUD/v1/webhooks/*Webhook management

Pagination

All list endpoints return paginated responses. Use the limit and offset query parameters to control the page:

ParameterDefaultMaxDescription
limit50100Number of items per page
offset0Number of items to skip

Paginated responses use a consistent envelope:

{
"data": [ ... ],
"total": 42,
"limit": 50,
"offset": 0,
"has_more": false
}

Response Compression

The API supports gzip compression. Include Accept-Encoding: gzip in your requests to receive compressed responses.

Caching

Responses include Cache-Control headers:

Endpoint GroupCache-ControlRationale
Evaluation APIno-storeAlways fetch fresh flag values
Pricingpublic, max-age=3600Rarely changes
Management APIprivate, no-cacheRevalidate with auth on every request

Strict Request Validation

The API rejects unknown fields in request bodies. If your request includes a field that is not part of the endpoint's schema, you will receive a 400 Bad Request error. This prevents typos from being silently ignored.

Error Responses

All errors follow a consistent format:

{
"error": "descriptive error message",
"request_id": "correlation-id"
}

Error payloads may include a request_id field for correlation with server logs. The same value is typically also sent as the X-Request-Id response header.

Request bodies (POST / PUT / PATCH)

POST, PUT, and PATCH requests that send a body must use Content-Type: application/json. Other content types receive 415 Unsupported Media Type.

Common HTTP status codes:

CodeMeaning
400Bad request (validation error)
401Unauthorized (missing/invalid auth)
403Forbidden (insufficient permissions)
404Not found
409Conflict (duplicate resource)
429Rate limit exceeded
500Internal server error

Rate Limiting

Evaluation endpoints are rate-limited to 1000 requests per minute per client. The client is identified by the first 12 characters of the X-API-Key header, or by IP address if no key is provided.

Responses from rate-limited routes include standard headers you can use to avoid hitting limits:

HeaderMeaning
X-RateLimit-LimitMaximum requests allowed in the current window
X-RateLimit-RemainingRequests remaining before the limit is hit
X-RateLimit-ResetUnix timestamp when the window resets

Limits differ by route group (for example, auth and evaluation use different values). Clients should read these headers and back off when X-RateLimit-Remaining is low or after a 429 Too Many Requests response.