Superflag Events API

The Events API from Superflag — 1 operation(s) for events.

GitHub OpenAPI

Operations 1

POST /api/v1/events/batch Ingest feature events #

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-events-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-events-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: Events
paths:
  /api/v1/events/batch:
    post:
      operationId: ingestFeatureEvents
      security:
      - BearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TelemetryBatchRequest'
      responses:
        '200':
          description: Ordered per-event ingestion results
        '400':
          description: Invalid batch envelope
        '401':
          description: Invalid environment credential
        '413':
          description: Batch body too large
        '429':
          description: Ordered partial results with retry guidance
        '503':
          description: Retryable storage failure
      description: Ingest Feature Events
      tags:
      - Events
      summary: Ingest feature events
      x-summary-source: derived
components:
  schemas:
    FeatureEvent:
      type: object
      additionalProperties: false
      required:
      - schemaVersion
      - id
      - kind
      - source
      - flagKey
      - variation
      - configVersion
      - reason
      - timestamp
      - sdk
      - subject
      properties:
        schemaVersion:
          const: 1
        id:
          type: string
          minLength: 1
          maxLength: 128
        kind:
          type: string
          enum:
          - decision
          - assignment
          - exposure
          - outcome
        source:
          type: object
          additionalProperties: false
          required:
          - app
          - environment
          properties:
            app:
              type: string
              minLength: 1
              maxLength: 96
            environment:
              type: string
              minLength: 1
              maxLength: 96
        flagKey:
          type: string
        variation:
          type: string
        configVersion:
          type: integer
          minimum: 0
        reason:
          type: string
          enum:
          - 'OFF'
          - TARGETING_MATCH
          - SPLIT
          - FALLTHROUGH
          - HOLDBACK
          - PREREQUISITE_FAILED
          - SCHEDULED_OUT
          - DEFAULT
        timestamp:
          type: string
          format: date-time
        sdk:
          type: object
          additionalProperties: false
          required:
          - name
          - version
          - platform
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 96
            version:
              type: string
              minLength: 1
              maxLength: 96
            platform:
              type: string
              enum:
              - browser
              - node
              - react-native
              - expo
              - remote
        subject:
          type: object
          additionalProperties: false
          required:
          - id
          - namespace
          - revision
          - state
          properties:
            id:
              type: string
              pattern: ^psn_[A-Za-z0-9_-]{16,96}$
            namespace:
              type: string
              minLength: 1
              maxLength: 96
            revision:
              type: integer
              minimum: 1
            state:
              type: string
              enum:
              - anonymous
              - authenticated
        experiment:
          type: object
          additionalProperties: false
          required:
          - experimentId
          - iterationId
          properties:
            experimentId:
              type: string
              minLength: 1
              maxLength: 128
            iterationId:
              type: string
              minLength: 1
              maxLength: 128
        dimensions:
          type: object
          maxProperties: 16
          additionalProperties:
            oneOf:
            - type: string
              maxLength: 64
            - type: number
            - type: boolean
        exposureId:
          type: string
        metric:
          type: object
          additionalProperties: false
          required:
          - key
          - revision
          properties:
            key:
              type: string
              minLength: 1
              maxLength: 96
            revision:
              type: integer
              minimum: 1
        value:
          oneOf:
          - type: boolean
          - type: number
      allOf:
      - if:
          properties:
            kind:
              const: assignment
        then:
          required:
          - experiment
      - if:
          properties:
            kind:
              const: outcome
        then:
          required:
          - exposureId
          - metric
          - value
    TelemetryBatchRequest:
      type: object
      additionalProperties: false
      required:
      - schemaVersion
      - events
      properties:
        schemaVersion:
          const: 1
        events:
          type: array
          minItems: 1
          maxItems: 100
          items:
            $ref: '#/components/schemas/FeatureEvent'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key