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

# Bulk Evaluation

> Evaluate multiple flags via OFREP bulk operation.

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url http://localhost:8080/ofrep/v1/evaluate/flags \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'X-Flipt-Namespace: <namespaceKey>' \
    --data '{
    "context": {
      "flags": ["flagKey1", "flagKey2", "flagKey3"],
      "targetingKey": "targetingKey1"
    }
  }'
  ```
</RequestExample>


## OpenAPI

````yaml https://raw.githubusercontent.com/flipt-io/flipt/refs/heads/v2/rpc/flipt/openapi.yaml POST /ofrep/v1/evaluate/flags
openapi: 3.0.3
info:
  title: Common API
  version: 0.0.1
servers:
  - url: http://localhost:8080
security:
  - bearerAuth: []
tags:
  - name: AuthenticationMethodKubernetesService
  - name: AuthenticationMethodOIDCService
  - name: AuthenticationService
  - name: EvaluationService
  - name: Flipt
  - name: OFREPService
paths:
  /ofrep/v1/evaluate/flags:
    post:
      tags:
        - OFREPService
      description: OFREP bulk flag evaluation
      operationId: ofrep.evaluateFlagsBulk
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluateBulkRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkEvaluationResponse'
components:
  schemas:
    EvaluateBulkRequest:
      type: object
      properties:
        context:
          type: object
          additionalProperties:
            type: string
    BulkEvaluationResponse:
      required:
        - flags
      type: object
      properties:
        flags:
          type: array
          items:
            $ref: '#/components/schemas/EvaluationResponse'
        eventStreams:
          type: array
          items:
            $ref: '#/components/schemas/EventStream'
          description: The array of real-time change notification connections
    EvaluationResponse:
      type: object
      properties:
        type:
          enum:
            - VARIANT_EVALUATION_RESPONSE_TYPE
            - BOOLEAN_EVALUATION_RESPONSE_TYPE
            - ERROR_EVALUATION_RESPONSE_TYPE
          type: string
          format: enum
        booleanResponse:
          $ref: '#/components/schemas/BooleanEvaluationResponse'
        variantResponse:
          $ref: '#/components/schemas/VariantEvaluationResponse'
        errorResponse:
          $ref: '#/components/schemas/ErrorEvaluationResponse'
    EventStream:
      required:
        - endpoint
      type: object
      properties:
        type:
          type: string
          description: The connection type identifying the push mechanism to use
        endpoint:
          allOf:
            - $ref: '#/components/schemas/EventStreamEndpoint'
          description: >-
            The endpoint URL the client should connect to for real-time flag
            change notifications
      description: A real-time change notification connection endpoint
    BooleanEvaluationResponse:
      type: object
      properties:
        enabled:
          type: boolean
        reason:
          enum:
            - UNKNOWN_EVALUATION_REASON
            - FLAG_DISABLED_EVALUATION_REASON
            - MATCH_EVALUATION_REASON
            - DEFAULT_EVALUATION_REASON
          type: string
          format: enum
        requestId:
          type: string
        requestDurationMillis:
          type: number
          format: double
        timestamp:
          type: string
          format: date-time
        flagKey:
          type: string
        segmentKeys:
          type: array
          items:
            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
    ErrorEvaluationResponse:
      type: object
      properties:
        flagKey:
          type: string
        namespaceKey:
          type: string
        reason:
          enum:
            - UNKNOWN_ERROR_EVALUATION_REASON
            - NOT_FOUND_ERROR_EVALUATION_REASON
          type: string
          format: enum
    EventStreamEndpoint:
      required:
        - requestUri
      type: object
      properties:
        requestUri:
          type: string
          description: The path + query portion of the endpoint URL. Must start with `/`.
        origin:
          type: string
          description: The scheme + host + optional port portion of the endpoint URL.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.