Skip to content
Dashboard
Theme
Theme

Evaluate one feature flag for a context

POST /v1/feature_flags/evaluate: Evaluate one feature flag for a context.

View Markdown

POST /v1/feature_flags/evaluate

Served from the configuration snapshot (no database read). An unknown key answers resource_not_found; service_unavailable before the first snapshot load.

Scope
feature_flags:evaluate
Auth
Secret key (sk_…)
Since
1.1
  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • key string Required

    max length 128

  • context FeatureFlagContext

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/feature_flags/evaluate" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"key": "plan"
}'
Response 200
{
"object": "feature_flag_evaluation",
"key": "plan",
"variant": "default",
"value": {},
"reason": "Primary SSO connection for Acme Corp."
}