Superflag Keys API
The Keys API from Superflag — 1 operation(s) for keys.
The Keys API from Superflag — 1 operation(s) for keys.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/superflag-sh:superflag-sh-keys-api"
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.
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: 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: Keys
paths:
/api/v1/keys:
get:
operationId: listKeys
description: List key metadata. List responses never contain plaintext secrets.
security:
- BearerAuth: []
parameters:
- name: appId
in: query
required: true
schema:
type: string
minLength: 1
maxLength: 128
- name: env
in: query
required: false
schema:
type: string
minLength: 1
maxLength: 128
responses:
'200':
description: Key DTOs without secrets
content:
application/json:
schema:
$ref: '#/components/schemas/KeyListResponse'
'400':
description: Missing appId
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing bearer, or a credential that is not cli_/admin_. sdk_/pub_ cannot list keys.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Caller cannot access this app
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Environment not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
tags:
- Keys
summary: List keys
x-summary-source: derived
post:
operationId: createKey
description: Create an sdk_, pub_, or admin_ key. Requires a caller-stable idempotency key. The plaintext token is returned only in this one-time response.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateKeyRequest'
responses:
'201':
description: Created key metadata plus the one-time plaintext token
content:
application/json:
schema:
$ref: '#/components/schemas/KeyCreateResponse'
'400':
description: Invalid key request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing bearer, or a credential that is not cli_/admin_.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Caller cannot access this app
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: App or environment not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'409':
description: Idempotency key reused with different semantics
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
tags:
- Keys
summary: Create key
x-summary-source: derived
patch:
operationId: revokeKey
description: Revoke a key by immutable id. Irreversible.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RevokeKeyRequest'
responses:
'200':
description: Revocation timestamp
content:
application/json:
schema:
$ref: '#/components/schemas/KeyRevokeResponse'
'400':
description: Invalid revoke request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing bearer, or a credential that is not cli_/admin_.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Caller cannot access this app
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Key not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
tags:
- Keys
summary: Revoke key
x-summary-source: derived
components:
schemas:
KeyCreateResponse:
type: object
additionalProperties: false
required:
- apiVersion
- key
- token
- delivery
properties:
apiVersion:
const: 1
key:
$ref: '#/components/schemas/KeyDto'
token:
type: string
minLength: 1
description: One-time plaintext credential. Identical idempotent retries can recover it only during the delivery window.
delivery:
$ref: '#/components/schemas/SecretDelivery'
KeyListResponse:
type: object
additionalProperties: false
required:
- apiVersion
- keys
properties:
apiVersion:
const: 1
keys:
type: array
items:
$ref: '#/components/schemas/KeyDto'
KeyDto:
type: object
additionalProperties: false
required:
- id
- appId
- environmentId
- environmentSlug
- type
- name
- createdAt
- revokedAt
properties:
id:
type: string
minLength: 1
appId:
type: string
minLength: 1
environmentId:
type:
- string
- 'null'
environmentSlug:
type:
- string
- 'null'
type:
enum:
- sdk
- pub
- admin
name:
type: string
minLength: 1
createdAt:
$ref: '#/components/schemas/IsoTimestamp'
revokedAt:
oneOf:
- $ref: '#/components/schemas/IsoTimestamp'
- type: 'null'
RevokeKeyRequest:
type: object
additionalProperties: false
required:
- id
- revoke
properties:
id:
type: string
minLength: 1
revoke:
const: true
KeyRevokeResponse:
type: object
additionalProperties: false
required:
- apiVersion
- success
- revokedAt
properties:
apiVersion:
const: 1
success:
const: true
revokedAt:
$ref: '#/components/schemas/IsoTimestamp'
IsoTimestamp:
type: string
format: date-time
CreateKeyRequest:
type: object
additionalProperties: false
required:
- appId
- type
- idempotencyKey
properties:
appId:
type: string
minLength: 1
env:
type: string
minLength: 1
type:
enum:
- sdk
- pub
- admin
name:
type: string
minLength: 1
maxLength: 100
idempotencyKey:
$ref: '#/components/schemas/IdempotencyKey'
IdempotencyKey:
type: string
minLength: 16
maxLength: 128
pattern: ^[A-Za-z0-9._:-]+$
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
SecretDelivery:
type: object
additionalProperties: false
required:
- idempotencyKey
- replayed
- expiresAt
properties:
idempotencyKey:
$ref: '#/components/schemas/IdempotencyKey'
replayed:
type: boolean
expiresAt:
$ref: '#/components/schemas/IsoTimestamp'
securitySchemes:
BearerAuth:
type: http
scheme: bearer
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key