Superflag Tokens API

The Tokens API from Superflag — 2 operation(s) for tokens.

GitHub OpenAPI

Operations 3

GET /api/v1/tokens List agent tokens #
POST /api/v1/tokens Create agent token #
DELETE /api/v1/tokens/{id} Revoke agent token #

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-tokens-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-tokens-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: Tokens
paths:
  /api/v1/tokens:
    get:
      operationId: listAgentTokens
      description: List agent tokens visible to the caller. A scoped agent token sees only itself; plaintext secrets are never listed.
      security:
      - BearerAuth: []
      responses:
        '200':
          description: Agent token metadata without plaintext credentials
        '401':
          description: Missing or invalid bearer
        '403':
          description: Wrong credential type
      tags:
      - Tokens
      summary: List agent tokens
      x-summary-source: derived
    post:
      operationId: createAgentToken
      description: 'Create a scoped agent token using an unscoped account cli_ credential. Returns the plaintext token once; Cache-Control: no-store.'
      security:
      - BearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - name
              - access
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                access:
                  type: object
                  required:
                  - scope
                  - permission
                  properties:
                    scope:
                      oneOf:
                      - type: object
                        required:
                        - kind
                        properties:
                          kind:
                            const: account
                      - type: object
                        required:
                        - kind
                        - appId
                        properties:
                          kind:
                            const: app
                          appId:
                            type: string
                      - type: object
                        required:
                        - kind
                        - appId
                        - envId
                        properties:
                          kind:
                            const: environment
                          appId:
                            type: string
                          envId:
                            type: string
                    permission:
                      enum:
                      - read
                      - write
                      - read-write
                      - manage
                      - admin
                      description: write and read-write require app or environment scope
                expiresAt:
                  type: integer
                  description: Unix milliseconds; omit for no expiry
      responses:
        '201':
          description: One-time token and metadata; store the token privately
        '400':
          description: Invalid request
        '401':
          description: Missing or invalid bearer
        '403':
          description: Only an unscoped account token may mint
        '404':
          description: App or environment not found
      tags:
      - Tokens
      summary: Create agent token
      x-summary-source: derived
  /api/v1/tokens/{id}:
    delete:
      operationId: revokeAgentToken
      description: Revoke an agent token by immutable ID. A scoped token can revoke only itself.
      security:
      - BearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Token revoked
        '401':
          description: Missing or invalid bearer
        '403':
          description: Caller cannot revoke this token
        '404':
          description: Token not found
      tags:
      - Tokens
      summary: Revoke agent token
      x-summary-source: derived
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key