Superflag Evaluate API

The Evaluate API from Superflag — 1 operation(s) for evaluate.

GitHub OpenAPI

Operations 1

POST /api/v1/evaluate Evaluate flag #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/superflag-sh:superflag-sh-evaluate-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

superflag-sh-evaluate-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Superflag control-plane evaluation and advanced…
  version: 1.0.0
  description: 'Public Superflag HTTP API. Discovery documents at /openapi.json and /api/v1/contract do not require auth. Delivery and management routes require Authorization: Bearer with a cli_, admin_, sdk_, or pub_ credential. See https://superflag.sh/docs/api-reference/overview.'
servers:
- url: https://superflag.sh
  description: Production
tags:
- name: Evaluate
paths:
  /api/v1/evaluate:
    post:
      operationId: evaluateFlag
      security:
      - BearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoteEvaluationRequest'
      responses:
        '200':
          description: Rich evaluation details with remote origin and fallback class
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoteEvaluationResponse'
        '400':
          description: Invalid evaluation request or JSON body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid bearer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: A server SDK key is required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '405':
          description: Wrong method. JSON includes code, message, resolution, and Allow.
        '413':
          description: Request body exceeds 64 KiB
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Monthly config sync quota exceeded
        '500':
          description: Stored configuration is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      description: Evaluate Flag
      tags:
      - Evaluate
      summary: Evaluate flag
      x-summary-source: derived
components:
  schemas:
    RemoteEvaluationRequest:
      type: object
      required:
      - flagKey
      - context
      - defaultValue
      properties:
        flagKey:
          type: string
          minLength: 1
        context:
          type: object
          required:
          - targetingKey
          properties:
            targetingKey:
              type: string
              minLength: 1
            attributes:
              type: object
              additionalProperties: true
        defaultValue: {}
        now:
          oneOf:
          - type: string
            format: date-time
          - type: number
    ApiError:
      type: object
      additionalProperties: false
      required:
      - error
      properties:
        apiVersion:
          type: integer
          const: 1
        code:
          type: string
        message:
          type: string
        resolution:
          type: string
        error:
          oneOf:
          - type: string
          - type: object
            required:
            - code
            - message
            properties:
              code:
                type: string
              message:
                type: string
              resolution:
                type: string
              retryable:
                type: boolean
              metadata:
                type: object
    EvaluationDetails:
      type: object
      additionalProperties: false
      required:
      - flagKey
      - source
      - configVersion
      - value
      - reason
      - segmentIds
      - prerequisites
      - timestamp
      properties:
        flagKey:
          type: string
        source:
          type: object
          additionalProperties: false
          required:
          - app
          - environment
          properties:
            app:
              type: string
            environment:
              type: string
        configVersion:
          type: integer
          minimum: 0
        value:
          oneOf:
          - type: string
          - type: number
          - type: boolean
          - type: array
            items: {}
          - type: object
            additionalProperties: true
        variation:
          type: string
        reason:
          enum:
          - 'OFF'
          - TARGETING_MATCH
          - SPLIT
          - FALLTHROUGH
          - HOLDBACK
          - PREREQUISITE_FAILED
          - SCHEDULED_OUT
          - DEFAULT
        errorCode:
          enum:
          - FLAG_NOT_FOUND
          - TYPE_MISMATCH
          - INVALID_CONTEXT
          - INVALID_CONFIG
          - CYCLE_DETECTED
          - EVALUATION_ERROR
        errorMessage:
          type: string
        ruleId:
          type: string
        segmentIds:
          type: array
          items:
            type: string
        prerequisites:
          type: array
          items:
            type: object
            additionalProperties: false
            required:
            - flagKey
            - satisfied
            - reason
            properties:
              flagKey:
                type: string
              variation:
                type: string
              satisfied:
                type: boolean
              reason:
                enum:
                - 'OFF'
                - TARGETING_MATCH
                - SPLIT
                - FALLTHROUGH
                - HOLDBACK
                - PREREQUISITE_FAILED
                - SCHEDULED_OUT
                - DEFAULT
        ruleFlags:
          type: array
          items:
            type: object
            additionalProperties: false
            required:
            - flagKey
            - equals
            - matched
            - reason
            properties:
              flagKey:
                type: string
              equals:
                type: boolean
              value:
                type: boolean
              matched:
                type: boolean
              reason:
                type: string
              errorCode:
                type: string
        timestamp:
          type: string
          format: date-time
        metadata:
          type: object
          additionalProperties: true
    RemoteEvaluationResponse:
      type: object
      additionalProperties: false
      required:
      - schemaVersion
      - details
      - evaluationOrigin
      - fallbackClass
      - privacy
      properties:
        schemaVersion:
          const: 1
        details:
          $ref: '#/components/schemas/EvaluationDetails'
        evaluationOrigin:
          const: remote
        fallbackClass:
          enum:
          - none
          - flag_not_found
          - type_mismatch
          - invalid_context
          - invalid_config
          - cycle_detected
          - evaluation_error
          - config_unavailable
          - unknown
        privacy:
          type: object
          additionalProperties: false
          required:
          - acceptedAttributes
          properties:
            acceptedAttributes:
              type: array
              items:
                type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key