---
title: "OFREP single flag evaluation contract"
method: POST
path: "/ofrep/v1/evaluate/flags/{key}"
tags: ["OFREP Core"]
---

# OFREP single flag evaluation contract

`POST /ofrep/v1/evaluate/flags/{key}`

OFREP single flag evaluation request.
The endpoint is called by the server providers to perform single flag evaluation.

## Path parameters

- `key` string, required

## Request body

- EvaluationRequest — Flag evaluation request
  - `context` Context — Context information for flag evaluation
    - `targetingKey` string — A string logically identifying the subject of evaluation (end-user, service, etc).

## Response `200`

OFREP successful evaluation response

- union
  - object — A boolean typed flag value
    - `key` string — Feature flag key
    - `reason` string — An OpenFeature reason for the evaluation
    - `variant` string — Variant of the evaluated flag value
    - `metadata` object — Arbitrary metadata for the flag, useful for telemetry and documentary purposes.
    - `value` boolean, required — Flag evaluation result
  - object — A string typed flag value
    - `key` string — Feature flag key
    - `reason` string — An OpenFeature reason for the evaluation
    - `variant` string — Variant of the evaluated flag value
    - `metadata` object — Arbitrary metadata for the flag, useful for telemetry and documentary purposes.
    - `value` string, required — Flag evaluation result
  - object — An integer typed flag value
    - `key` string — Feature flag key
    - `reason` string — An OpenFeature reason for the evaluation
    - `variant` string — Variant of the evaluated flag value
    - `metadata` object — Arbitrary metadata for the flag, useful for telemetry and documentary purposes.
    - `value` integer, required — Flag evaluation result
  - object — A float typed flag value
    - `key` string — Feature flag key
    - `reason` string — An OpenFeature reason for the evaluation
    - `variant` string — Variant of the evaluated flag value
    - `metadata` object — Arbitrary metadata for the flag, useful for telemetry and documentary purposes.
    - `value` number, required — Flag evaluation result
  - object — An object typed flag value
    - `key` string — Feature flag key
    - `reason` string — An OpenFeature reason for the evaluation
    - `variant` string — Variant of the evaluated flag value
    - `metadata` object — Arbitrary metadata for the flag, useful for telemetry and documentary purposes.
    - `value` object, required — Flag evaluation result
  - object — A flag evaluation that defers to the code default value
    - `key` string — Feature flag key
    - `reason` string — An OpenFeature reason for the evaluation
    - `variant` string — Variant of the evaluated flag value
    - `metadata` object — Arbitrary metadata for the flag, useful for telemetry and documentary purposes.

## Other responses

- `400` — Bad evaluation request
- `401` — Unauthorized - You need credentials to access the API
- `403` — Forbidden - You are not authorized to access the API
- `404` — Flag not found
- `429` — Rate limit reached on the Flag Management System
- `500` — Internal server error

## Changes

- **2025-08-21** `ace2bf25318d` — 1 breaking
  - added `#/components/schemas/codeDefaultFlag` to the `allOf[#/components/schemas/evaluationSuccess]/allOf[subschema #2]/` response property `oneOf` list for the response status `200`
- **2025-06-02** `6e3caed39fa7` — 1 info
  - removed `subschema #2` from the response body `allOf` list for the response status `200`
- **2025-02-07** `113e9501a7dc` — 3 info
  - api operation id `evaluateFlag` was added
  - api tag `OFREP Core` added
  - api tag `OFREP core` removed
- **2025-01-31** `d86062c9054c` — 1 breaking, 3 info
  - the `allOf[#/components/schemas/evaluationSuccess]/allOf[subschema #1]/metadata` response's property type changed from `object` to no type for status `200`
  - added the optional property `metadata` to the response with the `400` status
  - added the optional property `metadata` to the response with the `404` status
  - added `#/components/schemas/metadata, #/components/schemas/flagMetadataDescription, #/components/schemas/flagMetadataExamples` to the `allOf[#/components/schemas/evaluationSuccess]/allOf[subschema #1]/metadata` response property `allOf` list for the response status `200`
- **2025-01-22** `ea398c27b630` — 2 info
  - added `#/components/schemas/evaluationSuccess, subschema #2` to the response body `allOf` list for the response status `200`
  - removed `subschema #1, subschema #2` from the response body `allOf` list for the response status `200`

[Full history](https://skmtc.dev/open-feature/apis/openfeature-remote-evaluation-protocol-ofrep/changes/ofrep/v1/evaluate/flags/:key/post.md)

---

[API](https://skmtc.dev/open-feature/apis/openfeature-remote-evaluation-protocol-ofrep.md) · [All operations](https://skmtc.dev/open-feature/apis/openfeature-remote-evaluation-protocol-ofrep/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/open-feature/openfeature-remote-evaluation-protocol-ofrep/revisions/ace2bf25318d/schema)
