Superflag Public Config API

The Public Config API from Superflag — 1 operation(s) for public config.

GitHub OpenAPI

Operations 1

GET /api/v1/public-config Get public config #

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-public-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-public-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: Public Config
paths:
  /api/v1/public-config:
    get:
      operationId: getPublicConfig
      description: Client config for an environment pub_ key. doc is the client projection of the composed core config, so React and React Native SDKs evaluate targeting rules on device. Server-visible flags, server segments, metadata, and the context allow-list are omitted.
      security:
      - BearerAuth: []
      responses:
        '200':
          description: 'Client config envelope: appId, env, version, doc, ttlSeconds. doc is the client-visible core config with targeting rules.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicConfigResponse'
        '304':
          description: Authorization-scoped config is unchanged
        '401':
          description: Missing, wrong-type, or revoked environment bearer. Legacy shape keeps string error plus code/message/resolution.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyConfigAuthError'
        '429':
          description: Monthly config sync quota exceeded
        '503':
          description: Config sync metering unavailable
      tags:
      - Public Config
      summary: Get public config
      x-summary-source: derived
components:
  schemas:
    WeightedVariation:
      type: object
      additionalProperties: false
      required:
      - variation
      - weight
      properties:
        variation:
          type: string
          minLength: 1
        weight:
          type: integer
          minimum: 0
          maximum: 100000
    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
    LegacyFlagDocument:
      type: object
      additionalProperties: false
      required:
      - flags
      - overrides
      - rules
      properties:
        flags:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/LegacyFlagResource'
        overrides:
          type: object
          additionalProperties: true
        rules:
          type: object
          additionalProperties: true
    LegacyFlagResource:
      type: object
      additionalProperties: true
      required:
      - type
      - value
      properties:
        type:
          enum:
          - bool
          - string
          - number
          - json
        value:
          oneOf:
          - type: string
          - type: number
          - type: boolean
          - type: array
            items: {}
          - type: object
            additionalProperties: true
        rollout:
          type: object
          properties:
            percentage:
              type: number
              minimum: 0
              maximum: 100
        variants:
          type: array
          items:
            type: object
        clientEnabled:
          type: boolean
    LegacyConfigAuthError:
      type: object
      additionalProperties: false
      required:
      - code
      - message
      - resolution
      - error
      properties:
        code:
          type: string
        message:
          type: string
        resolution:
          type: string
        error:
          type: string
    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
    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
    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
    PublicConfigResponse:
      type: object
      additionalProperties: false
      required:
      - appId
      - env
      - version
      - doc
      - ttlSeconds
      properties:
        appId:
          type: string
          minLength: 1
        env:
          type: string
          minLength: 1
        version:
          type: integer
          minimum: 0
        doc:
          description: 'Client projection of the composed core schema v1 config: client-visible flags with their targeting rules and client segments, for on-device evaluation. source.app equals appId. Falls back to the value-only legacy document only if the stored config cannot be projected.'
          oneOf:
          - $ref: '#/components/schemas/AdvancedConfigurationDocument'
          - $ref: '#/components/schemas/LegacyFlagDocument'
        ttlSeconds:
          type: integer
          minimum: 0
    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
    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'
    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