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

# Variant Evaluation

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://try.flipt.io/evaluate/v1/variant \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --data '{
    "context": {},
    "entityId": "<entityid>",
    "flagKey": "<flagkey>",
    "namespaceKey": "<namespacekey>"
  }'
  ```
</RequestExample>


## OpenAPI

````yaml POST /evaluate/v1/variant
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:
  /evaluate/v1/variant:
    post:
      tags:
        - EvaluationService
      operationId: evaluateVariant
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VariantEvaluationResponse'
components:
  schemas:
    EvaluationRequest:
      required:
        - namespaceKey
        - flagKey
        - entityId
        - context
      type: object
      properties:
        requestId:
          type: string
        namespaceKey:
          type: string
        flagKey:
          type: string
        entityId:
          type: string
        context:
          type: object
          additionalProperties:
            type: string
        reference:
          type: string
    VariantEvaluationResponse:
      type: object
      properties:
        match:
          type: boolean
        segmentKeys:
          type: array
          items:
            type: string
        reason:
          enum:
            - UNKNOWN_EVALUATION_REASON
            - FLAG_DISABLED_EVALUATION_REASON
            - MATCH_EVALUATION_REASON
            - DEFAULT_EVALUATION_REASON
          type: string
          format: enum
        variantKey:
          type: string
        variantAttachment:
          type: string
        requestId:
          type: string
        requestDurationMillis:
          type: number
          format: double
        timestamp:
          type: string
          format: date-time
        flagKey:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````