Skip to main content
POST
/
v1
/
evaluate
curl -X POST https://fly.feather.mupeni.dev/v1/evaluate \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "flagKey": "new-checkout",
    "context": {
      "userId": "user_123",
      "attributes": { "country": "DE", "plan": "pro" }
    }
  }'
{
  "flagKey": "new-checkout",
  "value": true,
  "reason": "RULE_MATCH",
  "ruleId": "rule_beta",
  "requestId": "9fd3e4bc-5f2a-4ba2-b7f4-8a74054b8132"
}
Returns the resolved flag value and evaluation reason from the edge bundle cache. Auth: API key only (Authorization: Bearer <key>).

Body

flagKey
string
required
The flag key to evaluate.
context
object
required
Evaluation context.
context.userId
string
Stable user identifier.
context.anonymousId
string
Anonymous identifier when userId is not available.
context.attributes
Record<string, string | number | boolean>
Additional attributes used by flag rules.

Response

flagKey
string
required
value
boolean | string | number | null
required
reason
"DISABLED" | "RULE_MATCH" | "ROLLOUT" | "DEFAULT" | "FLAG_NOT_FOUND" | "ERROR"
required
ruleId
string
variant
string
requestId
string
required
Client keys (pk_...) cannot evaluate non-clientSafe flags. Those evaluations are masked as FLAG_NOT_FOUND.

Status codes

StatusMeaning
200Evaluation succeeded
400Invalid JSON body (INVALID_JSON)
401Missing/invalid API key (UNAUTHORIZED, INVALID_API_KEY)
422Validation failed (VALIDATION_ERROR)
429Rate-limited (RATE_LIMITED)
503Bundle unavailable; returns reason: "ERROR"
curl -X POST https://fly.feather.mupeni.dev/v1/evaluate \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "flagKey": "new-checkout",
    "context": {
      "userId": "user_123",
      "attributes": { "country": "DE", "plan": "pro" }
    }
  }'
{
  "flagKey": "new-checkout",
  "value": true,
  "reason": "RULE_MATCH",
  "ruleId": "rule_beta",
  "requestId": "9fd3e4bc-5f2a-4ba2-b7f4-8a74054b8132"
}