---
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 supporting flag evaluation
    - `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 supporting flag evaluation
    - `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 supporting flag evaluation
    - `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 supporting flag evaluation
    - `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 supporting flag evaluation
    - `value` object, required — Flag evaluation result

## 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

- **2024-07-26** `2fd784b6dd1e` — 1 info
  - added the new optional request property `context/targetingKey`
- **2024-07-05** `bc39d1d2a5e5` — 1 warning
  - the optional response header `Retry-Later` removed for the status `429`
- **2024-06-10** `536f0e210aa8` — 1 info
  - api tag `OFREP core` added
- **2024-05-30** `4dcc1b14ac85` — 5 info
  - removed the `DISABLED` enum value from the `allOf[subschema #1]/reason` response property for the response status `200`
  - removed the `SPLIT` enum value from the `allOf[subschema #1]/reason` response property for the response status `200`
  - removed the `STATIC` enum value from the `allOf[subschema #1]/reason` response property for the response status `200`
  - removed the `TARGETING_MATCH` enum value from the `allOf[subschema #1]/reason` response property for the response status `200`
  - …1 more
- **2024-03-07** `2637da20b444` — 4 breaking, 4 warning, 6 info
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `400`
  - the response's body type changed from `object` to no type for status `404`
  - the response's body type changed from `object` to no type for status `500`
  - …10 more

[Change 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/dd17dd9bbdeb/schema)
