statsig Keys API

Manage API keys for the project including server secret keys, client SDK keys, and console API keys.

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /keys List the project's API keys · List all API keys #
Ask an LLM
“Which server secret, client SDK and console API keys does my Statsig project have?”
“Can I audit all the API keys issued for our project?”
Tell an agent
List all API keys in my project.
Show every server, client and console key we have.
GET /console/v1/keys List keys by target app or environment · List Keys #
Ask an LLM
“Which keys are scoped to a given target app?”
“Can I see only the keys used in production?”
Tell an agent
List keys for target app {primaryTargetApp}.
Show keys in environment {environment}, page {page}, {limit} per page.
POST /console/v1/keys Create an API key · Create Key #
Ask an LLM
“How do I generate a new server secret or client key?”
“Can a new key be limited to certain environments and scopes?”
Tell an agent
Create a {type} key described as {description}.
Create a {type} key {description} with scopes {scopes} for environments {environments}.
GET /console/v1/keys/{id} Read one API key · Read Key #
Ask an LLM
“What scopes and environments does a specific key have?”
“Is a particular key still active?”
Tell an agent
Show the details of key {id}.
Look up key {id} and its scopes.
PATCH /console/v1/keys/{id} Update a key's scopes or environments · Update Key #
Ask an LLM
“Can I change the scopes on an existing key?”
“Is it possible to move a key to another target app?”
Tell an agent
Change the scopes on key {id} to {scopes}.
Point key {id} at target app {targetAppID} and environments {environments}.
DELETE /console/v1/keys/{id} Delete an API key · Delete Key #
Ask an LLM
“Can I permanently delete a key that leaked?”
“What's the way to get rid of an unused key entirely?”
Tell an agent destructive · confirm first
Delete key {id}.
Permanently remove API key {id}.
PATCH /console/v1/keys/{id}/deactivate Deactivate an API key · Deactivate Key #
Ask an LLM
“Can I switch off a key without deleting it?”
“How would I stop a key from working right away?”
Tell an agent destructive · confirm first
Deactivate key {id}.
Turn off API key {id} so it can no longer be used.
PATCH /console/v1/keys/{id}/rotate Rotate an API key · Rotate Key #
Ask an LLM
“What's the process for rotating a key's secret value?”
“Can I issue a fresh secret for an existing key?”
Tell an agent destructive · confirm first
Rotate key {id}.
Generate a new secret for key {id}, replacing the current one.

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/statsig:statsig-keys-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

statsig-keys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Statsig Keys API
  version: '1.0'
  description: 'Operations tagged Keys across 2 of this provider''s published API definitions: statsig-console-api-openapi.yml, statsig-keys-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://statsigapi.net/console/v1
  description: Statsig Console API Server
- url: https://statsigapi.net
tags:
- name: Keys
  description: Manage API keys for the project including server secret keys, client SDK keys, and console API keys.
paths:
  /keys:
    get:
      operationId: listKeys
      summary: List all API keys
      description: Retrieves a list of all API keys in the project including server secret keys, client SDK keys, and console API keys.
      tags:
      - Keys
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      responses:
        '200':
          description: List of API keys
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApiKey'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
      - consoleApiKey: []
    servers:
    - url: https://statsigapi.net/console/v1
      description: Statsig Console API Server
  /console/v1/keys:
    servers:
    - url: https://statsigapi.net
    get:
      summary: List Keys
      parameters:
      - name: primaryTargetApp
        required: false
        in: query
        schema:
          type: string
      - name: environment
        required: false
        in: query
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Results per page
        schema:
          example: 10
          oneOf:
          - type: string
          - type: number
          type: integer
      - name: page
        required: false
        in: query
        description: Page number
        schema:
          example: 1
          oneOf:
          - type: string
          - type: number
          type: integer
      responses:
        '200':
          description: Keys listed successfully
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PaginationResponseWithMessage'
                - properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/KeyDto'
                example:
                  message: Keys listed successfully.
                  data:
                  - key: secret-123
                    type: SERVER
                    description: Server secret key
                    scopes: []
                    environments:
                    - production
                    primaryTargetApp: primaryApp
                    secondaryTargetApps:
                    - secondaryApp
                    status: active
                  - key: console-123
                    type: CONSOLE
                    description: Console API key
                    scopes:
                    - omni_read_write
                    - can_access_keys
                    status: active
              example:
                message: Keys listed successfully.
                data:
                - key: secret-123
                  type: SERVER
                  description: Server secret key
                  scopes: []
                  environments:
                  - production
                  primaryTargetApp: primaryApp
                  secondaryTargetApps:
                  - secondaryApp
                  status: active
                - key: console-123
                  type: CONSOLE
                  description: Console API key
                  scopes:
                  - omni_read_write
                  - can_access_keys
                  status: active
        '403':
          description: Insufficient permissions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 403
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Forbidden resource:
                  value:
                    status: 403
                    message: Forbidden. The request was valid, but the server is refusing action. You might not have the necessary permissions to access the resource.
      tags:
      - Keys
      security:
      - STATSIG-API-KEY: []
      operationId: getConsoleV1Keys
      x-operation-id-source: derived
    post:
      summary: Create Key
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyCreateContractDto'
      responses:
        '200':
          description: Key created successfully
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SingleDataResponse'
                - properties:
                    data:
                      $ref: '#/components/schemas/KeyDto'
                example:
                  message: Key created successfully.
                  data:
                    key: secret-123
                    type: SERVER
                    description: Server secret key
                    scopes: []
                    environments:
                    - production
                    primaryTargetApp: primaryApp
                    secondaryTargetApps:
                    - secondaryApp
                    status: active
              example:
                message: Key created successfully.
                data:
                  key: secret-123
                  type: SERVER
                  description: Server secret key
                  scopes: []
                  environments:
                  - production
                  primaryTargetApp: primaryApp
                  secondaryTargetApps:
                  - secondaryApp
                  status: active
        '403':
          description: Insufficient permissions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 403
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Forbidden resource:
                  value:
                    status: 403
                    message: Forbidden. The request was valid, but the server is refusing action. You might not have the necessary permissions to access the resource.
      tags:
      - Keys
      security:
      - STATSIG-API-KEY: []
      operationId: postConsoleV1Keys
      x-operation-id-source: derived
  /console/v1/keys/{id}:
    servers:
    - url: https://statsigapi.net
    get:
      summary: Read Key
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: Key read successfully
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SingleDataResponse'
                - properties:
                    data:
                      $ref: '#/components/schemas/KeyDto'
                example:
                  message: Key read successfully.
                  data:
                    key: secret-123
                    type: SERVER
                    description: Server secret key
                    scopes: []
                    environments:
                    - production
                    primaryTargetApp: primaryApp
                    secondaryTargetApps:
                    - secondaryApp
                    status: active
              example:
                message: Key read successfully.
                data:
                  key: secret-123
                  type: SERVER
                  description: Server secret key
                  scopes: []
                  environments:
                  - production
                  primaryTargetApp: primaryApp
                  secondaryTargetApps:
                  - secondaryApp
                  status: active
        '403':
          description: Insufficient permissions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 403
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Forbidden resource:
                  value:
                    status: 403
                    message: Forbidden. The request was valid, but the server is refusing action. You might not have the necessary permissions to access the resource.
        '404':
          description: Key not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 404
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Not Found:
                  value:
                    status: 404
                    message: Not Found. The requested resource could not be found.
      tags:
      - Keys
      security:
      - STATSIG-API-KEY: []
      operationId: getConsoleV1KeysById
      x-operation-id-source: derived
    patch:
      summary: Update Key
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyUpdateContractDto'
      responses:
        '200':
          description: Key updated successfully
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SingleDataResponse'
                - properties:
                    data:
                      $ref: '#/components/schemas/KeyDto'
                example:
                  message: Key updated successfully.
                  data:
                    environments:
                    - staging
                    targetAppID: primaryApp
                    secondaryTargetAppIDs: null
              example:
                message: Key updated successfully.
                data:
                  environments:
                  - staging
                  targetAppID: primaryApp
                  secondaryTargetAppIDs: null
        '403':
          description: Insufficient permissions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 403
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Forbidden resource:
                  value:
                    status: 403
                    message: Forbidden. The request was valid, but the server is refusing action. You might not have the necessary permissions to access the resource.
        '404':
          description: Key not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 404
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Not Found:
                  value:
                    status: 404
                    message: Not Found. The requested resource could not be found.
      tags:
      - Keys
      security:
      - STATSIG-API-KEY: []
      operationId: patchConsoleV1KeysById
      x-operation-id-source: derived
    delete:
      summary: Delete Key
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: Key deleted successfully
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                example:
                  message: Key deleted successfully.
                  data:
                    key: secret-123
                    type: SERVER
                    description: Server secret key
                    scopes: []
                    environments:
                    - production
                    primaryTargetApp: primaryApp
                    secondaryTargetApps:
                    - secondaryApp
                    status: active
              example:
                message: Key deleted successfully.
                data:
                  key: secret-123
                  type: SERVER
                  description: Server secret key
                  scopes: []
                  environments:
                  - production
                  primaryTargetApp: primaryApp
                  secondaryTargetApps:
                  - secondaryApp
                  status: active
        '403':
          description: Insufficient permissions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 403
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Forbidden resource:
                  value:
                    status: 403
                    message: Forbidden. The request was valid, but the server is refusing action. You might not have the necessary permissions to access the resource.
        '404':
          description: Key not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 404
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Not Found:
                  value:
                    status: 404
                    message: Not Found. The requested resource could not be found.
      tags:
      - Keys
      security:
      - STATSIG-API-KEY: []
      operationId: deleteConsoleV1KeysById
      x-operation-id-source: derived
  /console/v1/keys/{id}/deactivate:
    servers:
    - url: https://statsigapi.net
    patch:
      summary: Deactivate Key
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: Key deactivated successfully
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                example:
                  message: Key deactivated successfully.
                  data:
                    key: secret-123
                    type: SERVER
                    description: Server secret key
                    scopes: []
                    environments:
                    - production
                    primaryTargetApp: primaryApp
                    secondaryTargetApps:
                    - secondaryApp
                    status: active
              example:
                message: Key deactivated successfully.
                data:
                  key: secret-123
                  type: SERVER
                  description: Server secret key
                  scopes: []
                  environments:
                  - production
                  primaryTargetApp: primaryApp
                  secondaryTargetApps:
                  - secondaryApp
                  status: active
        '403':
          description: Insufficient permissions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 403
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Forbidden resource:
                  value:
                    status: 403
                    message: Forbidden. The request was valid, but the server is refusing action. You might not have the necessary permissions to access the resource.
        '404':
          description: Key not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 404
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Not Found:
                  value:
                    status: 404
                    message: Not Found. The requested resource could not be found.
      tags:
      - Keys
      security:
      - STATSIG-API-KEY: []
      operationId: patchConsoleV1KeysByIdDeactivate
      x-operation-id-source: derived
  /console/v1/keys/{id}/rotate:
    servers:
    - url: https://statsigapi.net
    patch:
      summary: Rotate Key
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: Key rotated successfully
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SingleDataResponse'
                - properties:
                    data:
                      $ref: '#/components/schemas/KeyDto'
                example:
                  message: Key rotated successfully,
                  data:
                    key: secret-123
                    type: SERVER
                    description: Server secret key
                    scopes: []
                    environments:
                    - production
                    primaryTargetApp: primaryApp
                    secondaryTargetApps:
                    - secondaryApp
                    status: active
              example:
                message: Key rotated successfully,
                data:
                  key: secret-123
                  type: SERVER
                  description: Server secret key
                  scopes: []
                  environments:
                  - production
                  primaryTargetApp: primaryApp
                  secondaryTargetApps:
                  - secondaryApp
                  status: active
        '403':
          description: Insufficient permissions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 403
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Forbidden resource:
                  value:
                    status: 403
                    message: Forbidden. The request was valid, but the server is refusing action. You might not have the necessary permissions to access the resource.
        '404':
          description: Key not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                    - 404
                  message:
                    type: string
                required:
                - status
                - message
              examples:
                Not Found:
                  value:
                    status: 404
                    message: Not Found. The requested resource could not be found.
      tags:
      - Keys
      security:
      - STATSIG-API-KEY: []
      operationId: patchConsoleV1KeysByIdRotate
      x-operation-id-source: derived
components:
  parameters:
    ApiVersion:
      name: STATSIG-API-VERSION
      in: header
      required: false
      schema:
        type: string
        default: '20240601'
      description: The Console API version. Currently the only version is 20240601.
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error message describing the authentication failure.
  schemas:
    ApiKey:
      type: object
      description: An API key for accessing Statsig services.
      properties:
        key:
          type: string
          description: The API key value (partially masked).
        type:
          type: string
          enum:
          - server
          - client
          - console
          description: The type of API key.
        description:
          type: string
          description: A description of the key purpose.
        createdTime:
          type: integer
          format: int64
          description: Timestamp when the key was created.
    KeyUpdateContractDto:
      type: object
      properties:
        description:
          type: string
          maxLength: 1000
        scopes:
          type: array
          items:
            type: string
            enum:
            - omni_read_only
            - omni_read_write
            - client_download_config_specs
            - none_hash_enabled
            - can_access_keys
            - client_can_write_user_store
            - personal_read_only
            - personal_read_write
        environments:
          type: array
          items:
            type: string
        targetAppID:
          type:
          - string
          - 'null'
        secondaryTargetAppIDs:
          type:
          - array
          - 'null'
          items:
            type: string
    SingleDataResponse:
      type: object
      properties:
        message:
          type: string
          description: A simple string explaining the result of the operation.
        data:
          type: object
          description: A single result.
      required:
      - message
      - data
    KeyDto:
      type: object
      properties:
        key:
          type:
          - string
          - 'null'
        type:
          type: string
          enum:
          - SERVER
          - CLIENT
          - CONSOLE
          - SCIM
          - ORG
        description:
          type: string
        scopes:
          type: array
          items:
            type: string
            enum:
            - omni_read_only
            - omni_read_write
            - client_download_config_specs
            - none_hash_enabled
            - can_access_keys
            - client_can_write_user_store
            - personal_read_only
            - personal_read_write
        environments:
          type: array
          items:
            type: string
        primaryTargetApp:
          type:
          - string
          - 'null'
        secondaryTargetApps:
          type:
          - array
          - 'null'
          items:
            type: string
        status:
          type: string
          enum:
          - active
          - deactivated
        lastUsed:
          type:
          - string
          - 'null'
      required:
      - key
      - type
      - description
      - scopes
      - status
    PaginationResponseWithMessage:
      type: object
      properties:
        message:
          type: string
          description: A simple string explaining the result of the operation.
        data:
          description: Array of results returned by pagination limit.
          type: array
          items:
            type: object
        pagination:
          description: Pagination metadata for checking if there is next page for example.
          allOf:
          - $ref: '#/components/schemas/PaginationResponseMetadataDto'
      required:
      - message
      - data
      - pagination
    PaginationResponseMetadataDto:
      type: object
      properties:
        itemsPerPage:
          type: number
          format: double
        pageNumber:
          type: number
          format: double
        nextPage:
          type:
          - string
          - 'null'
        previousPage:
          type:
          - string
          - 'null'
        totalItems:
          type: number
          format: double
        all:
          type: string
      required:
      - itemsPerPage
      - pageNumber
      - nextPage
      - previousPage
    KeyCreateContractDto:
      type: object
      properties:
        description:
          type: string
          maxLength: 1000
        type:
          type: string
          enum:
          - SERVER
          - CLIENT
          - CONSOLE
          - SCIM
          - ORG
        scopes:
          type: array
          items:
            type: string
            enum:
            - omni_read_only
            - omni_read_write
            - client_download_config_specs
            - none_hash_enabled
            - can_access_keys
            - client_can_write_user_store
            - personal_read_only
            - personal_read_write
        environments:
          type: array
          items:
            type: string
        targetAppID:
          type: string
        secondaryTargetAppIDs:
          type: array
          items:
            type: string
      required:
      - description
      - type
  securitySchemes:
    consoleApiKey:
      type: apiKey
      in: header
      name: STATSIG-API-KEY
      description: Console API Key created in Project Settings > API Keys tab. Required for all Console API requests.
    STATSIG-API-KEY:
      type: apiKey
      name: STATSIG-API-KEY
      in: header
externalDocs:
  description: Statsig Console API Documentation
  url: https://docs.statsig.com/console-api/
x-refined-from:
- statsig-console-api-openapi.yml
- statsig-keys-api-openapi.yml