Evaluate A Single Feature Flag
Evaluates a single feature flag by its key. This endpoint is used by server-side providers for dynamic context evaluation, where each evaluation request includes the evaluation context.
The endpoint returns the evaluated flag value along with metadata including the evaluation reason, variant, and any flag-specific metadata. The flag value can be one of several types: boolean, string, integer, float, object, or a code default (indicating the provider should use the code default value).
Use Case: Server-side applications where evaluation context may change between requests and real-time targeting decisions are required.
Path parameters
The unique identifier (key) of the feature flag
Request body
Example request
{
"context": {
"targetingKey": "user-123",
"email": "user@example.com",
"plan": "premium",
"country": "CA"
}
}Response
Successful flag evaluation. Returns the evaluated flag value with metadata.
Example response
{
"key": "discount-banner",
"metadata": {
"team": "ecommerce",
"businessPurpose": "experiment",
"owner": "product-team"
}
}Changes
Changed in 11 of the 21 revisions of this API.14524
- ▲
request body became required
request-body-became-required
- ▲
the request's body type/format changed from
/toobject/request-body-type-changed
- ▲
the request property
contextbecame requiredrequest-property-became-required
- ▲
the request property
context/targetingKeybecame requiredrequest-property-became-required
- ▲
the response's body type/format changed from
/toobject/for status400response-body-type-changed
- ▲
the response's body type/format changed from
/toobject/for status404response-body-type-changed
- ▲
the response's body type/format changed from
/toobject/for status500response-body-type-changed
- ▲
the
allOf[evaluationSuccess]/response's property type/format changed from/toobject/for status200response-property-type-changed
- ○
added
subschema #1subschema #2to theallOf[evaluationSuccess]/response propertyallOflist for the response status200response-property-all-of-added
- ○
removed
subschema #1subschema #2from theallOf[evaluationSuccess]/response propertyallOflist for the response status200response-property-all-of-removed
- ▲
- ▲
added
codeDefaultFlagto theallOf[evaluationSuccess]/allOf[subschema #2]/response propertyoneOflist for the response status200response-property-one-of-added
- ▲
- ○
removed
subschema #2from the response bodyallOflist for the response status200response-body-all-of-removed
- ○
- ○
api operation id
evaluateFlagwas addedapi-operation-id-added
- ○
api tag
OFREP Coreaddedapi-tag-added
- ○
api tag
OFREP coreremovedapi-tag-removed
- ○
- ▲
the
allOf[evaluationSuccess]/allOf[subschema #1]/metadataresponse's property type/format changed fromobject/to/for status200response-property-type-changed
- ○
added the optional property
metadatato the response with the400statusresponse-optional-property-added
- ○
added the optional property
metadatato the response with the404statusresponse-optional-property-added
- ○
added
metadataflagMetadataDescriptionflagMetadataExamplesto theallOf[evaluationSuccess]/allOf[subschema #1]/metadataresponse propertyallOflist for the response status200response-property-all-of-added
- ▲
- ○
added
evaluationSuccesssubschema #2to the response bodyallOflist for the response status200response-body-all-of-added
- ○
removed
subschema #1subschema #2from the response bodyallOflist for the response status200response-body-all-of-removed
- ○
- ○
added the new optional request property
context/targetingKeynew-optional-request-property
- ○
- ●
the optional response header
Retry-Laterremoved for the status429optional-response-header-removed
- ●
- ○
api tag
OFREP coreaddedapi-tag-added
- ○
- ○
removed the
DISABLEDenum value from theallOf[subschema #1]/reasonresponse property for the response status200response-property-enum-value-removed
- ○
removed the
SPLITenum value from theallOf[subschema #1]/reasonresponse property for the response status200response-property-enum-value-removed
- ○
removed the
STATICenum value from theallOf[subschema #1]/reasonresponse property for the response status200response-property-enum-value-removed
- ○
removed the
TARGETING_MATCHenum value from theallOf[subschema #1]/reasonresponse property for the response status200response-property-enum-value-removed
- ○
removed the
UNKNOWNenum value from theallOf[subschema #1]/reasonresponse property for the response status200response-property-enum-value-removed
- ○