> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flipt.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Flag Evaluation

> OFREP single flag evaluation

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://try.flipt.io/ofrep/v1/evaluate/flags/<flagKey> \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'X-Flipt-Namespace: <namespaceKey>' \
    --data '{
    "context": {
      "targetingKey": "targetingKey1"
    },
  }'
  ```
</RequestExample>


## OpenAPI

````yaml POST /ofrep/v1/evaluate/flags/{key}
openapi: 3.0.3
info:
  title: api
  version: 1.47.0
servers:
  - url: http://localhost:8080
security:
  - bearerAuth: []
tags:
  - name: AuthenticationMethodKubernetesService
  - name: AuthenticationMethodOIDCService
  - name: AuthenticationMethodTokenService
  - name: AuthenticationService
  - name: EvaluationService
  - name: Flipt
  - name: OFREPService
paths:
  /ofrep/v1/evaluate/flags/{key}:
    post:
      tags:
        - OFREPService
      description: OFREP single flag evaluation
      operationId: ofrep.evaluateFlag
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluateFlagRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluatedFlag'
components:
  schemas:
    EvaluateFlagRequest:
      type: object
      properties:
        key:
          type: string
        context:
          type: object
          additionalProperties:
            type: string
    EvaluatedFlag:
      type: object
      properties:
        key:
          type: string
        reason:
          enum:
            - UNKNOWN
            - DISABLED
            - TARGETING_MATCH
            - DEFAULT
          type: string
          format: enum
        variant:
          type: string
        metadata:
          type: object
        value:
          $ref: '#/components/schemas/GoogleProtobufValue'
    GoogleProtobufValue:
      description: >-
        Represents a dynamically typed value which can be either null, a number,
        a string, a boolean, a recursive struct value, or a list of values.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````