Superflag Advanced Config API

The Advanced Config API from Superflag — 3 operation(s) for advanced config.

GitHub OpenAPI

Operations 3

GET /api/v1/advanced-config Get advanced config #
POST /api/v1/advanced-config/impact Preview advanced configuration impact #
POST /api/v1/advanced-config/inspect Inspect advanced configuration #

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-advanced-config-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-advanced-config-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: Advanced Config
paths:
  /api/v1/advanced-config:
    get:
      operationId: getAdvancedConfig
      security:
      - BearerAuth: []
      parameters:
      - name: appId
        in: query
        schema:
          type: string
      - name: env
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Versioned core configuration with TTL, privacy, and delivery
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedConfigResponse'
        '304':
          description: Authorization-scoped config is unchanged
        '400':
          description: appId and env must be provided together for management credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing, invalid, or revoked credential
        '403':
          description: Caller cannot access this app, or a management credential omitted appId/env
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Configuration not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Monthly environment sync quota exceeded
        '500':
          description: Stored advanced configuration is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '503':
          description: Config sync metering unavailable
      description: Get Advanced Config
      tags:
      - Advanced Config
      summary: Get advanced config
      x-summary-source: derived
  /api/v1/advanced-config/impact:
    post:
      operationId: previewAdvancedConfigurationImpact
      security:
      - BearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedImpactRequest'
      responses:
        '200':
          description: Deterministic affected flags, dependencies, and visibility impact
        '400':
          description: Invalid advanced resources
        '401':
          description: Unauthorized bearer or API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      description: Preview Advanced Configuration Impact
      tags:
      - Advanced Config
      summary: Preview advanced configuration impact
      x-summary-source: derived
  /api/v1/advanced-config/inspect:
    post:
      operationId: inspectAdvancedConfiguration
      security:
      - BearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigInspectionRequest'
      responses:
        '200':
          description: Explicit-time evaluation, segment, dependency, impact, or simulation inspection
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigInspectionResponse'
        '400':
          description: Invalid strict inspection request
        '401':
          description: Unauthorized bearer or API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: Proposed config version conflict
        '413':
          description: Inspection request exceeds 64 KiB
      description: Inspect Advanced Configuration
      tags:
      - Advanced Config
      summary: Inspect advanced configuration
      x-summary-source: derived
components:
  schemas:
    InspectionJsonValue:
      oneOf:
      - type: 'null'
      - type: string
      - type: number
      - type: boolean
      - type: array
        items:
          $ref: '#/components/schemas/InspectionJsonValue'
      - type: object
        additionalProperties:
          $ref: '#/components/schemas/InspectionJsonValue'
    AdvancedFlagResource:
      type: object
      additionalProperties: false
      required:
      - type
      - description
      - tags
      - owner
      - lifecycle
      - enabled
      - variations
      - offVariation
      - fallthrough
      properties:
        type:
          type: string
          enum:
          - boolean
          - string
          - number
          - object
        description:
          type: string
          minLength: 1
        tags:
          type: array
          items:
            type: string
        owner:
          type: string
          minLength: 1
        lifecycle:
          type: string
          enum:
          - draft
          - active
          - deprecated
          - archived
        enabled:
          type: boolean
        variations:
          type: object
          additionalProperties: true
        offVariation:
          type: string
        fallthrough:
          $ref: '#/components/schemas/Serve'
        prerequisites:
          type: array
          items:
            type: object
        rules:
          type: array
          items:
            type: object
            required:
            - id
            - when
            - serve
            properties:
              id:
                type: string
              when:
                $ref: '#/components/schemas/TargetingExpression'
              serve:
                $ref: '#/components/schemas/Serve'
              schedule:
                $ref: '#/components/schemas/Schedule'
              unallocated:
                type: string
                enum:
                - continue
                - 'off'
                description: Absent or continue keeps today's fallthrough. off serves the flag off variation when a valid bucket misses a rollout or progressive allocation.
        schedule:
          $ref: '#/components/schemas/Schedule'
        visibility:
          type: string
          enum:
          - server
          - client
        metadata:
          type: object
          additionalProperties: true
    ConfigInspectionSimulationResponse:
      allOf:
      - $ref: '#/components/schemas/InspectionResponseBase'
      - type: object
        required:
        - operation
        - result
        properties:
          operation:
            const: simulate
          result:
            type: array
            items:
              $ref: '#/components/schemas/InspectionSimulationResult'
      unevaluatedProperties: false
    AdvancedConfigurationDocument:
      type: object
      additionalProperties: false
      required:
      - schemaVersion
      - flags
      properties:
        schemaVersion:
          const: 1
        source:
          type: object
          required:
          - app
          - environment
          properties:
            app:
              type: string
            environment:
              type: string
        configVersion:
          type: integer
          minimum: 0
        flags:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AdvancedFlagResource'
        segments:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AdvancedSegmentResource'
        metadata:
          type: object
          additionalProperties: true
    ConfigInspectionDependenciesResponse:
      allOf:
      - $ref: '#/components/schemas/InspectionResponseBase'
      - type: object
        required:
        - operation
        - result
        properties:
          operation:
            const: dependencies
          result:
            type: array
            items:
              $ref: '#/components/schemas/InspectionPath'
      unevaluatedProperties: false
    AdvancedImpactRequest:
      type: object
      additionalProperties: false
      required:
      - appId
      - env
      - advancedConfig
      properties:
        appId:
          type: string
          minLength: 1
        env:
          type: string
          minLength: 1
        advancedConfig:
          $ref: '#/components/schemas/AdvancedConfigurationDocument'
    InspectionResponseBase:
      type: object
      required:
      - apiVersion
      - inspectionVersion
      - target
      properties:
        apiVersion:
          const: 1
        inspectionVersion:
          const: 1
        target:
          $ref: '#/components/schemas/InspectionTarget'
    InspectionExplanation:
      type: object
      additionalProperties: false
      required:
      - schemaVersion
      - source
      - configVersion
      - flagKey
      - now
      - stages
      properties:
        schemaVersion:
          const: 1
        source:
          type: object
          additionalProperties: false
          required:
          - app
          - environment
          properties:
            app:
              type: string
            environment:
              type: string
        configVersion:
          type: integer
          minimum: 0
        flagKey:
          type: string
        now:
          type: string
          format: date-time
        stages:
          type: array
          minItems: 4
          maxItems: 4
          prefixItems:
          - type: object
            properties:
              stage:
                const: eligibility
            required:
            - stage
            - eligible
            - reason
            - prerequisites
          - type: object
            properties:
              stage:
                const: assignment
            required:
            - stage
            - attempted
            - serve
          - type: object
            properties:
              stage:
                const: evaluation
              details:
                type: object
            required:
            - stage
            - details
          - type: object
            properties:
              stage:
                const: exposure-candidate
            required:
            - stage
            - candidate
            - flagKey
            - configVersion
            - reason
    ConfigInspectionSimulationRequest:
      allOf:
      - $ref: '#/components/schemas/InspectionRequestBase'
      - type: object
        required:
        - operation
        - proposal
        - scenarios
        properties:
          operation:
            const: simulate
          proposal:
            type: object
            additionalProperties: false
            required:
            - advancedConfig
            - ifVersion
            properties:
              advancedConfig:
                $ref: '#/components/schemas/AdvancedConfigurationDocument'
              ifVersion:
                type: integer
                minimum: 0
          scenarios:
            type: array
            minItems: 1
            maxItems: 100
            items:
              $ref: '#/components/schemas/InspectionScenario'
      unevaluatedProperties: false
    InspectionSimulationResult:
      type: object
      additionalProperties: false
      required:
      - id
      - changed
      - before
      - after
      properties:
        id:
          type: string
        changed:
          type: boolean
        before:
          $ref: '#/components/schemas/InspectionExplanation'
        after:
          $ref: '#/components/schemas/InspectionExplanation'
    ConfigInspectionResponse:
      oneOf:
      - $ref: '#/components/schemas/ConfigInspectionExplainResponse'
      - $ref: '#/components/schemas/ConfigInspectionSegmentResponse'
      - $ref: '#/components/schemas/ConfigInspectionDependenciesResponse'
      - $ref: '#/components/schemas/ConfigInspectionImpactsResponse'
      - $ref: '#/components/schemas/ConfigInspectionSimulationResponse'
      discriminator:
        propertyName: operation
    ConfigInspectionImpactsRequest:
      allOf:
      - $ref: '#/components/schemas/InspectionPathsRequestBase'
      - type: object
        required:
        - operation
        properties:
          operation:
            const: impacts
      unevaluatedProperties: false
    InspectionSegmentResult:
      type: object
      additionalProperties: false
      required:
      - segmentId
      - matched
      - now
      - segmentIds
      properties:
        segmentId:
          type: string
        matched:
          type: boolean
        now:
          type: string
          format: date-time
        segmentIds:
          type: array
          items:
            type: string
        error:
          const: SEGMENT_NOT_FOUND
        errorCode:
          type: string
        errorMessage:
          type: string
    ConfigInspectionDependenciesRequest:
      allOf:
      - $ref: '#/components/schemas/InspectionPathsRequestBase'
      - type: object
        required:
        - operation
        properties:
          operation:
            const: dependencies
      unevaluatedProperties: false
    InspectionTarget:
      type: object
      additionalProperties: false
      required:
      - appId
      - env
      - currentVersion
      properties:
        appId:
          type: string
        env:
          type: string
        currentVersion:
          type: integer
          minimum: 0
        proposedVersion:
          type: integer
          minimum: 1
    TargetingExpression:
      type: object
      description: Recursive all, any, not, match, segment, or flag targeting expression
      required:
      - op
      properties:
        op:
          type: string
          enum:
          - all
          - any
          - not
          - match
          - segment
          - flag
        expressions:
          type: array
          items:
            $ref: '#/components/schemas/TargetingExpression'
        expression:
          $ref: '#/components/schemas/TargetingExpression'
        attribute:
          type: string
        operator:
          type: string
        value: {}
        segment:
          type: string
        flag:
          type: string
        equals:
          type: boolean
        negate:
          type: boolean
    InspectionDocument:
      oneOf:
      - $ref: '#/components/schemas/InspectionCurrentDocument'
      - $ref: '#/components/schemas/InspectionProposedDocument'
      discriminator:
        propertyName: kind
    InspectionScenario:
      type: object
      additionalProperties: false
      required:
      - id
      - flagKey
      - context
      - fallback
      - now
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 256
        flagKey:
          type: string
          minLength: 1
          maxLength: 256
        context:
          $ref: '#/components/schemas/InspectionContext'
        fallback:
          $ref: '#/components/schemas/InspectionFallback'
        now:
          type: string
          format: date-time
    InspectionRequestBase:
      type: object
      required:
      - schemaVersion
      - appId
      - env
      properties:
        schemaVersion:
          const: 1
        appId:
          type: string
          minLength: 1
          maxLength: 256
        env:
          type: string
          minLength: 1
          maxLength: 256
    InspectionProposedDocument:
      type: object
      additionalProperties: false
      required:
      - kind
      - advancedConfig
      - ifVersion
      properties:
        kind:
          const: proposed
        advancedConfig:
          $ref: '#/components/schemas/AdvancedConfigurationDocument'
        ifVersion:
          type: integer
          minimum: 0
    ConfigInspectionExplainRequest:
      allOf:
      - $ref: '#/components/schemas/InspectionRequestBase'
      - type: object
        required:
        - operation
        - document
        - flagKey
        - context
        - fallback
        - now
        properties:
          operation:
            const: explain
          document:
            $ref: '#/components/schemas/InspectionDocument'
          flagKey:
            type: string
            minLength: 1
            maxLength: 256
          context:
            $ref: '#/components/schemas/InspectionContext'
          fallback:
            $ref: '#/components/schemas/InspectionFallback'
          now:
            type: string
            format: date-time
      unevaluatedProperties: false
    InspectionFallback:
      oneOf:
      - type: string
      - type: number
      - type: boolean
      - type: array
        items:
          $ref: '#/components/schemas/InspectionJsonValue'
      - type: object
        additionalProperties:
          $ref: '#/components/schemas/InspectionJsonValue'
    ConfigInspectionRequest:
      oneOf:
      - $ref: '#/components/schemas/ConfigInspectionExplainRequest'
      - $ref: '#/components/schemas/ConfigInspectionSegmentRequest'
      - $ref: '#/components/schemas/ConfigInspectionDependenciesRequest'
      - $ref: '#/components/schemas/ConfigInspectionImpactsRequest'
      - $ref: '#/components/schemas/ConfigInspectionSimulationRequest'
      discriminator:
        propertyName: operation
    InspectionPath:
      type: object
      additionalProperties: false
      required:
      - resources
      - relationships
      properties:
        resources:
          type: array
          items:
            $ref: '#/components/schemas/InspectionResource'
        relationships:
          type: array
          items:
            enum:
            - flag_prerequisite
            - flag_rule
            - flag_segment
            - segment_segment
    WeightedVariation:
      type: object
      additionalProperties: false
      required:
      - variation
      - weight
      properties:
        variation:
          type: string
          minLength: 1
        weight:
          type: integer
          minimum: 0
          maximum: 100000
    InspectionPathsRequestBase:
      allOf:
      - $ref: '#/components/schemas/InspectionRequestBase'
      - type: object
        required:
        - document
        - resource
        properties:
          document:
            $ref: '#/components/schemas/InspectionDocument'
          resource:
            $ref: '#/components/schemas/InspectionResource'
    ConfigInspectionSegmentRequest:
      allOf:
      - $ref: '#/components/schemas/InspectionRequestBase'
      - type: object
        required:
        - operation
        - document
        - segmentId
        - context
        - now
        properties:
          operation:
            const: segment
          document:
            $ref: '#/components/schemas/InspectionDocument'
          segmentId:
            type: string
            minLength: 1
            maxLength: 256
          context:
            $ref: '#/components/schemas/InspectionContext'
          now:
            type: string
            format: date-time
      unevaluatedProperties: false
    ConfigInspectionSegmentResponse:
      allOf:
      - $ref: '#/components/schemas/InspectionResponseBase'
      - type: object
        required:
        - operation
        - result
        properties:
          operation:
            const: segment
          result:
            $ref: '#/components/schemas/InspectionSegmentResult'
      unevaluatedProperties: false
    ConfigInspectionImpactsResponse:
      allOf:
      - $ref: '#/components/schemas/InspectionResponseBase'
      - type: object
        required:
        - operation
        - result
        properties:
          operation:
            const: impacts
          result:
            type: array
            items:
              $ref: '#/components/schemas/InspectionPath'
      unevaluatedProperties: false
    Serve:
      oneOf:
      - type: object
        additionalProperties: false
        required:
        - variation
        properties:
          variation:
            type: string
            minLength: 1
      - type: object
        additionalProperties: false
        required:
        - rollout
        properties:
          rollout:
            $ref: '#/components/schemas/Rollout'
      - type: object
        additionalProperties: false
        required:
        - progressive
        properties:
          progressive:
            type: object
            additionalProperties: false
            required:
            - start
            - end
            - from
            - to
            properties:
              start:
                type: string
                format: date-time
              end:
                type: string
                format: date-time
              from:
                $ref: '#/components/schemas/Rollout'
              to:
                $ref: '#/components/schemas/Rollout'
    AdvancedConfigResponse:
      type: object
      additionalProperties: false
      required:
      - schemaVersion
      - config
      - privacy
      - delivery
      - ttlSeconds
      - migration
      properties:
        schemaVersion:
          const: 1
        config:
          $ref: '#/components/schemas/AdvancedConfigurationDocument'
        privacy:
          type: object
          additionalProperties: false
          required:
          - allowedContextAttributes
          properties:
            allowedContextAttributes:
              type: array
              items:
                type: string
        delivery:
          enum:
          - server
          - client
          - management
        ttlSeconds:
          type: integer
          minimum: 0
        migration:
          type: object
          additionalProperties: false
          required:
          - legacyComposed
          - storedAdvancedConfig
          properties:
            legacyComposed:
              const: true
            storedAdvancedConfig:
              type: boolean
    AdvancedSegmentResource:
      type: object
      additionalProperties: false
      properties:
        included:
          type: array
          items:
            type: string
        excluded:
          type: array
          items:
            type: string
        rules:
          type: array
          items:
            $ref: '#/components/schemas/TargetingExpression'
        schedule:
          $ref: '#/components/schemas/Schedule'
        visibility:
          type: string
          enum:
          - server
          - client
        description:
          type: string
    InspectionContext:
      type: object
      additionalProperties: false
      required:
      - targetingKey
      properties:
        targetingKey:
          type: string
          minLength: 1
          maxLength: 512
        attributes:
          type: object
          maxProperties: 100
          propertyNames:
            minLength: 1
            maxLength: 128
          additionalProperties:
            $ref: '#/components/schemas/InspectionJsonValue'
    InspectionResource:
      type: object
      additionalProperties: false
      required:
      - kind
      - key
      properties:
        kind:
          enum:
          - flag
          - segment
        key:
          type: string
          minLength: 1
          maxLength: 256
    ConfigInspectionExplainResponse:
      allOf:
      - $ref: '#/components/schemas/InspectionResponseBase'
      - type: object
        required:
        - operation
        - result
        properties:
          operation:
            const: explain
          result:
            $ref: '#/components/schemas/InspectionExplanation'
      unevaluatedProperties: false
    Rollout:
      type: object
      additionalProperties: false
      required:
      - variations
      properties:
        variations:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/WeightedVariation'
        bucketBy:
          type: string
          minLength: 1
        salt:
          type: string
    InspectionCurrentDocument:
      type: object
      additionalProperties: false
      required:
      - kind
      properties:
        kind:
          const: current
    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
    Schedule:
      type: object
      additionalProperties: false
      properties:
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key