Statsig Console API

The Statsig Console API enables developers to programmatically manage their Statsig project configuration. It supports full CRUD operations on feature gates, dynamic configs, experiments, segments, layers, and other entities. The API requires a Console API Key and uses versioned endpoints with the STATSIG-API-VERSION header.

OpenAPI Specification

statsig-console-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Statsig Console API
  description: >-
    The Statsig Console API enables developers to programmatically manage
    their Statsig project configuration. It supports full CRUD operations on
    feature gates, dynamic configs, experiments, segments, layers, holdouts,
    autotunes, metrics, keys, users, tags, target apps, audit logs, and other
    entities. The API requires a Console API Key and uses versioned endpoints
    with the STATSIG-API-VERSION header. It is designed for automation
    workflows such as bulk configuration edits, syncing definitions into
    Statsig from external systems, and integrating Statsig management into
    CI/CD pipelines.
  version: '20240601'
  contact:
    name: Statsig Support
    url: https://statsig.com/support
  termsOfService: https://statsig.com/terms
externalDocs:
  description: Statsig Console API Documentation
  url: https://docs.statsig.com/console-api/
servers:
  - url: https://statsigapi.net/console/v1
    description: Statsig Console API Server
tags:
  - name: Audit Logs
    description: >-
      Access audit log entries tracking changes made to project
      configuration through the console or API.
  - name: Autotunes
    description: >-
      Manage autotune configurations that automatically optimize
      parameter values based on a target metric.
  - name: Dynamic Configs
    description: >-
      Manage dynamic configurations with full CRUD operations for
      server-driven configuration values.
  - name: Experiments
    description: >-
      Manage A/B test experiments including creation, configuration,
      starting, resetting, and analysis.
  - name: Gates
    description: >-
      Manage feature gates including creation, updates, rules, overrides,
      enabling, disabling, launching, and archiving.
  - name: Holdouts
    description: >-
      Manage holdout groups that exclude users from receiving specific
      features for measuring long-term impact.
  - name: Keys
    description: >-
      Manage API keys for the project including server secret keys,
      client SDK keys, and console API keys.
  - name: Layers
    description: >-
      Manage layers that enable sharing parameters across multiple
      experiments while maintaining mutual exclusivity.
  - name: Metrics
    description: >-
      Access and manage metric definitions and metric sources used
      in experiment analysis.
  - name: Segments
    description: >-
      Manage user segments for targeting rules across gates, configs,
      and experiments.
  - name: Target Apps
    description: >-
      Manage target application definitions that scope feature
      configurations to specific applications.
  - name: Users
    description: >-
      Manage user data and lookup user properties within the Statsig
      project.
security:
  - consoleApiKey: []
paths:
  /gates:
    get:
      operationId: listGates
      summary: List all gates
      description: >-
        Retrieves a list of all feature gates in the project with their
        current status and configuration.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: List of feature gates
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Gate'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createGate
      summary: Create a gate
      description: >-
        Creates a new feature gate in the project with the specified
        configuration, rules, and targeting conditions.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GateCreate'
      responses:
        '201':
          description: Gate created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gate'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /gates/{id}:
    get:
      operationId: getGate
      summary: Get a gate
      description: >-
        Retrieves the full configuration of a specific feature gate
        including its rules, conditions, and overrides.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      responses:
        '200':
          description: Gate details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gate'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: partiallyUpdateGate
      summary: Partially update a gate
      description: >-
        Updates specific fields of a feature gate without replacing the
        entire configuration.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GateUpdate'
      responses:
        '200':
          description: Gate updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gate'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteGate
      summary: Delete a gate
      description: >-
        Permanently deletes a feature gate from the project. This action
        cannot be undone.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      responses:
        '200':
          description: Gate deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /gates/{id}/enable:
    put:
      operationId: enableGate
      summary: Enable a gate
      description: >-
        Enables a feature gate so that its rules are actively evaluated
        for users.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      responses:
        '200':
          description: Gate enabled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gate'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /gates/{id}/disable:
    put:
      operationId: disableGate
      summary: Disable a gate
      description: >-
        Disables a feature gate so that it returns false for all users
        regardless of rules.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      responses:
        '200':
          description: Gate disabled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gate'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /gates/{id}/launch:
    put:
      operationId: launchGate
      summary: Launch a gate
      description: >-
        Launches a feature gate, indicating the feature has been fully
        rolled out and the gate can be cleaned up.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      responses:
        '200':
          description: Gate launched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gate'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /gates/{id}/archive:
    put:
      operationId: archiveGate
      summary: Archive a gate
      description: >-
        Archives a feature gate, removing it from active use while
        preserving its configuration for reference.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      responses:
        '200':
          description: Gate archived successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gate'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /gates/{id}/rules:
    get:
      operationId: listGateRules
      summary: List gate rules
      description: >-
        Retrieves all rules configured for a specific feature gate.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      responses:
        '200':
          description: List of gate rules
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Rule'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: addGateRule
      summary: Add a gate rule
      description: >-
        Adds a new targeting rule to a feature gate.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Rule'
      responses:
        '201':
          description: Rule added successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateGateRules
      summary: Update gate rules
      description: >-
        Replaces all rules for a feature gate with the provided set of rules.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rules:
                  type: array
                  items:
                    $ref: '#/components/schemas/Rule'
      responses:
        '200':
          description: Rules updated successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /gates/{id}/rules/{ruleID}:
    delete:
      operationId: deleteGateRule
      summary: Delete a gate rule
      description: >-
        Removes a specific targeting rule from a feature gate.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
        - name: ruleID
          in: path
          required: true
          schema:
            type: string
          description: >-
            The identifier of the rule to delete.
      responses:
        '200':
          description: Rule deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /gates/{id}/overrides:
    get:
      operationId: getGateOverrides
      summary: Get gate overrides
      description: >-
        Retrieves the user and ID overrides configured for a feature gate.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      responses:
        '200':
          description: Gate overrides
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Overrides'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: addGateOverrides
      summary: Add gate overrides
      description: >-
        Adds user or ID overrides to a feature gate for forcing specific
        evaluation results.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Overrides'
      responses:
        '200':
          description: Overrides added successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Overrides'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateGateOverrides
      summary: Update gate overrides
      description: >-
        Replaces all overrides for a feature gate with the provided set.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Overrides'
      responses:
        '200':
          description: Overrides updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Overrides'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteGateOverrides
      summary: Delete gate overrides
      description: >-
        Removes all user and ID overrides from a feature gate.
      tags:
        - Gates
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/GateId'
      responses:
        '200':
          description: Overrides deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /dynamic_configs:
    get:
      operationId: listDynamicConfigs
      summary: List all dynamic configs
      description: >-
        Retrieves a list of all dynamic configurations in the project.
      tags:
        - Dynamic Configs
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: List of dynamic configs
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DynamicConfig'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createDynamicConfig
      summary: Create a dynamic config
      description: >-
        Creates a new dynamic configuration in the project with the
        specified default values and rules.
      tags:
        - Dynamic Configs
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DynamicConfigCreate'
      responses:
        '201':
          description: Dynamic config created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicConfig'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /dynamic_configs/{id}:
    get:
      operationId: getDynamicConfig
      summary: Get a dynamic config
      description: >-
        Retrieves the full configuration of a specific dynamic config
        including its default values, rules, and conditions.
      tags:
        - Dynamic Configs
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/DynamicConfigId'
      responses:
        '200':
          description: Dynamic config details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicConfig'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: partiallyUpdateDynamicConfig
      summary: Partially update a dynamic config
      description: >-
        Updates specific fields of a dynamic config without replacing
        the entire configuration.
      tags:
        - Dynamic Configs
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/DynamicConfigId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DynamicConfigUpdate'
      responses:
        '200':
          description: Dynamic config updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicConfig'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteDynamicConfig
      summary: Delete a dynamic config
      description: >-
        Permanently deletes a dynamic config from the project.
      tags:
        - Dynamic Configs
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/DynamicConfigId'
      responses:
        '200':
          description: Dynamic config deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /dynamic_configs/{id}/rules:
    get:
      operationId: getDynamicConfigRules
      summary: Get dynamic config rules
      description: >-
        Retrieves all rules configured for a specific dynamic config.
      tags:
        - Dynamic Configs
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/DynamicConfigId'
      responses:
        '200':
          description: List of dynamic config rules
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Rule'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /experiments:
    get:
      operationId: listExperiments
      summary: List all experiments
      description: >-
        Retrieves a list of all experiments in the project with their
        current status and configuration.
      tags:
        - Experiments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: List of experiments
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Experiment'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createExperiment
      summary: Create an experiment
      description: >-
        Creates a new experiment in the project with the specified
        hypothesis, groups, and parameter configuration.
      tags:
        - Experiments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExperimentCreate'
      responses:
        '201':
          description: Experiment created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /experiments/{id}:
    get:
      operationId: getExperiment
      summary: Get an experiment
      description: >-
        Retrieves the full configuration of a specific experiment including
        its groups, parameters, hypothesis, and status.
      tags:
        - Experiments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/ExperimentId'
      responses:
        '200':
          description: Experiment details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: partiallyUpdateExperiment
      summary: Partially update an experiment
      description: >-
        Updates specific fields of an experiment without replacing the
        entire configuration.
      tags:
        - Experiments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/ExperimentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExperimentUpdate'
      responses:
        '200':
          description: Experiment updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteExperiment
      summary: Delete an experiment
      description: >-
        Permanently deletes an experiment from the project.
      tags:
        - Experiments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/ExperimentId'
      responses:
        '200':
          description: Experiment deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /experiments/{id}/start:
    put:
      operationId: startExperiment
      summary: Start an experiment
      description: >-
        Starts an experiment, beginning to allocate users to experiment
        groups and logging exposures.
      tags:
        - Experiments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/ExperimentId'
      responses:
        '200':
          description: Experiment started successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /experiments/{id}/reset:
    put:
      operationId: resetExperiment
      summary: Reset an experiment
      description: >-
        Resets an experiment, clearing all collected data and resetting
        user assignments.
      tags:
        - Experiments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/ExperimentId'
      responses:
        '200':
          description: Experiment reset successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /segments:
    get:
      operationId: listSegments
      summary: List all segments
      description: >-
        Retrieves a list of all user segments in the project.
      tags:
        - Segments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: List of segments
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Segment'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createSegment
      summary: Create a segment
      description: >-
        Creates a new user segment in the project for targeting rules.
      tags:
        - Segments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SegmentCreate'
      responses:
        '201':
          description: Segment created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Segment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /segments/{id}:
    get:
      operationId: getSegment
      summary: Get a segment
      description: >-
        Retrieves the full configuration of a specific user segment.
      tags:
        - Segments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: >-
            The name or identifier of the segment.
      responses:
        '200':
          description: Segment details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Segment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: partiallyUpdateSegment
      summary: Partially update a segment
      description: >-
        Updates specific fields of a user segment.
      tags:
        - Segments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: >-
            The name or identifier of the segment.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SegmentCreate'
      responses:
        '200':
          description: Segment updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Segment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteSegment
      summary: Delete a segment
      description: >-
        Permanently deletes a user segment from the project.
      tags:
        - Segments
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: >-
            The name or identifier of the segment.
      responses:
        '200':
          description: Segment deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /layers:
    get:
      operationId: listLayers
      summary: List all layers
      description: >-
        Retrieves a list of all layers in the project.
      tags:
        - Layers
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: List of layers
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Layer'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createLayer
      summary: Create a layer
      description: >-
        Creates a new layer in the project for sharing parameters across
        multiple experiments.
      tags:
        - Layers
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LayerCreate'
      responses:
        '201':
          description: Layer created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Layer'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /layers/{id}:
    get:
      operationId: getLayer
      summary: Get a layer
      description: >-
        Retrieves the full configuration of a specific layer including
        its parameters and associated experiments.
      tags:
        - Layers
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: >-
            The name or identifier of the layer.
      responses:
        '200':
          description: Layer deta

# --- truncated at 32 KB (71 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/statsig/refs/heads/main/openapi/statsig-console-api-openapi.yml