openapi: 3.1.0
info:
  version: 1.0.0
  title: GrowthBook REST API
  description: >
    GrowthBook offers a full REST API for interacting with the application.


    Request data can use either JSON or Form data encoding (with proper
    `Content-Type` headers). All response bodies are JSON-encoded.


    The API base URL for GrowthBook Cloud is `https://api.growthbook.io/api`.
    For self-hosted deployments, it is the same as your API_HOST environment
    variable (defaults to `http://localhost:3100/api`). The rest of these docs
    will assume you are using GrowthBook Cloud.


    ## Versioning


    Endpoints are versioned by path prefix:


    - `/v1/...` — stable, widely-supported endpoints

    - `/v2/...` — updated endpoints with improved shapes (e.g. unified per-rule
    environment scope for feature flags)


    New integrations should prefer v2 where available.


    ## Authentication


    We support both the HTTP Basic and Bearer authentication schemes for
    convenience.


    You first need to generate a new API Key in GrowthBook. Different keys have
    different permissions:


    - **Personal Access Tokens**: These are sensitive and provide the same level
    of access as the user has to an organization. These can be created by going
    to `Personal Access Tokens` under the your user menu.

    - **Secret Keys**: These are sensitive and provide the level of access for
    the role, which currently is either `admin` or `readonly`. Only Admins with
    the `manageApiKeys` permission can manage Secret Keys on behalf of an
    organization. These can be created by going to `Settings -> API Keys`


    If using HTTP Basic auth, pass the Secret Key as the username and leave the
    password blank (when using curl, add `:` at the end of the secret to
    indicate an empty password)


    ```bash

    curl https://api.growthbook.io/api/v1/features \
      -u secret_abc123DEF456:
    ```


    If using Bearer auth, pass the Secret Key as the token:


    ```bash

    curl https://api.growthbook.io/api/v1/features \

    -H "Authorization: Bearer secret_abc123DEF456"

    ```


    ## Errors


    The API may return the following error status codes:


    - **400** - Bad Request - Often due to a missing required parameter

    - **401** - Unauthorized - No valid API key provided

    - **402** - Request Failed - The parameters are valid, but the request
    failed

    - **403** - Forbidden - Provided API key does not have the required access

    - **404** - Not Found - Unknown API route or requested resource

    - **429** - Too Many Requests - You exceeded the rate limit of 60 requests
    per minute. Try again later.

    - **5XX** - Server Error - Something went wrong on GrowthBook's end (these
    are rare)


    The response body will be a JSON object with the following properties:


    - **message** - Information about the error
servers:
  - url: https://api.growthbook.io/api
    description: GrowthBook Cloud
  - url: https://{domain}/api
    description: Self-hosted GrowthBook
tags:
  - name: projects
    x-displayName: Projects
    description: Projects are used to organize your feature flags and experiments
  - name: environments
    x-displayName: Environments
    description: >-
      GrowthBook comes with one environment by default (production), but you can
      add as many as you need. When used with feature flags, you can
      enable/disable feature flags on a per-environment basis.
  - name: features-v2
    x-displayName: Feature Flags
    description: >-
      Control your feature flags programatically.


      Rules are returned as a unified top-level array; each rule carries
      `allEnvironments` / `environments` scope fields instead of being bucketed
      by environment.
  - name: feature-revisions-v2
    x-displayName: Feature Revisions
    description: >-
      Draft revisions for feature flags, including rules, scheduling, and
      approval workflows.


      Revision `rules` is a flat array with per-rule scope fields.
  - name: features
    x-displayName: Feature Flags (legacy)
    description: >-
      Control your feature flags programatically.


      **These are v1 endpoints.** New integrations should use the v2 Feature
      Flags endpoints, which expose a unified per-rule environment scope instead
      of per-environment rule arrays.
  - name: feature-revisions
    x-displayName: Feature Revisions (legacy)
    description: >-
      Draft revisions for feature flags, including rules, scheduling, and
      approval workflows.


      **These are v1 endpoints.** New integrations should use the v2 Feature
      Revisions endpoints.
  - name: ramp-schedules
    x-displayName: Ramp Schedules
    description: >-
      Multi-step rollout schedules that gradually ramp feature rule changes over
      time, with support for interval, approval, and scheduled triggers.
  - name: data-sources
    x-displayName: Data Sources
    description: >-
      How GrowthBook connects and queries your data, including cached database
      schema metadata (information schemas) for tables and columns.
  - name: fact-tables
    x-displayName: Fact Tables
    description: Fact Tables describe the shape of your data warehouse tables
  - name: fact-metrics
    x-displayName: Fact Metrics
    description: Fact Metrics are metrics built on top of Fact Table definitions
  - name: metrics
    x-displayName: Metrics (legacy)
    description: Metrics used as goals and guardrails for experiments
  - name: experiments
    x-displayName: Experiments
    description: Experiments (A/B Tests)
  - name: namespaces
    x-displayName: Namespaces
    description: >-
      Namespaces partition your user population into buckets so that experiments
      using the same hash attribute do not overlap unintentionally. Each
      namespace defines a 0–1 range and individual experiments claim sub-ranges
      within it.
  - name: snapshots
    x-displayName: Experiment Snapshots
    description: Experiment Snapshots (the individual updates of an experiment)
  - name: dimensions
    x-displayName: Dimensions
    description: Dimensions used during experiment analysis
  - name: segments
    x-displayName: Segments
    description: Segments used during experiment analysis
  - name: sdk-connections
    x-displayName: SDK Connections
    description: Client keys and settings for connecting SDKs to a GrowthBook instance
  - name: visual-changesets
    x-displayName: Visual Changesets
    description: Groups of visual changes made by the visual editor to a single page
  - name: saved-groups
    x-displayName: Saved Groups
    description: >-
      Defined sets of attribute values which can be used with feature rules for
      targeting features at particular users.
  - name: organizations
    x-displayName: Organizations
    description: >-
      Organizations are used for multi-org deployments where different teams can
      run their own isolated feature flags and experiments. These endpoints are
      only via a super-admin's Personal Access Token.
  - name: members
    x-displayName: Members
    description: Members are users who have been invited to an organization.
  - name: code-references
    x-displayName: Code References
    description: >-
      Intended for use with our code reference CI utility,
      [`gb-find-code-refs`](https://github.com/growthbook/gb-find-code-refs).
  - name: archetypes
    x-displayName: Archetypes
    description: >-
      Archetypes allow you to simulate the result of targeting rules on pre-set
      user attributes
  - name: queries
    x-displayName: Queries
    description: Retrieve queries used in experiments to calculate results.
  - name: settings
    x-displayName: Settings
    description: Get the organization settings.
  - name: attributes
    x-displayName: Attributes
    description: Used when targeting feature flags and experiments.
  - name: usage
    x-displayName: Usage
    description: Usage information for metrics in experiments.
  - name: Dashboards
    x-displayName: Dashboards
    description: ''
  - name: CustomFields
    x-displayName: Custom Fields
    description: ''
  - name: MetricGroups
    x-displayName: Metric Groups
    description: ''
  - name: Teams
    x-displayName: Teams
    description: ''
  - name: ExperimentTemplates
    x-displayName: Experiment Templates
    description: ''
  - name: AnalyticsExplorations
    x-displayName: Analytics Explorations
    description: ''
  - name: RampScheduleTemplates
    x-displayName: Ramp Schedule Templates
    description: Reusable step configurations for ramp schedules.
  - name: AnalyticsExploration_model
    x-displayName: AnalyticsExploration
    description: <SchemaDefinition schemaRef="#/components/schemas/AnalyticsExploration" />
  - name: Archetype_model
    x-displayName: Archetype
    description: <SchemaDefinition schemaRef="#/components/schemas/Archetype" />
  - name: Attribute_model
    x-displayName: Attribute
    description: <SchemaDefinition schemaRef="#/components/schemas/Attribute" />
  - name: CodeRef_model
    x-displayName: CodeRef
    description: <SchemaDefinition schemaRef="#/components/schemas/CodeRef" />
  - name: CustomField_model
    x-displayName: CustomField
    description: <SchemaDefinition schemaRef="#/components/schemas/CustomField" />
  - name: Dashboard_model
    x-displayName: Dashboard
    description: <SchemaDefinition schemaRef="#/components/schemas/Dashboard" />
  - name: DataSource_model
    x-displayName: DataSource
    description: <SchemaDefinition schemaRef="#/components/schemas/DataSource" />
  - name: Dimension_model
    x-displayName: Dimension
    description: <SchemaDefinition schemaRef="#/components/schemas/Dimension" />
  - name: Environment_model
    x-displayName: Environment
    description: <SchemaDefinition schemaRef="#/components/schemas/Environment" />
  - name: Experiment_model
    x-displayName: Experiment
    description: <SchemaDefinition schemaRef="#/components/schemas/Experiment" />
  - name: ExperimentAnalysisSettings_model
    x-displayName: ExperimentAnalysisSettings
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/ExperimentAnalysisSettings" />
  - name: ExperimentDecisionFrameworkSettings_model
    x-displayName: ExperimentDecisionFrameworkSettings
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/ExperimentDecisionFrameworkSettings" />
  - name: ExperimentMetric_model
    x-displayName: ExperimentMetric
    description: <SchemaDefinition schemaRef="#/components/schemas/ExperimentMetric" />
  - name: ExperimentMetricOverrideEntry_model
    x-displayName: ExperimentMetricOverrideEntry
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/ExperimentMetricOverrideEntry" />
  - name: ExperimentResults_model
    x-displayName: ExperimentResults
    description: <SchemaDefinition schemaRef="#/components/schemas/ExperimentResults" />
  - name: ExperimentSnapshot_model
    x-displayName: ExperimentSnapshot
    description: <SchemaDefinition schemaRef="#/components/schemas/ExperimentSnapshot" />
  - name: ExperimentTemplate_model
    x-displayName: ExperimentTemplate
    description: <SchemaDefinition schemaRef="#/components/schemas/ExperimentTemplate" />
  - name: ExperimentWithEnhancedStatus_model
    x-displayName: ExperimentWithEnhancedStatus
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/ExperimentWithEnhancedStatus" />
  - name: FactMetric_model
    x-displayName: FactMetric
    description: <SchemaDefinition schemaRef="#/components/schemas/FactMetric" />
  - name: FactTable_model
    x-displayName: FactTable
    description: <SchemaDefinition schemaRef="#/components/schemas/FactTable" />
  - name: FactTableColumn_model
    x-displayName: FactTableColumn
    description: <SchemaDefinition schemaRef="#/components/schemas/FactTableColumn" />
  - name: FactTableFilter_model
    x-displayName: FactTableFilter
    description: <SchemaDefinition schemaRef="#/components/schemas/FactTableFilter" />
  - name: Feature_model
    x-displayName: Feature
    description: <SchemaDefinition schemaRef="#/components/schemas/Feature" />
  - name: FeatureBaseRule_model
    x-displayName: FeatureBaseRule
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureBaseRule" />
  - name: FeatureDefinition_model
    x-displayName: FeatureDefinition
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureDefinition" />
  - name: FeatureEnvironment_model
    x-displayName: FeatureEnvironment
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureEnvironment" />
  - name: FeatureEnvironmentV2_model
    x-displayName: FeatureEnvironmentV2
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureEnvironmentV2" />
  - name: FeatureExperimentRefRule_model
    x-displayName: FeatureExperimentRefRule
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/FeatureExperimentRefRule" />
  - name: FeatureExperimentRule_model
    x-displayName: FeatureExperimentRule
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/FeatureExperimentRule"
      />
  - name: FeatureForceRule_model
    x-displayName: FeatureForceRule
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureForceRule" />
  - name: FeatureRevision_model
    x-displayName: FeatureRevision
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureRevision" />
  - name: FeatureRevisionV2_model
    x-displayName: FeatureRevisionV2
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureRevisionV2" />
  - name: FeatureRolloutRule_model
    x-displayName: FeatureRolloutRule
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureRolloutRule" />
  - name: FeatureRule_model
    x-displayName: FeatureRule
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureRule" />
  - name: FeatureRuleV2_model
    x-displayName: FeatureRuleV2
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureRuleV2" />
  - name: FeatureSafeRolloutRule_model
    x-displayName: FeatureSafeRolloutRule
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/FeatureSafeRolloutRule"
      />
  - name: FeatureV2_model
    x-displayName: FeatureV2
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureV2" />
  - name: FeatureWithRevisions_model
    x-displayName: FeatureWithRevisions
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureWithRevisions" />
  - name: FeatureWithRevisionsV2_model
    x-displayName: FeatureWithRevisionsV2
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/FeatureWithRevisionsV2"
      />
  - name: InformationSchema_model
    x-displayName: InformationSchema
    description: <SchemaDefinition schemaRef="#/components/schemas/InformationSchema" />
  - name: InformationSchemaTable_model
    x-displayName: InformationSchemaTable
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/InformationSchemaTable"
      />
  - name: LookbackOverride_model
    x-displayName: LookbackOverride
    description: <SchemaDefinition schemaRef="#/components/schemas/LookbackOverride" />
  - name: Member_model
    x-displayName: Member
    description: <SchemaDefinition schemaRef="#/components/schemas/Member" />
  - name: Metric_model
    x-displayName: Metric
    description: <SchemaDefinition schemaRef="#/components/schemas/Metric" />
  - name: MetricAnalysis_model
    x-displayName: MetricAnalysis
    description: <SchemaDefinition schemaRef="#/components/schemas/MetricAnalysis" />
  - name: MetricGroup_model
    x-displayName: MetricGroup
    description: <SchemaDefinition schemaRef="#/components/schemas/MetricGroup" />
  - name: MetricUsage_model
    x-displayName: MetricUsage
    description: <SchemaDefinition schemaRef="#/components/schemas/MetricUsage" />
  - name: Namespace_model
    x-displayName: Namespace
    description: <SchemaDefinition schemaRef="#/components/schemas/Namespace" />
  - name: NamespaceExperimentMember_model
    x-displayName: NamespaceExperimentMember
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/NamespaceExperimentMember" />
  - name: Organization_model
    x-displayName: Organization
    description: <SchemaDefinition schemaRef="#/components/schemas/Organization" />
  - name: PaginationFields_model
    x-displayName: PaginationFields
    description: <SchemaDefinition schemaRef="#/components/schemas/PaginationFields" />
  - name: Project_model
    x-displayName: Project
    description: <SchemaDefinition schemaRef="#/components/schemas/Project" />
  - name: Query_model
    x-displayName: Query
    description: <SchemaDefinition schemaRef="#/components/schemas/Query" />
  - name: RampSchedule_model
    x-displayName: RampSchedule
    description: <SchemaDefinition schemaRef="#/components/schemas/RampSchedule" />
  - name: RampScheduleTemplate_model
    x-displayName: RampScheduleTemplate
    description: <SchemaDefinition schemaRef="#/components/schemas/RampScheduleTemplate" />
  - name: SavedGroup_model
    x-displayName: SavedGroup
    description: <SchemaDefinition schemaRef="#/components/schemas/SavedGroup" />
  - name: ScheduleRule_model
    x-displayName: ScheduleRule
    description: <SchemaDefinition schemaRef="#/components/schemas/ScheduleRule" />
  - name: SdkConnection_model
    x-displayName: SdkConnection
    description: <SchemaDefinition schemaRef="#/components/schemas/SdkConnection" />
  - name: Segment_model
    x-displayName: Segment
    description: <SchemaDefinition schemaRef="#/components/schemas/Segment" />
  - name: Settings_model
    x-displayName: Settings
    description: <SchemaDefinition schemaRef="#/components/schemas/Settings" />
  - name: Team_model
    x-displayName: Team
    description: <SchemaDefinition schemaRef="#/components/schemas/Team" />
  - name: VisualChange_model
    x-displayName: VisualChange
    description: <SchemaDefinition schemaRef="#/components/schemas/VisualChange" />
  - name: VisualChangeset_model
    x-displayName: VisualChangeset
    description: <SchemaDefinition schemaRef="#/components/schemas/VisualChangeset" />
security:
  - bearerAuth: []
  - basicAuth: []
paths:
  /v1/features:
    get:
      operationId: listFeatures
      summary: Get all features
      description: >
        **Deprecated.** Use [GET /v2/features](#operation/listFeaturesV2)
        instead.


        Returns features with pagination. The skipPagination query parameter is

        honored only when API_ALLOW_SKIP_PAGINATION is set (self-hosted
        deployments).
      deprecated: true
      tags:
        - features
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/projectId'
        - $ref: '#/components/parameters/clientKey'
        - $ref: '#/components/parameters/skipPagination'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      features:
                        type: array
                        items:
                          $ref: '#/components/schemas/Feature'
                    required:
                      - features
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/features' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postFeature
      summary: Create a single feature
      description: >-
        **Deprecated.** Use [POST /v2/features](#operation/postFeatureV2)
        instead.
      deprecated: true
      tags:
        - features
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  description: >-
                    A unique key name for the feature. Feature keys can only
                    include letters, numbers, hyphens, and underscores.
                  type: string
                  minLength: 1
                archived:
                  type: boolean
                description:
                  description: Description of the feature
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                project:
                  description: An associated project ID
                  type: string
                valueType:
                  description: The data type of the feature payload. Boolean by default.
                  type: string
                  enum:
                    - boolean
                    - string
                    - number
                    - json
                defaultValue:
                  description: >-
                    Default value when feature is enabled. Type must match
                    `valueType`.
                  type: string
                tags:
                  description: List of associated tags
                  type: array
                  items:
                    type: string
                environments:
                  description: >-
                    A dictionary of environments that are enabled for this
                    feature. Keys supply the names of environments. Environments
                    belong to organization and are not specified will be
                    disabled by default.
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                      rules:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                description:
                                  type: string
                                condition:
                                  description: Applied to everyone by default.
                                  type: string
                                savedGroupTargeting:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      matchType:
                                        type: string
                                        enum:
                                          - all
                                          - any
                                          - none
                                      savedGroups:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - matchType
                                      - savedGroups
                                    additionalProperties: false
                                prerequisites:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        description: Feature ID
                                        type: string
                                      condition:
                                        type: string
                                    required:
                                      - id
                                      - condition
                                    additionalProperties: false
                                scheduleRules:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/ScheduleRule'
                                id:
                                  type: string
                                enabled:
                                  description: Enabled by default
                                  type: boolean
                                type:
                                  type: string
                                  const: force
                                value:
                                  type: string
                              required:
                                - type
                                - value
                              additionalProperties: false
                            - type: object
                              properties:
                                description:
                                  type: string
                                condition:
                                  description: Applied to everyone by default.
                                  type: string
                                savedGroupTargeting:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      matchType:
                                        type: string
                                        enum:
                                          - all
                                          - any
                                          - none
                                      savedGroups:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - matchType
                                      - savedGroups
                                    additionalProperties: false
                                prerequisites:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        description: Feature ID
                                        type: string
                                      condition:
                                        type: string
                                    required:
                                      - id
                                      - condition
                                    additionalProperties: false
                                scheduleRules:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/ScheduleRule'
                                id:
                                  type: string
                                enabled:
                                  description: Enabled by default
                                  type: boolean
                                type:
                                  type: string
                                  const: rollout
                                value:
                                  type: string
                                coverage:
                                  description: >-
                                    Percent of traffic included in this
                                    experiment. Users not included in the
                                    experiment will skip this rule.
                                  type: number
                                hashAttribute:
                                  type: string
                              required:
                                - type
                                - value
                                - coverage
                                - hashAttribute
                              additionalProperties: false
                            - type: object
                              properties:
                                description:
                                  type: string
                                id:
                                  type: string
                                enabled:
                                  description: Enabled by default
                                  type: boolean
                                type:
                                  type: string
                                  const: experiment-ref
                                condition:
                                  type: string
                                savedGroupTargeting:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      matchType:
                                        type: string
                                        enum:
                                          - all
                                          - any
                                          - none
                                      savedGroups:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - matchType
                                      - savedGroups
                                    additionalProperties: false
                                prerequisites:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        description: Feature ID
                                        type: string
                                      condition:
                                        type: string
                                    required:
                                      - id
                                      - condition
                                    additionalProperties: false
                                scheduleRules:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/ScheduleRule'
                                variations:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      value:
                                        type: string
                                      variationId:
                                        type: string
                                    required:
                                      - value
                                      - variationId
                                    additionalProperties: false
                                experimentId:
                                  type: string
                              required:
                                - type
                                - variations
                                - experimentId
                              additionalProperties: false
                            - type: object
                              properties:
                                description:
                                  type: string
                                condition:
                                  type: string
                                id:
                                  type: string
                                enabled:
                                  description: Enabled by default
                                  type: boolean
                                type:
                                  type: string
                                  const: experiment
                                trackingKey:
                                  type: string
                                hashAttribute:
                                  type: string
                                fallbackAttribute:
                                  type: string
                                disableStickyBucketing:
                                  type: boolean
                                bucketVersion:
                                  type: number
                                minBucketVersion:
                                  type: number
                                namespace:
                                  type: object
                                  properties:
                                    enabled:
                                      type: boolean
                                    name:
                                      type: string
                                    range:
                                      minItems: 2
                                      maxItems: 2
                                      type: array
                                      items:
                                        type: number
                                  required:
                                    - enabled
                                    - name
                                    - range
                                  additionalProperties: false
                                coverage:
                                  type: number
                                prerequisites:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        description: Feature ID
                                        type: string
                                      condition:
                                        type: string
                                    required:
                                      - id
                                      - condition
                                    additionalProperties: false
                                scheduleRules:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/ScheduleRule'
                                values:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      value:
                                        type: string
                                      weight:
                                        type: number
                                      name:
                                        type: string
                                    required:
                                      - value
                                      - weight
                                    additionalProperties: false
                                value:
                                  deprecated: true
                                  description: >-
                                    Support passing values under the value key
                                    as that was the original spec for
                                    FeatureExperimentRules
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      value:
                                        type: string
                                      weight:
                                        type: number
                                      name:
                                        type: string
                                    required:
                                      - value
                                      - weight
                                    additionalProperties: false
                              required:
                                - condition
                                - type
                              additionalProperties: false
                      definition:
                        description: >-
                          A JSON stringified
                          [FeatureDefinition](#tag/FeatureDefinition_model)
                        type: string
                      draft:
                        description: Use to write draft changes without publishing them.
                        type: object
                        properties:
                          enabled:
                            type: boolean
                          rules:
                            type: array
                            items:
                              anyOf:
                                - type: object
                                  properties:
                                    description:
                                      type: string
                                    condition:
                                      description: Applied to everyone by default.
                                      type: string
                                    savedGroupTargeting:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          matchType:
                                            type: string
                                            enum:
                                              - all
                                              - any
                                              - none
                                          savedGroups:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - matchType
                                          - savedGroups
                                        additionalProperties: false
                                    prerequisites:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            description: Feature ID
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    scheduleRules:
                                      type: array
                                      items:
                                        $ref: '#/components/schemas/ScheduleRule'
                                    id:
                                      type: string
                                    enabled:
                                      description: Enabled by default
                                      type: boolean
                                    type:
                                      type: string
                                      const: force
                                    value:
                                      type: string
                                  required:
                                    - type
                                    - value
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    description:
                                      type: string
                                    condition:
                                      description: Applied to everyone by default.
                                      type: string
                                    savedGroupTargeting:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          matchType:
                                            type: string
                                            enum:
                                              - all
                                              - any
                                              - none
                                          savedGroups:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - matchType
                                          - savedGroups
                                        additionalProperties: false
                                    prerequisites:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            description: Feature ID
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    scheduleRules:
                                      type: array
                                      items:
                                        $ref: '#/components/schemas/ScheduleRule'
                                    id:
                                      type: string
                                    enabled:
                                      description: Enabled by default
                                      type: boolean
                                    type:
                                      type: string
                                      const: rollout
                                    value:
                                      type: string
                                    coverage:
                                      description: >-
                                        Percent of traffic included in this
                                        experiment. Users not included in the
                                        experiment will skip this rule.
                                      type: number
                                    hashAttribute:
                                      type: string
                                  required:
                                    - type
                                    - value
                                    - coverage
                                    - hashAttribute
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    description:
                                      type: string
                                    id:
                                      type: string
                                    enabled:
                                      description: Enabled by default
                                      type: boolean
                                    type:
                                      type: string
                                      const: experiment-ref
                                    condition:
                                      type: string
                                    savedGroupTargeting:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          matchType:
                                            type: string
                                            enum:
                                              - all
                                              - any
                                              - none
                                          savedGroups:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - matchType
                                          - savedGroups
                                        additionalProperties: false
                                    prerequisites:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            description: Feature ID
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    scheduleRules:
                                      type: array
                                      items:
                                        $ref: '#/components/schemas/ScheduleRule'
                                    variations:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          value:
                                            type: string
                                          variationId:
                                            type: string
                                        required:
                                          - value
                                          - variationId
                                        additionalProperties: false
                                    experimentId:
                                      type: string
                                  required:
                                    - type
                                    - variations
                                    - experimentId
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    description:
                                      type: string
                                    condition:
                                      type: string
                                    id:
                                      type: string
                                    enabled:
                                      description: Enabled by default
                                      type: boolean
                                    type:
                                      type: string
                                      const: experiment
                                    trackingKey:
                                      type: string
                                    hashAttribute:
                                      type: string
                                    fallbackAttribute:
                                      type: string
                                    disableStickyBucketing:
                                      type: boolean
                                    bucketVersion:
                                      type: number
                                    minBucketVersion:
                                      type: number
                                    namespace:
                                      type: object
                                      properties:
                                        enabled:
                                          type: boolean
                                        name:
                                          type: string
                                        range:
                                          minItems: 2
                                          maxItems: 2
                                          type: array
                                          items:
                                            type: number
                                      required:
                                        - enabled
                                        - name
                                        - range
                                      additionalProperties: false
                                    coverage:
                                      type: number
                                    prerequisites:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            description: Feature ID
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    scheduleRules:
                                      type: array
                                      items:
                                        $ref: '#/components/schemas/ScheduleRule'
                                    values:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          value:
                                            type: string
                                          weight:
                                            type: number
                                          name:
                                            type: string
                                        required:
                                          - value
                                          - weight
                                        additionalProperties: false
                                    value:
                                      deprecated: true
                                      description: >-
                                        Support passing values under the value
                                        key as that was the original spec for
                                        FeatureExperimentRules
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          value:
                                            type: string
                                          weight:
                                            type: number
                                          name:
                                            type: string
                                        required:
                                          - value
                                          - weight
                                        additionalProperties: false
                                  required:
                                    - condition
                                    - type
                                  additionalProperties: false
                          definition:
                            description: >-
                              A JSON stringified
                              [FeatureDefinition](#tag/FeatureDefinition_model)
                            type: string
                        required:
                          - rules
                        additionalProperties: false
                    required:
                      - enabled
                      - rules
                    additionalProperties: false
                prerequisites:
                  description: Feature IDs. Each feature must evaluate to `true`
                  type: array
                  items:
                    type: string
                jsonSchema:
                  description: >-
                    Use JSON schema to validate the payload of a JSON-type
                    feature value (enterprise only).
                  type: string
                customFields:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
              required:
                - id
                - owner
                - valueType
                - defaultValue
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    $ref: '#/components/schemas/Feature'
                required:
                  - feature
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/features' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}:
    get:
      operationId: getFeature
      summary: Get a single feature
      description: >-
        **Deprecated.** Use [GET /v2/features/:id](#operation/getFeatureV2)
        instead.
      deprecated: true
      tags:
        - features
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/withRevisions'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    $ref: '#/components/schemas/FeatureWithRevisions'
                required:
                  - feature
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/features/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: updateFeature
      summary: Partially update a feature
      description: >
        **Deprecated.** Use [POST /v2/features/:id](#operation/updateFeatureV2)
        instead.


        Updates any combination of a feature's metadata (description, owner,
        tags, project), default value, environment settings (rules, kill
        switches, enabled state), prerequisites, holdout assignment, or JSON
        schema validation. All provided fields are merged into the existing
        feature and the result is immediately published as a new revision.


        Returns 403 if the API key lacks permission or if approval rules are
        enabled for an affected environment and the org setting "REST API always
        bypasses approval requirements" is off.
      deprecated: true
      tags:
        - features
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  description: Description of the feature
                  type: string
                archived:
                  type: boolean
                project:
                  description: An associated project ID
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                defaultValue:
                  type: string
                tags:
                  description: >-
                    List of associated tags. Will override tags completely with
                    submitted list
                  type: array
                  items:
                    type: string
                environments:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                      rules:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                description:
                                  type: string
                                condition:
                                  description: Applied to everyone by default.
                                  type: string
                                savedGroupTargeting:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      matchType:
                                        type: string
                                        enum:
                                          - all
                                          - any
                                          - none
                                      savedGroups:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - matchType
                                      - savedGroups
                                    additionalProperties: false
                                prerequisites:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        description: Feature ID
                                        type: string
                                      condition:
                                        type: string
                                    required:
                                      - id
                                      - condition
                                    additionalProperties: false
                                scheduleRules:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/ScheduleRule'
                                id:
                                  type: string
                                enabled:
                                  description: Enabled by default
                                  type: boolean
                                type:
                                  type: string
                                  const: force
                                value:
                                  type: string
                              required:
                                - type
                                - value
                              additionalProperties: false
                            - type: object
                              properties:
                                description:
                                  type: string
                                condition:
                                  description: Applied to everyone by default.
                                  type: string
                                savedGroupTargeting:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      matchType:
                                        type: string
                                        enum:
                                          - all
                                          - any
                                          - none
                                      savedGroups:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - matchType
                                      - savedGroups
                                    additionalProperties: false
                                prerequisites:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        description: Feature ID
                                        type: string
                                      condition:
                                        type: string
                                    required:
                                      - id
                                      - condition
                                    additionalProperties: false
                                scheduleRules:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/ScheduleRule'
                                id:
                                  type: string
                                enabled:
                                  description: Enabled by default
                                  type: boolean
                                type:
                                  type: string
                                  const: rollout
                                value:
                                  type: string
                                coverage:
                                  description: >-
                                    Percent of traffic included in this
                                    experiment. Users not included in the
                                    experiment will skip this rule.
                                  type: number
                                hashAttribute:
                                  type: string
                              required:
                                - type
                                - value
                                - coverage
                                - hashAttribute
                              additionalProperties: false
                            - type: object
                              properties:
                                description:
                                  type: string
                                id:
                                  type: string
                                enabled:
                                  description: Enabled by default
                                  type: boolean
                                type:
                                  type: string
                                  const: experiment-ref
                                condition:
                                  type: string
                                savedGroupTargeting:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      matchType:
                                        type: string
                                        enum:
                                          - all
                                          - any
                                          - none
                                      savedGroups:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - matchType
                                      - savedGroups
                                    additionalProperties: false
                                prerequisites:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        description: Feature ID
                                        type: string
                                      condition:
                                        type: string
                                    required:
                                      - id
                                      - condition
                                    additionalProperties: false
                                scheduleRules:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/ScheduleRule'
                                variations:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      value:
                                        type: string
                                      variationId:
                                        type: string
                                    required:
                                      - value
                                      - variationId
                                    additionalProperties: false
                                experimentId:
                                  type: string
                              required:
                                - type
                                - variations
                                - experimentId
                              additionalProperties: false
                            - type: object
                              properties:
                                description:
                                  type: string
                                condition:
                                  type: string
                                id:
                                  type: string
                                enabled:
                                  description: Enabled by default
                                  type: boolean
                                type:
                                  type: string
                                  const: experiment
                                trackingKey:
                                  type: string
                                hashAttribute:
                                  type: string
                                fallbackAttribute:
                                  type: string
                                disableStickyBucketing:
                                  type: boolean
                                bucketVersion:
                                  type: number
                                minBucketVersion:
                                  type: number
                                namespace:
                                  type: object
                                  properties:
                                    enabled:
                                      type: boolean
                                    name:
                                      type: string
                                    range:
                                      minItems: 2
                                      maxItems: 2
                                      type: array
                                      items:
                                        type: number
                                  required:
                                    - enabled
                                    - name
                                    - range
                                  additionalProperties: false
                                coverage:
                                  type: number
                                prerequisites:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        description: Feature ID
                                        type: string
                                      condition:
                                        type: string
                                    required:
                                      - id
                                      - condition
                                    additionalProperties: false
                                scheduleRules:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/ScheduleRule'
                                values:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      value:
                                        type: string
                                      weight:
                                        type: number
                                      name:
                                        type: string
                                    required:
                                      - value
                                      - weight
                                    additionalProperties: false
                                value:
                                  deprecated: true
                                  description: >-
                                    Support passing values under the value key
                                    as that was the original spec for
                                    FeatureExperimentRules
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      value:
                                        type: string
                                      weight:
                                        type: number
                                      name:
                                        type: string
                                    required:
                                      - value
                                      - weight
                                    additionalProperties: false
                              required:
                                - condition
                                - type
                              additionalProperties: false
                      definition:
                        description: >-
                          A JSON stringified
                          [FeatureDefinition](#tag/FeatureDefinition_model)
                        type: string
                      draft:
                        description: Use to write draft changes without publishing them.
                        type: object
                        properties:
                          enabled:
                            type: boolean
                          rules:
                            type: array
                            items:
                              anyOf:
                                - type: object
                                  properties:
                                    description:
                                      type: string
                                    condition:
                                      description: Applied to everyone by default.
                                      type: string
                                    savedGroupTargeting:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          matchType:
                                            type: string
                                            enum:
                                              - all
                                              - any
                                              - none
                                          savedGroups:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - matchType
                                          - savedGroups
                                        additionalProperties: false
                                    prerequisites:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            description: Feature ID
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    scheduleRules:
                                      type: array
                                      items:
                                        $ref: '#/components/schemas/ScheduleRule'
                                    id:
                                      type: string
                                    enabled:
                                      description: Enabled by default
                                      type: boolean
                                    type:
                                      type: string
                                      const: force
                                    value:
                                      type: string
                                  required:
                                    - type
                                    - value
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    description:
                                      type: string
                                    condition:
                                      description: Applied to everyone by default.
                                      type: string
                                    savedGroupTargeting:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          matchType:
                                            type: string
                                            enum:
                                              - all
                                              - any
                                              - none
                                          savedGroups:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - matchType
                                          - savedGroups
                                        additionalProperties: false
                                    prerequisites:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            description: Feature ID
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    scheduleRules:
                                      type: array
                                      items:
                                        $ref: '#/components/schemas/ScheduleRule'
                                    id:
                                      type: string
                                    enabled:
                                      description: Enabled by default
                                      type: boolean
                                    type:
                                      type: string
                                      const: rollout
                                    value:
                                      type: string
                                    coverage:
                                      description: >-
                                        Percent of traffic included in this
                                        experiment. Users not included in the
                                        experiment will skip this rule.
                                      type: number
                                    hashAttribute:
                                      type: string
                                  required:
                                    - type
                                    - value
                                    - coverage
                                    - hashAttribute
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    description:
                                      type: string
                                    id:
                                      type: string
                                    enabled:
                                      description: Enabled by default
                                      type: boolean
                                    type:
                                      type: string
                                      const: experiment-ref
                                    condition:
                                      type: string
                                    savedGroupTargeting:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          matchType:
                                            type: string
                                            enum:
                                              - all
                                              - any
                                              - none
                                          savedGroups:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - matchType
                                          - savedGroups
                                        additionalProperties: false
                                    prerequisites:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            description: Feature ID
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    scheduleRules:
                                      type: array
                                      items:
                                        $ref: '#/components/schemas/ScheduleRule'
                                    variations:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          value:
                                            type: string
                                          variationId:
                                            type: string
                                        required:
                                          - value
                                          - variationId
                                        additionalProperties: false
                                    experimentId:
                                      type: string
                                  required:
                                    - type
                                    - variations
                                    - experimentId
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    description:
                                      type: string
                                    condition:
                                      type: string
                                    id:
                                      type: string
                                    enabled:
                                      description: Enabled by default
                                      type: boolean
                                    type:
                                      type: string
                                      const: experiment
                                    trackingKey:
                                      type: string
                                    hashAttribute:
                                      type: string
                                    fallbackAttribute:
                                      type: string
                                    disableStickyBucketing:
                                      type: boolean
                                    bucketVersion:
                                      type: number
                                    minBucketVersion:
                                      type: number
                                    namespace:
                                      type: object
                                      properties:
                                        enabled:
                                          type: boolean
                                        name:
                                          type: string
                                        range:
                                          minItems: 2
                                          maxItems: 2
                                          type: array
                                          items:
                                            type: number
                                      required:
                                        - enabled
                                        - name
                                        - range
                                      additionalProperties: false
                                    coverage:
                                      type: number
                                    prerequisites:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            description: Feature ID
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    scheduleRules:
                                      type: array
                                      items:
                                        $ref: '#/components/schemas/ScheduleRule'
                                    values:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          value:
                                            type: string
                                          weight:
                                            type: number
                                          name:
                                            type: string
                                        required:
                                          - value
                                          - weight
                                        additionalProperties: false
                                    value:
                                      deprecated: true
                                      description: >-
                                        Support passing values under the value
                                        key as that was the original spec for
                                        FeatureExperimentRules
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          value:
                                            type: string
                                          weight:
                                            type: number
                                          name:
                                            type: string
                                        required:
                                          - value
                                          - weight
                                        additionalProperties: false
                                  required:
                                    - condition
                                    - type
                                  additionalProperties: false
                          definition:
                            description: >-
                              A JSON stringified
                              [FeatureDefinition](#tag/FeatureDefinition_model)
                            type: string
                        required:
                          - rules
                        additionalProperties: false
                    required:
                      - enabled
                      - rules
                    additionalProperties: false
                prerequisites:
                  description: Feature IDs. Each feature must evaluate to `true`
                  type: array
                  items:
                    type: string
                jsonSchema:
                  description: >-
                    Use JSON schema to validate the payload of a JSON-type
                    feature value (enterprise only).
                  type: string
                customFields:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                holdout:
                  description: >
                    Holdout to assign this feature to. Pass `null` to remove the
                    feature from its current holdout. Omit the field entirely to
                    leave the holdout unchanged.
                  anyOf:
                    - type: object
                      properties:
                        id:
                          description: Holdout ID
                          type: string
                        value:
                          description: >-
                            The feature value assigned to users in the holdout
                            treatment group
                          type: string
                      required:
                        - id
                        - value
                      additionalProperties: false
                    - type: 'null'
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    $ref: '#/components/schemas/Feature'
                required:
                  - feature
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/features/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteFeature
      summary: Deletes a single feature
      description: >
        **Deprecated.** Use [DELETE
        /v2/features/:id](#operation/deleteFeatureV2) instead.


        Permanently deletes a feature and all of its revisions.


        Archived features can be deleted freely. Deleting a live (non-archived)
        feature returns 403 unless the org setting "REST API always bypasses
        approval requirements" is enabled, or the API key lacks delete
        permission.
      deprecated: true
      tags:
        - features
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    description: The ID of the deleted feature
                    example: feature-123
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X DELETE 'https://api.growthbook.io/api/v1/features/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/toggle:
    post:
      operationId: toggleFeature
      summary: Toggle a feature in one or more environments
      description: >
        **Deprecated.** Use [POST
        /v2/features/:id/toggle](#operation/toggleFeatureV2) instead.


        Enables or disables a feature in one or more environments
        simultaneously. Accepts a map of environment name → boolean and
        immediately publishes the change.


        Returns 403 if the API key lacks permission or if approval rules are
        enabled for an affected environment and the org setting "REST API always
        bypasses approval requirements" is off.
      deprecated: true
      tags:
        - features
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                environments:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    anyOf:
                      - type: boolean
                        const: true
                      - type: boolean
                        const: false
                      - type: string
                        const: 'true'
                      - type: string
                        const: 'false'
                      - type: string
                        const: '1'
                      - type: string
                        const: '0'
                      - type: number
                        const: 1
                      - type: number
                        const: 0
                      - type: string
                        const: ''
              required:
                - environments
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    $ref: '#/components/schemas/Feature'
                required:
                  - feature
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST 'https://api.growthbook.io/api/v1/features/{id}/toggle'
            \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"reason":"Kill switch activated","environments":{"production":false}}'
  /v1/features/{id}/revert:
    post:
      operationId: revertFeature
      summary: Revert a feature to a specific revision
      description: >
        **Deprecated.** Use [POST
        /v2/features/:id/revert](#operation/revertFeatureV2) instead.


        Creates a new revision whose rules and values match a
        previously-published revision, then immediately publishes it. This
        leaves a clear audit trail of the revert action in the revision history.


        Returns 403 if the API key lacks permission or if approval rules are
        enabled for an affected environment and the org setting "REST API always
        bypasses approval requirements" is off.
      deprecated: true
      tags:
        - features
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                revision:
                  type: number
                comment:
                  type: string
              required:
                - revision
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    $ref: '#/components/schemas/Feature'
                required:
                  - feature
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST 'https://api.growthbook.io/api/v1/features/{id}/revert'
            \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"revision":3,"comment":"Bug found"}'
  /v1/feature-keys:
    get:
      operationId: getFeatureKeys
      summary: Get list of feature keys
      description: >-
        **Deprecated.** Use [GET /v2/feature-keys](#operation/getFeatureKeysV2)
        instead.
      deprecated: true
      tags:
        - features
      parameters:
        - $ref: '#/components/parameters/projectId'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/feature-keys' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/stale-features:
    get:
      operationId: getFeatureStale
      summary: Get stale status for one or more features
      description: >-
        **Deprecated.** Use [GET
        /v2/stale-features](#operation/getFeatureStaleV2) instead.
      deprecated: true
      tags:
        - features
      parameters:
        - $ref: '#/components/parameters/ids'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  features:
                    $ref: '#/components/schemas/features'
                required:
                  - features
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/stale-features' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/revisions:
    get:
      operationId: listRevisions
      summary: List feature revisions
      description: >-
        **Deprecated.** Use [GET /v2/revisions](#operation/listRevisionsV2)
        instead.


        Returns a paginated list of feature revisions across all features in the
        organization. Optionally filtered by feature, status, author, and/or the
        calling user's involvement. Results are sorted newest-first.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/skipPagination'
        - $ref: '#/components/parameters/featureId'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/author'
        - $ref: '#/components/parameters/mine'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revisions:
                    type: array
                    items:
                      $ref: '#/components/schemas/FeatureRevision'
                  limit:
                    type: integer
                  offset:
                    type: integer
                  count:
                    type: integer
                  total:
                    type: integer
                  hasMore:
                    type: boolean
                  nextOffset:
                    anyOf:
                      - type: integer
                      - type: 'null'
                required:
                  - revisions
                  - limit
                  - offset
                  - count
                  - total
                  - hasMore
                  - nextOffset
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/revisions' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions:
    get:
      operationId: getFeatureRevisions
      summary: List revisions for a feature
      description: >-
        **Deprecated.** Use [GET
        /v2/features/:id/revisions](#operation/getFeatureRevisionsV2) instead.


        Returns a paginated list of revisions for this feature, sorted
        newest-first. Optionally filtered by status and/or author.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/skipPagination'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/author'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revisions:
                    type: array
                    items:
                      $ref: '#/components/schemas/FeatureRevision'
                  limit:
                    type: integer
                  offset:
                    type: integer
                  count:
                    type: integer
                  total:
                    type: integer
                  hasMore:
                    type: boolean
                  nextOffset:
                    anyOf:
                      - type: integer
                      - type: 'null'
                required:
                  - revisions
                  - limit
                  - offset
                  - count
                  - total
                  - hasMore
                  - nextOffset
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/features/abc123/revisions' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postFeatureRevision
      summary: Create a draft revision
      description: >-
        **Deprecated.** Use [POST
        /v2/features/:id/revisions](#operation/postFeatureRevisionV2) instead.


        Creates a new draft revision branched from the current live revision. A
        feature can have multiple concurrent drafts; use this to start an
        isolated line of edits.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
                title:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/features/{id}/revisions' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/latest:
    get:
      operationId: getFeatureRevisionLatest
      summary: Get the most recent active draft revision
      description: >-
        **Deprecated.** Use [GET
        /v2/features/:id/revisions/latest](#operation/getFeatureRevisionLatestV2)
        instead.


        Returns the most recently updated draft revision for the feature.
        Returns 404 if there is no active draft. Pass `mine=true` to return the
        most recent draft authored by or contributed to by the calling user
        (requires a user-scoped API key).
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: mine
          in: query
          description: >-
            If true, return only the most recent active draft authored by or
            contributed to by the calling user. Requires a user-scoped API key.
          schema:
            description: >-
              If true, return only the most recent active draft authored by or
              contributed to by the calling user. Requires a user-scoped API
              key.
            anyOf:
              - type: string
                const: 'true'
              - type: string
                const: 'false'
              - type: string
                const: '0'
              - type: string
                const: '1'
              - type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/features/{id}/revisions/latest' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}:
    get:
      operationId: getFeatureRevision
      summary: Get a single feature revision
      description: >-
        **Deprecated.** Use [GET
        /v2/features/:id/revisions/:version](#operation/getFeatureRevisionV2)
        instead.


        Returns the revision at the specified version for this feature. Use `GET
        /features/{id}/revisions/latest` for the most recent active draft.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/metadata:
    put:
      operationId: putFeatureRevisionMetadata
      summary: Update revision metadata (comment, title, feature metadata)
      description: >-
        **Deprecated.** Use [PUT
        /v2/features/:id/revisions/:version/metadata](#operation/putFeatureRevisionMetadataV2)
        instead.


        Updates draft-level metadata (`comment`, `title`) and/or feature-level
        metadata (owner, project, tags, customFields, jsonSchema, etc.). Merge
        semantics: omitted fields are left unchanged; any provided field
        replaces the current value (pass an empty string/array/object to clear).
        Feature metadata changes are staged on the revision and applied to the
        feature on publish. Changing `project` requires publish permission on
        both the old and new project.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
                title:
                  type: string
                description:
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                project:
                  type: string
                tags:
                  type: array
                  items:
                    type: string
                neverStale:
                  type: boolean
                customFields:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                jsonSchema:
                  type: object
                  properties:
                    schemaType:
                      type: string
                      enum:
                        - schema
                        - simple
                    schema:
                      type: string
                    simple:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - object
                            - object[]
                            - primitive
                            - primitive[]
                        fields:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                maxLength: 64
                              type:
                                type: string
                                enum:
                                  - integer
                                  - float
                                  - string
                                  - boolean
                              required:
                                type: boolean
                              default:
                                type: string
                                maxLength: 256
                              description:
                                type: string
                                maxLength: 256
                              enum:
                                maxItems: 256
                                type: array
                                items:
                                  type: string
                                  maxLength: 256
                              min:
                                type: number
                              max:
                                type: number
                            required:
                              - key
                              - type
                              - required
                              - default
                              - description
                              - enum
                              - min
                              - max
                            additionalProperties: false
                      required:
                        - type
                        - fields
                      additionalProperties: false
                    date: {}
                    enabled:
                      type: boolean
                  required:
                    - schemaType
                    - schema
                    - simple
                    - date
                    - enabled
                  additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/metadata'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/default-value:
    put:
      operationId: putFeatureRevisionDefaultValue
      summary: Set the default value in a draft revision
      description: >-
        **Deprecated.** Use [PUT
        /v2/features/:id/revisions/:version/default-value](#operation/putFeatureRevisionDefaultValueV2)
        instead.


        Replaces the feature's default value for this revision. The value must
        be a string representation matching the feature's value type (e.g.
        `"true"` for booleans, `42` for numbers, a JSON string for JSON
        features).
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                defaultValue:
                  type: string
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - defaultValue
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/default-value'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/prerequisites:
    put:
      operationId: putFeatureRevisionPrerequisites
      summary: Set feature-level prerequisites in a draft revision
      description: >-
        **Deprecated.** Use [PUT
        /v2/features/:id/revisions/:version/prerequisites](#operation/putFeatureRevisionPrerequisitesV2)
        instead.


        Replaces the feature's prerequisite list for this revision. Each
        prerequisite condition is evaluated against `{ value:
        <prereq-flag-value> }` at SDK eval time — use `value` as the condition
        key.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prerequisites:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      condition:
                        type: string
                    required:
                      - id
                      - condition
                    additionalProperties: false
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - prerequisites
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/prerequisites'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/holdout:
    put:
      operationId: putFeatureRevisionHoldout
      summary: Set holdout in a draft revision
      description: >-
        **Deprecated.** Use [PUT
        /v2/features/:id/revisions/:version/holdout](#operation/putFeatureRevisionHoldoutV2)
        instead.


        Sets (or clears, via `holdout: null`) the holdout experiment bound to
        the feature. Holdout linkage side-effects (updating the holdout's linked
        feature list) are applied on publish.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                holdout:
                  anyOf:
                    - type: object
                      properties:
                        id:
                          type: string
                        value:
                          type: string
                      required:
                        - id
                        - value
                      additionalProperties: false
                    - type: 'null'
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - holdout
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/holdout'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/archive:
    put:
      operationId: putFeatureRevisionArchive
      summary: Set archived state in a draft revision
      description: >-
        **Deprecated.** Use [PUT
        /v2/features/:id/revisions/:version/archive](#operation/putFeatureRevisionArchiveV2)
        instead.


        Sets whether the feature is archived. Archived features are excluded
        from SDK payloads on publish.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                archived:
                  type: boolean
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - archived
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/archive'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/toggle:
    post:
      operationId: postFeatureRevisionToggle
      summary: Toggle an environment on/off in a draft revision
      description: >-
        **Deprecated.** Use [POST
        /v2/features/:id/revisions/:version/toggle](#operation/postFeatureRevisionToggleV2)
        instead.


        Sets whether the feature is enabled in the given environment as part of
        the draft. Takes effect on publish.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environment:
                  type: string
                enabled:
                  type: boolean
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - environment
                - enabled
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/toggle'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/rules:
    post:
      operationId: postFeatureRevisionRuleAdd
      summary: Add a rule to a draft revision
      description: >-
        **Deprecated.** Use [POST
        /v2/features/:id/revisions/:version/rules](#operation/postFeatureRevisionRuleAddV2)
        instead, which accepts rules with unified
        `allEnvironments`/`environments` scope fields instead of a
        per-environment `environment` parameter.


        Appends a new rule to the end of the rule list for the given
        environment. A `rule.type` of `force`, `rollout`, `experiment-ref`, or
        `safe-rollout` determines the accepted shape. Use `rampSchedule` for
        ramp configuration or `schedule` for a simple start/end window; if both
        are provided, `rampSchedule` wins.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environment:
                  type: string
                rule:
                  anyOf:
                    - type: object
                      properties:
                        description:
                          type: string
                        enabled:
                          type: boolean
                        condition:
                          type: string
                        savedGroups:
                          type: array
                          items:
                            type: object
                            properties:
                              match:
                                type: string
                                enum:
                                  - all
                                  - none
                                  - any
                              ids:
                                type: array
                                items:
                                  type: string
                            required:
                              - match
                              - ids
                            additionalProperties: false
                        prerequisites:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              condition:
                                type: string
                            required:
                              - id
                              - condition
                            additionalProperties: false
                        scheduleRules:
                          type: array
                          items:
                            type: object
                            properties:
                              timestamp:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              enabled:
                                type: boolean
                            required:
                              - timestamp
                              - enabled
                            additionalProperties: false
                        scheduleType:
                          type: string
                          enum:
                            - none
                            - schedule
                            - ramp
                        type:
                          type: string
                          const: experiment-ref
                        experimentId:
                          type: string
                        variations:
                          type: array
                          items:
                            type: object
                            properties:
                              variationId:
                                type: string
                              value:
                                type: string
                            required:
                              - value
                            additionalProperties: false
                      required:
                        - type
                        - experimentId
                        - variations
                      additionalProperties: false
                    - type: object
                      properties:
                        description:
                          type: string
                        enabled:
                          type: boolean
                        condition:
                          type: string
                        savedGroups:
                          type: array
                          items:
                            type: object
                            properties:
                              match:
                                type: string
                                enum:
                                  - all
                                  - none
                                  - any
                              ids:
                                type: array
                                items:
                                  type: string
                            required:
                              - match
                              - ids
                            additionalProperties: false
                        prerequisites:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              condition:
                                type: string
                            required:
                              - id
                              - condition
                            additionalProperties: false
                        scheduleRules:
                          type: array
                          items:
                            type: object
                            properties:
                              timestamp:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              enabled:
                                type: boolean
                            required:
                              - timestamp
                              - enabled
                            additionalProperties: false
                        scheduleType:
                          type: string
                          enum:
                            - none
                            - schedule
                            - ramp
                        type:
                          type: string
                          const: safe-rollout
                        controlValue:
                          type: string
                        variationValue:
                          type: string
                        hashAttribute:
                          type: string
                        trackingKey:
                          type: string
                        seed:
                          type: string
                        safeRolloutFields:
                          type: object
                          properties:
                            datasourceId:
                              type: string
                            exposureQueryId:
                              type: string
                            guardrailMetricIds:
                              type: array
                              items:
                                type: string
                            maxDuration:
                              type: object
                              properties:
                                amount:
                                  type: number
                                  exclusiveMinimum: 0
                                unit:
                                  type: string
                                  enum:
                                    - weeks
                                    - days
                                    - hours
                                    - minutes
                              required:
                                - amount
                                - unit
                              additionalProperties: false
                            autoRollback:
                              type: boolean
                            rampUpSchedule:
                              type: object
                              properties:
                                enabled:
                                  type: boolean
                                steps:
                                  minItems: 1
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      percent:
                                        type: number
                                        minimum: 0
                                        maximum: 1
                                    required:
                                      - percent
                                    additionalProperties: false
                              required:
                                - enabled
                              additionalProperties: false
                          required:
                            - datasourceId
                            - exposureQueryId
                            - guardrailMetricIds
                            - maxDuration
                          additionalProperties: false
                      required:
                        - type
                        - controlValue
                        - variationValue
                        - hashAttribute
                        - safeRolloutFields
                      additionalProperties: false
                    - type: object
                      properties:
                        description:
                          type: string
                        enabled:
                          type: boolean
                        condition:
                          type: string
                        savedGroups:
                          type: array
                          items:
                            type: object
                            properties:
                              match:
                                type: string
                                enum:
                                  - all
                                  - none
                                  - any
                              ids:
                                type: array
                                items:
                                  type: string
                            required:
                              - match
                              - ids
                            additionalProperties: false
                        prerequisites:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              condition:
                                type: string
                            required:
                              - id
                              - condition
                            additionalProperties: false
                        scheduleRules:
                          type: array
                          items:
                            type: object
                            properties:
                              timestamp:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              enabled:
                                type: boolean
                            required:
                              - timestamp
                              - enabled
                            additionalProperties: false
                        scheduleType:
                          type: string
                          enum:
                            - none
                            - schedule
                            - ramp
                        type:
                          type: string
                          enum:
                            - force
                            - rollout
                        value:
                          type: string
                        coverage:
                          type: number
                          minimum: 0
                          maximum: 1
                        hashAttribute:
                          type: string
                        seed:
                          type: string
                      required:
                        - value
                      additionalProperties: false
                rampSchedule:
                  type: object
                  properties:
                    name:
                      type: string
                    templateId:
                      type: string
                    steps:
                      type: array
                      items:
                        type: object
                        properties:
                          trigger:
                            anyOf:
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: interval
                                  seconds:
                                    type: number
                                    exclusiveMinimum: 0
                                required:
                                  - type
                                  - seconds
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: approval
                                required:
                                  - type
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: scheduled
                                  at: {}
                                required:
                                  - type
                                  - at
                                additionalProperties: false
                          actions:
                            type: array
                            items:
                              type: object
                              properties:
                                targetType:
                                  type: string
                                  const: feature-rule
                                targetId:
                                  type: string
                                patch:
                                  type: object
                                  properties:
                                    ruleId:
                                      type: string
                                    coverage:
                                      anyOf:
                                        - type: number
                                          minimum: 0
                                          maximum: 1
                                        - type: 'null'
                                    condition:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                    savedGroups:
                                      anyOf:
                                        - type: array
                                          items:
                                            type: object
                                            properties:
                                              match:
                                                type: string
                                                enum:
                                                  - all
                                                  - none
                                                  - any
                                              ids:
                                                type: array
                                                items:
                                                  type: string
                                            required:
                                              - match
                                              - ids
                                            additionalProperties: false
                                        - type: 'null'
                                    prerequisites:
                                      anyOf:
                                        - type: array
                                          items:
                                            type: object
                                            properties:
                                              id:
                                                type: string
                                              condition:
                                                type: string
                                            required:
                                              - id
                                              - condition
                                            additionalProperties: false
                                        - type: 'null'
                                    force:
                                      description: Force value (any JSON type)
                                    enabled:
                                      anyOf:
                                        - type: boolean
                                        - type: 'null'
                                  additionalProperties: false
                              required:
                                - patch
                              additionalProperties: false
                          approvalNotes:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - trigger
                        additionalProperties: false
                    endActions:
                      type: array
                      items:
                        type: object
                        properties:
                          targetType:
                            type: string
                            const: feature-rule
                          targetId:
                            type: string
                          patch:
                            type: object
                            properties:
                              ruleId:
                                type: string
                              coverage:
                                anyOf:
                                  - type: number
                                    minimum: 0
                                    maximum: 1
                                  - type: 'null'
                              condition:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              savedGroups:
                                anyOf:
                                  - type: array
                                    items:
                                      type: object
                                      properties:
                                        match:
                                          type: string
                                          enum:
                                            - all
                                            - none
                                            - any
                                        ids:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - match
                                        - ids
                                      additionalProperties: false
                                  - type: 'null'
                              prerequisites:
                                anyOf:
                                  - type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: string
                                        condition:
                                          type: string
                                      required:
                                        - id
                                        - condition
                                      additionalProperties: false
                                  - type: 'null'
                              force:
                                description: Force value (any JSON type)
                              enabled:
                                anyOf:
                                  - type: boolean
                                  - type: 'null'
                            additionalProperties: false
                        required:
                          - patch
                        additionalProperties: false
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endCondition:
                      type: object
                      properties:
                        trigger:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: scheduled
                                at: {}
                              required:
                                - type
                                - at
                              additionalProperties: false
                      additionalProperties: false
                  additionalProperties: false
                schedule:
                  type: object
                  properties:
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                  additionalProperties: false
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - environment
                - rule
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/rules'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/rules/{ruleId}:
    put:
      operationId: putFeatureRevisionRule
      summary: Update a rule in a draft revision
      description: >-
        **Deprecated.** Use [PUT
        /v2/features/:id/revisions/:version/rules/:ruleId](#operation/putFeatureRevisionRuleV2)
        instead, which locates rules by `ruleId` in the flat array without an
        `environment` parameter.


        Patches fields on an existing rule. The rule `type` cannot be changed —
        to convert types, delete and re-add. Fields that don't apply to the
        current rule type are rejected.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
        - $ref: '#/components/parameters/ruleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environment:
                  type: string
                rule:
                  type: object
                  properties:
                    description:
                      type: string
                    enabled:
                      type: boolean
                    condition:
                      type: string
                    savedGroups:
                      type: array
                      items:
                        type: object
                        properties:
                          match:
                            type: string
                            enum:
                              - all
                              - none
                              - any
                          ids:
                            type: array
                            items:
                              type: string
                        required:
                          - match
                          - ids
                        additionalProperties: false
                    prerequisites:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          condition:
                            type: string
                        required:
                          - id
                          - condition
                        additionalProperties: false
                    scheduleRules:
                      anyOf:
                        - type: array
                          items:
                            type: object
                            properties:
                              timestamp:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              enabled:
                                type: boolean
                            required:
                              - timestamp
                              - enabled
                            additionalProperties: false
                        - type: 'null'
                    scheduleType:
                      anyOf:
                        - type: string
                          enum:
                            - none
                            - schedule
                            - ramp
                        - type: 'null'
                    type:
                      type: string
                      enum:
                        - force
                        - rollout
                        - experiment-ref
                        - safe-rollout
                    value:
                      type: string
                    coverage:
                      type: number
                      minimum: 0
                      maximum: 1
                    hashAttribute:
                      type: string
                    seed:
                      type: string
                    experimentId:
                      type: string
                    variations:
                      type: array
                      items:
                        type: object
                        properties:
                          variationId:
                            type: string
                          value:
                            type: string
                        required:
                          - variationId
                          - value
                        additionalProperties: false
                    controlValue:
                      type: string
                    variationValue:
                      type: string
                  additionalProperties: false
                rampSchedule:
                  type: object
                  properties:
                    name:
                      type: string
                    templateId:
                      type: string
                    steps:
                      type: array
                      items:
                        type: object
                        properties:
                          trigger:
                            anyOf:
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: interval
                                  seconds:
                                    type: number
                                    exclusiveMinimum: 0
                                required:
                                  - type
                                  - seconds
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: approval
                                required:
                                  - type
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: scheduled
                                  at: {}
                                required:
                                  - type
                                  - at
                                additionalProperties: false
                          actions:
                            type: array
                            items:
                              type: object
                              properties:
                                targetType:
                                  type: string
                                  const: feature-rule
                                targetId:
                                  type: string
                                patch:
                                  type: object
                                  properties:
                                    ruleId:
                                      type: string
                                    coverage:
                                      anyOf:
                                        - type: number
                                          minimum: 0
                                          maximum: 1
                                        - type: 'null'
                                    condition:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                    savedGroups:
                                      anyOf:
                                        - type: array
                                          items:
                                            type: object
                                            properties:
                                              match:
                                                type: string
                                                enum:
                                                  - all
                                                  - none
                                                  - any
                                              ids:
                                                type: array
                                                items:
                                                  type: string
                                            required:
                                              - match
                                              - ids
                                            additionalProperties: false
                                        - type: 'null'
                                    prerequisites:
                                      anyOf:
                                        - type: array
                                          items:
                                            type: object
                                            properties:
                                              id:
                                                type: string
                                              condition:
                                                type: string
                                            required:
                                              - id
                                              - condition
                                            additionalProperties: false
                                        - type: 'null'
                                    force:
                                      description: Force value (any JSON type)
                                    enabled:
                                      anyOf:
                                        - type: boolean
                                        - type: 'null'
                                  additionalProperties: false
                              required:
                                - patch
                              additionalProperties: false
                          approvalNotes:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - trigger
                        additionalProperties: false
                    endActions:
                      type: array
                      items:
                        type: object
                        properties:
                          targetType:
                            type: string
                            const: feature-rule
                          targetId:
                            type: string
                          patch:
                            type: object
                            properties:
                              ruleId:
                                type: string
                              coverage:
                                anyOf:
                                  - type: number
                                    minimum: 0
                                    maximum: 1
                                  - type: 'null'
                              condition:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              savedGroups:
                                anyOf:
                                  - type: array
                                    items:
                                      type: object
                                      properties:
                                        match:
                                          type: string
                                          enum:
                                            - all
                                            - none
                                            - any
                                        ids:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - match
                                        - ids
                                      additionalProperties: false
                                  - type: 'null'
                              prerequisites:
                                anyOf:
                                  - type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: string
                                        condition:
                                          type: string
                                      required:
                                        - id
                                        - condition
                                      additionalProperties: false
                                  - type: 'null'
                              force:
                                description: Force value (any JSON type)
                              enabled:
                                anyOf:
                                  - type: boolean
                                  - type: 'null'
                            additionalProperties: false
                        required:
                          - patch
                        additionalProperties: false
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endCondition:
                      type: object
                      properties:
                        trigger:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: scheduled
                                at: {}
                              required:
                                - type
                                - at
                              additionalProperties: false
                      additionalProperties: false
                  additionalProperties: false
                schedule:
                  type: object
                  properties:
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                  additionalProperties: false
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - environment
                - rule
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/rules/{ruleId}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteFeatureRevisionRule
      summary: Delete a rule from a draft revision
      description: >-
        **Deprecated.** Use [DELETE
        /v2/features/:id/revisions/:version/rules/:ruleId](#operation/deleteFeatureRevisionRuleV2)
        instead, which removes the rule from the flat array without an
        `environment` parameter.


        Removes the rule from the specified environment. Any pending ramp
        actions on the draft for this rule are also cleared.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
        - $ref: '#/components/parameters/ruleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environment:
                  type: string
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - environment
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/rules/{ruleId}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/rules/reorder:
    post:
      operationId: postFeatureRevisionRulesReorder
      summary: Reorder rules in an environment
      description: >-
        **Deprecated.** Use [POST
        /v2/features/:id/revisions/:version/rules/reorder](#operation/postFeatureRevisionRulesReorderV2)
        instead, which reorders the global flat rule array without an
        `environment` parameter.


        Replaces the rule order for the environment. `ruleIds` must contain
        **exactly** the set of existing rule IDs in that environment — no
        additions, omissions, or duplicates.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environment:
                  type: string
                ruleIds:
                  type: array
                  items:
                    type: string
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - environment
                - ruleIds
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/rules/reorder'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/rules/{ruleId}/ramp-schedule:
    put:
      operationId: putFeatureRevisionRuleRampSchedule
      summary: Set ramp schedule for a rule
      description: >-
        **Deprecated.** Use [PUT
        /v2/features/:id/revisions/:version/rules/:ruleId/ramp-schedule](#operation/putFeatureRevisionRuleRampScheduleV2)
        instead.


        Attaches (or replaces) a ramp schedule for the rule. Rejects if the rule
        already has a live ramp schedule — update that directly via PUT
        /ramp-schedules/{id}. The schedule is created at publish time.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
        - $ref: '#/components/parameters/ruleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                templateId:
                  type: string
                steps:
                  type: array
                  items:
                    type: object
                    properties:
                      trigger:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                const: interval
                              seconds:
                                type: number
                                exclusiveMinimum: 0
                            required:
                              - type
                              - seconds
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: approval
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: scheduled
                              at: {}
                            required:
                              - type
                              - at
                            additionalProperties: false
                      actions:
                        type: array
                        items:
                          type: object
                          properties:
                            targetType:
                              type: string
                              const: feature-rule
                            targetId:
                              type: string
                            patch:
                              type: object
                              properties:
                                ruleId:
                                  type: string
                                coverage:
                                  anyOf:
                                    - type: number
                                      minimum: 0
                                      maximum: 1
                                    - type: 'null'
                                condition:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                savedGroups:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          match:
                                            type: string
                                            enum:
                                              - all
                                              - none
                                              - any
                                          ids:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - match
                                          - ids
                                        additionalProperties: false
                                    - type: 'null'
                                prerequisites:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    - type: 'null'
                                force:
                                  description: Force value (any JSON type)
                                enabled:
                                  anyOf:
                                    - type: boolean
                                    - type: 'null'
                              additionalProperties: false
                          required:
                            - patch
                          additionalProperties: false
                      approvalNotes:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - trigger
                    additionalProperties: false
                endActions:
                  type: array
                  items:
                    type: object
                    properties:
                      targetType:
                        type: string
                        const: feature-rule
                      targetId:
                        type: string
                      patch:
                        type: object
                        properties:
                          ruleId:
                            type: string
                          coverage:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 1
                              - type: 'null'
                          condition:
                            anyOf:
                              - type: string
                              - type: 'null'
                          savedGroups:
                            anyOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    match:
                                      type: string
                                      enum:
                                        - all
                                        - none
                                        - any
                                    ids:
                                      type: array
                                      items:
                                        type: string
                                  required:
                                    - match
                                    - ids
                                  additionalProperties: false
                              - type: 'null'
                          prerequisites:
                            anyOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                    condition:
                                      type: string
                                  required:
                                    - id
                                    - condition
                                  additionalProperties: false
                              - type: 'null'
                          force:
                            description: Force value (any JSON type)
                          enabled:
                            anyOf:
                              - type: boolean
                              - type: 'null'
                        additionalProperties: false
                    required:
                      - patch
                    additionalProperties: false
                startDate:
                  anyOf:
                    - type: string
                    - type: 'null'
                endCondition:
                  type: object
                  properties:
                    trigger:
                      anyOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              const: scheduled
                            at: {}
                          required:
                            - type
                            - at
                          additionalProperties: false
                  additionalProperties: false
                environment:
                  deprecated: true
                  type: string
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/rules/{ruleId}/ramp-schedule'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteFeatureRevisionRuleRampSchedule
      summary: Remove ramp schedule from a rule
      description: >-
        **Deprecated.** Use [DELETE
        /v2/features/:id/revisions/:version/rules/:ruleId/ramp-schedule](#operation/deleteFeatureRevisionRuleRampScheduleV2)
        instead.


        Removes a pending ramp schedule attached by the draft. If the rule
        currently has a live ramp schedule, a detach action is queued and
        applied at publish time.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
        - $ref: '#/components/parameters/ruleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environment:
                  deprecated: true
                  type: string
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/rules/{ruleId}/ramp-schedule'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/request-review:
    post:
      operationId: postFeatureRevisionRequestReview
      summary: Request review for a draft revision
      description: >-
        **Deprecated.** Use [POST
        /v2/features/:id/revisions/:version/request-review](#operation/postFeatureRevisionRequestReviewV2)
        instead.


        Moves the draft into the `pending-review` state and notifies reviewers.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/request-review'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/submit-review:
    post:
      operationId: postFeatureRevisionSubmitReview
      summary: Submit a review on a draft revision
      description: >-
        **Deprecated.** Use [POST
        /v2/features/:id/revisions/:version/submit-review](#operation/postFeatureRevisionSubmitReviewV2)
        instead.


        Submits an `approve`, `request-changes`, or `comment` review on the
        draft. Contributors cannot approve their own drafts, but may submit
        comments or request changes.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
                action:
                  type: string
                  enum:
                    - approve
                    - request-changes
                    - comment
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/submit-review'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/merge-status:
    get:
      operationId: getFeatureRevisionMergeStatus
      summary: Get merge status for a draft revision
      description: >-
        **Deprecated.** Use [GET
        /v2/features/:id/revisions/:version/merge-status](#operation/getFeatureRevisionMergeStatusV2)
        instead.


        Runs a dry-run merge of the draft against the current live revision and
        returns any conflicts. Use this before publishing to preview changes and
        detect conflicting edits.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  conflicts:
                    type: array
                    items:
                      $ref: '#/components/schemas/conflicts'
                  result:
                    $ref: '#/components/schemas/result'
                required:
                  - success
                  - conflicts
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/merge-status'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/rebase:
    post:
      operationId: postFeatureRevisionRebase
      summary: Rebase a draft revision onto the current live version
      description: >-
        **Deprecated.** Use [POST
        /v2/features/:id/revisions/:version/rebase](#operation/postFeatureRevisionRebaseV2)
        instead.


        Updates the draft's base revision to match the currently-live revision,
        applying the draft's changes on top. Supply `conflictResolutions` to
        resolve any conflicting fields.


        **Conflict key format changed for v1 clients.** Rules now merge as a
        single flat array, so the per-rule `envName.ruleId` keys used by older
        clients are no longer recognized. Valid keys: `defaultValue`, `rules`,
        `prerequisites`, `archived`, `holdout`, and `environmentsEnabled.<env>`.
        Unrecognized keys are ignored; unresolved conflicts respond with `409`.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                conflictResolutions:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                    enum:
                      - overwrite
                      - discard
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/rebase'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/publish:
    post:
      operationId: postFeatureRevisionPublish
      summary: Publish a draft revision
      description: >-
        **Deprecated.** Use [POST
        /v2/features/:id/revisions/:version/publish](#operation/postFeatureRevisionPublishV2)
        instead.


        Immediately publishes a draft revision, making it the live version of
        the feature. Blocked if the org requires approvals and
        `bypassApprovalChecks` is off.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/publish'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/discard:
    post:
      operationId: postFeatureRevisionDiscard
      summary: Discard a draft revision
      description: >-
        **Deprecated.** Use [POST
        /v2/features/:id/revisions/:version/discard](#operation/postFeatureRevisionDiscardV2)
        instead.


        Permanently discards a draft revision. Only drafts (never published
        revisions) can be discarded. Any pending ramp actions staged on the
        draft are dropped.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/discard'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/features/{id}/revisions/{version}/revert:
    post:
      operationId: postFeatureRevisionRevert
      summary: Revert the feature to a prior revision
      description: >-
        **Deprecated.** Use [POST
        /v2/features/:id/revisions/:version/revert](#operation/postFeatureRevisionRevertV2)
        instead.


        Creates a new draft (or immediately publishes) whose content matches the
        specified historical revision.
      deprecated: true
      tags:
        - feature-revisions
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                strategy:
                  type: string
                  enum:
                    - draft
                    - publish
                comment:
                  type: string
                title:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevision'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/features/{id}/revisions/{version}/revert'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features:
    get:
      operationId: listFeaturesV2
      summary: Get all features
      description: >
        Returns features with pagination. Rules are returned as a unified
        top-level array with per-rule environment scope.
      tags:
        - features-v2
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/projectId'
        - $ref: '#/components/parameters/clientKey'
        - $ref: '#/components/parameters/skipPagination'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      features:
                        type: array
                        items:
                          $ref: '#/components/schemas/FeatureV2'
                    required:
                      - features
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v2/features' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postFeatureV2
      summary: Create a single feature
      description: >-
        Creates a new feature. Rules are supplied as a top-level `rules` array;
        each rule includes `allEnvironments` / `environments` scope fields.
      tags:
        - features-v2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  description: >-
                    A unique key name for the feature. Feature keys can only
                    include letters, numbers, hyphens, and underscores.
                  type: string
                  minLength: 1
                archived:
                  type: boolean
                description:
                  description: Description of the feature
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                project:
                  description: An associated project ID
                  type: string
                valueType:
                  description: The data type of the feature payload. Boolean by default.
                  type: string
                  enum:
                    - boolean
                    - string
                    - number
                    - json
                defaultValue:
                  description: >-
                    Default value when feature is enabled. Type must match
                    `valueType`.
                  type: string
                tags:
                  description: List of associated tags
                  type: array
                  items:
                    type: string
                rules:
                  description: >-
                    Feature rules. Each rule carries its own environment scope
                    via `allEnvironments` / `environments`.
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          description:
                            type: string
                          condition:
                            type: string
                          savedGroupTargeting:
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          prerequisites:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  description: Feature ID
                                  type: string
                                condition:
                                  type: string
                              required:
                                - id
                                - condition
                              additionalProperties: false
                          scheduleRules:
                            type: array
                            items:
                              type: object
                              properties:
                                timestamp:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                enabled:
                                  type: boolean
                              required:
                                - timestamp
                                - enabled
                              additionalProperties: false
                          id:
                            type: string
                          enabled:
                            type: boolean
                          type:
                            type: string
                            const: force
                          value:
                            type: string
                          allEnvironments:
                            description: >-
                              When true the rule applies to all environments
                              (default).
                            type: boolean
                          environments:
                            description: >-
                              Specific environment IDs this rule applies to.
                              Required when allEnvironments is false.
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - value
                        additionalProperties: false
                      - type: object
                        properties:
                          description:
                            type: string
                          condition:
                            type: string
                          savedGroupTargeting:
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          prerequisites:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  description: Feature ID
                                  type: string
                                condition:
                                  type: string
                              required:
                                - id
                                - condition
                              additionalProperties: false
                          scheduleRules:
                            type: array
                            items:
                              type: object
                              properties:
                                timestamp:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                enabled:
                                  type: boolean
                              required:
                                - timestamp
                                - enabled
                              additionalProperties: false
                          id:
                            type: string
                          enabled:
                            type: boolean
                          type:
                            type: string
                            const: rollout
                          value:
                            type: string
                          coverage:
                            type: number
                          hashAttribute:
                            type: string
                          allEnvironments:
                            description: >-
                              When true the rule applies to all environments
                              (default).
                            type: boolean
                          environments:
                            description: >-
                              Specific environment IDs this rule applies to.
                              Required when allEnvironments is false.
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - value
                          - coverage
                          - hashAttribute
                        additionalProperties: false
                      - type: object
                        properties:
                          description:
                            type: string
                          id:
                            type: string
                          enabled:
                            type: boolean
                          type:
                            type: string
                            const: experiment-ref
                          condition:
                            type: string
                          savedGroupTargeting:
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          prerequisites:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  description: Feature ID
                                  type: string
                                condition:
                                  type: string
                              required:
                                - id
                                - condition
                              additionalProperties: false
                          scheduleRules:
                            type: array
                            items:
                              type: object
                              properties:
                                timestamp:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                enabled:
                                  type: boolean
                              required:
                                - timestamp
                                - enabled
                              additionalProperties: false
                          variations:
                            type: array
                            items:
                              type: object
                              properties:
                                value:
                                  type: string
                                variationId:
                                  type: string
                              required:
                                - value
                                - variationId
                              additionalProperties: false
                          experimentId:
                            type: string
                          allEnvironments:
                            description: >-
                              When true the rule applies to all environments
                              (default).
                            type: boolean
                          environments:
                            description: >-
                              Specific environment IDs this rule applies to.
                              Required when allEnvironments is false.
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - variations
                          - experimentId
                        additionalProperties: false
                      - type: object
                        properties:
                          description:
                            type: string
                          id:
                            type: string
                          enabled:
                            type: boolean
                          type:
                            type: string
                            const: safe-rollout
                          condition:
                            type: string
                          savedGroupTargeting:
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          prerequisites:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  description: Feature ID
                                  type: string
                                condition:
                                  type: string
                              required:
                                - id
                                - condition
                              additionalProperties: false
                          scheduleRules:
                            type: array
                            items:
                              type: object
                              properties:
                                timestamp:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                enabled:
                                  type: boolean
                              required:
                                - timestamp
                                - enabled
                              additionalProperties: false
                          controlValue:
                            type: string
                          variationValue:
                            type: string
                          hashAttribute:
                            type: string
                          trackingKey:
                            type: string
                          seed:
                            type: string
                          safeRolloutId:
                            description: >-
                              ID of an existing SafeRollout on this feature.
                              Bulk POST/PUT cannot create new safe-rollouts; use
                              POST /v2/features/:id/revisions/:version/rules to
                              create one.
                            type: string
                          status:
                            type: string
                            enum:
                              - running
                              - released
                              - rolled-back
                              - stopped
                          allEnvironments:
                            description: >-
                              When true the rule applies to all environments
                              (default).
                            type: boolean
                          environments:
                            description: >-
                              Specific environment IDs this rule applies to.
                              Required when allEnvironments is false.
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - controlValue
                          - variationValue
                          - hashAttribute
                          - safeRolloutId
                        additionalProperties: false
                environments:
                  description: >-
                    Per-environment enabled state. V2 rules are specified on the
                    top-level `rules` field.
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                    additionalProperties: false
                prerequisites:
                  description: Feature IDs. Each feature must evaluate to `true`
                  type: array
                  items:
                    type: string
                jsonSchema:
                  description: >-
                    Use JSON schema to validate the payload of a JSON-type
                    feature value (enterprise only).
                  type: string
                customFields:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
              required:
                - id
                - owner
                - valueType
                - defaultValue
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    $ref: '#/components/schemas/FeatureV2'
                required:
                  - feature
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v2/features' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}:
    get:
      operationId: getFeatureV2
      summary: Get a single feature
      tags:
        - features-v2
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/withRevisions'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    $ref: '#/components/schemas/FeatureWithRevisionsV2'
                required:
                  - feature
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v2/features/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: updateFeatureV2
      summary: Partially update a feature
      description: >-
        Updates any combination of a feature's metadata, default value,
        environment state, and rules. Other top-level fields are patch-merged:
        omit a field to leave it unchanged. The `rules` field, when supplied,
        replaces the entire `rules` array atomically in a single revision (v1
        PUT applied per-environment patches; v2 swaps the full flat array). To
        preserve existing rules during a partial edit, GET the feature first,
        mutate the returned `rules` array, and PUT the full array back.
        Safe-rollout rules round-trip via their `safeRolloutId`; use `POST
        /v2/features/:id/revisions/:version/rules` to create new ones. Returns
        403 if approval rules are enabled for an affected environment and the
        bypass setting is off.
      tags:
        - features-v2
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  description: Description of the feature
                  type: string
                archived:
                  type: boolean
                project:
                  description: An associated project ID
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                defaultValue:
                  type: string
                tags:
                  description: >-
                    List of associated tags. Will override tags completely with
                    submitted list
                  type: array
                  items:
                    type: string
                rules:
                  description: >-
                    Replaces all feature rules atomically. Behavior differs from
                    v1: v1 PUT applies per-environment patches, v2 PUT swaps the
                    entire `rules` array in one revision. To preserve existing
                    rules during a partial edit, GET the feature first, mutate
                    the returned `rules` array, and PUT the full array back.
                    Safe-rollout rules round-trip via their `safeRolloutId`
                    (creation requires `POST
                    /v2/features/:id/revisions/:version/rules`).
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          description:
                            type: string
                          condition:
                            type: string
                          savedGroupTargeting:
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          prerequisites:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  description: Feature ID
                                  type: string
                                condition:
                                  type: string
                              required:
                                - id
                                - condition
                              additionalProperties: false
                          scheduleRules:
                            type: array
                            items:
                              type: object
                              properties:
                                timestamp:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                enabled:
                                  type: boolean
                              required:
                                - timestamp
                                - enabled
                              additionalProperties: false
                          id:
                            type: string
                          enabled:
                            type: boolean
                          type:
                            type: string
                            const: force
                          value:
                            type: string
                          allEnvironments:
                            description: >-
                              When true the rule applies to all environments
                              (default).
                            type: boolean
                          environments:
                            description: >-
                              Specific environment IDs this rule applies to.
                              Required when allEnvironments is false.
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - value
                        additionalProperties: false
                      - type: object
                        properties:
                          description:
                            type: string
                          condition:
                            type: string
                          savedGroupTargeting:
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          prerequisites:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  description: Feature ID
                                  type: string
                                condition:
                                  type: string
                              required:
                                - id
                                - condition
                              additionalProperties: false
                          scheduleRules:
                            type: array
                            items:
                              type: object
                              properties:
                                timestamp:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                enabled:
                                  type: boolean
                              required:
                                - timestamp
                                - enabled
                              additionalProperties: false
                          id:
                            type: string
                          enabled:
                            type: boolean
                          type:
                            type: string
                            const: rollout
                          value:
                            type: string
                          coverage:
                            type: number
                          hashAttribute:
                            type: string
                          allEnvironments:
                            description: >-
                              When true the rule applies to all environments
                              (default).
                            type: boolean
                          environments:
                            description: >-
                              Specific environment IDs this rule applies to.
                              Required when allEnvironments is false.
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - value
                          - coverage
                          - hashAttribute
                        additionalProperties: false
                      - type: object
                        properties:
                          description:
                            type: string
                          id:
                            type: string
                          enabled:
                            type: boolean
                          type:
                            type: string
                            const: experiment-ref
                          condition:
                            type: string
                          savedGroupTargeting:
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          prerequisites:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  description: Feature ID
                                  type: string
                                condition:
                                  type: string
                              required:
                                - id
                                - condition
                              additionalProperties: false
                          scheduleRules:
                            type: array
                            items:
                              type: object
                              properties:
                                timestamp:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                enabled:
                                  type: boolean
                              required:
                                - timestamp
                                - enabled
                              additionalProperties: false
                          variations:
                            type: array
                            items:
                              type: object
                              properties:
                                value:
                                  type: string
                                variationId:
                                  type: string
                              required:
                                - value
                                - variationId
                              additionalProperties: false
                          experimentId:
                            type: string
                          allEnvironments:
                            description: >-
                              When true the rule applies to all environments
                              (default).
                            type: boolean
                          environments:
                            description: >-
                              Specific environment IDs this rule applies to.
                              Required when allEnvironments is false.
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - variations
                          - experimentId
                        additionalProperties: false
                      - type: object
                        properties:
                          description:
                            type: string
                          id:
                            type: string
                          enabled:
                            type: boolean
                          type:
                            type: string
                            const: safe-rollout
                          condition:
                            type: string
                          savedGroupTargeting:
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          prerequisites:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  description: Feature ID
                                  type: string
                                condition:
                                  type: string
                              required:
                                - id
                                - condition
                              additionalProperties: false
                          scheduleRules:
                            type: array
                            items:
                              type: object
                              properties:
                                timestamp:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                enabled:
                                  type: boolean
                              required:
                                - timestamp
                                - enabled
                              additionalProperties: false
                          controlValue:
                            type: string
                          variationValue:
                            type: string
                          hashAttribute:
                            type: string
                          trackingKey:
                            type: string
                          seed:
                            type: string
                          safeRolloutId:
                            description: >-
                              ID of an existing SafeRollout on this feature.
                              Bulk POST/PUT cannot create new safe-rollouts; use
                              POST /v2/features/:id/revisions/:version/rules to
                              create one.
                            type: string
                          status:
                            type: string
                            enum:
                              - running
                              - released
                              - rolled-back
                              - stopped
                          allEnvironments:
                            description: >-
                              When true the rule applies to all environments
                              (default).
                            type: boolean
                          environments:
                            description: >-
                              Specific environment IDs this rule applies to.
                              Required when allEnvironments is false.
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - controlValue
                          - variationValue
                          - hashAttribute
                          - safeRolloutId
                        additionalProperties: false
                environments:
                  description: >-
                    Per-environment enabled state. V2 rules are specified on the
                    top-level `rules` field.
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                    additionalProperties: false
                prerequisites:
                  description: Feature IDs. Each feature must evaluate to `true`
                  type: array
                  items:
                    type: string
                jsonSchema:
                  description: >-
                    Use JSON schema to validate the payload of a JSON-type
                    feature value (enterprise only).
                  type: string
                customFields:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                holdout:
                  description: >
                    Holdout to assign this feature to. Pass `null` to remove the
                    feature from its current holdout. Omit the field entirely to
                    leave the holdout unchanged.
                  anyOf:
                    - type: object
                      properties:
                        id:
                          description: Holdout ID
                          type: string
                        value:
                          description: >-
                            The feature value assigned to users in the holdout
                            treatment group
                          type: string
                      required:
                        - id
                        - value
                      additionalProperties: false
                    - type: 'null'
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    $ref: '#/components/schemas/FeatureV2'
                required:
                  - feature
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v2/features/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteFeatureV2
      summary: Deletes a single feature
      description: >
        Permanently deletes a feature and all of its revisions.


        Archived features can be deleted freely. Deleting a live (non-archived)
        feature returns 403 unless the org setting "REST API always bypasses
        approval requirements" is enabled.
      tags:
        - features-v2
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    description: The ID of the deleted feature
                    example: feature-123
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X DELETE 'https://api.growthbook.io/api/v2/features/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/toggle:
    post:
      operationId: toggleFeatureV2
      summary: Toggle a feature in one or more environments
      description: >-
        Enables or disables a feature in one or more environments
        simultaneously. Accepts a map of environment name → boolean.
      tags:
        - features-v2
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                environments:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    anyOf:
                      - type: boolean
                        const: true
                      - type: boolean
                        const: false
                      - type: string
                        const: 'true'
                      - type: string
                        const: 'false'
                      - type: string
                        const: '1'
                      - type: string
                        const: '0'
                      - type: number
                        const: 1
                      - type: number
                        const: 0
                      - type: string
                        const: ''
              required:
                - environments
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    $ref: '#/components/schemas/FeatureV2'
                required:
                  - feature
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST 'https://api.growthbook.io/api/v2/features/{id}/toggle'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revert:
    post:
      operationId: revertFeatureV2
      summary: Revert a feature to a specific revision
      tags:
        - features-v2
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                revision:
                  type: number
                comment:
                  type: string
              required:
                - revision
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    $ref: '#/components/schemas/FeatureV2'
                required:
                  - feature
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST 'https://api.growthbook.io/api/v2/features/{id}/revert'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/feature-keys:
    get:
      operationId: getFeatureKeysV2
      summary: Get list of feature keys
      tags:
        - features-v2
      parameters:
        - $ref: '#/components/parameters/projectId'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v2/feature-keys' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/stale-features:
    get:
      operationId: getFeatureStaleV2
      summary: Get stale status for one or more features
      tags:
        - features-v2
      parameters:
        - $ref: '#/components/parameters/ids'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  features:
                    description: >-
                      Map of feature ID to stale status. Only requested features
                      that were found and readable are included.
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: object
                      properties:
                        featureId:
                          type: string
                        isStale:
                          type: boolean
                        staleReason:
                          anyOf:
                            - type: string
                              enum:
                                - never-stale
                                - recently-updated
                                - active-draft
                                - has-dependents
                                - no-rules
                                - rules-one-sided
                                - abandoned-draft
                                - toggled-off
                                - active-experiment
                                - has-rules
                            - type: 'null'
                        neverStale:
                          type: boolean
                        staleByEnv:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties:
                            type: object
                            properties:
                              isStale:
                                type: boolean
                              reason:
                                anyOf:
                                  - type: string
                                    enum:
                                      - no-rules
                                      - rules-one-sided
                                      - abandoned-draft
                                      - toggled-off
                                      - active-experiment
                                      - has-rules
                                      - recently-updated
                                      - active-draft
                                      - has-dependents
                                  - type: 'null'
                              evaluatesTo:
                                type: string
                            required:
                              - isStale
                              - reason
                            additionalProperties: false
                      required:
                        - featureId
                        - isStale
                        - staleReason
                        - neverStale
                      additionalProperties: false
                required:
                  - features
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v2/stale-features' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/revisions:
    get:
      operationId: listRevisionsV2
      summary: List feature revisions
      description: >-
        Returns a paginated list of feature revisions across all features in the
        organization. Revision `rules` is a flat array with per-rule scope.
      tags:
        - feature-revisions-v2
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/skipPagination'
        - $ref: '#/components/parameters/featureId'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/author'
        - name: mine
          in: query
          description: >-
            If true, return only revisions authored by or contributed to by the
            calling user.
          schema:
            description: >-
              If true, return only revisions authored by or contributed to by
              the calling user.
            anyOf:
              - type: string
                const: 'true'
              - type: string
                const: 'false'
              - type: string
                const: '0'
              - type: string
                const: '1'
              - type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revisions:
                    type: array
                    items:
                      $ref: '#/components/schemas/FeatureRevisionV2'
                  limit:
                    type: integer
                  offset:
                    type: integer
                  count:
                    type: integer
                  total:
                    type: integer
                  hasMore:
                    type: boolean
                  nextOffset:
                    anyOf:
                      - type: integer
                      - type: 'null'
                required:
                  - revisions
                  - limit
                  - offset
                  - count
                  - total
                  - hasMore
                  - nextOffset
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v2/revisions' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions:
    get:
      operationId: getFeatureRevisionsV2
      summary: List revisions for a feature
      description: >-
        Returns a paginated list of revisions for this feature, sorted
        newest-first. Revision `rules` is a flat array with per-rule scope.
      tags:
        - feature-revisions-v2
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/skipPagination'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/author'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revisions:
                    type: array
                    items:
                      $ref: '#/components/schemas/FeatureRevisionV2'
                  limit:
                    type: integer
                  offset:
                    type: integer
                  count:
                    type: integer
                  total:
                    type: integer
                  hasMore:
                    type: boolean
                  nextOffset:
                    anyOf:
                      - type: integer
                      - type: 'null'
                required:
                  - revisions
                  - limit
                  - offset
                  - count
                  - total
                  - hasMore
                  - nextOffset
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v2/features/{id}/revisions' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postFeatureRevisionV2
      summary: Create a draft revision
      description: Creates a new draft revision branched from the current live revision.
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
                title:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v2/features/{id}/revisions' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/latest:
    get:
      operationId: getFeatureRevisionLatestV2
      summary: Get the most recent active draft revision
      description: >-
        Returns the most recently updated draft revision for the feature.
        Returns 404 if there is no active draft.
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: mine
          in: query
          description: >-
            If true, return only the most recent active draft authored by or
            contributed to by the calling user.
          schema:
            description: >-
              If true, return only the most recent active draft authored by or
              contributed to by the calling user.
            anyOf:
              - type: string
                const: 'true'
              - type: string
                const: 'false'
              - type: string
                const: '0'
              - type: string
                const: '1'
              - type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v2/features/{id}/revisions/latest' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}:
    get:
      operationId: getFeatureRevisionV2
      summary: Get a single feature revision
      description: >-
        Returns the revision at the specified version for this feature. Revision
        `rules` is a flat array with per-rule environment scope.
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/metadata:
    put:
      operationId: putFeatureRevisionMetadataV2
      summary: Update revision metadata
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
                title:
                  type: string
                description:
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                project:
                  type: string
                tags:
                  type: array
                  items:
                    type: string
                neverStale:
                  type: boolean
                customFields:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                jsonSchema:
                  type: object
                  properties:
                    schemaType:
                      type: string
                      enum:
                        - schema
                        - simple
                    schema:
                      type: string
                    simple:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - object
                            - object[]
                            - primitive
                            - primitive[]
                        fields:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                maxLength: 64
                              type:
                                type: string
                                enum:
                                  - integer
                                  - float
                                  - string
                                  - boolean
                              required:
                                type: boolean
                              default:
                                type: string
                                maxLength: 256
                              description:
                                type: string
                                maxLength: 256
                              enum:
                                maxItems: 256
                                type: array
                                items:
                                  type: string
                                  maxLength: 256
                              min:
                                type: number
                              max:
                                type: number
                            required:
                              - key
                              - type
                              - required
                              - default
                              - description
                              - enum
                              - min
                              - max
                            additionalProperties: false
                      required:
                        - type
                        - fields
                      additionalProperties: false
                    date: {}
                    enabled:
                      type: boolean
                  required:
                    - schemaType
                    - schema
                    - simple
                    - date
                    - enabled
                  additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/metadata'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/default-value:
    put:
      operationId: putFeatureRevisionDefaultValueV2
      summary: Set the default value in a draft revision
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                defaultValue:
                  type: string
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - defaultValue
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/default-value'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/prerequisites:
    put:
      operationId: putFeatureRevisionPrerequisitesV2
      summary: Set feature-level prerequisites in a draft revision
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prerequisites:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      condition:
                        type: string
                    required:
                      - id
                      - condition
                    additionalProperties: false
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - prerequisites
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/prerequisites'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/holdout:
    put:
      operationId: putFeatureRevisionHoldoutV2
      summary: Set holdout in a draft revision
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                holdout:
                  anyOf:
                    - type: object
                      properties:
                        id:
                          type: string
                        value:
                          type: string
                      required:
                        - id
                        - value
                      additionalProperties: false
                    - type: 'null'
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - holdout
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/holdout'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/archive:
    put:
      operationId: putFeatureRevisionArchiveV2
      summary: Set archived state in a draft revision
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                archived:
                  type: boolean
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - archived
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/archive'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/toggle:
    post:
      operationId: postFeatureRevisionToggleV2
      summary: Toggle an environment on/off in a draft revision
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                environment:
                  type: string
                enabled:
                  type: boolean
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - environment
                - enabled
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/toggle'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/rules:
    post:
      operationId: postFeatureRevisionRuleAddV2
      summary: Add a rule to a draft revision
      description: >-
        Appends a new rule to the revision's rule list. Supply `allEnvironments:
        true` to target all environments, or `environments: [...]` to scope to
        specific ones. Use `rampSchedule` for ramp configuration or `schedule`
        for a simple start/end window.
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rule:
                  anyOf:
                    - type: object
                      properties:
                        description:
                          type: string
                        enabled:
                          type: boolean
                        condition:
                          type: string
                        savedGroups:
                          type: array
                          items:
                            type: object
                            properties:
                              match:
                                type: string
                                enum:
                                  - all
                                  - none
                                  - any
                              ids:
                                type: array
                                items:
                                  type: string
                            required:
                              - match
                              - ids
                            additionalProperties: false
                        prerequisites:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              condition:
                                type: string
                            required:
                              - id
                              - condition
                            additionalProperties: false
                        scheduleRules:
                          type: array
                          items:
                            type: object
                            properties:
                              timestamp:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              enabled:
                                type: boolean
                            required:
                              - timestamp
                              - enabled
                            additionalProperties: false
                        scheduleType:
                          type: string
                          enum:
                            - none
                            - schedule
                            - ramp
                        allEnvironments:
                          description: >-
                            When true the rule applies to all environments.
                            Defaults to false.
                          type: boolean
                        environments:
                          description: >-
                            Specific environment IDs this rule applies to. Used
                            when allEnvironments is false.
                          type: array
                          items:
                            type: string
                        type:
                          type: string
                          const: experiment-ref
                        experimentId:
                          type: string
                        variations:
                          type: array
                          items:
                            type: object
                            properties:
                              variationId:
                                type: string
                              value:
                                type: string
                            required:
                              - value
                            additionalProperties: false
                      required:
                        - type
                        - experimentId
                        - variations
                      additionalProperties: false
                    - type: object
                      properties:
                        description:
                          type: string
                        enabled:
                          type: boolean
                        condition:
                          type: string
                        savedGroups:
                          type: array
                          items:
                            type: object
                            properties:
                              match:
                                type: string
                                enum:
                                  - all
                                  - none
                                  - any
                              ids:
                                type: array
                                items:
                                  type: string
                            required:
                              - match
                              - ids
                            additionalProperties: false
                        prerequisites:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              condition:
                                type: string
                            required:
                              - id
                              - condition
                            additionalProperties: false
                        scheduleRules:
                          type: array
                          items:
                            type: object
                            properties:
                              timestamp:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              enabled:
                                type: boolean
                            required:
                              - timestamp
                              - enabled
                            additionalProperties: false
                        scheduleType:
                          type: string
                          enum:
                            - none
                            - schedule
                            - ramp
                        allEnvironments:
                          description: >-
                            When true the rule applies to all environments.
                            Defaults to false.
                          type: boolean
                        environments:
                          description: >-
                            Specific environment IDs this rule applies to. Used
                            when allEnvironments is false.
                          type: array
                          items:
                            type: string
                        type:
                          type: string
                          const: safe-rollout
                        controlValue:
                          type: string
                        variationValue:
                          type: string
                        hashAttribute:
                          type: string
                        trackingKey:
                          type: string
                        seed:
                          type: string
                        safeRolloutFields:
                          type: object
                          properties:
                            datasourceId:
                              type: string
                            exposureQueryId:
                              type: string
                            guardrailMetricIds:
                              type: array
                              items:
                                type: string
                            maxDuration:
                              type: object
                              properties:
                                amount:
                                  type: number
                                  exclusiveMinimum: 0
                                unit:
                                  type: string
                                  enum:
                                    - weeks
                                    - days
                                    - hours
                                    - minutes
                              required:
                                - amount
                                - unit
                              additionalProperties: false
                            autoRollback:
                              type: boolean
                            rampUpSchedule:
                              type: object
                              properties:
                                enabled:
                                  type: boolean
                                steps:
                                  minItems: 1
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      percent:
                                        type: number
                                        minimum: 0
                                        maximum: 1
                                    required:
                                      - percent
                                    additionalProperties: false
                              required:
                                - enabled
                              additionalProperties: false
                          required:
                            - datasourceId
                            - exposureQueryId
                            - guardrailMetricIds
                            - maxDuration
                          additionalProperties: false
                      required:
                        - type
                        - controlValue
                        - variationValue
                        - hashAttribute
                        - safeRolloutFields
                      additionalProperties: false
                    - type: object
                      properties:
                        description:
                          type: string
                        enabled:
                          type: boolean
                        condition:
                          type: string
                        savedGroups:
                          type: array
                          items:
                            type: object
                            properties:
                              match:
                                type: string
                                enum:
                                  - all
                                  - none
                                  - any
                              ids:
                                type: array
                                items:
                                  type: string
                            required:
                              - match
                              - ids
                            additionalProperties: false
                        prerequisites:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              condition:
                                type: string
                            required:
                              - id
                              - condition
                            additionalProperties: false
                        scheduleRules:
                          type: array
                          items:
                            type: object
                            properties:
                              timestamp:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              enabled:
                                type: boolean
                            required:
                              - timestamp
                              - enabled
                            additionalProperties: false
                        scheduleType:
                          type: string
                          enum:
                            - none
                            - schedule
                            - ramp
                        allEnvironments:
                          description: >-
                            When true the rule applies to all environments.
                            Defaults to false.
                          type: boolean
                        environments:
                          description: >-
                            Specific environment IDs this rule applies to. Used
                            when allEnvironments is false.
                          type: array
                          items:
                            type: string
                        type:
                          type: string
                          enum:
                            - force
                            - rollout
                        value:
                          type: string
                        coverage:
                          type: number
                          minimum: 0
                          maximum: 1
                        hashAttribute:
                          type: string
                        seed:
                          type: string
                      required:
                        - value
                      additionalProperties: false
                rampSchedule:
                  type: object
                  properties:
                    name:
                      type: string
                    templateId:
                      type: string
                    steps:
                      type: array
                      items:
                        type: object
                        properties:
                          trigger:
                            anyOf:
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: interval
                                  seconds:
                                    type: number
                                    exclusiveMinimum: 0
                                required:
                                  - type
                                  - seconds
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: approval
                                required:
                                  - type
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: scheduled
                                  at: {}
                                required:
                                  - type
                                  - at
                                additionalProperties: false
                          actions:
                            type: array
                            items:
                              type: object
                              properties:
                                targetType:
                                  type: string
                                  const: feature-rule
                                targetId:
                                  type: string
                                patch:
                                  type: object
                                  properties:
                                    ruleId:
                                      type: string
                                    coverage:
                                      anyOf:
                                        - type: number
                                          minimum: 0
                                          maximum: 1
                                        - type: 'null'
                                    condition:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                    savedGroups:
                                      anyOf:
                                        - type: array
                                          items:
                                            type: object
                                            properties:
                                              match:
                                                type: string
                                                enum:
                                                  - all
                                                  - none
                                                  - any
                                              ids:
                                                type: array
                                                items:
                                                  type: string
                                            required:
                                              - match
                                              - ids
                                            additionalProperties: false
                                        - type: 'null'
                                    prerequisites:
                                      anyOf:
                                        - type: array
                                          items:
                                            type: object
                                            properties:
                                              id:
                                                type: string
                                              condition:
                                                type: string
                                            required:
                                              - id
                                              - condition
                                            additionalProperties: false
                                        - type: 'null'
                                    force:
                                      description: Force value (any JSON type)
                                    enabled:
                                      anyOf:
                                        - type: boolean
                                        - type: 'null'
                                  additionalProperties: false
                              required:
                                - patch
                              additionalProperties: false
                          approvalNotes:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - trigger
                        additionalProperties: false
                    endActions:
                      type: array
                      items:
                        type: object
                        properties:
                          targetType:
                            type: string
                            const: feature-rule
                          targetId:
                            type: string
                          patch:
                            type: object
                            properties:
                              ruleId:
                                type: string
                              coverage:
                                anyOf:
                                  - type: number
                                    minimum: 0
                                    maximum: 1
                                  - type: 'null'
                              condition:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              savedGroups:
                                anyOf:
                                  - type: array
                                    items:
                                      type: object
                                      properties:
                                        match:
                                          type: string
                                          enum:
                                            - all
                                            - none
                                            - any
                                        ids:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - match
                                        - ids
                                      additionalProperties: false
                                  - type: 'null'
                              prerequisites:
                                anyOf:
                                  - type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: string
                                        condition:
                                          type: string
                                      required:
                                        - id
                                        - condition
                                      additionalProperties: false
                                  - type: 'null'
                              force:
                                description: Force value (any JSON type)
                              enabled:
                                anyOf:
                                  - type: boolean
                                  - type: 'null'
                            additionalProperties: false
                        required:
                          - patch
                        additionalProperties: false
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endCondition:
                      type: object
                      properties:
                        trigger:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: scheduled
                                at: {}
                              required:
                                - type
                                - at
                              additionalProperties: false
                      additionalProperties: false
                  additionalProperties: false
                schedule:
                  type: object
                  properties:
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                  additionalProperties: false
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - rule
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/rules'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/rules/{ruleId}:
    put:
      operationId: putFeatureRevisionRuleV2
      summary: Update a rule in a draft revision
      description: >-
        Patches fields on an existing rule (identified by `ruleId`). The rule
        `type` cannot be changed. Scope can be updated via `allEnvironments` /
        `environments` patch fields.
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
        - $ref: '#/components/parameters/ruleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rule:
                  type: object
                  properties:
                    description:
                      type: string
                    enabled:
                      type: boolean
                    condition:
                      type: string
                    savedGroups:
                      type: array
                      items:
                        type: object
                        properties:
                          match:
                            type: string
                            enum:
                              - all
                              - none
                              - any
                          ids:
                            type: array
                            items:
                              type: string
                        required:
                          - match
                          - ids
                        additionalProperties: false
                    prerequisites:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          condition:
                            type: string
                        required:
                          - id
                          - condition
                        additionalProperties: false
                    scheduleRules:
                      anyOf:
                        - type: array
                          items:
                            type: object
                            properties:
                              timestamp:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              enabled:
                                type: boolean
                            required:
                              - timestamp
                              - enabled
                            additionalProperties: false
                        - type: 'null'
                    scheduleType:
                      anyOf:
                        - type: string
                          enum:
                            - none
                            - schedule
                            - ramp
                        - type: 'null'
                    type:
                      type: string
                      enum:
                        - force
                        - rollout
                        - experiment-ref
                        - safe-rollout
                    value:
                      type: string
                    coverage:
                      type: number
                      minimum: 0
                      maximum: 1
                    hashAttribute:
                      type: string
                    seed:
                      type: string
                    experimentId:
                      type: string
                    variations:
                      type: array
                      items:
                        type: object
                        properties:
                          variationId:
                            type: string
                          value:
                            type: string
                        required:
                          - variationId
                          - value
                        additionalProperties: false
                    controlValue:
                      type: string
                    variationValue:
                      type: string
                    allEnvironments:
                      type: boolean
                    environments:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                rampSchedule:
                  type: object
                  properties:
                    name:
                      type: string
                    templateId:
                      type: string
                    steps:
                      type: array
                      items:
                        type: object
                        properties:
                          trigger:
                            anyOf:
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: interval
                                  seconds:
                                    type: number
                                    exclusiveMinimum: 0
                                required:
                                  - type
                                  - seconds
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: approval
                                required:
                                  - type
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: scheduled
                                  at: {}
                                required:
                                  - type
                                  - at
                                additionalProperties: false
                          actions:
                            type: array
                            items:
                              type: object
                              properties:
                                targetType:
                                  type: string
                                  const: feature-rule
                                targetId:
                                  type: string
                                patch:
                                  type: object
                                  properties:
                                    ruleId:
                                      type: string
                                    coverage:
                                      anyOf:
                                        - type: number
                                          minimum: 0
                                          maximum: 1
                                        - type: 'null'
                                    condition:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                    savedGroups:
                                      anyOf:
                                        - type: array
                                          items:
                                            type: object
                                            properties:
                                              match:
                                                type: string
                                                enum:
                                                  - all
                                                  - none
                                                  - any
                                              ids:
                                                type: array
                                                items:
                                                  type: string
                                            required:
                                              - match
                                              - ids
                                            additionalProperties: false
                                        - type: 'null'
                                    prerequisites:
                                      anyOf:
                                        - type: array
                                          items:
                                            type: object
                                            properties:
                                              id:
                                                type: string
                                              condition:
                                                type: string
                                            required:
                                              - id
                                              - condition
                                            additionalProperties: false
                                        - type: 'null'
                                    force:
                                      description: Force value (any JSON type)
                                    enabled:
                                      anyOf:
                                        - type: boolean
                                        - type: 'null'
                                  additionalProperties: false
                              required:
                                - patch
                              additionalProperties: false
                          approvalNotes:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - trigger
                        additionalProperties: false
                    endActions:
                      type: array
                      items:
                        type: object
                        properties:
                          targetType:
                            type: string
                            const: feature-rule
                          targetId:
                            type: string
                          patch:
                            type: object
                            properties:
                              ruleId:
                                type: string
                              coverage:
                                anyOf:
                                  - type: number
                                    minimum: 0
                                    maximum: 1
                                  - type: 'null'
                              condition:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              savedGroups:
                                anyOf:
                                  - type: array
                                    items:
                                      type: object
                                      properties:
                                        match:
                                          type: string
                                          enum:
                                            - all
                                            - none
                                            - any
                                        ids:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - match
                                        - ids
                                      additionalProperties: false
                                  - type: 'null'
                              prerequisites:
                                anyOf:
                                  - type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: string
                                        condition:
                                          type: string
                                      required:
                                        - id
                                        - condition
                                      additionalProperties: false
                                  - type: 'null'
                              force:
                                description: Force value (any JSON type)
                              enabled:
                                anyOf:
                                  - type: boolean
                                  - type: 'null'
                            additionalProperties: false
                        required:
                          - patch
                        additionalProperties: false
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endCondition:
                      type: object
                      properties:
                        trigger:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  const: scheduled
                                at: {}
                              required:
                                - type
                                - at
                              additionalProperties: false
                      additionalProperties: false
                  additionalProperties: false
                schedule:
                  type: object
                  properties:
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                  additionalProperties: false
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - rule
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/rules/{ruleId}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteFeatureRevisionRuleV2
      summary: Delete a rule from a draft revision
      description: >-
        Removes the rule from the revision. Any pending ramp actions for this
        rule are also cleared.
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
        - $ref: '#/components/parameters/ruleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/rules/{ruleId}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/rules/reorder:
    post:
      operationId: postFeatureRevisionRulesReorderV2
      summary: Reorder rules in the revision
      description: >-
        Replaces the flat global rule order. `ruleIds` must contain **exactly**
        the set of all existing rule IDs in the revision — no additions,
        omissions, or duplicates.
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ruleIds:
                  type: array
                  items:
                    type: string
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              required:
                - ruleIds
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/rules/reorder'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/rules/{ruleId}/ramp-schedule:
    put:
      operationId: putFeatureRevisionRuleRampScheduleV2
      summary: Set ramp schedule for a rule
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
        - $ref: '#/components/parameters/ruleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                templateId:
                  type: string
                steps:
                  type: array
                  items:
                    type: object
                    properties:
                      trigger:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                const: interval
                              seconds:
                                type: number
                                exclusiveMinimum: 0
                            required:
                              - type
                              - seconds
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: approval
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: scheduled
                              at: {}
                            required:
                              - type
                              - at
                            additionalProperties: false
                      actions:
                        type: array
                        items:
                          type: object
                          properties:
                            targetType:
                              type: string
                              const: feature-rule
                            targetId:
                              type: string
                            patch:
                              type: object
                              properties:
                                ruleId:
                                  type: string
                                coverage:
                                  anyOf:
                                    - type: number
                                      minimum: 0
                                      maximum: 1
                                    - type: 'null'
                                condition:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                savedGroups:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          match:
                                            type: string
                                            enum:
                                              - all
                                              - none
                                              - any
                                          ids:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - match
                                          - ids
                                        additionalProperties: false
                                    - type: 'null'
                                prerequisites:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    - type: 'null'
                                force:
                                  description: Force value (any JSON type)
                                enabled:
                                  anyOf:
                                    - type: boolean
                                    - type: 'null'
                              additionalProperties: false
                          required:
                            - patch
                          additionalProperties: false
                      approvalNotes:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - trigger
                    additionalProperties: false
                endActions:
                  type: array
                  items:
                    type: object
                    properties:
                      targetType:
                        type: string
                        const: feature-rule
                      targetId:
                        type: string
                      patch:
                        type: object
                        properties:
                          ruleId:
                            type: string
                          coverage:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 1
                              - type: 'null'
                          condition:
                            anyOf:
                              - type: string
                              - type: 'null'
                          savedGroups:
                            anyOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    match:
                                      type: string
                                      enum:
                                        - all
                                        - none
                                        - any
                                    ids:
                                      type: array
                                      items:
                                        type: string
                                  required:
                                    - match
                                    - ids
                                  additionalProperties: false
                              - type: 'null'
                          prerequisites:
                            anyOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                    condition:
                                      type: string
                                  required:
                                    - id
                                    - condition
                                  additionalProperties: false
                              - type: 'null'
                          force:
                            description: Force value (any JSON type)
                          enabled:
                            anyOf:
                              - type: boolean
                              - type: 'null'
                        additionalProperties: false
                    required:
                      - patch
                    additionalProperties: false
                startDate:
                  anyOf:
                    - type: string
                    - type: 'null'
                endCondition:
                  type: object
                  properties:
                    trigger:
                      anyOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              const: scheduled
                            at: {}
                          required:
                            - type
                            - at
                          additionalProperties: false
                  additionalProperties: false
                environment:
                  deprecated: true
                  type: string
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/rules/{ruleId}/ramp-schedule'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteFeatureRevisionRuleRampScheduleV2
      summary: Remove ramp schedule from a rule
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - name: version
          in: path
          required: true
          description: ''
          schema:
            anyOf:
              - type: integer
              - type: string
                const: new
        - $ref: '#/components/parameters/ruleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                revisionTitle:
                  type: string
                revisionComment:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/rules/{ruleId}/ramp-schedule'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/request-review:
    post:
      operationId: postFeatureRevisionRequestReviewV2
      summary: Request review for a draft revision
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/request-review'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/submit-review:
    post:
      operationId: postFeatureRevisionSubmitReviewV2
      summary: Submit a review on a draft revision
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
                action:
                  type: string
                  enum:
                    - approve
                    - request-changes
                    - comment
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/submit-review'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/merge-status:
    get:
      operationId: getFeatureRevisionMergeStatusV2
      summary: Get merge status for a draft revision
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  conflicts:
                    type: array
                    items:
                      $ref: '#/components/schemas/conflicts'
                  result:
                    type: object
                    properties:
                      defaultValue:
                        type: string
                      rules:
                        type: array
                        items: {}
                      environmentsEnabled:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: boolean
                      prerequisites:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            condition:
                              type: string
                          required:
                            - id
                            - condition
                          additionalProperties: false
                      archived:
                        type: boolean
                      metadata:
                        type: object
                        properties:
                          releaseType:
                            type: string
                          riskLevel:
                            type: string
                        additionalProperties: {}
                      holdout:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: string
                              value:
                                type: string
                            required:
                              - id
                              - value
                            additionalProperties: false
                          - type: 'null'
                    additionalProperties: false
                required:
                  - success
                  - conflicts
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/merge-status'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/rebase:
    post:
      operationId: postFeatureRevisionRebaseV2
      summary: Rebase a draft revision onto the current live version
      description: >-
        Updates the draft's base revision to match the currently-live revision,
        applying the draft's changes on top. Supply `conflictResolutions` to
        resolve any conflicting fields. Valid keys: `defaultValue`, `rules`,
        `prerequisites`, `archived`, `holdout`, and `environmentsEnabled.<env>`.
        Unresolved conflicts respond with `409`.
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                conflictResolutions:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                    enum:
                      - overwrite
                      - discard
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/rebase'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/publish:
    post:
      operationId: postFeatureRevisionPublishV2
      summary: Publish a draft revision
      description: >-
        Immediately publishes a draft revision, making it the live version of
        the feature.
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/publish'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/discard:
    post:
      operationId: postFeatureRevisionDiscardV2
      summary: Discard a draft revision
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/discard'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v2/features/{id}/revisions/{version}/revert:
    post:
      operationId: postFeatureRevisionRevertV2
      summary: Revert the feature to a prior revision
      tags:
        - feature-revisions-v2
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                strategy:
                  type: string
                  enum:
                    - draft
                    - publish
                comment:
                  type: string
                title:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  revision:
                    $ref: '#/components/schemas/FeatureRevisionV2'
                required:
                  - revision
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v2/features/{id}/revisions/{version}/revert'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/archetypes:
    get:
      operationId: listArchetypes
      summary: Get the organization's archetypes
      tags:
        - archetypes
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  archetypes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Archetype'
                required:
                  - archetypes
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/archetypes' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postArchetype
      summary: Create a single archetype
      tags:
        - archetypes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                isPublic:
                  description: >-
                    Whether to make this Archetype available to other team
                    members
                  type: boolean
                attributes:
                  description: The attributes to set when using this Archetype
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                projects:
                  type: array
                  items:
                    type: string
              required:
                - name
                - isPublic
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  archetype:
                    $ref: '#/components/schemas/Archetype'
                required:
                  - archetype
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/archetypes' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/archetypes/{id}:
    get:
      operationId: getArchetype
      summary: Get a single archetype
      tags:
        - archetypes
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  archetype:
                    $ref: '#/components/schemas/Archetype'
                required:
                  - archetype
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/archetypes/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: putArchetype
      summary: Update a single archetype
      tags:
        - archetypes
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                isPublic:
                  description: >-
                    Whether to make this Archetype available to other team
                    members
                  type: boolean
                attributes:
                  description: The attributes to set when using this Archetype
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                projects:
                  type: array
                  items:
                    type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  archetype:
                    $ref: '#/components/schemas/Archetype'
                required:
                  - archetype
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X PUT 'https://api.growthbook.io/api/v1/archetypes/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"description":"New description"}'
    delete:
      operationId: deleteArchetype
      summary: Deletes a single archetype
      tags:
        - archetypes
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE 'https://api.growthbook.io/api/v1/archetypes/abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/experiments:
    get:
      operationId: listExperiments
      summary: Get all experiments
      tags:
        - experiments
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/projectId'
        - $ref: '#/components/parameters/datasourceId'
        - $ref: '#/components/parameters/trackingKey'
        - $ref: '#/components/parameters/experimentId'
        - name: status
          in: query
          description: ''
          schema:
            type: string
            enum:
              - draft
              - running
              - stopped
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      experiments:
                        type: array
                        items:
                          $ref: '#/components/schemas/Experiment'
                    required:
                      - experiments
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/experiments' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postExperiment
      summary: Create a single experiment
      tags:
        - experiments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                datasourceId:
                  description: >-
                    ID for the [DataSource](#tag/DataSource_model). Can only be
                    set if a templateId is not provided.
                  type: string
                assignmentQueryId:
                  description: >-
                    The ID property of one of the assignment query objects
                    associated with the datasource. Can only be set if a
                    templateId is not provided.
                  type: string
                trackingKey:
                  type: string
                bypassDuplicateKeyCheck:
                  description: >-
                    If true, allow creating an experiment even if another
                    experiment with the same tracking key already exists. This
                    is ignored if the organization requires unique tracking keys
                    as a rule.
                  type: boolean
                name:
                  description: Name of the experiment
                  type: string
                type:
                  type: string
                  enum:
                    - standard
                    - multi-armed-bandit
                project:
                  description: Project ID which the experiment belongs to
                  type: string
                templateId:
                  description: >-
                    ID of the
                    [ExperimentTemplate](#tag/ExperimentTemplate_model) this
                    experiment was created from. Template fields are applied by
                    default and overridden by explicitly provided payload
                    fields.
                  type: string
                hypothesis:
                  description: Hypothesis of the experiment
                  type: string
                description:
                  description: Description of the experiment
                  type: string
                tags:
                  type: array
                  items:
                    type: string
                metrics:
                  type: array
                  items:
                    type: string
                secondaryMetrics:
                  type: array
                  items:
                    type: string
                guardrailMetrics:
                  type: array
                  items:
                    type: string
                activationMetric:
                  description: Users must convert on this metric before being included
                  type: string
                segmentId:
                  description: Only users in this segment will be included
                  type: string
                queryFilter:
                  description: WHERE clause to add to the default experiment query
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                archived:
                  type: boolean
                status:
                  type: string
                  enum:
                    - draft
                    - running
                    - stopped
                autoRefresh:
                  type: boolean
                hashAttribute:
                  type: string
                fallbackAttribute:
                  type: string
                hashVersion:
                  anyOf:
                    - type: number
                      const: 1
                    - type: number
                      const: 2
                disableStickyBucketing:
                  type: boolean
                bucketVersion:
                  type: number
                minBucketVersion:
                  type: number
                releasedVariationId:
                  type: string
                excludeFromPayload:
                  type: boolean
                inProgressConversions:
                  type: string
                  enum:
                    - loose
                    - strict
                attributionModel:
                  description: >-
                    Setting attribution model to `"experimentDuration"` is the
                    same as selecting "Ignore Conversion Windows" for the
                    Conversion Window Override. Setting it to
                    `"lookbackOverride"` requires a `lookbackOverride` object to
                    be provided.
                  type: string
                  enum:
                    - firstExposure
                    - experimentDuration
                    - lookbackOverride
                lookbackOverride:
                  description: >-
                    Controls the lookback override for the experiment. For type
                    "window", value must be a non-negative number and valueUnit
                    is required.
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - date
                        - window
                    value:
                      description: >-
                        For "window" type - non-negative numeric value (e.g. 7
                        for 7 days). For "date" type a date string.
                      anyOf:
                        - description: >-
                            For "window" type - non-negative numeric value (e.g.
                            7 for 7 days). For "date" type a date string.
                          type: number
                        - format: date-time
                          description: >-
                            For "window" type - non-negative numeric value (e.g.
                            7 for 7 days). For "date" type a date string.
                          type: string
                    valueUnit:
                      description: Used when type is "window". Defaults to "days".
                      type: string
                      enum:
                        - minutes
                        - hours
                        - days
                        - weeks
                  required:
                    - type
                    - value
                  additionalProperties: false
                statsEngine:
                  type: string
                  enum:
                    - bayesian
                    - frequentist
                variations:
                  minItems: 2
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      key:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                      screenshots:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            width:
                              type: number
                            height:
                              type: number
                            description:
                              type: string
                          required:
                            - path
                          additionalProperties: false
                    required:
                      - key
                      - name
                    additionalProperties: false
                phases:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      dateStarted:
                        format: date-time
                        type: string
                      dateEnded:
                        format: date-time
                        type: string
                      reasonForStopping:
                        type: string
                      seed:
                        type: string
                      coverage:
                        type: number
                      trafficSplit:
                        type: array
                        items:
                          type: object
                          properties:
                            variationId:
                              type: string
                            weight:
                              type: number
                          required:
                            - variationId
                            - weight
                          additionalProperties: false
                      namespace:
                        type: object
                        properties:
                          namespaceId:
                            type: string
                          enabled:
                            type: boolean
                          range:
                            minItems: 2
                            maxItems: 2
                            type: array
                            items:
                              type: number
                          ranges:
                            type: array
                            items:
                              type: array
                              prefixItems:
                                - type: number
                                - type: number
                        required:
                          - namespaceId
                        additionalProperties: false
                      targetingCondition:
                        type: string
                      prerequisites:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              description: Feature ID
                              type: string
                            condition:
                              type: string
                          required:
                            - id
                            - condition
                          additionalProperties: false
                      reason:
                        type: string
                      condition:
                        type: string
                      savedGroupTargeting:
                        type: array
                        items:
                          type: object
                          properties:
                            matchType:
                              type: string
                              enum:
                                - all
                                - any
                                - none
                            savedGroups:
                              type: array
                              items:
                                type: string
                          required:
                            - matchType
                            - savedGroups
                          additionalProperties: false
                      variationWeights:
                        type: array
                        items:
                          type: number
                    required:
                      - name
                      - dateStarted
                    additionalProperties: false
                regressionAdjustmentEnabled:
                  description: >-
                    Controls whether regression adjustment (CUPED) is enabled
                    for experiment analyses
                  type: boolean
                sequentialTestingEnabled:
                  description: Only applicable to frequentist analyses
                  type: boolean
                sequentialTestingTuningParameter:
                  type: number
                shareLevel:
                  type: string
                  enum:
                    - public
                    - organization
                banditScheduleValue:
                  type: number
                banditScheduleUnit:
                  type: string
                  enum:
                    - days
                    - hours
                banditBurnInValue:
                  type: number
                banditBurnInUnit:
                  type: string
                  enum:
                    - days
                    - hours
                banditConversionWindowValue:
                  type: number
                banditConversionWindowUnit:
                  type: string
                  enum:
                    - days
                    - hours
                postStratificationEnabled:
                  description: When null, the organization default is used.
                  anyOf:
                    - description: When null, the organization default is used.
                      type: boolean
                    - description: When null, the organization default is used.
                      type: 'null'
                decisionFrameworkSettings:
                  description: >-
                    Controls the decision framework and metric overrides for the
                    experiment. Replaces the entire stored object on update
                    (does not patch individual fields).
                  type: object
                  properties:
                    decisionCriteriaId:
                      type: string
                    decisionFrameworkMetricOverrides:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            description: ID of the metric to override settings for.
                            type: string
                          targetMDE:
                            description: >-
                              The target relative MDE to use for the metric,
                              expressed as proportions (e.g. use 0.1 for 10%).
                              Must be greater than 0.
                            type: number
                            exclusiveMinimum: 0
                        required:
                          - id
                        additionalProperties: false
                  additionalProperties: false
                metricOverrides:
                  description: >-
                    Per-metric analysis overrides for this experiment. Replaces
                    the entire stored array (does not patch individual entries).
                  type: array
                  items:
                    description: >-
                      Per-metric analysis overrides stored on the experiment
                      (matches internal metricOverrides).
                    type: object
                    properties:
                      id:
                        description: ID of the metric to override settings for.
                        type: string
                      windowType:
                        type: string
                        enum:
                          - conversion
                          - lookback
                          - ''
                      windowHours:
                        type: number
                      delayHours:
                        type: number
                      properPriorOverride:
                        description: >-
                          Must be true for the override to take effect. If true,
                          the other proper prior settings in this object will be
                          used if present.
                        type: boolean
                      properPriorEnabled:
                        type: boolean
                      properPriorMean:
                        type: number
                      properPriorStdDev:
                        type: number
                      regressionAdjustmentOverride:
                        description: >-
                          Must be true for the override to take effect. If true,
                          the other regression adjustment settings in this
                          object will be used if present.
                        type: boolean
                      regressionAdjustmentEnabled:
                        type: boolean
                      regressionAdjustmentDays:
                        type: number
                    required:
                      - id
                    additionalProperties: false
                defaultDashboardId:
                  description: ID of the default dashboard for this experiment.
                  type: string
                customFields:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                customMetricSlices:
                  description: >-
                    Custom slices that apply to ALL applicable metrics in the
                    experiment
                  type: array
                  items:
                    type: object
                    properties:
                      slices:
                        type: array
                        items:
                          type: object
                          properties:
                            column:
                              type: string
                            levels:
                              type: array
                              items:
                                type: string
                          required:
                            - column
                            - levels
                          additionalProperties: false
                    required:
                      - slices
                    additionalProperties: false
              required:
                - trackingKey
                - name
                - variations
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  experiment:
                    $ref: '#/components/schemas/Experiment'
                required:
                  - experiment
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/experiments' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/experiments/{id}:
    get:
      operationId: getExperiment
      summary: Get a single experiment
      tags:
        - experiments
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  experiment:
                    $ref: '#/components/schemas/ExperimentWithEnhancedStatus'
                required:
                  - experiment
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/experiments/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: updateExperiment
      summary: Update a single experiment
      tags:
        - experiments
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                datasourceId:
                  description: >-
                    Can only be set if existing experiment does not have a
                    datasource
                  type: string
                assignmentQueryId:
                  type: string
                trackingKey:
                  type: string
                bypassDuplicateKeyCheck:
                  description: >-
                    If true, allow updating the tracking key even if another
                    experiment with the same tracking key already exist. This is
                    ignored if the organization requires unique tracking keys as
                    a rule.
                  type: boolean
                name:
                  description: Name of the experiment
                  type: string
                type:
                  type: string
                  enum:
                    - standard
                    - multi-armed-bandit
                project:
                  description: Project ID which the experiment belongs to
                  type: string
                hypothesis:
                  description: Hypothesis of the experiment
                  type: string
                description:
                  description: Description of the experiment
                  type: string
                tags:
                  type: array
                  items:
                    type: string
                metrics:
                  type: array
                  items:
                    type: string
                secondaryMetrics:
                  type: array
                  items:
                    type: string
                guardrailMetrics:
                  type: array
                  items:
                    type: string
                activationMetric:
                  description: Users must convert on this metric before being included
                  type: string
                segmentId:
                  description: Only users in this segment will be included
                  type: string
                queryFilter:
                  description: WHERE clause to add to the default experiment query
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                archived:
                  type: boolean
                status:
                  type: string
                  enum:
                    - draft
                    - running
                    - stopped
                autoRefresh:
                  type: boolean
                hashAttribute:
                  type: string
                fallbackAttribute:
                  type: string
                hashVersion:
                  anyOf:
                    - type: number
                      const: 1
                    - type: number
                      const: 2
                disableStickyBucketing:
                  type: boolean
                bucketVersion:
                  type: number
                minBucketVersion:
                  type: number
                results:
                  description: >-
                    The result status of the experiment. Maps to
                    resultSummary.status in the GET response.
                  type: string
                  enum:
                    - dnf
                    - won
                    - lost
                    - inconclusive
                winner:
                  description: >-
                    The index of the winning variation (0-indexed). Maps to
                    resultSummary.winner (variation ID) in the GET response.
                  type: number
                analysis:
                  description: >-
                    Analysis summary or conclusions for the experiment. Maps to
                    resultSummary.conclusions in the GET response.
                  type: string
                releasedVariationId:
                  description: >-
                    The ID of the released variation. Maps to
                    resultSummary.releasedVariationId in the GET response.
                  type: string
                excludeFromPayload:
                  description: >-
                    If true, the experiment is excluded from the SDK payload.
                    Maps to resultSummary.excludeFromPayload in the GET
                    response.
                  type: boolean
                inProgressConversions:
                  type: string
                  enum:
                    - loose
                    - strict
                attributionModel:
                  description: >-
                    Setting attribution model to `"experimentDuration"` is the
                    same as selecting "Ignore Conversion Windows" for the
                    Conversion Window Override. Setting it to
                    `"lookbackOverride"` requires a `lookbackOverride` object to
                    be provided.
                  type: string
                  enum:
                    - firstExposure
                    - experimentDuration
                    - lookbackOverride
                lookbackOverride:
                  description: >-
                    Controls the lookback override for the experiment. For type
                    "window", value must be a non-negative number and valueUnit
                    is required.
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - date
                        - window
                    value:
                      description: >-
                        For "window" type - non-negative numeric value (e.g. 7
                        for 7 days). For "date" type a date string.
                      anyOf:
                        - description: >-
                            For "window" type - non-negative numeric value (e.g.
                            7 for 7 days). For "date" type a date string.
                          type: number
                        - format: date-time
                          description: >-
                            For "window" type - non-negative numeric value (e.g.
                            7 for 7 days). For "date" type a date string.
                          type: string
                    valueUnit:
                      description: Used when type is "window". Defaults to "days".
                      type: string
                      enum:
                        - minutes
                        - hours
                        - days
                        - weeks
                  required:
                    - type
                    - value
                  additionalProperties: false
                statsEngine:
                  type: string
                  enum:
                    - bayesian
                    - frequentist
                variations:
                  minItems: 2
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      key:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                      screenshots:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            width:
                              type: number
                            height:
                              type: number
                            description:
                              type: string
                          required:
                            - path
                          additionalProperties: false
                    required:
                      - key
                      - name
                    additionalProperties: false
                phases:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      dateStarted:
                        format: date-time
                        type: string
                      dateEnded:
                        format: date-time
                        type: string
                      reasonForStopping:
                        type: string
                      seed:
                        type: string
                      coverage:
                        type: number
                      trafficSplit:
                        deprecated: true
                        description: Deprecated and unused. Use variationWeights instead.
                        type: array
                        items:
                          type: object
                          properties:
                            variationId:
                              type: string
                            weight:
                              type: number
                          required:
                            - variationId
                            - weight
                          additionalProperties: false
                      namespace:
                        type: object
                        properties:
                          namespaceId:
                            type: string
                          range:
                            minItems: 2
                            maxItems: 2
                            type: array
                            items:
                              type: number
                          enabled:
                            type: boolean
                        required:
                          - namespaceId
                          - range
                        additionalProperties: false
                      targetingCondition:
                        type: string
                      prerequisites:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              description: Feature ID
                              type: string
                            condition:
                              type: string
                          required:
                            - id
                            - condition
                          additionalProperties: false
                      reason:
                        type: string
                      condition:
                        type: string
                      savedGroupTargeting:
                        type: array
                        items:
                          type: object
                          properties:
                            matchType:
                              type: string
                              enum:
                                - all
                                - any
                                - none
                            savedGroups:
                              type: array
                              items:
                                type: string
                          required:
                            - matchType
                            - savedGroups
                          additionalProperties: false
                      variationWeights:
                        type: array
                        items:
                          type: number
                    required:
                      - name
                      - dateStarted
                    additionalProperties: false
                regressionAdjustmentEnabled:
                  description: >-
                    Controls whether regression adjustment (CUPED) is enabled
                    for experiment analyses
                  type: boolean
                sequentialTestingEnabled:
                  description: Only applicable to frequentist analyses
                  type: boolean
                sequentialTestingTuningParameter:
                  type: number
                shareLevel:
                  type: string
                  enum:
                    - public
                    - organization
                banditScheduleValue:
                  type: number
                banditScheduleUnit:
                  type: string
                  enum:
                    - days
                    - hours
                banditBurnInValue:
                  type: number
                banditBurnInUnit:
                  type: string
                  enum:
                    - days
                    - hours
                banditConversionWindowValue:
                  type: number
                banditConversionWindowUnit:
                  type: string
                  enum:
                    - days
                    - hours
                postStratificationEnabled:
                  description: When null, the organization default is used.
                  anyOf:
                    - description: When null, the organization default is used.
                      type: boolean
                    - description: When null, the organization default is used.
                      type: 'null'
                decisionFrameworkSettings:
                  description: >-
                    Controls the decision framework and metric overrides for the
                    experiment. Replaces the entire stored object on update
                    (does not patch individual fields).
                  type: object
                  properties:
                    decisionCriteriaId:
                      type: string
                    decisionFrameworkMetricOverrides:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            description: ID of the metric to override settings for.
                            type: string
                          targetMDE:
                            description: >-
                              The target relative MDE to use for the metric,
                              expressed as proportions (e.g. use 0.1 for 10%).
                              Must be greater than 0.
                            type: number
                            exclusiveMinimum: 0
                        required:
                          - id
                        additionalProperties: false
                  additionalProperties: false
                metricOverrides:
                  description: >-
                    Per-metric analysis overrides for this experiment. Replaces
                    the entire stored array (does not patch individual entries).
                  type: array
                  items:
                    description: >-
                      Per-metric analysis overrides stored on the experiment
                      (matches internal metricOverrides).
                    type: object
                    properties:
                      id:
                        description: ID of the metric to override settings for.
                        type: string
                      windowType:
                        type: string
                        enum:
                          - conversion
                          - lookback
                          - ''
                      windowHours:
                        type: number
                      delayHours:
                        type: number
                      properPriorOverride:
                        description: >-
                          Must be true for the override to take effect. If true,
                          the other proper prior settings in this object will be
                          used if present.
                        type: boolean
                      properPriorEnabled:
                        type: boolean
                      properPriorMean:
                        type: number
                      properPriorStdDev:
                        type: number
                      regressionAdjustmentOverride:
                        description: >-
                          Must be true for the override to take effect. If true,
                          the other regression adjustment settings in this
                          object will be used if present.
                        type: boolean
                      regressionAdjustmentEnabled:
                        type: boolean
                      regressionAdjustmentDays:
                        type: number
                    required:
                      - id
                    additionalProperties: false
                defaultDashboardId:
                  description: ID of the default dashboard for this experiment.
                  type: string
                customFields:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                customMetricSlices:
                  description: >-
                    Custom slices that apply to ALL applicable metrics in the
                    experiment
                  type: array
                  items:
                    type: object
                    properties:
                      slices:
                        type: array
                        items:
                          type: object
                          properties:
                            column:
                              type: string
                            levels:
                              type: array
                              items:
                                type: string
                          required:
                            - column
                            - levels
                          additionalProperties: false
                    required:
                      - slices
                    additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  experiment:
                    $ref: '#/components/schemas/Experiment'
                required:
                  - experiment
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/experiments/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/experiments/{id}/results:
    get:
      operationId: getExperimentResults
      summary: Get results for an experiment
      tags:
        - experiments
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/phase'
        - $ref: '#/components/parameters/dimension'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/ExperimentResults'
                required:
                  - result
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/experiments/{id}/results' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/experiments/{id}/start:
    post:
      operationId: postExperimentStart
      summary: Start an experiment
      tags:
        - experiments
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                skipChecklist:
                  description: >-
                    If true, skips validating the experiment satisifies all
                    pre-launch checklist items
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  experiment:
                    $ref: '#/components/schemas/ExperimentWithEnhancedStatus'
                required:
                  - experiment
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/experiments/exp_abc123/start' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/experiments/{id}/stop:
    post:
      operationId: postExperimentStop
      summary: Stop an experiment
      tags:
        - experiments
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                results:
                  description: The experiment conclusion status.
                  type: string
                  enum:
                    - dnf
                    - won
                    - lost
                    - inconclusive
                enableTemporaryRollout:
                  description: >-
                    If true, include this stopped experiment in SDK payload and
                    force the release variation (`releasedVariationId`) to all
                    traffic.
                  type: boolean
                releasedVariationId:
                  description: >-
                    Required if enableTemporaryRollout is true. Variation ID
                    (e.g. var_abc123) to release to 100% of traffic eligible for
                    this experiment.
                  type: string
                winnerVariationId:
                  description: >-
                    Variation ID (e.g. var_abc123) of the winning variation.
                    Used only as metadata. Required if results is 'won' and
                    there are multiple test variations. Otherwise, defaults to
                    the test variation when results is 'won' and to the baseline
                    variation for other results.
                  type: string
                analysis:
                  description: >-
                    Optional markdown summary displayed on the experiment
                    results page.
                  type: string
                reason:
                  description: >-
                    Optional reason for ending the phase stored on the latest
                    phase metadata.
                  type: string
                dateEnded:
                  description: >-
                    Optional ISO datetime for ending the latest phase. Defaults
                    to the current date and time.
                  type: string
              required:
                - results
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  experiment:
                    $ref: '#/components/schemas/ExperimentWithEnhancedStatus'
                required:
                  - experiment
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/experiments/exp_abc123/stop' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"results":"won","releasedVariationId":"var_treatment","winnerVariationId":"var_treatment","enableTemporaryRollout":true,"analysis":"Reached desired sample size with statistically significant positive lift; shipping treatment"}'
  /v1/experiments/{id}/modify-temporary-rollout:
    post:
      operationId: postExperimentModifyTemporaryRollout
      summary: Modify temporary rollout status for a stopped experiment
      tags:
        - experiments
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                enableTemporaryRollout:
                  description: >-
                    If true, keep the stopped experiment in SDK payload and
                    force traffic to the winner variation. If false, end
                    temporary rollout and remove from SDK payload.
                  type: boolean
                releasedVariationId:
                  description: >-
                    Variation ID (e.g. var_abc123) to release to 100% of traffic
                    eligible for this experiment. Required if
                    enableTemporaryRollout is true.
                  type: string
              required:
                - enableTemporaryRollout
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  experiment:
                    $ref: '#/components/schemas/ExperimentWithEnhancedStatus'
                required:
                  - experiment
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/experiments/exp_abc123/modify-temporary-rollout'
            \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"enableTemporaryRollout":false}'
  /v1/experiments/{id}/snapshot:
    post:
      operationId: postExperimentSnapshot
      summary: Create Experiment Snapshot
      tags:
        - experiments
        - snapshots
      parameters:
        - name: id
          in: path
          required: true
          description: The experiment id of the experiment to update
          schema:
            description: The experiment id of the experiment to update
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                triggeredBy:
                  description: >-
                    Set to "schedule" if you want this request to trigger
                    notifications and other events as it if were a scheduled
                    update. Defaults to manual.
                  type: string
                  enum:
                    - manual
                    - schedule
                dimension:
                  description: >-
                    Dimension to break results down by. For Unit Dimensions, use
                    the dimension id (e.g. "dim_abc123"). For Experiment
                    Dimensions, use "exp:<dimensionName>" (e.g. "exp:country").
                    Built-in pre-exposure dimensions include "pre:date" and,
                    when configured, "pre:activation". Omit this field to create
                    a standard snapshot.
                  type: string
                phase:
                  description: >-
                    Zero-based phase index to snapshot, where 0 is the first
                    experiment phase. Defaults to the latest phase.
                  type: integer
                  minimum: 0
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  snapshot:
                    $ref: '#/components/schemas/snapshot'
                required:
                  - snapshot
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/experiments/{id}/snapshot' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"triggeredBy":"schedule"}'
  /v1/experiments/{id}/variation/{variationId}/screenshot/upload:
    post:
      operationId: postVariationImageUpload
      summary: Upload a variation screenshot
      tags:
        - experiments
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/variationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                screenshot:
                  contentEncoding: base64
                  description: Base64-encoded screenshot data
                  type: string
                contentType:
                  description: MIME type of the screenshot
                  type: string
                  enum:
                    - image/png
                    - image/jpeg
                    - image/gif
                description:
                  description: Optional description for the screenshot
                  type: string
              required:
                - screenshot
                - contentType
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  screenshot:
                    $ref: '#/components/schemas/screenshot'
                required:
                  - screenshot
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/experiments/{id}/variation/{variationId}/screenshot/upload'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/experiments/{id}/variation/{variationId}/screenshot:
    delete:
      operationId: deleteVariationScreenshot
      summary: Delete a variation screenshot
      tags:
        - experiments
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/variationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                path:
                  description: The screenshot path/URL to delete (from upload response)
                  type: string
              required:
                - path
              additionalProperties: false
      responses:
        '200':
          description: Screenshot deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/experiments/{id}/variation/{variationId}/screenshot'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/experiment-names:
    get:
      operationId: getExperimentNames
      summary: Get a list of experiments with names and ids
      tags:
        - experiments
      parameters:
        - $ref: '#/components/parameters/projectId'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  experiments:
                    type: array
                    items:
                      $ref: '#/components/schemas/experiments'
                required:
                  - experiments
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/experiment-names' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/experiments/{id}/visual-changesets:
    get:
      operationId: listVisualChangesets
      summary: Get all visual changesets
      tags:
        - visual-changesets
      parameters:
        - name: id
          in: path
          required: true
          description: The experiment id the visual changesets belong to
          schema:
            description: The experiment id the visual changesets belong to
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  visualChangesets:
                    type: array
                    items:
                      $ref: '#/components/schemas/VisualChangeset'
                required:
                  - visualChangesets
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/experiments/abc123/visual-changesets'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postVisualChangesets
      summary: Create a visual changeset for an experiment
      tags:
        - visual-changesets
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                editorUrl:
                  description: >-
                    URL of the page opened in the visual editor when creating
                    this changeset
                  type: string
                urlPatterns:
                  description: >-
                    URL patterns that determine which pages this visual
                    changeset applies to
                  type: array
                  items:
                    type: object
                    properties:
                      include:
                        type: boolean
                      type:
                        type: string
                        enum:
                          - simple
                          - regex
                      pattern:
                        type: string
                    required:
                      - type
                      - pattern
                    additionalProperties: false
              required:
                - editorUrl
                - urlPatterns
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  visualChangeset:
                    $ref: '#/components/schemas/VisualChangeset'
                required:
                  - visualChangeset
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/experiments/abc123/visual-changesets'
            \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"editorUrl":"https://example.com/","urlPatterns":[{"type":"simple","pattern":"/","include":true}]}'
  /v1/snapshots/{id}:
    get:
      operationId: getExperimentSnapshot
      summary: Get an experiment snapshot status
      tags:
        - snapshots
      parameters:
        - name: id
          in: path
          required: true
          description: The id of the requested resource (a snapshot ID, not experiment ID)
          schema:
            description: >-
              The id of the requested resource (a snapshot ID, not experiment
              ID)
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  snapshot:
                    $ref: '#/components/schemas/snapshot'
                required:
                  - snapshot
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/snapshots/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/metrics:
    get:
      operationId: listMetrics
      summary: Get all metrics
      tags:
        - metrics
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/projectId'
        - $ref: '#/components/parameters/datasourceId'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      metrics:
                        type: array
                        items:
                          $ref: '#/components/schemas/Metric'
                    required:
                      - metrics
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/metrics' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postMetric
      summary: Create a single metric
      tags:
        - metrics
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                datasourceId:
                  description: ID for the [DataSource](#tag/DataSource_model)
                  type: string
                managedBy:
                  description: >-
                    Where this metric must be managed from. If not set (empty
                    string), it can be managed from anywhere. If set to "api",
                    it can be managed via the API only.
                  type: string
                  enum:
                    - ''
                    - api
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                name:
                  description: Name of the metric
                  type: string
                description:
                  description: Description of the metric
                  type: string
                type:
                  description: >-
                    Type of metric. See [Metrics
                    documentation](/app/metrics/legacy)
                  type: string
                  enum:
                    - binomial
                    - count
                    - duration
                    - revenue
                tags:
                  description: List of tags
                  type: array
                  items:
                    type: string
                projects:
                  description: List of project IDs for projects that can access this metric
                  type: array
                  items:
                    type: string
                archived:
                  type: boolean
                behavior:
                  type: object
                  properties:
                    goal:
                      type: string
                      enum:
                        - increase
                        - decrease
                    cappingSettings:
                      description: Controls how outliers are handled
                      type: object
                      properties:
                        type:
                          anyOf:
                            - type: string
                              enum:
                                - none
                                - absolute
                                - percentile
                            - type: 'null'
                        value:
                          description: >-
                            When type is absolute, this is the absolute value.
                            When type is percentile, this is the percentile
                            value (from 0.0 to 1.0).
                          type: number
                        ignoreZeros:
                          description: >-
                            If true and capping is `percentile`, zeros will be
                            ignored when calculating the percentile.
                          type: boolean
                      required:
                        - type
                      additionalProperties: false
                    cap:
                      deprecated: true
                      description: >-
                        (deprecated, use cappingSettings instead) This should be
                        non-negative
                      type: number
                      minimum: 0
                    capping:
                      deprecated: true
                      description: >-
                        (deprecated, use cappingSettings instead) Used in
                        conjunction with `capValue` to set the capping
                        (winsorization). Do not specify or set to null for no
                        capping. "absolute" will cap user values at the
                        `capValue` if it is greater than 0. "percentile" will
                        cap user values at the percentile of user values in an
                        experiment using the `capValue` for the percentile, if
                        greater than 0. <br/>  If `behavior.capping` is
                        non-null, you must specify `behavior.capValue`.
                      anyOf:
                        - type: string
                          enum:
                            - absolute
                            - percentile
                        - type: 'null'
                    capValue:
                      deprecated: true
                      description: >-
                        (deprecated, use cappingSettings instead) This should be
                        non-negative. <br/> Must specify `behavior.capping` when
                        setting `behavior.capValue`.
                      type: number
                      minimum: 0
                    windowSettings:
                      description: Controls the conversion window for the metric
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - none
                            - conversion
                            - lookback
                        delayHours:
                          deprecated: true
                          description: >-
                            Wait this many hours after experiment exposure
                            before counting conversions. Ignored if delayValue
                            is set.
                          type: number
                        delayValue:
                          description: >-
                            Wait this long after experiment exposure before
                            counting conversions.
                          type: number
                        delayUnit:
                          description: Default `hours`.
                          type: string
                          enum:
                            - minutes
                            - hours
                            - days
                            - weeks
                        windowValue:
                          type: number
                        windowUnit:
                          type: string
                          enum:
                            - minutes
                            - hours
                            - days
                            - weeks
                      required:
                        - type
                      additionalProperties: false
                    conversionWindowStart:
                      deprecated: true
                      description: >-
                        The start of a Conversion Window relative to the
                        exposure date, in hours. This is equivalent to the
                        [Conversion
                        Delay](/app/metrics/legacy/#conversion-delay). <br/>
                        Must specify both `behavior.conversionWindowStart` and
                        `behavior.conversionWindowEnd` or neither.
                      type: number
                    conversionWindowEnd:
                      deprecated: true
                      description: >-
                        The end of a [Conversion
                        Window](/app/metrics/legacy/#conversion-window) relative
                        to the exposure date, in hours. This is equivalent to
                        the [Conversion
                        Delay](/app/metrics/legacy/#conversion-delay) +
                        Conversion Window Hours settings in the UI. In other
                        words, if you want a 48 hour window starting after 24
                        hours, you would set conversionWindowStart to 24 and
                        conversionWindowEnd to 72 (24+48). <br/> Must specify
                        both `behavior.conversionWindowStart` and
                        `behavior.conversionWindowEnd` or neither.
                      type: number
                    priorSettings:
                      description: >-
                        Controls the bayesian prior for the metric. If omitted,
                        organization defaults will be used.
                      type: object
                      properties:
                        override:
                          description: >-
                            If false, the organization default settings will be
                            used instead of the other settings in this object
                          type: boolean
                        proper:
                          description: >-
                            If true, the `mean` and `stddev` will be used,
                            otherwise we will use an improper flat prior.
                          type: boolean
                        mean:
                          description: >-
                            The mean of the prior distribution of relative
                            effects in proportion terms (e.g. 0.01 is 1%)
                          type: number
                        stddev:
                          description: >-
                            Must be > 0. The standard deviation of the prior
                            distribution of relative effects in proportion
                            terms.
                          type: number
                          exclusiveMinimum: 0
                      required:
                        - override
                        - proper
                        - mean
                        - stddev
                      additionalProperties: false
                    riskThresholdSuccess:
                      deprecated: true
                      description: >-
                        No longer used. Threshold for Risk to be considered low
                        enough, as a proportion (e.g. put 0.0025 for 0.25%).
                        <br/> Must be a non-negative number and must not be
                        higher than `riskThresholdDanger`.
                      type: number
                      minimum: 0
                    riskThresholdDanger:
                      deprecated: true
                      description: >-
                        No longer used. Threshold for Risk to be considered too
                        high, as a proportion (e.g. put 0.0125 for 1.25%). <br/>
                        Must be a non-negative number.
                      type: number
                      minimum: 0
                    minPercentChange:
                      description: >-
                        Minimum percent change to consider uplift significant,
                        as a proportion (e.g. put 0.005 for 0.5%)
                      type: number
                      minimum: 0
                    maxPercentChange:
                      description: >-
                        Maximum percent change to consider uplift significant,
                        as a proportion (e.g. put 0.5 for 50%)
                      type: number
                      minimum: 0
                    minSampleSize:
                      type: number
                      minimum: 0
                    targetMDE:
                      description: >-
                        The percentage change that you want to reliably detect
                        before ending an experiment, as a proportion (e.g. put
                        0.1 for 10%). This is used to estimate the "Days Left"
                        for running experiments.
                      type: number
                      minimum: 0
                  additionalProperties: false
                sql:
                  description: >-
                    Preferred way to define SQL. Only one of `sql`, `sqlBuilder`
                    or `mixpanel` allowed, and at least one must be specified.
                  type: object
                  properties:
                    identifierTypes:
                      type: array
                      items:
                        type: string
                    conversionSQL:
                      type: string
                    userAggregationSQL:
                      description: >-
                        Custom user level aggregation for your metric (default:
                        `SUM(value)`)
                      type: string
                    denominatorMetricId:
                      description: >-
                        The metric ID for a [denominator metric for funnel and
                        ratio
                        metrics](/app/metrics/legacy/#denominator-ratio--funnel-metrics)
                      type: string
                  required:
                    - identifierTypes
                    - conversionSQL
                  additionalProperties: false
                sqlBuilder:
                  description: >-
                    An alternative way to specify a SQL metric, rather than a
                    full query. Using `sql` is preferred to `sqlBuilder`. Only
                    one of `sql`, `sqlBuilder` or `mixpanel` allowed, and at
                    least one must be specified.
                  type: object
                  properties:
                    identifierTypeColumns:
                      type: array
                      items:
                        type: object
                        properties:
                          identifierType:
                            type: string
                          columnName:
                            type: string
                        required:
                          - identifierType
                          - columnName
                        additionalProperties: false
                    tableName:
                      type: string
                    valueColumnName:
                      type: string
                    timestampColumnName:
                      type: string
                    conditions:
                      type: array
                      items:
                        type: object
                        properties:
                          column:
                            type: string
                          operator:
                            type: string
                          value:
                            type: string
                        required:
                          - column
                          - operator
                          - value
                        additionalProperties: false
                  required:
                    - identifierTypeColumns
                    - tableName
                    - timestampColumnName
                  additionalProperties: false
                mixpanel:
                  description: >-
                    Only use for MixPanel (non-SQL) Data Sources. Only one of
                    `sql`, `sqlBuilder` or `mixpanel` allowed, and at least one
                    must be specified.
                  type: object
                  properties:
                    eventName:
                      type: string
                    eventValue:
                      type: string
                    userAggregation:
                      type: string
                    conditions:
                      type: array
                      items:
                        type: object
                        properties:
                          property:
                            type: string
                          operator:
                            type: string
                          value:
                            type: string
                        required:
                          - property
                          - operator
                          - value
                        additionalProperties: false
                  required:
                    - eventName
                    - userAggregation
                  additionalProperties: false
              required:
                - datasourceId
                - name
                - type
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  metric:
                    $ref: '#/components/schemas/Metric'
                required:
                  - metric
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/metrics' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/metrics/{id}:
    get:
      operationId: getMetric
      summary: Get a single metric
      tags:
        - metrics
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  metric:
                    $ref: '#/components/schemas/Metric'
                required:
                  - metric
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/metrics/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: putMetric
      summary: Update a metric
      tags:
        - metrics
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                managedBy:
                  description: >-
                    Where this metric must be managed from. If not set (empty
                    string), it can be managed from anywhere. If set to "api",
                    it can be managed via the API only. Please note that we have
                    deprecated support for setting the managedBy property to
                    "admin". Your existing Legacy Metrics with this value will
                    continue to work, but we suggest migrating to Fact Metrics
                    instead.
                  type: string
                  enum:
                    - ''
                    - api
                    - admin
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                name:
                  description: Name of the metric
                  type: string
                description:
                  description: Description of the metric
                  type: string
                type:
                  description: >-
                    Type of metric. See [Metrics
                    documentation](/app/metrics/legacy)
                  type: string
                  enum:
                    - binomial
                    - count
                    - duration
                    - revenue
                tags:
                  description: List of tags
                  type: array
                  items:
                    type: string
                projects:
                  description: List of project IDs for projects that can access this metric
                  type: array
                  items:
                    type: string
                archived:
                  type: boolean
                behavior:
                  type: object
                  properties:
                    goal:
                      type: string
                      enum:
                        - increase
                        - decrease
                    cappingSettings:
                      description: Controls how outliers are handled
                      type: object
                      properties:
                        type:
                          anyOf:
                            - type: string
                              enum:
                                - none
                                - absolute
                                - percentile
                            - type: 'null'
                        value:
                          description: >-
                            When type is absolute, this is the absolute value.
                            When type is percentile, this is the percentile
                            value (from 0.0 to 1.0).
                          type: number
                        ignoreZeros:
                          description: >-
                            If true and capping is `percentile`, zeros will be
                            ignored when calculating the percentile.
                          type: boolean
                      required:
                        - type
                      additionalProperties: false
                    cap:
                      deprecated: true
                      description: >-
                        (deprecated, use cappingSettings instead) This should be
                        non-negative
                      type: number
                      minimum: 0
                    capping:
                      deprecated: true
                      description: >-
                        (deprecated, use cappingSettings instead) Used in
                        conjunction with `capValue` to set the capping
                        (winsorization). Do not specify or set to null for no
                        capping. "absolute" will cap user values at the
                        `capValue` if it is greater than 0. "percentile" will
                        cap user values at the percentile of user values in an
                        experiment using the `capValue` for the percentile, if
                        greater than 0. <br/>  If `behavior.capping` is
                        non-null, you must specify `behavior.capValue`.
                      anyOf:
                        - type: string
                          enum:
                            - absolute
                            - percentile
                        - type: 'null'
                    capValue:
                      deprecated: true
                      description: >-
                        (deprecated, use cappingSettings instead) This should be
                        non-negative. <br/> Must specify `behavior.capping` when
                        setting `behavior.capValue`.
                      type: number
                      minimum: 0
                    windowSettings:
                      description: Controls the conversion window for the metric
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - none
                            - conversion
                            - lookback
                        delayHours:
                          deprecated: true
                          description: >-
                            Wait this many hours after experiment exposure
                            before counting conversions. Ignored if delayValue
                            is set.
                          type: number
                        delayValue:
                          description: >-
                            Wait this long after experiment exposure before
                            counting conversions.
                          type: number
                        delayUnit:
                          description: Default `hours`.
                          type: string
                          enum:
                            - minutes
                            - hours
                            - days
                            - weeks
                        windowValue:
                          type: number
                        windowUnit:
                          type: string
                          enum:
                            - minutes
                            - hours
                            - days
                            - weeks
                      required:
                        - type
                      additionalProperties: false
                    conversionWindowStart:
                      deprecated: true
                      description: >-
                        The start of a Conversion Window relative to the
                        exposure date, in hours. This is equivalent to the
                        [Conversion
                        Delay](/app/metrics/legacy/#conversion-delay). <br/>
                        Must specify both `behavior.conversionWindowStart` and
                        `behavior.conversionWindowEnd` or neither.
                      type: number
                    conversionWindowEnd:
                      deprecated: true
                      description: >-
                        The end of a [Conversion
                        Window](/app/metrics/legacy/#conversion-window) relative
                        to the exposure date, in hours. This is equivalent to
                        the [Conversion
                        Delay](/app/metrics/legacy/#conversion-delay) +
                        Conversion Window Hours settings in the UI. In other
                        words, if you want a 48 hour window starting after 24
                        hours, you would set conversionWindowStart to 24 and
                        conversionWindowEnd to 72 (24+48). <br/> Must specify
                        both `behavior.conversionWindowStart` and
                        `behavior.conversionWindowEnd` or neither.
                      type: number
                    priorSettings:
                      description: >-
                        Controls the bayesian prior for the metric. If omitted,
                        organization defaults will be used.
                      type: object
                      properties:
                        override:
                          description: >-
                            If false, the organization default settings will be
                            used instead of the other settings in this object
                          type: boolean
                        proper:
                          description: >-
                            If true, the `mean` and `stddev` will be used,
                            otherwise we will use an improper flat prior.
                          type: boolean
                        mean:
                          description: >-
                            The mean of the prior distribution of relative
                            effects in proportion terms (e.g. 0.01 is 1%)
                          type: number
                        stddev:
                          description: >-
                            Must be > 0. The standard deviation of the prior
                            distribution of relative effects in proportion
                            terms.
                          type: number
                          exclusiveMinimum: 0
                      required:
                        - override
                        - proper
                        - mean
                        - stddev
                      additionalProperties: false
                    riskThresholdSuccess:
                      deprecated: true
                      description: >-
                        No longer used. Threshold for Risk to be considered low
                        enough, as a proportion (e.g. put 0.0025 for 0.25%).
                        <br/> Must be a non-negative number and must not be
                        higher than `riskThresholdDanger`.
                      type: number
                      minimum: 0
                    riskThresholdDanger:
                      deprecated: true
                      description: >-
                        No longer used. Threshold for Risk to be considered too
                        high, as a proportion (e.g. put 0.0125 for 1.25%). <br/>
                        Must be a non-negative number.
                      type: number
                      minimum: 0
                    minPercentChange:
                      description: >-
                        Minimum percent change to consider uplift significant,
                        as a proportion (e.g. put 0.005 for 0.5%)
                      type: number
                      minimum: 0
                    maxPercentChange:
                      description: >-
                        Maximum percent change to consider uplift significant,
                        as a proportion (e.g. put 0.5 for 50%)
                      type: number
                      minimum: 0
                    minSampleSize:
                      type: number
                      minimum: 0
                    targetMDE:
                      description: >-
                        The percentage change that you want to reliably detect
                        before ending an experiment, as a proportion (e.g. put
                        0.1 for 10%). This is used to estimate the "Days Left"
                        for running experiments.
                      type: number
                      minimum: 0
                  additionalProperties: false
                sql:
                  description: >-
                    Preferred way to define SQL. Only one of `sql`, `sqlBuilder`
                    or `mixpanel` allowed.
                  type: object
                  properties:
                    identifierTypes:
                      type: array
                      items:
                        type: string
                    conversionSQL:
                      type: string
                    userAggregationSQL:
                      description: >-
                        Custom user level aggregation for your metric (default:
                        `SUM(value)`)
                      type: string
                    denominatorMetricId:
                      description: >-
                        The metric ID for a [denominator metric for funnel and
                        ratio
                        metrics](/app/metrics/legacy/#denominator-ratio--funnel-metrics)
                      type: string
                  additionalProperties: false
                sqlBuilder:
                  description: >-
                    An alternative way to specify a SQL metric, rather than a
                    full query. Using `sql` is preferred to `sqlBuilder`. Only
                    one of `sql`, `sqlBuilder` or `mixpanel` allowed
                  type: object
                  properties:
                    identifierTypeColumns:
                      type: array
                      items:
                        type: object
                        properties:
                          identifierType:
                            type: string
                          columnName:
                            type: string
                        required:
                          - identifierType
                          - columnName
                        additionalProperties: false
                    tableName:
                      type: string
                    valueColumnName:
                      type: string
                    timestampColumnName:
                      type: string
                    conditions:
                      type: array
                      items:
                        type: object
                        properties:
                          column:
                            type: string
                          operator:
                            type: string
                          value:
                            type: string
                        required:
                          - column
                          - operator
                          - value
                        additionalProperties: false
                  additionalProperties: false
                mixpanel:
                  description: >-
                    Only use for MixPanel (non-SQL) Data Sources. Only one of
                    `sql`, `sqlBuilder` or `mixpanel` allowed.
                  type: object
                  properties:
                    eventName:
                      type: string
                    eventValue:
                      type: string
                    userAggregation:
                      type: string
                    conditions:
                      type: array
                      items:
                        type: object
                        properties:
                          property:
                            type: string
                          operator:
                            type: string
                          value:
                            type: string
                        required:
                          - property
                          - operator
                          - value
                        additionalProperties: false
                  additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  updatedId:
                    type: string
                required:
                  - updatedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X PUT 'https://api.growthbook.io/api/v1/metrics/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"net revenue","description":"revenue minus lacroix spend"}'
    delete:
      operationId: deleteMetric
      summary: Deletes a metric
      tags:
        - metrics
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X DELETE 'https://api.growthbook.io/api/v1/metrics/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/usage/metrics:
    get:
      operationId: getMetricUsage
      summary: Get metric usage across experiments
      description: >
        Returns usage information for one or more legacy or fact metrics,
        showing which experiments use each metric

        and some usage statistics. If a metric is part of a metric group, then
        usage of that metric group counts as

        usage of all metrics in the group. Warning: only includes experiments
        that you have access to! If you do not have admin

        access or read access to experiments across all projects, this endpoint
        may not return the latest usage data across

        all experiments. 
      tags:
        - usage
      parameters:
        - name: ids
          in: query
          required: true
          description: >-
            List of comma-separated metric IDs (both fact and legacy) to get
            usage for, e.g. ids=met_123,fact_456
          schema:
            description: >-
              List of comma-separated metric IDs (both fact and legacy) to get
              usage for, e.g. ids=met_123,fact_456
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  metricUsage:
                    type: array
                    items:
                      $ref: '#/components/schemas/MetricUsage'
                required:
                  - metricUsage
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/usage/metrics' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/segments:
    get:
      operationId: listSegments
      summary: Get all segments
      tags:
        - segments
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/datasourceId'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      segments:
                        type: array
                        items:
                          $ref: '#/components/schemas/Segment'
                    required:
                      - segments
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/segments' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postSegment
      summary: Create a single segment
      tags:
        - segments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: Name of the segment
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                description:
                  description: Description of the segment
                  type: string
                datasourceId:
                  description: ID of the datasource this segment belongs to
                  type: string
                identifierType:
                  description: Type of identifier (user, anonymous, etc.)
                  type: string
                projects:
                  description: >-
                    List of project IDs for projects that can access this
                    segment
                  type: array
                  items:
                    type: string
                managedBy:
                  description: >-
                    Where this Segment must be managed from. If not set (empty
                    string), it can be managed from anywhere.
                  type: string
                  enum:
                    - ''
                    - api
                type:
                  description: >-
                    GrowthBook supports two types of Segments, SQL and FACT. SQL
                    segments are defined by a SQL query, and FACT segments are
                    defined by a fact table and filters.
                  type: string
                  enum:
                    - SQL
                    - FACT
                query:
                  description: >-
                    SQL query that defines the Segment. This is required for SQL
                    segments.
                  type: string
                factTableId:
                  description: >-
                    ID of the fact table this segment belongs to. This is
                    required for FACT segments.
                  type: string
                filters:
                  description: >-
                    Optional array of fact table filter ids that can further
                    define the Fact Table based Segment.
                  type: array
                  items:
                    type: string
              required:
                - name
                - datasourceId
                - identifierType
                - type
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  segment:
                    $ref: '#/components/schemas/Segment'
                required:
                  - segment
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/segments' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"Annual Subscribers","datasourceId":"ds_123abc","identifierType":"user_id","type":"SQL","query":"SELECT plan FROM subscribers WHERE plan = "}'
  /v1/segments/{id}:
    get:
      operationId: getSegment
      summary: Get a single segment
      tags:
        - segments
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  segment:
                    $ref: '#/components/schemas/Segment'
                required:
                  - segment
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/segments/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: updateSegment
      summary: Update a single segment
      tags:
        - segments
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: Name of the segment
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                description:
                  description: Description of the segment
                  type: string
                datasourceId:
                  description: ID of the datasource this segment belongs to
                  type: string
                identifierType:
                  description: Type of identifier (user, anonymous, etc.)
                  type: string
                projects:
                  description: >-
                    List of project IDs for projects that can access this
                    segment
                  type: array
                  items:
                    type: string
                managedBy:
                  description: >-
                    Where this Segment must be managed from. If not set (empty
                    string), it can be managed from anywhere.
                  type: string
                  enum:
                    - ''
                    - api
                type:
                  description: >-
                    GrowthBook supports two types of Segments, SQL and FACT. SQL
                    segments are defined by a SQL query, and FACT segments are
                    defined by a fact table and filters.
                  type: string
                  enum:
                    - SQL
                    - FACT
                query:
                  description: >-
                    SQL query that defines the Segment. This is required for SQL
                    segments.
                  type: string
                factTableId:
                  description: >-
                    ID of the fact table this segment belongs to. This is
                    required for FACT segments.
                  type: string
                filters:
                  description: >-
                    Optional array of fact table filter ids that can further
                    define the Fact Table based Segment.
                  type: array
                  items:
                    type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  segment:
                    $ref: '#/components/schemas/Segment'
                required:
                  - segment
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/segments/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"User Region"}'
    delete:
      operationId: deleteSegment
      summary: Deletes a single segment
      tags:
        - segments
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    description: The ID of the deleted segment
                    example: seg_123abc
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X DELETE 'https://api.growthbook.io/api/v1/segments/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/dimensions:
    get:
      operationId: listDimensions
      summary: Get all dimensions
      tags:
        - dimensions
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/datasourceId'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      dimensions:
                        type: array
                        items:
                          $ref: '#/components/schemas/Dimension'
                    required:
                      - dimensions
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/dimensions' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postDimension
      summary: Create a single dimension
      tags:
        - dimensions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: Name of the dimension
                  type: string
                description:
                  description: Description of the dimension
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                datasourceId:
                  description: ID of the datasource this dimension belongs to
                  type: string
                identifierType:
                  description: Type of identifier (user, anonymous, etc.)
                  type: string
                query:
                  description: SQL query or equivalent for the dimension
                  type: string
                managedBy:
                  description: >-
                    Where this dimension must be managed from. If not set (empty
                    string), it can be managed from anywhere.
                  type: string
                  enum:
                    - ''
                    - api
              required:
                - name
                - datasourceId
                - identifierType
                - query
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  dimension:
                    $ref: '#/components/schemas/Dimension'
                required:
                  - dimension
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/dimensions' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"User Country","datasourceId":"ds_123abc","identifierType":"user","query":"SELECT country FROM users"}'
  /v1/dimensions/{id}:
    get:
      operationId: getDimension
      summary: Get a single dimension
      tags:
        - dimensions
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  dimension:
                    $ref: '#/components/schemas/Dimension'
                required:
                  - dimension
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/dimensions/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: updateDimension
      summary: Update a single dimension
      tags:
        - dimensions
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: Name of the dimension
                  type: string
                description:
                  description: Description of the dimension
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                datasourceId:
                  description: ID of the datasource this dimension belongs to
                  type: string
                identifierType:
                  description: Type of identifier (user, anonymous, etc.)
                  type: string
                query:
                  description: SQL query or equivalent for the dimension
                  type: string
                managedBy:
                  description: >-
                    Where this dimension must be managed from. If not set (empty
                    string), it can be managed from anywhere.
                  type: string
                  enum:
                    - ''
                    - api
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  dimension:
                    $ref: '#/components/schemas/Dimension'
                required:
                  - dimension
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/dimensions/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"User Region"}'
    delete:
      operationId: deleteDimension
      summary: Deletes a single dimension
      tags:
        - dimensions
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    description: The ID of the deleted dimension
                    example: dim_123abc
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE 'https://api.growthbook.io/api/v1/dimensions/abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/projects:
    get:
      operationId: listProjects
      summary: Get all projects
      tags:
        - projects
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      projects:
                        type: array
                        items:
                          $ref: '#/components/schemas/Project'
                    required:
                      - projects
                    additionalProperties: false
                  - type: object
                    properties:
                      limit:
                        type: integer
                      offset:
                        type: integer
                      count:
                        type: integer
                      total:
                        type: integer
                      hasMore:
                        type: boolean
                      nextOffset:
                        anyOf:
                          - type: integer
                          - type: 'null'
                    required:
                      - limit
                      - offset
                      - count
                      - total
                      - hasMore
                      - nextOffset
                    additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/projects' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postProject
      summary: Create a single project
      tags:
        - projects
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                publicId:
                  description: >-
                    URL-safe slug (lowercase letters, numbers, dashes).
                    Auto-generated from name if not provided.
                  type: string
                settings:
                  description: >-
                    Project stats settings that, when set, override the
                    organization settings.
                  type: object
                  properties:
                    statsEngine:
                      description: Stats engine.
                      type: string
                    confidenceLevel:
                      description: >-
                        Bayesian chance-to-win threshold (stored as decimal,
                        e.g. 0.95).
                      type: number
                    pValueThreshold:
                      description: Frequentist p-value threshold (e.g. 0.05).
                      type: number
                  additionalProperties: false
              required:
                - name
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  project:
                    $ref: '#/components/schemas/Project'
                required:
                  - project
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/projects' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"My Project","description":"Super cool project"}'
  /v1/projects/{id}:
    get:
      operationId: getProject
      summary: Get a single project
      tags:
        - projects
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  project:
                    $ref: '#/components/schemas/Project'
                required:
                  - project
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/projects/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: putProject
      summary: Edit a single project
      tags:
        - projects
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: Project name.
                  type: string
                description:
                  description: Project description.
                  type: string
                publicId:
                  description: URL-safe slug (lowercase letters, numbers, dashes).
                  type: string
                settings:
                  description: >-
                    Project stats settings that, when set, override the
                    organization settings.
                  type: object
                  properties:
                    statsEngine:
                      description: Stats engine.
                      type: string
                    confidenceLevel:
                      description: >-
                        Bayesian chance-to-win threshold (stored as decimal,
                        e.g. 0.95).
                      type: number
                    pValueThreshold:
                      description: Frequentist p-value threshold (e.g. 0.05).
                      type: number
                  additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  project:
                    $ref: '#/components/schemas/Project'
                required:
                  - project
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X PUT 'https://api.growthbook.io/api/v1/projects/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"My Subsidiary"}'
    delete:
      operationId: deleteProject
      summary: Deletes a single project
      tags:
        - projects
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    description: The ID of the deleted project
                    example: prj__123abc
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X DELETE 'https://api.growthbook.io/api/v1/projects/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/environments:
    get:
      operationId: listEnvironments
      summary: Get the organization's environments
      tags:
        - environments
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  environments:
                    type: array
                    items:
                      $ref: '#/components/schemas/Environment'
                required:
                  - environments
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/environments' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postEnvironment
      summary: Create a new environment
      tags:
        - environments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  description: The ID of the new environment
                  type: string
                description:
                  description: The description of the new environment
                  type: string
                toggleOnList:
                  description: Show on feature list page
                  type: boolean
                defaultState:
                  description: Default state for new features
                  type: boolean
                projects:
                  type: array
                  items:
                    type: string
                parent:
                  description: >-
                    An environment that the new environment should inherit
                    feature rules from. Requires an enterprise license
                  type: string
              required:
                - id
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  environment:
                    $ref: '#/components/schemas/Environment'
                required:
                  - environment
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/environments' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"id":"new-env","description":"My new environment"}'
  /v1/environments/{id}:
    put:
      operationId: putEnvironment
      summary: Update an environment
      tags:
        - environments
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  description: The description of the new environment
                  type: string
                toggleOnList:
                  description: Show on feature list page
                  type: boolean
                defaultState:
                  description: Default state for new features
                  type: boolean
                projects:
                  type: array
                  items:
                    type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  environment:
                    $ref: '#/components/schemas/Environment'
                required:
                  - environment
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X PUT 'https://api.growthbook.io/api/v1/environments/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"description":"My updated environment"}'
    delete:
      operationId: deleteEnvironment
      summary: Deletes a single environment
      tags:
        - environments
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/environments/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/attributes:
    get:
      operationId: listAttributes
      summary: Get the organization's attributes
      tags:
        - attributes
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  attributes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Attribute'
                required:
                  - attributes
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/attributes' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postAttribute
      summary: Create a new attribute
      tags:
        - attributes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                property:
                  description: The attribute property
                  type: string
                datatype:
                  description: The attribute datatype
                  type: string
                  enum:
                    - boolean
                    - string
                    - number
                    - secureString
                    - enum
                    - string[]
                    - number[]
                    - secureString[]
                description:
                  description: The description of the new attribute
                  type: string
                archived:
                  description: The attribute is archived
                  type: boolean
                hashAttribute:
                  description: Shall the attribute be hashed
                  type: boolean
                enum:
                  type: string
                format:
                  description: The attribute's format
                  type: string
                  enum:
                    - ''
                    - version
                    - date
                    - isoCountryCode
                projects:
                  type: array
                  items:
                    type: string
                tags:
                  type: array
                  items:
                    type: string
              required:
                - property
                - datatype
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  attribute:
                    $ref: '#/components/schemas/Attribute'
                required:
                  - attribute
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/attributes' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"property":"foo","datatype":"boolean","description":"My new attribute"}'
  /v1/attributes/{property}:
    put:
      operationId: putAttribute
      summary: Update an attribute
      tags:
        - attributes
      parameters:
        - $ref: '#/components/parameters/property'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                datatype:
                  description: The attribute datatype
                  type: string
                  enum:
                    - boolean
                    - string
                    - number
                    - secureString
                    - enum
                    - string[]
                    - number[]
                    - secureString[]
                description:
                  description: The description of the new attribute
                  type: string
                archived:
                  description: The attribute is archived
                  type: boolean
                hashAttribute:
                  description: Shall the attribute be hashed
                  type: boolean
                enum:
                  type: string
                format:
                  description: The attribute's format
                  type: string
                  enum:
                    - ''
                    - version
                    - date
                    - isoCountryCode
                projects:
                  type: array
                  items:
                    type: string
                tags:
                  type: array
                  items:
                    type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  attribute:
                    $ref: '#/components/schemas/Attribute'
                required:
                  - attribute
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X PUT 'https://api.growthbook.io/api/v1/attributes/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"description":"My updated attribute"}'
    delete:
      operationId: deleteAttribute
      summary: Deletes a single attribute
      tags:
        - attributes
      parameters:
        - $ref: '#/components/parameters/property'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedProperty:
                    type: string
                required:
                  - deletedProperty
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE 'https://api.growthbook.io/api/v1/attributes/abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/sdk-connections:
    get:
      operationId: listSdkConnections
      summary: Get all sdk connections
      tags:
        - sdk-connections
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/projectId'
        - $ref: '#/components/parameters/withProxy'
        - $ref: '#/components/parameters/multiOrg'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      connections:
                        type: array
                        items:
                          $ref: '#/components/schemas/SdkConnection'
                    required:
                      - connections
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/sdk-connections' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postSdkConnection
      summary: Create a single sdk connection
      tags:
        - sdk-connections
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                language:
                  type: string
                sdkVersion:
                  type: string
                environment:
                  type: string
                projects:
                  type: array
                  items:
                    type: string
                encryptPayload:
                  type: boolean
                includeVisualExperiments:
                  type: boolean
                includeDraftExperiments:
                  type: boolean
                includeExperimentNames:
                  type: boolean
                includeRedirectExperiments:
                  type: boolean
                includeRuleIds:
                  type: boolean
                includeProjectIdInMetadata:
                  type: boolean
                includeCustomFieldsInMetadata:
                  type: boolean
                allowedCustomFieldsInMetadata:
                  type: array
                  items:
                    type: string
                includeTagsInMetadata:
                  type: boolean
                proxyEnabled:
                  type: boolean
                proxyHost:
                  type: string
                hashSecureAttributes:
                  type: boolean
                remoteEvalEnabled:
                  type: boolean
                savedGroupReferencesEnabled:
                  type: boolean
              required:
                - name
                - language
                - environment
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  sdkConnection:
                    $ref: '#/components/schemas/SdkConnection'
                required:
                  - sdkConnection
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/sdk-connections' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/sdk-connections/{id}:
    get:
      operationId: getSdkConnection
      summary: Get a single sdk connection
      tags:
        - sdk-connections
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  sdkConnection:
                    $ref: '#/components/schemas/SdkConnection'
                required:
                  - sdkConnection
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/sdk-connections/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: putSdkConnection
      summary: Update a single sdk connection
      tags:
        - sdk-connections
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                language:
                  type: string
                sdkVersion:
                  type: string
                environment:
                  type: string
                projects:
                  type: array
                  items:
                    type: string
                encryptPayload:
                  type: boolean
                includeVisualExperiments:
                  type: boolean
                includeDraftExperiments:
                  type: boolean
                includeExperimentNames:
                  type: boolean
                includeRedirectExperiments:
                  type: boolean
                includeRuleIds:
                  type: boolean
                includeProjectIdInMetadata:
                  type: boolean
                includeCustomFieldsInMetadata:
                  type: boolean
                allowedCustomFieldsInMetadata:
                  type: array
                  items:
                    type: string
                includeTagsInMetadata:
                  type: boolean
                proxyEnabled:
                  type: boolean
                proxyHost:
                  type: string
                hashSecureAttributes:
                  type: boolean
                remoteEvalEnabled:
                  type: boolean
                savedGroupReferencesEnabled:
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  sdkConnection:
                    $ref: '#/components/schemas/SdkConnection'
                required:
                  - sdkConnection
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT 'https://api.growthbook.io/api/v1/sdk-connections/{id}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteSdkConnection
      summary: Deletes a single SDK connection
      tags:
        - sdk-connections
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/sdk-connections/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/sdk-connections/lookup/{key}:
    get:
      operationId: lookupSdkConnectionByKey
      summary: Find a single sdk connection by its key
      tags:
        - sdk-connections
      parameters:
        - $ref: '#/components/parameters/key'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  sdkConnection:
                    $ref: '#/components/schemas/SdkConnection'
                required:
                  - sdkConnection
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/sdk-connections/lookup/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/data-sources:
    get:
      operationId: listDataSources
      summary: Get all data sources
      tags:
        - data-sources
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/projectId'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      dataSources:
                        type: array
                        items:
                          $ref: '#/components/schemas/DataSource'
                    required:
                      - dataSources
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/data-sources' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/data-sources/{id}:
    get:
      operationId: getDataSource
      summary: Get a single data source
      tags:
        - data-sources
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  dataSource:
                    $ref: '#/components/schemas/DataSource'
                required:
                  - dataSource
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/data-sources/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/data-sources/{dataSourceId}/information-schema:
    get:
      operationId: getInformationSchema
      summary: Get a Data Source's Information Schema
      description: >-
        Returns cached database schema metadata for a data source, including
        databases, schemas, and tables. The information schema is automatically
        created when a SQL-based data source is added. Not all data source types
        support information schemas.
      tags:
        - data-sources
      parameters:
        - $ref: '#/components/parameters/dataSourceId'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  informationSchema:
                    $ref: '#/components/schemas/InformationSchema'
                required:
                  - informationSchema
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/data-sources/{dataSourceId}/information-schema'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/visual-changesets/{id}:
    get:
      operationId: getVisualChangeset
      summary: Get a single visual changeset
      tags:
        - visual-changesets
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/includeExperiment'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  visualChangeset:
                    $ref: '#/components/schemas/VisualChangeset'
                  experiment:
                    $ref: '#/components/schemas/Experiment'
                required:
                  - visualChangeset
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/visual-changesets/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: putVisualChangeset
      summary: Update a visual changeset
      tags:
        - visual-changesets
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  nModified:
                    type: number
                  visualChangeset:
                    $ref: '#/components/schemas/VisualChangeset'
                required:
                  - nModified
                  - visualChangeset
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v1/visual-changesets/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/visual-changesets/{id}/visual-change:
    post:
      operationId: postVisualChange
      summary: Create a visual change for a visual changeset
      tags:
        - visual-changesets
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  nModified:
                    type: number
                required:
                  - nModified
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/visual-changesets/{id}/visual-change'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/visual-changesets/{id}/visual-change/{visualChangeId}:
    put:
      operationId: putVisualChange
      summary: Update a visual change for a visual changeset
      tags:
        - visual-changesets
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/visualChangeId'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  nModified:
                    type: number
                required:
                  - nModified
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v1/visual-changesets/{id}/visual-change/{visualChangeId}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/saved-groups:
    get:
      operationId: listSavedGroups
      summary: Get all saved group
      tags:
        - saved-groups
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      savedGroups:
                        type: array
                        items:
                          $ref: '#/components/schemas/SavedGroup'
                    required:
                      - savedGroups
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/saved-groups' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postSavedGroup
      summary: Create a single saved group
      tags:
        - saved-groups
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The display name of the Saved Group
                  type: string
                type:
                  description: >-
                    The type of Saved Group (inferred from other arguments if
                    missing)
                  type: string
                  enum:
                    - condition
                    - list
                condition:
                  description: >-
                    When type = 'condition', this is the JSON-encoded condition
                    for the group
                  type: string
                attributeKey:
                  description: >-
                    When type = 'list', this is the attribute key the group is
                    based on
                  type: string
                values:
                  description: >-
                    When type = 'list', this is the list of values for the
                    attribute key
                  type: array
                  items:
                    type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                projects:
                  type: array
                  items:
                    type: string
              required:
                - name
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  savedGroup:
                    $ref: '#/components/schemas/SavedGroup'
                required:
                  - savedGroup
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/saved-groups' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"interal-users","values":["userId-123","userId-345","userId-678"],"attributeKey":"userId","owner":""}'
  /v1/saved-groups/{id}:
    get:
      operationId: getSavedGroup
      summary: Get a single saved group
      tags:
        - saved-groups
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  savedGroup:
                    $ref: '#/components/schemas/SavedGroup'
                required:
                  - savedGroup
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/saved-groups/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: updateSavedGroup
      summary: Partially update a single saved group
      tags:
        - saved-groups
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The display name of the Saved Group
                  type: string
                condition:
                  description: >-
                    When type = 'condition', this is the JSON-encoded condition
                    for the group
                  type: string
                values:
                  description: >-
                    When type = 'list', this is the list of values for the
                    attribute key
                  type: array
                  items:
                    type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                projects:
                  type: array
                  items:
                    type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  savedGroup:
                    $ref: '#/components/schemas/SavedGroup'
                required:
                  - savedGroup
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST 'https://api.growthbook.io/api/v1/saved-groups/abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"values":["userId-123","userId-345"]}'
    delete:
      operationId: deleteSavedGroup
      summary: Deletes a single saved group
      tags:
        - saved-groups
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/saved-groups/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/organizations:
    get:
      operationId: listOrganizations
      summary: >-
        Get all organizations (only for super admins on multi-org Enterprise
        Plan only)
      tags:
        - organizations
      parameters:
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      organizations:
                        type: array
                        items:
                          $ref: '#/components/schemas/Organization'
                    required:
                      - organizations
                    additionalProperties: false
                  - type: object
                    properties:
                      limit:
                        type: integer
                      offset:
                        type: integer
                      count:
                        type: integer
                      total:
                        type: integer
                      hasMore:
                        type: boolean
                      nextOffset:
                        anyOf:
                          - type: integer
                          - type: 'null'
                    required:
                      - limit
                      - offset
                      - count
                      - total
                      - hasMore
                      - nextOffset
                    additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/organizations' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postOrganization
      summary: >-
        Create a single organization (only for super admins on multi-org
        Enterprise Plan only)
      tags:
        - organizations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The name of the organization
                  type: string
                externalId:
                  description: >-
                    An optional identifier that you use within your company for
                    the organization
                  type: string
              required:
                - name
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  organization:
                    $ref: '#/components/schemas/Organization'
                required:
                  - organization
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/organizations' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"My Subsidiary"}'
  /v1/organizations/{id}:
    put:
      operationId: putOrganization
      summary: >-
        Edit a single organization (only for super admins on multi-org
        Enterprise Plan only)
      tags:
        - organizations
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The name of the organization
                  type: string
                externalId:
                  description: >-
                    An optional identifier that you use within your company for
                    the organization
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  organization:
                    $ref: '#/components/schemas/Organization'
                required:
                  - organization
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT 'https://api.growthbook.io/api/v1/organizations/abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"My Subsidiary","externalId":"subsidiary-123"}'
  /v1/sdk-payload/{key}:
    get:
      operationId: getSdkPayload
      summary: Get a SDK payload
      parameters:
        - name: key
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/sdk-payload/{key}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/fact-tables:
    get:
      operationId: listFactTables
      summary: Get all fact tables
      tags:
        - fact-tables
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/datasourceId'
        - $ref: '#/components/parameters/projectId'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      factTables:
                        type: array
                        items:
                          $ref: '#/components/schemas/FactTable'
                    required:
                      - factTables
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/fact-tables' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postFactTable
      summary: Create a single fact table
      tags:
        - fact-tables
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  description: Description of the fact table
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                projects:
                  description: List of associated project ids
                  type: array
                  items:
                    type: string
                tags:
                  description: List of associated tags
                  type: array
                  items:
                    type: string
                datasource:
                  description: The datasource id
                  type: string
                userIdTypes:
                  description: >-
                    List of identifier columns in this table. For example, "id"
                    or "anonymous_id"
                  type: array
                  items:
                    type: string
                sql:
                  description: The SQL query for this fact table
                  type: string
                eventName:
                  description: The event name used in SQL template variables
                  type: string
                managedBy:
                  description: Set this to "api" to disable editing in the GrowthBook UI
                  type: string
                  enum:
                    - ''
                    - api
                    - admin
              required:
                - name
                - datasource
                - userIdTypes
                - sql
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  factTable:
                    $ref: '#/components/schemas/FactTable'
                required:
                  - factTable
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/fact-tables' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"Orders","datasource":"ds_abc123","userIdTypes":["id"],"sql":"SELECT * FROM orders"}'
  /v1/fact-tables/{id}:
    get:
      operationId: getFactTable
      summary: Get a single fact table
      tags:
        - fact-tables
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  factTable:
                    $ref: '#/components/schemas/FactTable'
                required:
                  - factTable
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/fact-tables/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: updateFactTable
      summary: Update a single fact table
      tags:
        - fact-tables
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  description: Description of the fact table
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                projects:
                  description: List of associated project ids
                  type: array
                  items:
                    type: string
                tags:
                  description: List of associated tags
                  type: array
                  items:
                    type: string
                userIdTypes:
                  description: >-
                    List of identifier columns in this table. For example, "id"
                    or "anonymous_id"
                  type: array
                  items:
                    type: string
                sql:
                  description: The SQL query for this fact table
                  type: string
                eventName:
                  description: The event name used in SQL template variables
                  type: string
                columns:
                  description: >-
                    Optional array of columns that you want to update. Only
                    allows updating properties of existing columns. Cannot
                    create new columns or delete existing ones. Columns cannot
                    be added or deleted; column structure is determined by SQL
                    parsing. Slice-related properties require an enterprise
                    license.
                  type: array
                  items:
                    $ref: '#/components/schemas/FactTableColumn'
                columnsError:
                  description: Error message if there was an issue parsing the SQL schema
                  anyOf:
                    - type: string
                    - type: 'null'
                managedBy:
                  description: Set this to "api" to disable editing in the GrowthBook UI
                  type: string
                  enum:
                    - ''
                    - api
                    - admin
                archived:
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  factTable:
                    $ref: '#/components/schemas/FactTable'
                required:
                  - factTable
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/fact-tables/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"New Fact Table Name"}'
    delete:
      operationId: deleteFactTable
      summary: Deletes a single fact table
      tags:
        - fact-tables
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    description: The ID of the deleted fact table
                    example: ftb_123abc
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE 'https://api.growthbook.io/api/v1/fact-tables/abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/fact-tables/{factTableId}/filters:
    get:
      operationId: listFactTableFilters
      summary: Get all filters for a fact table
      tags:
        - fact-tables
      parameters:
        - $ref: '#/components/parameters/factTableId'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      factTableFilters:
                        type: array
                        items:
                          $ref: '#/components/schemas/FactTableFilter'
                    required:
                      - factTableFilters
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/fact-tables/abc123/filters' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postFactTableFilter
      summary: Create a single fact table filter
      tags:
        - fact-tables
      parameters:
        - $ref: '#/components/parameters/factTableId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  description: Description of the fact table filter
                  type: string
                value:
                  description: The SQL expression for this filter.
                  example: country = 'US'
                  type: string
                managedBy:
                  description: >-
                    Set this to "api" to disable editing in the GrowthBook UI.
                    Before you do this, the Fact Table itself must also be
                    marked as "api"
                  type: string
                  enum:
                    - ''
                    - api
              required:
                - name
                - value
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  factTableFilter:
                    $ref: '#/components/schemas/FactTableFilter'
                required:
                  - factTableFilter
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/fact-tables/abc123/filters' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"High Value Order","value":"amount>100"}'
  /v1/fact-tables/{factTableId}/filters/{id}:
    get:
      operationId: getFactTableFilter
      summary: Get a single fact filter
      tags:
        - fact-tables
      parameters:
        - $ref: '#/components/parameters/factTableId'
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  factTableFilter:
                    $ref: '#/components/schemas/FactTableFilter'
                required:
                  - factTableFilter
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/fact-tables/abc123/filters/abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: updateFactTableFilter
      summary: Update a single fact table filter
      tags:
        - fact-tables
      parameters:
        - $ref: '#/components/parameters/factTableId'
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  description: Description of the fact table filter
                  type: string
                value:
                  description: The SQL expression for this filter.
                  example: country = 'US'
                  type: string
                managedBy:
                  description: >-
                    Set this to "api" to disable editing in the GrowthBook UI.
                    Before you do this, the Fact Table itself must also be
                    marked as "api"
                  type: string
                  enum:
                    - ''
                    - api
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  factTableFilter:
                    $ref: '#/components/schemas/FactTableFilter'
                required:
                  - factTableFilter
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/fact-tables/abc123/filters/abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"value":"amount > 50"}'
    delete:
      operationId: deleteFactTableFilter
      summary: Deletes a single fact table filter
      tags:
        - fact-tables
      parameters:
        - $ref: '#/components/parameters/factTableId'
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    description: The ID of the deleted fact filter
                    example: flt_123abc
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/fact-tables/abc123/filters/abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/fact-metrics:
    get:
      operationId: listFactMetrics
      summary: Get all fact metrics
      tags:
        - fact-metrics
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/datasourceId'
        - $ref: '#/components/parameters/projectId'
        - name: factTableId
          in: query
          description: >-
            Filter by Fact Table Id (for ratio metrics, we only look at the
            numerator)
          schema:
            description: >-
              Filter by Fact Table Id (for ratio metrics, we only look at the
              numerator)
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      factMetrics:
                        type: array
                        items:
                          $ref: '#/components/schemas/FactMetric'
                    required:
                      - factMetrics
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/fact-metrics' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postFactMetric
      summary: Create a single fact metric
      tags:
        - fact-metrics
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                projects:
                  type: array
                  items:
                    type: string
                tags:
                  type: array
                  items:
                    type: string
                metricType:
                  type: string
                  enum:
                    - proportion
                    - retention
                    - mean
                    - quantile
                    - ratio
                    - dailyParticipation
                numerator:
                  type: object
                  properties:
                    factTableId:
                      type: string
                    column:
                      description: >-
                        Must be empty for proportion metrics and
                        dailyParticipation metrics. Otherwise, the column name
                        or one of the special values: '$$distinctUsers' or
                        '$$count' (or '$$distinctDates' if metricType is 'mean'
                        or 'ratio' or 'quantile' and quantileSettings.type is
                        'unit')
                      type: string
                    aggregation:
                      description: >-
                        User aggregation of selected column. Either sum or max
                        for numeric columns; count distinct for string columns;
                        hll merge / kll merge for pre-built sketch columns
                        (requires data-source support); ignored for special
                        columns. Default: sum. If you specify a string column
                        you must explicitly specify count distinct. Not used for
                        proportion metrics; for event quantile metrics only kll
                        merge is applicable.
                      type: string
                      enum:
                        - sum
                        - max
                        - count distinct
                        - hll merge
                        - kll merge
                    filters:
                      deprecated: true
                      description: >-
                        Array of Fact Table Filter Ids. Deprecated, use
                        rowFilters instead.
                      type: array
                      items:
                        type: string
                    inlineFilters:
                      deprecated: true
                      description: >-
                        Inline filters to apply to the fact table. Keys are
                        column names, values are arrays of values to filter by.
                        Deprecated, use rowFilters instead.
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties:
                        type: array
                        items:
                          type: string
                    rowFilters:
                      description: >-
                        Filters to apply to the rows of the fact table before
                        aggregation.
                      type: array
                      items:
                        type: object
                        properties:
                          operator:
                            type: string
                            enum:
                              - '='
                              - '!='
                              - '>'
                              - <
                              - '>='
                              - <=
                              - in
                              - not_in
                              - is_null
                              - not_null
                              - is_true
                              - is_false
                              - contains
                              - not_contains
                              - starts_with
                              - ends_with
                              - sql_expr
                              - saved_filter
                          values:
                            description: >-
                              Not required for is_null, not_null, is_true,
                              is_false operators.
                            type: array
                            items:
                              type: string
                          column:
                            description: >-
                              Required for all operators except sql_expr and
                              saved_filter.
                            type: string
                        required:
                          - operator
                        additionalProperties: false
                    aggregateFilterColumn:
                      description: >-
                        Column to use to filter users after aggregation. Either
                        '$$count' of rows or the name of a numeric column that
                        will be summed by user. Must specify `aggregateFilter`
                        if using this. Only can be used with 'retention' and
                        'proportion' metrics.
                      type: string
                    aggregateFilter:
                      description: >-
                        Simple comparison operator and value to apply after
                        aggregation (e.g. '= 10' or '>= 1'). Requires
                        `aggregateFilterColumn`.
                      type: string
                  required:
                    - factTableId
                  additionalProperties: false
                denominator:
                  description: Only when metricType is 'ratio'
                  type: object
                  properties:
                    factTableId:
                      type: string
                    column:
                      description: >-
                        The column name or one of the special values:
                        '$$distinctUsers' or '$$count' (or '$$distinctDates' if
                        metricType is 'mean' or 'ratio' or 'quantile' and
                        quantileSettings.type is 'unit')
                      type: string
                    aggregation:
                      description: >-
                        User aggregation of selected column. Either sum or max
                        for numeric columns; count distinct for string columns;
                        hll merge / kll merge for pre-built sketch columns
                        (requires data-source support); ignored for special
                        columns. Default: sum. If you specify a string column
                        you must explicitly specify count distinct. Not used for
                        proportion metrics; for event quantile metrics only kll
                        merge is applicable.
                      type: string
                      enum:
                        - sum
                        - max
                        - count distinct
                        - hll merge
                        - kll merge
                    filters:
                      deprecated: true
                      description: >-
                        Array of Fact Table Filter Ids. Deprecated, use
                        rowFilters instead.
                      type: array
                      items:
                        type: string
                    inlineFilters:
                      deprecated: true
                      description: >-
                        Inline filters to apply to the fact table. Keys are
                        column names, values are arrays of values to filter by.
                        Deprecated, use rowFilters instead.
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties:
                        type: array
                        items:
                          type: string
                    rowFilters:
                      description: >-
                        Filters to apply to the rows of the fact table before
                        aggregation.
                      type: array
                      items:
                        type: object
                        properties:
                          operator:
                            type: string
                            enum:
                              - '='
                              - '!='
                              - '>'
                              - <
                              - '>='
                              - <=
                              - in
                              - not_in
                              - is_null
                              - not_null
                              - is_true
                              - is_false
                              - contains
                              - not_contains
                              - starts_with
                              - ends_with
                              - sql_expr
                              - saved_filter
                          values:
                            description: >-
                              Not required for is_null, not_null, is_true,
                              is_false operators.
                            type: array
                            items:
                              type: string
                          column:
                            description: >-
                              Required for all operators except sql_expr and
                              saved_filter.
                            type: string
                        required:
                          - operator
                        additionalProperties: false
                  required:
                    - factTableId
                    - column
                  additionalProperties: false
                inverse:
                  description: >-
                    Set to true for things like Bounce Rate, where you want the
                    metric to decrease
                  type: boolean
                quantileSettings:
                  description: >-
                    Controls the settings for quantile metrics (mandatory if
                    metricType is "quantile")
                  type: object
                  properties:
                    type:
                      description: >-
                        Whether the quantile is over unit aggregations or raw
                        event values
                      type: string
                      enum:
                        - event
                        - unit
                    ignoreZeros:
                      description: >-
                        If true, zero values will be ignored when calculating
                        the quantile
                      type: boolean
                    quantile:
                      description: The quantile value (from 0.001 to 0.999)
                      type: number
                      minimum: 0.001
                      maximum: 0.999
                      multipleOf: 0.001
                    quantileEventCountColumn:
                      description: >-
                        Optional override for the source-column name used to
                        recover per-row event counts when numerator.aggregation
                        is 'kll merge'. Defaults to
                        '<numerator.column>_n_events'. Only valid for
                        event-quantile metrics with a 'kll merge' numerator.
                      type: string
                  required:
                    - type
                    - ignoreZeros
                    - quantile
                  additionalProperties: false
                cappingSettings:
                  description: Controls how outliers are handled
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - none
                        - absolute
                        - percentile
                    value:
                      description: >-
                        When type is absolute, this is the absolute value. When
                        type is percentile, this is the percentile value (from
                        0.0 to 1.0).
                      type: number
                    ignoreZeros:
                      description: >-
                        If true and capping is `percentile`, zeros will be
                        ignored when calculating the percentile.
                      type: boolean
                  required:
                    - type
                  additionalProperties: false
                windowSettings:
                  description: Controls the conversion window for the metric
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - none
                        - conversion
                        - lookback
                    delayHours:
                      deprecated: true
                      description: >-
                        Wait this many hours after experiment exposure before
                        counting conversions. Ignored if delayValue is set.
                      type: number
                    delayValue:
                      description: >-
                        Wait this long after experiment exposure before counting
                        conversions.
                      type: number
                    delayUnit:
                      description: Default `hours`.
                      type: string
                      enum:
                        - minutes
                        - hours
                        - days
                        - weeks
                    windowValue:
                      type: number
                    windowUnit:
                      description: Default `hours`.
                      type: string
                      enum:
                        - minutes
                        - hours
                        - days
                        - weeks
                  required:
                    - type
                  additionalProperties: false
                priorSettings:
                  description: >-
                    Controls the bayesian prior for the metric. If omitted,
                    organization defaults will be used.
                  type: object
                  properties:
                    override:
                      description: >-
                        If false, the organization default settings will be used
                        instead of the other settings in this object
                      type: boolean
                    proper:
                      description: >-
                        If true, the `mean` and `stddev` will be used, otherwise
                        we will use an improper flat prior.
                      type: boolean
                    mean:
                      description: >-
                        The mean of the prior distribution of relative effects
                        in proportion terms (e.g. 0.01 is 1%)
                      type: number
                    stddev:
                      description: >-
                        Must be > 0. The standard deviation of the prior
                        distribution of relative effects in proportion terms.
                      type: number
                      exclusiveMinimum: 0
                  required:
                    - override
                    - proper
                    - mean
                    - stddev
                  additionalProperties: false
                regressionAdjustmentSettings:
                  description: >-
                    Controls the regression adjustment (CUPED) settings for the
                    metric
                  type: object
                  properties:
                    override:
                      description: If false, the organization default settings will be used
                      type: boolean
                    enabled:
                      description: >-
                        Controls whether or not regression adjustment is applied
                        to the metric
                      type: boolean
                    days:
                      description: >-
                        Number of pre-exposure days to use for the regression
                        adjustment
                      type: number
                  required:
                    - override
                  additionalProperties: false
                riskThresholdSuccess:
                  deprecated: true
                  description: >-
                    No longer used. Threshold for Risk to be considered low
                    enough, as a proportion (e.g. put 0.0025 for 0.25%). <br/>
                    Must be a non-negative number and must not be higher than
                    `riskThresholdDanger`.
                  type: number
                  minimum: 0
                riskThresholdDanger:
                  deprecated: true
                  description: >-
                    No longer used. Threshold for Risk to be considered too
                    high, as a proportion (e.g. put 0.0125 for 1.25%). <br/>
                    Must be a non-negative number.
                  type: number
                  minimum: 0
                displayAsPercentage:
                  description: >-
                    If true and the metric is a ratio or dailyParticipation
                    metric, variation means will be displayed as a percentage.
                    Defaults to true for dailyParticipation metrics and false
                    for ratio metrics.
                  type: boolean
                minPercentChange:
                  description: >-
                    Minimum percent change to consider uplift significant, as a
                    proportion (e.g. put 0.005 for 0.5%)
                  type: number
                  minimum: 0
                maxPercentChange:
                  description: >-
                    Maximum percent change to consider uplift significant, as a
                    proportion (e.g. put 0.5 for 50%)
                  type: number
                  minimum: 0
                minSampleSize:
                  type: number
                  minimum: 0
                targetMDE:
                  description: >-
                    The percentage change that you want to reliably detect
                    before ending an experiment, as a proportion (e.g. put 0.1
                    for 10%). This is used to estimate the "Days Left" for
                    running experiments.
                  type: number
                  minimum: 0
                managedBy:
                  description: Set this to "api" to disable editing in the GrowthBook UI
                  type: string
                  enum:
                    - ''
                    - api
                    - admin
                metricAutoSlices:
                  description: >-
                    Array of slice column names that will be automatically
                    included in metric analysis. This is an enterprise feature.
                  type: array
                  items:
                    type: string
              required:
                - name
                - metricType
                - numerator
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  factMetric:
                    $ref: '#/components/schemas/FactMetric'
                required:
                  - factMetric
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/fact-metrics' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"Purchased","metricType":"proportion","numerator":{"factTableId":"ftb_abc123","column":"$$distinctUsers","filters":[]},"priorSettings":{"override":false,"proper":false,"mean":0,"stddev":0.3}}'
  /v1/fact-metrics/{id}:
    get:
      operationId: getFactMetric
      summary: Get a single fact metric
      tags:
        - fact-metrics
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  factMetric:
                    $ref: '#/components/schemas/FactMetric'
                required:
                  - factMetric
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/fact-metrics/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: updateFactMetric
      summary: Update a single fact metric
      tags:
        - fact-metrics
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                projects:
                  type: array
                  items:
                    type: string
                tags:
                  type: array
                  items:
                    type: string
                metricType:
                  type: string
                  enum:
                    - proportion
                    - retention
                    - mean
                    - quantile
                    - ratio
                    - dailyParticipation
                numerator:
                  type: object
                  properties:
                    factTableId:
                      type: string
                    column:
                      description: >-
                        Must be empty for proportion metrics and
                        dailyParticipation metrics. Otherwise, the column name
                        or one of the special values: '$$distinctUsers' or
                        '$$count' (or '$$distinctDates' if metricType is 'mean'
                        or 'ratio' or 'quantile' and quantileSettings.type is
                        'unit')
                      type: string
                    aggregation:
                      description: >-
                        User aggregation of selected column. Either sum or max
                        for numeric columns; count distinct for string columns;
                        hll merge / kll merge for pre-built sketch columns
                        (requires data-source support); ignored for special
                        columns. Default: sum. If you specify a string column
                        you must explicitly specify count distinct. Not used for
                        proportion metrics; for event quantile metrics only kll
                        merge is applicable.
                      type: string
                      enum:
                        - sum
                        - max
                        - count distinct
                        - hll merge
                        - kll merge
                    filters:
                      deprecated: true
                      description: >-
                        Array of Fact Table Filter Ids. Deprecated, use
                        rowFilters instead.
                      type: array
                      items:
                        type: string
                    inlineFilters:
                      deprecated: true
                      description: >-
                        Inline filters to apply to the fact table. Keys are
                        column names, values are arrays of values to filter by.
                        Deprecated, use rowFilters instead.
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties:
                        type: array
                        items:
                          type: string
                    rowFilters:
                      description: >-
                        Filters to apply to the rows of the fact table before
                        aggregation.
                      type: array
                      items:
                        type: object
                        properties:
                          operator:
                            type: string
                            enum:
                              - '='
                              - '!='
                              - '>'
                              - <
                              - '>='
                              - <=
                              - in
                              - not_in
                              - is_null
                              - not_null
                              - is_true
                              - is_false
                              - contains
                              - not_contains
                              - starts_with
                              - ends_with
                              - sql_expr
                              - saved_filter
                          values:
                            description: >-
                              Not required for is_null, not_null, is_true,
                              is_false operators.
                            type: array
                            items:
                              type: string
                          column:
                            description: >-
                              Required for all operators except sql_expr and
                              saved_filter.
                            type: string
                        required:
                          - operator
                        additionalProperties: false
                    aggregateFilterColumn:
                      description: >-
                        Column to use to filter users after aggregation. Either
                        '$$count' of rows or the name of a numeric column that
                        will be summed by user. Must specify `aggregateFilter`
                        if using this. Only can be used with 'retention' and
                        'proportion' metrics.
                      type: string
                    aggregateFilter:
                      description: >-
                        Simple comparison operator and value to apply after
                        aggregation (e.g. '= 10' or '>= 1'). Requires
                        `aggregateFilterColumn`.
                      type: string
                  required:
                    - factTableId
                  additionalProperties: false
                denominator:
                  description: Only when metricType is 'ratio'
                  type: object
                  properties:
                    factTableId:
                      type: string
                    column:
                      description: >-
                        The column name or one of the special values:
                        '$$distinctUsers' or '$$count' (or '$$distinctDates' if
                        metricType is 'mean' or 'ratio' or 'quantile' and
                        quantileSettings.type is 'unit')
                      type: string
                    aggregation:
                      description: >-
                        User aggregation of selected column. Either sum or max
                        for numeric columns; count distinct for string columns;
                        hll merge / kll merge for pre-built sketch columns
                        (requires data-source support); ignored for special
                        columns. Default: sum. If you specify a string column
                        you must explicitly specify count distinct. Not used for
                        proportion metrics; for event quantile metrics only kll
                        merge is applicable.
                      type: string
                      enum:
                        - sum
                        - max
                        - count distinct
                        - hll merge
                        - kll merge
                    filters:
                      deprecated: true
                      description: >-
                        Array of Fact Table Filter Ids. Deprecated, use
                        rowFilters instead.
                      type: array
                      items:
                        type: string
                    inlineFilters:
                      deprecated: true
                      description: >-
                        Inline filters to apply to the fact table. Keys are
                        column names, values are arrays of values to filter by.
                        Deprecated, use rowFilters instead.
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties:
                        type: array
                        items:
                          type: string
                    rowFilters:
                      description: >-
                        Filters to apply to the rows of the fact table before
                        aggregation.
                      type: array
                      items:
                        type: object
                        properties:
                          operator:
                            type: string
                            enum:
                              - '='
                              - '!='
                              - '>'
                              - <
                              - '>='
                              - <=
                              - in
                              - not_in
                              - is_null
                              - not_null
                              - is_true
                              - is_false
                              - contains
                              - not_contains
                              - starts_with
                              - ends_with
                              - sql_expr
                              - saved_filter
                          values:
                            description: >-
                              Not required for is_null, not_null, is_true,
                              is_false operators.
                            type: array
                            items:
                              type: string
                          column:
                            description: >-
                              Required for all operators except sql_expr and
                              saved_filter.
                            type: string
                        required:
                          - operator
                        additionalProperties: false
                  required:
                    - factTableId
                    - column
                  additionalProperties: false
                inverse:
                  description: >-
                    Set to true for things like Bounce Rate, where you want the
                    metric to decrease
                  type: boolean
                quantileSettings:
                  description: >-
                    Controls the settings for quantile metrics (mandatory if
                    metricType is "quantile")
                  type: object
                  properties:
                    type:
                      description: >-
                        Whether the quantile is over unit aggregations or raw
                        event values
                      type: string
                      enum:
                        - event
                        - unit
                    ignoreZeros:
                      description: >-
                        If true, zero values will be ignored when calculating
                        the quantile
                      type: boolean
                    quantile:
                      description: The quantile value (from 0.001 to 0.999)
                      type: number
                      minimum: 0.001
                      maximum: 0.999
                      multipleOf: 0.001
                    quantileEventCountColumn:
                      description: >-
                        Optional override for the source-column name used to
                        recover per-row event counts when numerator.aggregation
                        is 'kll merge'. Defaults to
                        '<numerator.column>_n_events'. Only valid for
                        event-quantile metrics with a 'kll merge' numerator.
                      type: string
                  required:
                    - type
                    - ignoreZeros
                    - quantile
                  additionalProperties: false
                cappingSettings:
                  description: Controls how outliers are handled
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - none
                        - absolute
                        - percentile
                    value:
                      description: >-
                        When type is absolute, this is the absolute value. When
                        type is percentile, this is the percentile value (from
                        0.0 to 1.0).
                      type: number
                    ignoreZeros:
                      description: >-
                        If true and capping is `percentile`, zeros will be
                        ignored when calculating the percentile.
                      type: boolean
                  required:
                    - type
                  additionalProperties: false
                windowSettings:
                  description: Controls the conversion window for the metric
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - none
                        - conversion
                        - lookback
                    delayHours:
                      deprecated: true
                      description: >-
                        Wait this many hours after experiment exposure before
                        counting conversions. Ignored if delayValue is set.
                      type: number
                    delayValue:
                      description: >-
                        Wait this long after experiment exposure before counting
                        conversions.
                      type: number
                    delayUnit:
                      description: Default `hours`.
                      type: string
                      enum:
                        - minutes
                        - hours
                        - days
                        - weeks
                    windowValue:
                      type: number
                    windowUnit:
                      description: Default `hours`.
                      type: string
                      enum:
                        - minutes
                        - hours
                        - days
                        - weeks
                  required:
                    - type
                  additionalProperties: false
                priorSettings:
                  description: >-
                    Controls the bayesian prior for the metric. If omitted,
                    organization defaults will be used.
                  type: object
                  properties:
                    override:
                      description: >-
                        If false, the organization default settings will be used
                        instead of the other settings in this object
                      type: boolean
                    proper:
                      description: >-
                        If true, the `mean` and `stddev` will be used, otherwise
                        we will use an improper flat prior.
                      type: boolean
                    mean:
                      description: >-
                        The mean of the prior distribution of relative effects
                        in proportion terms (e.g. 0.01 is 1%)
                      type: number
                    stddev:
                      description: >-
                        Must be > 0. The standard deviation of the prior
                        distribution of relative effects in proportion terms.
                      type: number
                      exclusiveMinimum: 0
                  required:
                    - override
                    - proper
                    - mean
                    - stddev
                  additionalProperties: false
                regressionAdjustmentSettings:
                  description: >-
                    Controls the regression adjustment (CUPED) settings for the
                    metric
                  type: object
                  properties:
                    override:
                      description: If false, the organization default settings will be used
                      type: boolean
                    enabled:
                      description: >-
                        Controls whether or not regression adjustment is applied
                        to the metric
                      type: boolean
                    days:
                      description: >-
                        Number of pre-exposure days to use for the regression
                        adjustment
                      type: number
                  required:
                    - override
                  additionalProperties: false
                riskThresholdSuccess:
                  deprecated: true
                  description: >-
                    No longer used. Threshold for Risk to be considered low
                    enough, as a proportion (e.g. put 0.0025 for 0.25%). <br/>
                    Must be a non-negative number and must not be higher than
                    `riskThresholdDanger`.
                  type: number
                  minimum: 0
                riskThresholdDanger:
                  deprecated: true
                  description: >-
                    No longer used. Threshold for Risk to be considered too
                    high, as a proportion (e.g. put 0.0125 for 1.25%). <br/>
                    Must be a non-negative number.
                  type: number
                  minimum: 0
                displayAsPercentage:
                  description: >-
                    If true and the metric is a ratio or dailyParticipation
                    metric, variation means will be displayed as a percentage.
                    Defaults to true for dailyParticipation metrics and false
                    for ratio metrics.
                  type: boolean
                minPercentChange:
                  description: >-
                    Minimum percent change to consider uplift significant, as a
                    proportion (e.g. put 0.005 for 0.5%)
                  type: number
                  minimum: 0
                maxPercentChange:
                  description: >-
                    Maximum percent change to consider uplift significant, as a
                    proportion (e.g. put 0.5 for 50%)
                  type: number
                  minimum: 0
                minSampleSize:
                  type: number
                  minimum: 0
                targetMDE:
                  type: number
                  minimum: 0
                managedBy:
                  description: Set this to "api" to disable editing in the GrowthBook UI
                  type: string
                  enum:
                    - ''
                    - api
                    - admin
                archived:
                  type: boolean
                metricAutoSlices:
                  description: >-
                    Array of slice column names that will be automatically
                    included in metric analysis. This is an enterprise feature.
                  type: array
                  items:
                    type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  factMetric:
                    $ref: '#/components/schemas/FactMetric'
                required:
                  - factMetric
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST 'https://api.growthbook.io/api/v1/fact-metrics/abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name":"Updated Metric Name"}'
    delete:
      operationId: deleteFactMetric
      summary: Deletes a single fact metric
      tags:
        - fact-metrics
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    description: The ID of the deleted fact metric
                    example: fact__123abc
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/fact-metrics/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/fact-metrics/{id}/analysis:
    post:
      operationId: postFactMetricAnalysis
      summary: Create a fact metric analysis
      tags:
        - fact-metrics
      parameters:
        - name: id
          in: path
          required: true
          description: The fact metric id to analyze
          schema:
            description: The fact metric id to analyze
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                userIdType:
                  description: >-
                    The identifier type to use for the analysis. If not
                    provided, defaults to the first available identifier type in
                    the fact table.
                  type: string
                lookbackDays:
                  description: >-
                    Number of days to look back for the analysis. Defaults to
                    30.
                  type: number
                  minimum: 1
                  maximum: 999999
                populationType:
                  description: >-
                    The type of population to analyze. Defaults to 'factTable',
                    meaning the analysis will return the metric value for all
                    units found in the fact table.
                  type: string
                  enum:
                    - factTable
                    - segment
                populationId:
                  description: >-
                    The ID of the population (e.g., segment ID) when
                    populationType is not 'factTable'. Defaults to null.
                  anyOf:
                    - type: string
                    - type: 'null'
                additionalNumeratorFilters:
                  description: >-
                    We support passing in adhoc filters for an analysis that
                    don't live on the metric itself. These are in addition to
                    the metric's filters. To use this, you can pass in an array
                    of Fact Table Filter Ids.
                  type: array
                  items:
                    type: string
                additionalDenominatorFilters:
                  description: >-
                    We support passing in adhoc filters for an analysis that
                    don't live on the metric itself. These are in addition to
                    the metric's filters. To use this, you can pass in an array
                    of Fact Table Filter Ids.
                  type: array
                  items:
                    type: string
                useCache:
                  description: >-
                    Whether to use a cached query if one exists. Defaults to
                    true.
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  metricAnalysis:
                    $ref: '#/components/schemas/MetricAnalysis'
                required:
                  - metricAnalysis
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/fact-metrics/{id}/analysis' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"lookbackDays":90}'
  /v1/bulk-import/facts:
    post:
      operationId: postBulkImportFacts
      summary: Bulk import fact tables, filters, and metrics
      tags:
        - fact-tables
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                factTables:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      data:
                        type: object
                        properties:
                          name:
                            type: string
                          description:
                            description: Description of the fact table
                            type: string
                          owner:
                            description: >-
                              The userId or email address of the owner. If an
                              email address is provided, it will be used to look
                              up the userId of the matching organization member.
                              If an ID is provided, it will be validated as
                              existing in the organization.
                            type: string
                          projects:
                            description: List of associated project ids
                            type: array
                            items:
                              type: string
                          tags:
                            description: List of associated tags
                            type: array
                            items:
                              type: string
                          datasource:
                            description: The datasource id
                            type: string
                          userIdTypes:
                            description: >-
                              List of identifier columns in this table. For
                              example, "id" or "anonymous_id"
                            type: array
                            items:
                              type: string
                          sql:
                            description: The SQL query for this fact table
                            type: string
                          eventName:
                            description: The event name used in SQL template variables
                            type: string
                          managedBy:
                            description: >-
                              Set this to "api" to disable editing in the
                              GrowthBook UI
                            type: string
                            enum:
                              - ''
                              - api
                              - admin
                        required:
                          - name
                          - datasource
                          - userIdTypes
                          - sql
                        additionalProperties: false
                    required:
                      - id
                      - data
                    additionalProperties: false
                factTableFilters:
                  type: array
                  items:
                    type: object
                    properties:
                      factTableId:
                        type: string
                      id:
                        type: string
                      data:
                        type: object
                        properties:
                          name:
                            type: string
                          description:
                            description: Description of the fact table filter
                            type: string
                          value:
                            description: The SQL expression for this filter.
                            example: country = 'US'
                            type: string
                          managedBy:
                            description: >-
                              Set this to "api" to disable editing in the
                              GrowthBook UI. Before you do this, the Fact Table
                              itself must also be marked as "api"
                            type: string
                            enum:
                              - ''
                              - api
                        required:
                          - name
                          - value
                        additionalProperties: false
                    required:
                      - factTableId
                      - id
                      - data
                    additionalProperties: false
                factMetrics:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      data:
                        type: object
                        properties:
                          name:
                            type: string
                          description:
                            type: string
                          owner:
                            description: >-
                              The userId or email address of the owner. If an
                              email address is provided, it will be used to look
                              up the userId of the matching organization member.
                              If an ID is provided, it will be validated as
                              existing in the organization.
                            type: string
                          projects:
                            type: array
                            items:
                              type: string
                          tags:
                            type: array
                            items:
                              type: string
                          metricType:
                            type: string
                            enum:
                              - proportion
                              - retention
                              - mean
                              - quantile
                              - ratio
                              - dailyParticipation
                          numerator:
                            type: object
                            properties:
                              factTableId:
                                type: string
                              column:
                                description: >-
                                  Must be empty for proportion metrics and
                                  dailyParticipation metrics. Otherwise, the
                                  column name or one of the special values:
                                  '$$distinctUsers' or '$$count' (or
                                  '$$distinctDates' if metricType is 'mean' or
                                  'ratio' or 'quantile' and
                                  quantileSettings.type is 'unit')
                                type: string
                              aggregation:
                                description: >-
                                  User aggregation of selected column. Either
                                  sum or max for numeric columns; count distinct
                                  for string columns; hll merge / kll merge for
                                  pre-built sketch columns (requires data-source
                                  support); ignored for special columns.
                                  Default: sum. If you specify a string column
                                  you must explicitly specify count distinct.
                                  Not used for proportion metrics; for event
                                  quantile metrics only kll merge is applicable.
                                type: string
                                enum:
                                  - sum
                                  - max
                                  - count distinct
                                  - hll merge
                                  - kll merge
                              filters:
                                deprecated: true
                                description: >-
                                  Array of Fact Table Filter Ids. Deprecated,
                                  use rowFilters instead.
                                type: array
                                items:
                                  type: string
                              inlineFilters:
                                deprecated: true
                                description: >-
                                  Inline filters to apply to the fact table.
                                  Keys are column names, values are arrays of
                                  values to filter by. Deprecated, use
                                  rowFilters instead.
                                type: object
                                propertyNames:
                                  type: string
                                additionalProperties:
                                  type: array
                                  items:
                                    type: string
                              rowFilters:
                                description: >-
                                  Filters to apply to the rows of the fact table
                                  before aggregation.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    operator:
                                      type: string
                                      enum:
                                        - '='
                                        - '!='
                                        - '>'
                                        - <
                                        - '>='
                                        - <=
                                        - in
                                        - not_in
                                        - is_null
                                        - not_null
                                        - is_true
                                        - is_false
                                        - contains
                                        - not_contains
                                        - starts_with
                                        - ends_with
                                        - sql_expr
                                        - saved_filter
                                    values:
                                      description: >-
                                        Not required for is_null, not_null,
                                        is_true, is_false operators.
                                      type: array
                                      items:
                                        type: string
                                    column:
                                      description: >-
                                        Required for all operators except
                                        sql_expr and saved_filter.
                                      type: string
                                  required:
                                    - operator
                                  additionalProperties: false
                              aggregateFilterColumn:
                                description: >-
                                  Column to use to filter users after
                                  aggregation. Either '$$count' of rows or the
                                  name of a numeric column that will be summed
                                  by user. Must specify `aggregateFilter` if
                                  using this. Only can be used with 'retention'
                                  and 'proportion' metrics.
                                type: string
                              aggregateFilter:
                                description: >-
                                  Simple comparison operator and value to apply
                                  after aggregation (e.g. '= 10' or '>= 1').
                                  Requires `aggregateFilterColumn`.
                                type: string
                            required:
                              - factTableId
                            additionalProperties: false
                          denominator:
                            description: Only when metricType is 'ratio'
                            type: object
                            properties:
                              factTableId:
                                type: string
                              column:
                                description: >-
                                  The column name or one of the special values:
                                  '$$distinctUsers' or '$$count' (or
                                  '$$distinctDates' if metricType is 'mean' or
                                  'ratio' or 'quantile' and
                                  quantileSettings.type is 'unit')
                                type: string
                              aggregation:
                                description: >-
                                  User aggregation of selected column. Either
                                  sum or max for numeric columns; count distinct
                                  for string columns; hll merge / kll merge for
                                  pre-built sketch columns (requires data-source
                                  support); ignored for special columns.
                                  Default: sum. If you specify a string column
                                  you must explicitly specify count distinct.
                                  Not used for proportion metrics; for event
                                  quantile metrics only kll merge is applicable.
                                type: string
                                enum:
                                  - sum
                                  - max
                                  - count distinct
                                  - hll merge
                                  - kll merge
                              filters:
                                deprecated: true
                                description: >-
                                  Array of Fact Table Filter Ids. Deprecated,
                                  use rowFilters instead.
                                type: array
                                items:
                                  type: string
                              inlineFilters:
                                deprecated: true
                                description: >-
                                  Inline filters to apply to the fact table.
                                  Keys are column names, values are arrays of
                                  values to filter by. Deprecated, use
                                  rowFilters instead.
                                type: object
                                propertyNames:
                                  type: string
                                additionalProperties:
                                  type: array
                                  items:
                                    type: string
                              rowFilters:
                                description: >-
                                  Filters to apply to the rows of the fact table
                                  before aggregation.
                                type: array
                                items:
                                  type: object
                                  properties:
                                    operator:
                                      type: string
                                      enum:
                                        - '='
                                        - '!='
                                        - '>'
                                        - <
                                        - '>='
                                        - <=
                                        - in
                                        - not_in
                                        - is_null
                                        - not_null
                                        - is_true
                                        - is_false
                                        - contains
                                        - not_contains
                                        - starts_with
                                        - ends_with
                                        - sql_expr
                                        - saved_filter
                                    values:
                                      description: >-
                                        Not required for is_null, not_null,
                                        is_true, is_false operators.
                                      type: array
                                      items:
                                        type: string
                                    column:
                                      description: >-
                                        Required for all operators except
                                        sql_expr and saved_filter.
                                      type: string
                                  required:
                                    - operator
                                  additionalProperties: false
                            required:
                              - factTableId
                              - column
                            additionalProperties: false
                          inverse:
                            description: >-
                              Set to true for things like Bounce Rate, where you
                              want the metric to decrease
                            type: boolean
                          quantileSettings:
                            description: >-
                              Controls the settings for quantile metrics
                              (mandatory if metricType is "quantile")
                            type: object
                            properties:
                              type:
                                description: >-
                                  Whether the quantile is over unit aggregations
                                  or raw event values
                                type: string
                                enum:
                                  - event
                                  - unit
                              ignoreZeros:
                                description: >-
                                  If true, zero values will be ignored when
                                  calculating the quantile
                                type: boolean
                              quantile:
                                description: The quantile value (from 0.001 to 0.999)
                                type: number
                                minimum: 0.001
                                maximum: 0.999
                                multipleOf: 0.001
                              quantileEventCountColumn:
                                description: >-
                                  Optional override for the source-column name
                                  used to recover per-row event counts when
                                  numerator.aggregation is 'kll merge'. Defaults
                                  to '<numerator.column>_n_events'. Only valid
                                  for event-quantile metrics with a 'kll merge'
                                  numerator.
                                type: string
                            required:
                              - type
                              - ignoreZeros
                              - quantile
                            additionalProperties: false
                          cappingSettings:
                            description: Controls how outliers are handled
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - none
                                  - absolute
                                  - percentile
                              value:
                                description: >-
                                  When type is absolute, this is the absolute
                                  value. When type is percentile, this is the
                                  percentile value (from 0.0 to 1.0).
                                type: number
                              ignoreZeros:
                                description: >-
                                  If true and capping is `percentile`, zeros
                                  will be ignored when calculating the
                                  percentile.
                                type: boolean
                            required:
                              - type
                            additionalProperties: false
                          windowSettings:
                            description: Controls the conversion window for the metric
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - none
                                  - conversion
                                  - lookback
                              delayHours:
                                deprecated: true
                                description: >-
                                  Wait this many hours after experiment exposure
                                  before counting conversions. Ignored if
                                  delayValue is set.
                                type: number
                              delayValue:
                                description: >-
                                  Wait this long after experiment exposure
                                  before counting conversions.
                                type: number
                              delayUnit:
                                description: Default `hours`.
                                type: string
                                enum:
                                  - minutes
                                  - hours
                                  - days
                                  - weeks
                              windowValue:
                                type: number
                              windowUnit:
                                description: Default `hours`.
                                type: string
                                enum:
                                  - minutes
                                  - hours
                                  - days
                                  - weeks
                            required:
                              - type
                            additionalProperties: false
                          priorSettings:
                            description: >-
                              Controls the bayesian prior for the metric. If
                              omitted, organization defaults will be used.
                            type: object
                            properties:
                              override:
                                description: >-
                                  If false, the organization default settings
                                  will be used instead of the other settings in
                                  this object
                                type: boolean
                              proper:
                                description: >-
                                  If true, the `mean` and `stddev` will be used,
                                  otherwise we will use an improper flat prior.
                                type: boolean
                              mean:
                                description: >-
                                  The mean of the prior distribution of relative
                                  effects in proportion terms (e.g. 0.01 is 1%)
                                type: number
                              stddev:
                                description: >-
                                  Must be > 0. The standard deviation of the
                                  prior distribution of relative effects in
                                  proportion terms.
                                type: number
                                exclusiveMinimum: 0
                            required:
                              - override
                              - proper
                              - mean
                              - stddev
                            additionalProperties: false
                          regressionAdjustmentSettings:
                            description: >-
                              Controls the regression adjustment (CUPED)
                              settings for the metric
                            type: object
                            properties:
                              override:
                                description: >-
                                  If false, the organization default settings
                                  will be used
                                type: boolean
                              enabled:
                                description: >-
                                  Controls whether or not regression adjustment
                                  is applied to the metric
                                type: boolean
                              days:
                                description: >-
                                  Number of pre-exposure days to use for the
                                  regression adjustment
                                type: number
                            required:
                              - override
                            additionalProperties: false
                          riskThresholdSuccess:
                            deprecated: true
                            description: >-
                              No longer used. Threshold for Risk to be
                              considered low enough, as a proportion (e.g. put
                              0.0025 for 0.25%). <br/> Must be a non-negative
                              number and must not be higher than
                              `riskThresholdDanger`.
                            type: number
                            minimum: 0
                          riskThresholdDanger:
                            deprecated: true
                            description: >-
                              No longer used. Threshold for Risk to be
                              considered too high, as a proportion (e.g. put
                              0.0125 for 1.25%). <br/> Must be a non-negative
                              number.
                            type: number
                            minimum: 0
                          displayAsPercentage:
                            description: >-
                              If true and the metric is a ratio or
                              dailyParticipation metric, variation means will be
                              displayed as a percentage. Defaults to true for
                              dailyParticipation metrics and false for ratio
                              metrics.
                            type: boolean
                          minPercentChange:
                            description: >-
                              Minimum percent change to consider uplift
                              significant, as a proportion (e.g. put 0.005 for
                              0.5%)
                            type: number
                            minimum: 0
                          maxPercentChange:
                            description: >-
                              Maximum percent change to consider uplift
                              significant, as a proportion (e.g. put 0.5 for
                              50%)
                            type: number
                            minimum: 0
                          minSampleSize:
                            type: number
                            minimum: 0
                          targetMDE:
                            description: >-
                              The percentage change that you want to reliably
                              detect before ending an experiment, as a
                              proportion (e.g. put 0.1 for 10%). This is used to
                              estimate the "Days Left" for running experiments.
                            type: number
                            minimum: 0
                          managedBy:
                            description: >-
                              Set this to "api" to disable editing in the
                              GrowthBook UI
                            type: string
                            enum:
                              - ''
                              - api
                              - admin
                          archived:
                            description: >-
                              Set to true to archive the metric. Archived
                              metrics are hidden by default in the UI and
                              excluded from new experiments.
                            type: boolean
                          metricAutoSlices:
                            description: >-
                              Array of slice column names that will be
                              automatically included in metric analysis. This is
                              an enterprise feature.
                            type: array
                            items:
                              type: string
                        required:
                          - name
                          - metricType
                          - numerator
                        additionalProperties: false
                    required:
                      - id
                      - data
                    additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  factTablesAdded:
                    type: integer
                  factTablesUpdated:
                    type: integer
                  factTableFiltersAdded:
                    type: integer
                  factTableFiltersUpdated:
                    type: integer
                  factMetricsAdded:
                    type: integer
                  factMetricsUpdated:
                    type: integer
                required:
                  - success
                  - factTablesAdded
                  - factTablesUpdated
                  - factTableFiltersAdded
                  - factTableFiltersUpdated
                  - factMetricsAdded
                  - factMetricsUpdated
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/bulk-import/facts' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"factTables":[],"factTableFilters":[],"factMetrics":[]}'
  /v1/code-refs:
    post:
      operationId: postCodeRefs
      summary: Submit list of code references
      tags:
        - code-references
      parameters:
        - $ref: '#/components/parameters/deleteMissing'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                branch:
                  type: string
                repoName:
                  type: string
                refs:
                  type: array
                  items:
                    type: object
                    properties:
                      filePath:
                        type: string
                      startingLineNumber:
                        type: integer
                      lines:
                        type: string
                      flagKey:
                        type: string
                      contentHash:
                        type: string
                    required:
                      - filePath
                      - startingLineNumber
                      - lines
                      - flagKey
                      - contentHash
                    additionalProperties: false
              required:
                - branch
                - repoName
                - refs
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  featuresUpdated:
                    type: array
                    items:
                      type: string
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/code-refs' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"branch":"main","repoName":"my-repo","refs":[{"filePath":"src/app.ts","startingLineNumber":16,"lines":"...","flagKey":"my-feature","contentHash":"abc123"}]}'
    get:
      operationId: listCodeRefs
      summary: Get list of all code references for the current organization
      tags:
        - code-references
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      codeRefs:
                        type: array
                        items:
                          $ref: '#/components/schemas/CodeRef'
                    required:
                      - codeRefs
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/code-refs' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/code-refs/{id}:
    get:
      operationId: getCodeRefs
      summary: Get list of code references for a single feature id
      tags:
        - code-references
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  codeRefs:
                    type: array
                    items:
                      $ref: '#/components/schemas/CodeRef'
                required:
                  - codeRefs
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/code-refs/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/members:
    get:
      operationId: listMembers
      summary: Get all organization members
      tags:
        - members
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/userName'
        - $ref: '#/components/parameters/userEmail'
        - $ref: '#/components/parameters/globalRole'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      members:
                        type: array
                        items:
                          $ref: '#/components/schemas/Member'
                    required:
                      - members
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/members' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/members/{id}/role:
    post:
      operationId: updateMemberRole
      summary: >-
        Update a member's global role (including any enviroment restrictions, if
        applicable). Can also update a member's project roles if your plan
        supports it.
      tags:
        - members
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                member:
                  type: object
                  properties:
                    role:
                      type: string
                    environments:
                      type: array
                      items:
                        type: string
                    projectRoles:
                      type: array
                      items:
                        type: object
                        properties:
                          project:
                            type: string
                          role:
                            type: string
                          environments:
                            type: array
                            items:
                              type: string
                          limitAccessByEnvironment:
                            type: boolean
                        required:
                          - project
                          - role
                          - environments
                        additionalProperties: false
                  additionalProperties: false
              required:
                - member
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  updatedMember:
                    $ref: '#/components/schemas/updatedMember'
                required:
                  - updatedMember
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/members/{id}/role' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/members/{id}:
    delete:
      operationId: deleteMember
      summary: Removes a single user from an organization
      tags:
        - members
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X DELETE 'https://api.growthbook.io/api/v1/members/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/queries/{id}:
    get:
      operationId: getQuery
      summary: Get a single query
      tags:
        - queries
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  query:
                    $ref: '#/components/schemas/Query'
                required:
                  - query
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/queries/abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/settings:
    get:
      operationId: getSettings
      summary: Get organization settings
      tags:
        - settings
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  settings:
                    $ref: '#/components/schemas/Settings'
                required:
                  - settings
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/settings' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/information-schema-tables/{tableId}:
    get:
      operationId: getInformationSchemaTable
      summary: Get a single Information Schema Table by id
      description: >-
        Returns cached metadata for a specific table in the Data Source,
        including columns and their data types. Not all data source types
        support information schemas.
      tags:
        - data-sources
      parameters:
        - $ref: '#/components/parameters/tableId'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  informationSchemaTable:
                    $ref: '#/components/schemas/InformationSchemaTable'
                required:
                  - informationSchemaTable
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/information-schema-tables/{tableId}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedules:
    get:
      operationId: listRampSchedules
      summary: Get all rampSchedules
      description: |
        Returns all ramp schedules for the organization, with optional filters.
      tags:
        - ramp-schedules
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/featureId'
        - name: status
          in: query
          description: Filter by schedule status
          schema:
            description: Filter by schedule status
            type: string
            enum:
              - pending
              - ready
              - running
              - paused
              - pending-approval
              - completed
              - rolled-back
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  limit:
                    type: integer
                  offset:
                    type: integer
                  count:
                    type: integer
                  total:
                    type: integer
                  hasMore:
                    type: boolean
                  nextOffset:
                    anyOf:
                      - type: integer
                      - type: 'null'
                  rampSchedules:
                    type: array
                    items:
                      $ref: '#/components/schemas/RampSchedule'
                required:
                  - limit
                  - offset
                  - count
                  - total
                  - hasMore
                  - nextOffset
                  - rampSchedules
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/ramp-schedules' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: createRampSchedule
      summary: Create a single rampSchedule
      description: >
        Creates a new ramp schedule, optionally attaching it to a published
        feature rule.


        ### Target attachment (optional)


        Provide `featureId` and `ruleId` together to attach the schedule to a
        specific

        rule on creation. The rule must already be live (published). Each rule
        can only

        be controlled by one schedule at a time.


        When both are supplied, **`targetId` and `patch.ruleId` are
        auto-injected**

        into every step action and endAction — callers only need to supply the
        patch

        values (`coverage`, `condition`, etc.).


        `environment` is accepted for backward compatibility with pre-v2 ramps
        but is

        deprecated and no longer required. Post-v2 `rule.id` is uniquely
        sufficient.


        If rule attachment is omitted, the schedule is created as a
        free-standing

        skeleton in `pending` status. Use `POST
        /ramp-schedules/{id}/actions/add-target`

        to attach rules later, and `POST /ramp-schedules/{id}/actions/start` to
        start it.


        ### Using templates


        Provide `templateId` to inherit steps and endActions from a saved
        template.

        Explicit `steps` / `endActions` in the request body take precedence over
        the

        template. Template auto-population requires `featureId` and `ruleId` to
        be set

        (so targetId can be injected).


        Requires an **Enterprise** plan.
      tags:
        - ramp-schedules
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                featureId:
                  description: >-
                    Feature that anchors this schedule. Required when `ruleId`
                    is set.
                  type: string
                ruleId:
                  description: >-
                    Rule to attach as the initial target. Requires `featureId`.
                    Post-v2 `rule.id` is uniquely sufficient; `environment` is
                    optional and deprecated.
                  type: string
                environment:
                  deprecated: true
                  description: >-
                    Deprecated. Legacy disambiguator for pre-v2 rules whose
                    `ruleId` could repeat across envs. Omit on new schedules —
                    the resolver uses `rule.id` directly.
                  type: string
                steps:
                  description: >
                    Ordered ramp steps. When `featureId`+`ruleId` are provided,

                    `targetId` and `patch.ruleId` in actions are auto-injected —
                    only

                    supply the patch fields you want to change.
                  type: array
                  items:
                    type: object
                    properties:
                      trigger:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                const: interval
                              seconds:
                                type: number
                                exclusiveMinimum: 0
                            required:
                              - type
                              - seconds
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: approval
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: scheduled
                              at:
                                type: string
                            required:
                              - type
                              - at
                            additionalProperties: false
                      actions:
                        type: array
                        items:
                          type: object
                          properties:
                            targetType:
                              description: >-
                                Omit when using featureId+ruleId+environment
                                (auto-injected)
                              type: string
                              const: feature-rule
                            targetId:
                              description: >-
                                Auto-injected when featureId+ruleId+environment
                                are provided
                              type: string
                            patch:
                              description: >-
                                Sparse patch — only fields present are applied;
                                absent fields accumulate from previous steps
                              type: object
                              properties:
                                ruleId:
                                  description: >-
                                    Auto-injected when ruleId is provided at the
                                    top level
                                  type: string
                                coverage:
                                  anyOf:
                                    - type: number
                                      minimum: 0
                                      maximum: 1
                                    - type: 'null'
                                condition:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                savedGroups:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          match:
                                            type: string
                                            enum:
                                              - all
                                              - none
                                              - any
                                          ids:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - match
                                          - ids
                                        additionalProperties: false
                                    - type: 'null'
                                prerequisites:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    - type: 'null'
                                force:
                                  description: Force value (any JSON type)
                                enabled:
                                  anyOf:
                                    - type: boolean
                                    - type: 'null'
                              additionalProperties: false
                          required:
                            - patch
                          additionalProperties: false
                      approvalNotes:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - trigger
                    additionalProperties: false
                endActions:
                  description: >-
                    Actions applied when the ramp completes. `targetId` and
                    `patch.ruleId` are auto-injected when `featureId`+`ruleId`
                    are provided.
                  type: array
                  items:
                    type: object
                    properties:
                      targetType:
                        description: >-
                          Omit when using featureId+ruleId+environment
                          (auto-injected)
                        type: string
                        const: feature-rule
                      targetId:
                        description: >-
                          Auto-injected when featureId+ruleId+environment are
                          provided
                        type: string
                      patch:
                        description: >-
                          Sparse patch — only fields present are applied; absent
                          fields accumulate from previous steps
                        type: object
                        properties:
                          ruleId:
                            description: >-
                              Auto-injected when ruleId is provided at the top
                              level
                            type: string
                          coverage:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 1
                              - type: 'null'
                          condition:
                            anyOf:
                              - type: string
                              - type: 'null'
                          savedGroups:
                            anyOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    match:
                                      type: string
                                      enum:
                                        - all
                                        - none
                                        - any
                                    ids:
                                      type: array
                                      items:
                                        type: string
                                  required:
                                    - match
                                    - ids
                                  additionalProperties: false
                              - type: 'null'
                          prerequisites:
                            anyOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                    condition:
                                      type: string
                                  required:
                                    - id
                                    - condition
                                  additionalProperties: false
                              - type: 'null'
                          force:
                            description: Force value (any JSON type)
                          enabled:
                            anyOf:
                              - type: boolean
                              - type: 'null'
                        additionalProperties: false
                    required:
                      - patch
                    additionalProperties: false
                startDate:
                  description: When to start. Absent/null = immediately on start action.
                  anyOf:
                    - type: string
                      format: date-time
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    - type: 'null'
                endCondition:
                  description: Optional hard deadline
                  type: object
                  properties:
                    trigger:
                      type: object
                      properties:
                        type:
                          type: string
                          const: scheduled
                        at:
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      required:
                        - type
                        - at
                      additionalProperties: false
                  additionalProperties: false
                templateId:
                  description: >-
                    Load steps and endActions from a saved template
                    (featureId+ruleId must also be set for auto-injection)
                  type: string
              required:
                - name
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampSchedule:
                    $ref: '#/components/schemas/RampSchedule'
                required:
                  - rampSchedule
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/ramp-schedules' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedules/{id}/actions/start:
    post:
      operationId: startRampSchedule
      summary: Start a ramp schedule
      description: >
        Transitions the schedule from `ready` to `running` and processes the
        first

        step immediately if eligible.
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampSchedule:
                    $ref: '#/components/schemas/RampSchedule'
                required:
                  - rampSchedule
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/ramp-schedules/{id}/actions/start'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedules/{id}/actions/pause:
    post:
      operationId: pauseRampSchedule
      summary: Pause a ramp schedule
      description: |
        Pauses a `running` or `pending-approval` schedule. The schedule can be
        resumed from the same position with the `/actions/resume` endpoint.
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampSchedule:
                    $ref: '#/components/schemas/RampSchedule'
                required:
                  - rampSchedule
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/ramp-schedules/{id}/actions/pause'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedules/{id}/actions/resume:
    post:
      operationId: resumeRampSchedule
      summary: Resume a paused ramp schedule
      description: |
        Resumes a `paused` schedule. Adjusts timing anchors to account for the
        pause duration so step intervals continue from where they left off.
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampSchedule:
                    $ref: '#/components/schemas/RampSchedule'
                required:
                  - rampSchedule
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/ramp-schedules/{id}/actions/resume'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedules/{id}/actions/rollback:
    post:
      operationId: rollbackRampSchedule
      summary: Roll back a ramp schedule
      description: |
        Rolls back to the starting position and lands in `paused` status so the
        schedule can be restarted with `/actions/start` or `/actions/resume`.
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampSchedule:
                    $ref: '#/components/schemas/RampSchedule'
                required:
                  - rampSchedule
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/ramp-schedules/{id}/actions/rollback'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedules/{id}/actions/jump:
    post:
      operationId: jumpRampSchedule
      summary: Jump to a specific step
      description: >
        Moves the schedule directly to `targetStepIndex` (forward or backward)
        and

        pauses. Use `-1` to jump to the pre-start position without rolling back
        rule

        patches.
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                targetStepIndex:
                  description: Zero-based index of the step to jump to; -1 = pre-start
                  type: integer
                  minimum: -1
              required:
                - targetStepIndex
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampSchedule:
                    $ref: '#/components/schemas/RampSchedule'
                required:
                  - rampSchedule
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/ramp-schedules/{id}/actions/jump'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedules/{id}/actions/complete:
    post:
      operationId: completeRampSchedule
      summary: Complete a ramp schedule immediately
      description: |
        Applies end actions and marks the schedule as `completed`, regardless of
        how many steps remain.
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampSchedule:
                    $ref: '#/components/schemas/RampSchedule'
                required:
                  - rampSchedule
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/ramp-schedules/{id}/actions/complete'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedules/{id}/actions/approve-step:
    post:
      operationId: approveStepRampSchedule
      summary: Approve the current pending-approval step
      description: |
        Approves the current step on a schedule in `pending-approval` status and
        advances to the next step. Requires the caller to have feature review
        permissions for the associated feature.
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampSchedule:
                    $ref: '#/components/schemas/RampSchedule'
                required:
                  - rampSchedule
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/ramp-schedules/{id}/actions/approve-step'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedules/{id}/actions/add-target:
    post:
      operationId: addTargetRampSchedule
      summary: Add a target rule to a ramp schedule
      description: >
        Attaches an additional feature rule to this ramp schedule. The `ruleId`

        must identify a rule that is already published and must not already be

        controlled by another schedule. `environment` is accepted for backward

        compatibility with pre-v2 ramps but is deprecated and no longer
        required.
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                featureId:
                  type: string
                ruleId:
                  type: string
                environment:
                  deprecated: true
                  description: >-
                    Deprecated pre-v2 disambiguator; ignored on v2 rules where
                    `rule.id` is uniquely sufficient.
                  type: string
              required:
                - featureId
                - ruleId
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampSchedule:
                    $ref: '#/components/schemas/RampSchedule'
                required:
                  - rampSchedule
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/ramp-schedules/{id}/actions/add-target'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedules/{id}/actions/eject-target:
    post:
      operationId: ejectTargetRampSchedule
      summary: Remove a target rule from a ramp schedule
      description: >
        Detaches a target rule from this ramp schedule. Identify the target
        either

        by its `targetId` or by the `[ruleId, environment]` pair.


        If this is the last target on the schedule, the schedule is deleted
        entirely

        and the response contains `deleted: true` instead of `rampSchedule`.
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                targetId:
                  description: Target ID (from the targets array)
                  type: string
                ruleId:
                  description: Rule ID — use as an alternative to targetId
                  type: string
                environment:
                  deprecated: true
                  description: >-
                    Deprecated pre-v2 disambiguator. Optional when used with
                    ruleId; omit on v2 ramps.
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      rampSchedule:
                        $ref: '#/components/schemas/RampSchedule'
                    required:
                      - rampSchedule
                    additionalProperties: false
                  - type: object
                    properties:
                      deleted:
                        type: boolean
                      rampScheduleId:
                        type: string
                    required:
                      - deleted
                      - rampScheduleId
                    additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/ramp-schedules/{id}/actions/eject-target'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/namespaces:
    get:
      operationId: listNamespaces
      summary: Get all namespaces
      tags:
        - namespaces
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      namespaces:
                        type: array
                        items:
                          $ref: '#/components/schemas/Namespace'
                    required:
                      - namespaces
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/namespaces' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    post:
      operationId: postNamespace
      summary: Create a namespace
      tags:
        - namespaces
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                displayName:
                  description: >-
                    Human-readable display name. Must be unique within the
                    organization.
                  type: string
                description:
                  type: string
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                format:
                  description: >-
                    Namespace format. Defaults to 'multiRange', which supports
                    multiple ranges per experiment and a configurable hash
                    attribute.
                  type: string
                  enum:
                    - legacy
                    - multiRange
                hashAttribute:
                  description: >-
                    Required when format is 'multiRange'. The user attribute
                    (e.g. 'id', 'device_id') used to assign users to namespace
                    buckets.
                  type: string
              required:
                - displayName
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  namespace:
                    $ref: '#/components/schemas/Namespace'
                required:
                  - namespace
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/namespaces' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"displayName":"Checkout Flow","description":"Experiments on the checkout funnel","format":"multiRange","hashAttribute":"id"}'
  /v1/namespaces/{id}:
    get:
      operationId: getNamespace
      summary: Get a single namespace
      tags:
        - namespaces
      parameters:
        - name: id
          in: path
          required: true
          description: The unique id of the namespace
          schema:
            description: The unique id of the namespace
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  namespace:
                    $ref: '#/components/schemas/Namespace'
                required:
                  - namespace
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET 'https://api.growthbook.io/api/v1/namespaces/ns-abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: putNamespace
      summary: Update a namespace
      tags:
        - namespaces
      parameters:
        - name: id
          in: path
          required: true
          description: The unique id of the namespace
          schema:
            description: The unique id of the namespace
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                displayName:
                  description: Human-readable display name.
                  type: string
                description:
                  description: Namespace description.
                  type: string
                status:
                  description: Set to 'inactive' to disable the namespace.
                  type: string
                  enum:
                    - active
                    - inactive
                hashAttribute:
                  description: >-
                    Only applies to multiRange namespaces. Changes which user
                    attribute is used for bucket hashing going forward.
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  namespace:
                    $ref: '#/components/schemas/Namespace'
                required:
                  - namespace
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT 'https://api.growthbook.io/api/v1/namespaces/ns-abc123'
            \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"displayName":"Checkout v2","status":"inactive"}'
    delete:
      operationId: deleteNamespace
      summary: Delete a namespace
      description: >-
        Permanently removes a namespace from the organization. Returns a 409
        error if any active experiments currently reference this namespace —
        disable or remove those references first.
      tags:
        - namespaces
      parameters:
        - name: id
          in: path
          required: true
          description: The unique id of the namespace
          schema:
            description: The unique id of the namespace
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    description: The ID of the deleted namespace.
                    example: ns-abc123
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/namespaces/ns-abc123' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/namespaces/{id}/memberships:
    get:
      operationId: getNamespaceMemberships
      summary: Get namespace membership
      tags:
        - namespaces
      parameters:
        - name: id
          in: path
          required: true
          description: The unique id of the namespace
          schema:
            description: The unique id of the namespace
            type: string
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      experiments:
                        type: array
                        items:
                          $ref: '#/components/schemas/NamespaceExperimentMember'
                    required:
                      - experiments
                    additionalProperties: false
                  - $ref: '#/components/schemas/PaginationFields'
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/namespaces/ns-abc123/memberships'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/namespaces/{id}/rotateSeed:
    post:
      operationId: postNamespaceRotateSeed
      summary: Rotate namespace seed
      description: >-
        ⚠️ Dangerous: sets a new seed for a multiRange namespace. Every user's
        bucket position within the namespace is re-computed immediately, which
        re-randomizes traffic eligibility for **all** experiments currently
        using this namespace. Only do this if you intentionally want to
        reshuffle all allocations across experiments. This could be useful when
        re-using a namespace for a new set of experiments.
      tags:
        - namespaces
      parameters:
        - name: id
          in: path
          required: true
          description: The unique id of the namespace
          schema:
            description: The unique id of the namespace
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                seed:
                  description: >-
                    A specific value to use as the new seed. If omitted, a
                    random value is generated.
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  namespace:
                    $ref: '#/components/schemas/Namespace'
                required:
                  - namespace
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/namespaces/ns-abc123/rotateSeed' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/transform-copy:
    post:
      operationId: postCopyTransform
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                visualChangesetId:
                  type: string
                copy:
                  type: string
                mode:
                  type: string
                  enum:
                    - energetic
                    - concise
                    - humorous
              required:
                - visualChangesetId
                - copy
                - mode
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema: {}
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/transform-copy' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/dashboards/{id}:
    get:
      operationId: getDashboard
      summary: Get a single dashboard
      tags:
        - Dashboards
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  dashboard:
                    $ref: '#/components/schemas/Dashboard'
                required:
                  - dashboard
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/dashboards/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteDashboard
      summary: Delete a single dashboard
      tags:
        - Dashboards
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X DELETE 'https://api.growthbook.io/api/v1/dashboards/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: updateDashboard
      summary: Update a single dashboard
      tags:
        - Dashboards
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  description: The display name of the Dashboard
                  type: string
                editLevel:
                  description: >-
                    Dashboards that are "published" are editable by organization
                    members with appropriate permissions
                  type: string
                  enum:
                    - published
                    - private
                shareLevel:
                  description: >-
                    General Dashboards only. Dashboards that are "published" are
                    viewable by organization members with appropriate
                    permissions
                  type: string
                  enum:
                    - published
                    - private
                enableAutoUpdates:
                  description: >-
                    If enabled for a General Dashboard, also requires an
                    updateSchedule
                  type: boolean
                updateSchedule:
                  description: >-
                    General Dashboards only. Experiment Dashboards update based
                    on the parent experiment instead
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: stale
                        hours:
                          type: number
                      required:
                        - type
                        - hours
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: cron
                        cron:
                          type: string
                      required:
                        - type
                        - cron
                      additionalProperties: false
                projects:
                  description: >-
                    General Dashboards only, Experiment Dashboards use the
                    experiment's projects
                  type: array
                  items:
                    type: string
                blocks:
                  type: array
                  items:
                    anyOf:
                      - anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                const: markdown
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              content:
                                type: string
                            required:
                              - type
                              - title
                              - description
                              - content
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: experiment-metadata
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              experimentId:
                                type: string
                              showDescription:
                                type: boolean
                              showHypothesis:
                                type: boolean
                              showVariationImages:
                                type: boolean
                              variationIds:
                                type: array
                                items:
                                  type: string
                            required:
                              - type
                              - title
                              - description
                              - experimentId
                              - showDescription
                              - showHypothesis
                              - showVariationImages
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: experiment-metric
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              experimentId:
                                type: string
                              metricIds:
                                type: array
                                items:
                                  type: string
                              variationIds:
                                type: array
                                items:
                                  type: string
                              baselineRow:
                                type: number
                              differenceType:
                                type: string
                                enum:
                                  - absolute
                                  - relative
                                  - scaled
                              columnsFilter:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - Metric & Variation Names
                                    - Baseline Average
                                    - Variation Averages
                                    - Chance to Win
                                    - CI Graph
                                    - Lift
                              sliceTagsFilter:
                                type: array
                                items:
                                  type: string
                              metricTagFilter:
                                type: array
                                items:
                                  type: string
                              sortBy:
                                anyOf:
                                  - type: string
                                    enum:
                                      - metrics
                                      - metricTags
                                      - significance
                                      - change
                                  - type: 'null'
                              sortDirection:
                                anyOf:
                                  - type: string
                                    enum:
                                      - asc
                                      - desc
                                  - type: 'null'
                            required:
                              - type
                              - title
                              - description
                              - snapshotId
                              - experimentId
                              - metricIds
                              - variationIds
                              - baselineRow
                              - differenceType
                              - columnsFilter
                              - sliceTagsFilter
                              - metricTagFilter
                              - sortBy
                              - sortDirection
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: experiment-dimension
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              experimentId:
                                type: string
                              dimensionId:
                                type: string
                              dimensionValues:
                                type: array
                                items:
                                  type: string
                              metricIds:
                                type: array
                                items:
                                  type: string
                              variationIds:
                                type: array
                                items:
                                  type: string
                              baselineRow:
                                type: number
                              differenceType:
                                type: string
                                enum:
                                  - absolute
                                  - relative
                                  - scaled
                              columnsFilter:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - Metric & Variation Names
                                    - Baseline Average
                                    - Variation Averages
                                    - Chance to Win
                                    - CI Graph
                                    - Lift
                              metricTagFilter:
                                type: array
                                items:
                                  type: string
                              sortBy:
                                anyOf:
                                  - type: string
                                    enum:
                                      - metrics
                                      - metricTags
                                      - significance
                                      - change
                                  - type: 'null'
                              sortDirection:
                                anyOf:
                                  - type: string
                                    enum:
                                      - asc
                                      - desc
                                  - type: 'null'
                            required:
                              - type
                              - title
                              - description
                              - snapshotId
                              - experimentId
                              - dimensionId
                              - dimensionValues
                              - metricIds
                              - variationIds
                              - baselineRow
                              - differenceType
                              - columnsFilter
                              - metricTagFilter
                              - sortBy
                              - sortDirection
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: experiment-time-series
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              experimentId:
                                type: string
                              metricId:
                                type: string
                              metricIds:
                                type: array
                                items:
                                  type: string
                              variationIds:
                                type: array
                                items:
                                  type: string
                              differenceType:
                                type: string
                                enum:
                                  - absolute
                                  - relative
                                  - scaled
                              sliceTagsFilter:
                                type: array
                                items:
                                  type: string
                              metricTagFilter:
                                type: array
                                items:
                                  type: string
                              sortBy:
                                anyOf:
                                  - type: string
                                    enum:
                                      - metrics
                                      - metricTags
                                      - significance
                                      - change
                                  - type: 'null'
                              sortDirection:
                                anyOf:
                                  - type: string
                                    enum:
                                      - asc
                                      - desc
                                  - type: 'null'
                            required:
                              - type
                              - title
                              - description
                              - snapshotId
                              - experimentId
                              - metricIds
                              - variationIds
                              - differenceType
                              - sliceTagsFilter
                              - metricTagFilter
                              - sortBy
                              - sortDirection
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: experiment-traffic
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              experimentId:
                                type: string
                              showTable:
                                type: boolean
                              showTimeseries:
                                type: boolean
                            required:
                              - type
                              - title
                              - description
                              - experimentId
                              - showTable
                              - showTimeseries
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: sql-explorer
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              savedQueryId:
                                type: string
                              dataVizConfigIndex:
                                type: number
                              blockConfig:
                                type: array
                                items:
                                  type: string
                            required:
                              - type
                              - title
                              - description
                              - savedQueryId
                              - blockConfig
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: metric-explorer
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              factMetricId:
                                type: string
                              visualizationType:
                                type: string
                                enum:
                                  - histogram
                                  - bigNumber
                                  - timeseries
                              valueType:
                                type: string
                                enum:
                                  - avg
                                  - sum
                              metricAnalysisId:
                                type: string
                              analysisSettings:
                                type: object
                                properties:
                                  userIdType:
                                    type: string
                                  lookbackDays:
                                    type: number
                                  populationType:
                                    type: string
                                    enum:
                                      - metric
                                      - factTable
                                      - exposureQuery
                                      - population
                                      - segment
                                  populationId:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  additionalNumeratorFilters:
                                    type: array
                                    items:
                                      type: string
                                  additionalDenominatorFilters:
                                    type: array
                                    items:
                                      type: string
                                  startDate:
                                    type: string
                                  endDate:
                                    type: string
                                required:
                                  - userIdType
                                  - lookbackDays
                                  - populationType
                                  - populationId
                                  - startDate
                                  - endDate
                                additionalProperties: false
                            required:
                              - type
                              - title
                              - description
                              - factMetricId
                              - visualizationType
                              - valueType
                              - metricAnalysisId
                              - analysisSettings
                            additionalProperties: false
                      - anyOf:
                          - type: object
                            properties:
                              organization:
                                type: string
                              id:
                                type: string
                              uid:
                                type: string
                              type:
                                type: string
                                const: metric-explorer
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              factMetricId:
                                type: string
                              visualizationType:
                                type: string
                                enum:
                                  - histogram
                                  - bigNumber
                                  - timeseries
                              valueType:
                                type: string
                                enum:
                                  - avg
                                  - sum
                              metricAnalysisId:
                                type: string
                              analysisSettings:
                                type: object
                                properties:
                                  userIdType:
                                    type: string
                                  lookbackDays:
                                    type: number
                                  populationType:
                                    type: string
                                    enum:
                                      - metric
                                      - factTable
                                      - exposureQuery
                                      - population
                                      - segment
                                  populationId:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  additionalNumeratorFilters:
                                    type: array
                                    items:
                                      type: string
                                  additionalDenominatorFilters:
                                    type: array
                                    items:
                                      type: string
                                  startDate:
                                    type: string
                                  endDate:
                                    type: string
                                required:
                                  - userIdType
                                  - lookbackDays
                                  - populationType
                                  - populationId
                                  - startDate
                                  - endDate
                                additionalProperties: false
                            required:
                              - organization
                              - id
                              - uid
                              - type
                              - title
                              - description
                              - factMetricId
                              - visualizationType
                              - valueType
                              - metricAnalysisId
                              - analysisSettings
                            additionalProperties: false
                          - type: object
                            properties:
                              organization:
                                type: string
                              id:
                                type: string
                              uid:
                                type: string
                              type:
                                type: string
                                const: markdown
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              content:
                                type: string
                            required:
                              - organization
                              - id
                              - uid
                              - type
                              - title
                              - description
                              - content
                            additionalProperties: false
                          - type: object
                            properties:
                              organization:
                                type: string
                              id:
                                type: string
                              uid:
                                type: string
                              type:
                                type: string
                                const: experiment-metadata
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              experimentId:
                                type: string
                              showDescription:
                                type: boolean
                              showHypothesis:
                                type: boolean
                              showVariationImages:
                                type: boolean
                              variationIds:
                                type: array
                                items:
                                  type: string
                            required:
                              - organization
                              - id
                              - uid
                              - type
                              - title
                              - description
                              - experimentId
                              - showDescription
                              - showHypothesis
                              - showVariationImages
                            additionalProperties: false
                          - type: object
                            properties:
                              organization:
                                type: string
                              id:
                                type: string
                              uid:
                                type: string
                              type:
                                type: string
                                const: experiment-metric
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              experimentId:
                                type: string
                              metricIds:
                                type: array
                                items:
                                  type: string
                              variationIds:
                                type: array
                                items:
                                  type: string
                              baselineRow:
                                type: number
                              differenceType:
                                type: string
                                enum:
                                  - absolute
                                  - relative
                                  - scaled
                              columnsFilter:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - Metric & Variation Names
                                    - Baseline Average
                                    - Variation Averages
                                    - Chance to Win
                                    - CI Graph
                                    - Lift
                              sliceTagsFilter:
                                type: array
                                items:
                                  type: string
                              metricTagFilter:
                                type: array
                                items:
                                  type: string
                              sortBy:
                                anyOf:
                                  - type: string
                                    enum:
                                      - metrics
                                      - metricTags
                                      - significance
                                      - change
                                  - type: 'null'
                              sortDirection:
                                anyOf:
                                  - type: string
                                    enum:
                                      - asc
                                      - desc
                                  - type: 'null'
                            required:
                              - organization
                              - id
                              - uid
                              - type
                              - title
                              - description
                              - snapshotId
                              - experimentId
                              - metricIds
                              - variationIds
                              - baselineRow
                              - differenceType
                              - columnsFilter
                              - sliceTagsFilter
                              - metricTagFilter
                              - sortBy
                              - sortDirection
                            additionalProperties: false
                          - type: object
                            properties:
                              organization:
                                type: string
                              id:
                                type: string
                              uid:
                                type: string
                              type:
                                type: string
                                const: experiment-dimension
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              experimentId:
                                type: string
                              dimensionId:
                                type: string
                              dimensionValues:
                                type: array
                                items:
                                  type: string
                              metricIds:
                                type: array
                                items:
                                  type: string
                              variationIds:
                                type: array
                                items:
                                  type: string
                              baselineRow:
                                type: number
                              differenceType:
                                type: string
                                enum:
                                  - absolute
                                  - relative
                                  - scaled
                              columnsFilter:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - Metric & Variation Names
                                    - Baseline Average
                                    - Variation Averages
                                    - Chance to Win
                                    - CI Graph
                                    - Lift
                              metricTagFilter:
                                type: array
                                items:
                                  type: string
                              sortBy:
                                anyOf:
                                  - type: string
                                    enum:
                                      - metrics
                                      - metricTags
                                      - significance
                                      - change
                                  - type: 'null'
                              sortDirection:
                                anyOf:
                                  - type: string
                                    enum:
                                      - asc
                                      - desc
                                  - type: 'null'
                            required:
                              - organization
                              - id
                              - uid
                              - type
                              - title
                              - description
                              - snapshotId
                              - experimentId
                              - dimensionId
                              - dimensionValues
                              - metricIds
                              - variationIds
                              - baselineRow
                              - differenceType
                              - columnsFilter
                              - metricTagFilter
                              - sortBy
                              - sortDirection
                            additionalProperties: false
                          - type: object
                            properties:
                              organization:
                                type: string
                              id:
                                type: string
                              uid:
                                type: string
                              type:
                                type: string
                                const: experiment-time-series
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              experimentId:
                                type: string
                              metricId:
                                type: string
                              metricIds:
                                type: array
                                items:
                                  type: string
                              variationIds:
                                type: array
                                items:
                                  type: string
                              differenceType:
                                type: string
                                enum:
                                  - absolute
                                  - relative
                                  - scaled
                              sliceTagsFilter:
                                type: array
                                items:
                                  type: string
                              metricTagFilter:
                                type: array
                                items:
                                  type: string
                              sortBy:
                                anyOf:
                                  - type: string
                                    enum:
                                      - metrics
                                      - metricTags
                                      - significance
                                      - change
                                  - type: 'null'
                              sortDirection:
                                anyOf:
                                  - type: string
                                    enum:
                                      - asc
                                      - desc
                                  - type: 'null'
                            required:
                              - organization
                              - id
                              - uid
                              - type
                              - title
                              - description
                              - snapshotId
                              - experimentId
                              - metricIds
                              - variationIds
                              - differenceType
                              - sliceTagsFilter
                              - metricTagFilter
                              - sortBy
                              - sortDirection
                            additionalProperties: false
                          - type: object
                            properties:
                              organization:
                                type: string
                              id:
                                type: string
                              uid:
                                type: string
                              type:
                                type: string
                                const: experiment-traffic
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              experimentId:
                                type: string
                              showTable:
                                type: boolean
                              showTimeseries:
                                type: boolean
                            required:
                              - organization
                              - id
                              - uid
                              - type
                              - title
                              - description
                              - experimentId
                              - showTable
                              - showTimeseries
                            additionalProperties: false
                          - type: object
                            properties:
                              organization:
                                type: string
                              id:
                                type: string
                              uid:
                                type: string
                              type:
                                type: string
                                const: sql-explorer
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              savedQueryId:
                                type: string
                              dataVizConfigIndex:
                                type: number
                              blockConfig:
                                type: array
                                items:
                                  type: string
                            required:
                              - organization
                              - id
                              - uid
                              - type
                              - title
                              - description
                              - savedQueryId
                              - blockConfig
                            additionalProperties: false
                          - type: object
                            properties:
                              organization:
                                type: string
                              id:
                                type: string
                              uid:
                                type: string
                              type:
                                type: string
                                const: metric-exploration
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              explorerAnalysisId:
                                type: string
                              config:
                                type: object
                                properties:
                                  datasource:
                                    description: ID of the datasource to query
                                    type: string
                                  dimensions:
                                    type: array
                                    items:
                                      anyOf:
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: date
                                            column:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            dateGranularity:
                                              type: string
                                              enum:
                                                - auto
                                                - hour
                                                - day
                                                - week
                                                - month
                                                - year
                                          required:
                                            - dimensionType
                                            - column
                                            - dateGranularity
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: dynamic
                                            column:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            maxValues:
                                              type: number
                                          required:
                                            - dimensionType
                                            - column
                                            - maxValues
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: static
                                            column:
                                              type: string
                                            values:
                                              type: array
                                              items:
                                                type: string
                                          required:
                                            - dimensionType
                                            - column
                                            - values
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: slice
                                            slices:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  name:
                                                    type: string
                                                  filters:
                                                    type: array
                                                    items:
                                                      type: object
                                                      properties:
                                                        operator:
                                                          type: string
                                                          enum:
                                                            - '='
                                                            - '!='
                                                            - <
                                                            - <=
                                                            - '>'
                                                            - '>='
                                                            - in
                                                            - not_in
                                                            - contains
                                                            - not_contains
                                                            - starts_with
                                                            - ends_with
                                                            - is_null
                                                            - not_null
                                                            - is_true
                                                            - is_false
                                                            - sql_expr
                                                            - saved_filter
                                                        column:
                                                          type: string
                                                        values:
                                                          type: array
                                                          items:
                                                            type: string
                                                      required:
                                                        - operator
                                                      additionalProperties: false
                                                required:
                                                  - name
                                                  - filters
                                                additionalProperties: false
                                          required:
                                            - dimensionType
                                            - slices
                                          additionalProperties: false
                                  chartType:
                                    type: string
                                    enum:
                                      - line
                                      - area
                                      - timeseries-table
                                      - table
                                      - bar
                                      - stackedBar
                                      - horizontalBar
                                      - stackedHorizontalBar
                                      - bigNumber
                                  dateRange:
                                    type: object
                                    properties:
                                      predefined:
                                        type: string
                                        enum:
                                          - today
                                          - last7Days
                                          - last30Days
                                          - last90Days
                                          - customLookback
                                          - customDateRange
                                      lookbackValue:
                                        anyOf:
                                          - type: number
                                          - type: 'null'
                                      lookbackUnit:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - hour
                                              - day
                                              - week
                                              - month
                                          - type: 'null'
                                      startDate:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                      endDate:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                    required:
                                      - predefined
                                    additionalProperties: false
                                  showAs:
                                    type: string
                                    enum:
                                      - total
                                      - per_unit
                                  type:
                                    type: string
                                    const: metric
                                  dataset:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        const: metric
                                      values:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            name:
                                              type: string
                                            rowFilters:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - '='
                                                      - '!='
                                                      - <
                                                      - <=
                                                      - '>'
                                                      - '>='
                                                      - in
                                                      - not_in
                                                      - contains
                                                      - not_contains
                                                      - starts_with
                                                      - ends_with
                                                      - is_null
                                                      - not_null
                                                      - is_true
                                                      - is_false
                                                      - sql_expr
                                                      - saved_filter
                                                  column:
                                                    type: string
                                                  values:
                                                    type: array
                                                    items:
                                                      type: string
                                                required:
                                                  - operator
                                                additionalProperties: false
                                            type:
                                              type: string
                                              const: metric
                                            metricId:
                                              type: string
                                            unit:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            denominatorUnit:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                          required:
                                            - name
                                            - rowFilters
                                            - type
                                            - metricId
                                            - unit
                                            - denominatorUnit
                                          additionalProperties: false
                                    required:
                                      - type
                                      - values
                                    additionalProperties: false
                                required:
                                  - datasource
                                  - dimensions
                                  - chartType
                                  - dateRange
                                  - type
                                  - dataset
                                additionalProperties: false
                            required:
                              - organization
                              - id
                              - uid
                              - type
                              - title
                              - description
                              - explorerAnalysisId
                              - config
                            additionalProperties: false
                          - type: object
                            properties:
                              organization:
                                type: string
                              id:
                                type: string
                              uid:
                                type: string
                              type:
                                type: string
                                const: fact-table-exploration
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              explorerAnalysisId:
                                type: string
                              config:
                                type: object
                                properties:
                                  datasource:
                                    description: ID of the datasource to query
                                    type: string
                                  dimensions:
                                    type: array
                                    items:
                                      anyOf:
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: date
                                            column:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            dateGranularity:
                                              type: string
                                              enum:
                                                - auto
                                                - hour
                                                - day
                                                - week
                                                - month
                                                - year
                                          required:
                                            - dimensionType
                                            - column
                                            - dateGranularity
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: dynamic
                                            column:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            maxValues:
                                              type: number
                                          required:
                                            - dimensionType
                                            - column
                                            - maxValues
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: static
                                            column:
                                              type: string
                                            values:
                                              type: array
                                              items:
                                                type: string
                                          required:
                                            - dimensionType
                                            - column
                                            - values
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: slice
                                            slices:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  name:
                                                    type: string
                                                  filters:
                                                    type: array
                                                    items:
                                                      type: object
                                                      properties:
                                                        operator:
                                                          type: string
                                                          enum:
                                                            - '='
                                                            - '!='
                                                            - <
                                                            - <=
                                                            - '>'
                                                            - '>='
                                                            - in
                                                            - not_in
                                                            - contains
                                                            - not_contains
                                                            - starts_with
                                                            - ends_with
                                                            - is_null
                                                            - not_null
                                                            - is_true
                                                            - is_false
                                                            - sql_expr
                                                            - saved_filter
                                                        column:
                                                          type: string
                                                        values:
                                                          type: array
                                                          items:
                                                            type: string
                                                      required:
                                                        - operator
                                                      additionalProperties: false
                                                required:
                                                  - name
                                                  - filters
                                                additionalProperties: false
                                          required:
                                            - dimensionType
                                            - slices
                                          additionalProperties: false
                                  chartType:
                                    type: string
                                    enum:
                                      - line
                                      - area
                                      - timeseries-table
                                      - table
                                      - bar
                                      - stackedBar
                                      - horizontalBar
                                      - stackedHorizontalBar
                                      - bigNumber
                                  dateRange:
                                    type: object
                                    properties:
                                      predefined:
                                        type: string
                                        enum:
                                          - today
                                          - last7Days
                                          - last30Days
                                          - last90Days
                                          - customLookback
                                          - customDateRange
                                      lookbackValue:
                                        anyOf:
                                          - type: number
                                          - type: 'null'
                                      lookbackUnit:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - hour
                                              - day
                                              - week
                                              - month
                                          - type: 'null'
                                      startDate:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                      endDate:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                    required:
                                      - predefined
                                    additionalProperties: false
                                  showAs:
                                    type: string
                                    enum:
                                      - total
                                      - per_unit
                                  type:
                                    type: string
                                    const: fact_table
                                  dataset:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        const: fact_table
                                      factTableId:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                      values:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            name:
                                              type: string
                                            rowFilters:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - '='
                                                      - '!='
                                                      - <
                                                      - <=
                                                      - '>'
                                                      - '>='
                                                      - in
                                                      - not_in
                                                      - contains
                                                      - not_contains
                                                      - starts_with
                                                      - ends_with
                                                      - is_null
                                                      - not_null
                                                      - is_true
                                                      - is_false
                                                      - sql_expr
                                                      - saved_filter
                                                  column:
                                                    type: string
                                                  values:
                                                    type: array
                                                    items:
                                                      type: string
                                                required:
                                                  - operator
                                                additionalProperties: false
                                            type:
                                              type: string
                                              const: fact_table
                                            valueType:
                                              type: string
                                              enum:
                                                - unit_count
                                                - count
                                                - sum
                                            valueColumn:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            unit:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                          required:
                                            - name
                                            - rowFilters
                                            - type
                                            - valueType
                                            - valueColumn
                                            - unit
                                          additionalProperties: false
                                    required:
                                      - type
                                      - factTableId
                                      - values
                                    additionalProperties: false
                                required:
                                  - datasource
                                  - dimensions
                                  - chartType
                                  - dateRange
                                  - type
                                  - dataset
                                additionalProperties: false
                            required:
                              - organization
                              - id
                              - uid
                              - type
                              - title
                              - description
                              - explorerAnalysisId
                              - config
                            additionalProperties: false
                          - type: object
                            properties:
                              organization:
                                type: string
                              id:
                                type: string
                              uid:
                                type: string
                              type:
                                type: string
                                const: data-source-exploration
                              title:
                                type: string
                              description:
                                type: string
                              snapshotId:
                                type: string
                              explorerAnalysisId:
                                type: string
                              config:
                                type: object
                                properties:
                                  datasource:
                                    description: ID of the datasource to query
                                    type: string
                                  dimensions:
                                    type: array
                                    items:
                                      anyOf:
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: date
                                            column:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            dateGranularity:
                                              type: string
                                              enum:
                                                - auto
                                                - hour
                                                - day
                                                - week
                                                - month
                                                - year
                                          required:
                                            - dimensionType
                                            - column
                                            - dateGranularity
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: dynamic
                                            column:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            maxValues:
                                              type: number
                                          required:
                                            - dimensionType
                                            - column
                                            - maxValues
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: static
                                            column:
                                              type: string
                                            values:
                                              type: array
                                              items:
                                                type: string
                                          required:
                                            - dimensionType
                                            - column
                                            - values
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            dimensionType:
                                              type: string
                                              const: slice
                                            slices:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  name:
                                                    type: string
                                                  filters:
                                                    type: array
                                                    items:
                                                      type: object
                                                      properties:
                                                        operator:
                                                          type: string
                                                          enum:
                                                            - '='
                                                            - '!='
                                                            - <
                                                            - <=
                                                            - '>'
                                                            - '>='
                                                            - in
                                                            - not_in
                                                            - contains
                                                            - not_contains
                                                            - starts_with
                                                            - ends_with
                                                            - is_null
                                                            - not_null
                                                            - is_true
                                                            - is_false
                                                            - sql_expr
                                                            - saved_filter
                                                        column:
                                                          type: string
                                                        values:
                                                          type: array
                                                          items:
                                                            type: string
                                                      required:
                                                        - operator
                                                      additionalProperties: false
                                                required:
                                                  - name
                                                  - filters
                                                additionalProperties: false
                                          required:
                                            - dimensionType
                                            - slices
                                          additionalProperties: false
                                  chartType:
                                    type: string
                                    enum:
                                      - line
                                      - area
                                      - timeseries-table
                                      - table
                                      - bar
                                      - stackedBar
                                      - horizontalBar
                                      - stackedHorizontalBar
                                      - bigNumber
                                  dateRange:
                                    type: object
                                    properties:
                                      predefined:
                                        type: string
                                        enum:
                                          - today
                                          - last7Days
                                          - last30Days
                                          - last90Days
                                          - customLookback
                                          - customDateRange
                                      lookbackValue:
                                        anyOf:
                                          - type: number
                                          - type: 'null'
                                      lookbackUnit:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - hour
                                              - day
                                              - week
                                              - month
                                          - type: 'null'
                                      startDate:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                      endDate:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                    required:
                                      - predefined
                                    additionalProperties: false
                                  showAs:
                                    type: string
                                    enum:
                                      - total
                                      - per_unit
                                  type:
                                    type: string
                                    const: data_source
                                  dataset:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        const: data_source
                                      table:
                                        type: string
                                      path:
                                        type: string
                                      timestampColumn:
                                        type: string
                                      columnTypes:
                                        type: object
                                        propertyNames:
                                          type: string
                                        additionalProperties:
                                          type: string
                                          enum:
                                            - string
                                            - number
                                            - date
                                            - boolean
                                            - other
                                      values:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            name:
                                              type: string
                                            rowFilters:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - '='
                                                      - '!='
                                                      - <
                                                      - <=
                                                      - '>'
                                                      - '>='
                                                      - in
                                                      - not_in
                                                      - contains
                                                      - not_contains
                                                      - starts_with
                                                      - ends_with
                                                      - is_null
                                                      - not_null
                                                      - is_true
                                                      - is_false
                                                      - sql_expr
                                                      - saved_filter
                                                  column:
                                                    type: string
                                                  values:
                                                    type: array
                                                    items:
                                                      type: string
                                                required:
                                                  - operator
                                                additionalProperties: false
                                            type:
                                              type: string
                                              const: data_source
                                            valueType:
                                              type: string
                                              enum:
                                                - unit_count
                                                - count
                                                - sum
                                            valueColumn:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            unit:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                          required:
                                            - name
                                            - rowFilters
                                            - type
                                            - valueType
                                            - valueColumn
                                            - unit
                                          additionalProperties: false
                                    required:
                                      - type
                                      - table
                                      - path
                                      - timestampColumn
                                      - columnTypes
                                      - values
                                    additionalProperties: false
                                required:
                                  - datasource
                                  - dimensions
                                  - chartType
                                  - dateRange
                                  - type
                                  - dataset
                                additionalProperties: false
                            required:
                              - organization
                              - id
                              - uid
                              - type
                              - title
                              - description
                              - explorerAnalysisId
                              - config
                            additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  dashboard:
                    $ref: '#/components/schemas/Dashboard'
                required:
                  - dashboard
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X PUT 'https://api.growthbook.io/api/v1/dashboards/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/dashboards:
    post:
      operationId: createDashboard
      summary: Create a single dashboard
      tags:
        - Dashboards
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  description: The display name of the Dashboard
                  type: string
                editLevel:
                  description: >-
                    Dashboards that are "published" are editable by organization
                    members with appropriate permissions
                  type: string
                  enum:
                    - published
                    - private
                shareLevel:
                  description: >-
                    General Dashboards only. Dashboards that are "published" are
                    viewable by organization members with appropriate
                    permissions
                  type: string
                  enum:
                    - published
                    - private
                enableAutoUpdates:
                  description: >-
                    If enabled for a General Dashboard, also requires an
                    updateSchedule
                  type: boolean
                updateSchedule:
                  description: >-
                    General Dashboards only. Experiment Dashboards update based
                    on the parent experiment instead
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: stale
                        hours:
                          type: number
                      required:
                        - type
                        - hours
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: cron
                        cron:
                          type: string
                      required:
                        - type
                        - cron
                      additionalProperties: false
                experimentId:
                  description: >-
                    The parent experiment for an Experiment Dashboard, or
                    undefined for a general dashboard
                  type: string
                projects:
                  description: >-
                    General Dashboards only, Experiment Dashboards use the
                    experiment's projects
                  type: array
                  items:
                    type: string
                blocks:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          type:
                            type: string
                            const: markdown
                          title:
                            type: string
                          description:
                            type: string
                          snapshotId:
                            type: string
                          content:
                            type: string
                        required:
                          - type
                          - title
                          - description
                          - content
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: experiment-metadata
                          title:
                            type: string
                          description:
                            type: string
                          snapshotId:
                            type: string
                          experimentId:
                            type: string
                          showDescription:
                            type: boolean
                          showHypothesis:
                            type: boolean
                          showVariationImages:
                            type: boolean
                          variationIds:
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - title
                          - description
                          - experimentId
                          - showDescription
                          - showHypothesis
                          - showVariationImages
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: experiment-metric
                          title:
                            type: string
                          description:
                            type: string
                          snapshotId:
                            type: string
                          experimentId:
                            type: string
                          metricIds:
                            type: array
                            items:
                              type: string
                          variationIds:
                            type: array
                            items:
                              type: string
                          baselineRow:
                            type: number
                          differenceType:
                            type: string
                            enum:
                              - absolute
                              - relative
                              - scaled
                          columnsFilter:
                            type: array
                            items:
                              type: string
                              enum:
                                - Metric & Variation Names
                                - Baseline Average
                                - Variation Averages
                                - Chance to Win
                                - CI Graph
                                - Lift
                          sliceTagsFilter:
                            type: array
                            items:
                              type: string
                          metricTagFilter:
                            type: array
                            items:
                              type: string
                          sortBy:
                            anyOf:
                              - type: string
                                enum:
                                  - metrics
                                  - metricTags
                                  - significance
                                  - change
                              - type: 'null'
                          sortDirection:
                            anyOf:
                              - type: string
                                enum:
                                  - asc
                                  - desc
                              - type: 'null'
                        required:
                          - type
                          - title
                          - description
                          - snapshotId
                          - experimentId
                          - metricIds
                          - variationIds
                          - baselineRow
                          - differenceType
                          - columnsFilter
                          - sliceTagsFilter
                          - metricTagFilter
                          - sortBy
                          - sortDirection
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: experiment-dimension
                          title:
                            type: string
                          description:
                            type: string
                          snapshotId:
                            type: string
                          experimentId:
                            type: string
                          dimensionId:
                            type: string
                          dimensionValues:
                            type: array
                            items:
                              type: string
                          metricIds:
                            type: array
                            items:
                              type: string
                          variationIds:
                            type: array
                            items:
                              type: string
                          baselineRow:
                            type: number
                          differenceType:
                            type: string
                            enum:
                              - absolute
                              - relative
                              - scaled
                          columnsFilter:
                            type: array
                            items:
                              type: string
                              enum:
                                - Metric & Variation Names
                                - Baseline Average
                                - Variation Averages
                                - Chance to Win
                                - CI Graph
                                - Lift
                          metricTagFilter:
                            type: array
                            items:
                              type: string
                          sortBy:
                            anyOf:
                              - type: string
                                enum:
                                  - metrics
                                  - metricTags
                                  - significance
                                  - change
                              - type: 'null'
                          sortDirection:
                            anyOf:
                              - type: string
                                enum:
                                  - asc
                                  - desc
                              - type: 'null'
                        required:
                          - type
                          - title
                          - description
                          - snapshotId
                          - experimentId
                          - dimensionId
                          - dimensionValues
                          - metricIds
                          - variationIds
                          - baselineRow
                          - differenceType
                          - columnsFilter
                          - metricTagFilter
                          - sortBy
                          - sortDirection
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: experiment-time-series
                          title:
                            type: string
                          description:
                            type: string
                          snapshotId:
                            type: string
                          experimentId:
                            type: string
                          metricId:
                            type: string
                          metricIds:
                            type: array
                            items:
                              type: string
                          variationIds:
                            type: array
                            items:
                              type: string
                          differenceType:
                            type: string
                            enum:
                              - absolute
                              - relative
                              - scaled
                          sliceTagsFilter:
                            type: array
                            items:
                              type: string
                          metricTagFilter:
                            type: array
                            items:
                              type: string
                          sortBy:
                            anyOf:
                              - type: string
                                enum:
                                  - metrics
                                  - metricTags
                                  - significance
                                  - change
                              - type: 'null'
                          sortDirection:
                            anyOf:
                              - type: string
                                enum:
                                  - asc
                                  - desc
                              - type: 'null'
                        required:
                          - type
                          - title
                          - description
                          - snapshotId
                          - experimentId
                          - metricIds
                          - variationIds
                          - differenceType
                          - sliceTagsFilter
                          - metricTagFilter
                          - sortBy
                          - sortDirection
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: experiment-traffic
                          title:
                            type: string
                          description:
                            type: string
                          snapshotId:
                            type: string
                          experimentId:
                            type: string
                          showTable:
                            type: boolean
                          showTimeseries:
                            type: boolean
                        required:
                          - type
                          - title
                          - description
                          - experimentId
                          - showTable
                          - showTimeseries
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: sql-explorer
                          title:
                            type: string
                          description:
                            type: string
                          snapshotId:
                            type: string
                          savedQueryId:
                            type: string
                          dataVizConfigIndex:
                            type: number
                          blockConfig:
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - title
                          - description
                          - savedQueryId
                          - blockConfig
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: metric-explorer
                          title:
                            type: string
                          description:
                            type: string
                          snapshotId:
                            type: string
                          factMetricId:
                            type: string
                          visualizationType:
                            type: string
                            enum:
                              - histogram
                              - bigNumber
                              - timeseries
                          valueType:
                            type: string
                            enum:
                              - avg
                              - sum
                          metricAnalysisId:
                            type: string
                          analysisSettings:
                            type: object
                            properties:
                              userIdType:
                                type: string
                              lookbackDays:
                                type: number
                              populationType:
                                type: string
                                enum:
                                  - metric
                                  - factTable
                                  - exposureQuery
                                  - population
                                  - segment
                              populationId:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              additionalNumeratorFilters:
                                type: array
                                items:
                                  type: string
                              additionalDenominatorFilters:
                                type: array
                                items:
                                  type: string
                              startDate:
                                type: string
                              endDate:
                                type: string
                            required:
                              - userIdType
                              - lookbackDays
                              - populationType
                              - populationId
                              - startDate
                              - endDate
                            additionalProperties: false
                        required:
                          - type
                          - title
                          - description
                          - factMetricId
                          - visualizationType
                          - valueType
                          - metricAnalysisId
                          - analysisSettings
                        additionalProperties: false
              required:
                - title
                - editLevel
                - shareLevel
                - enableAutoUpdates
                - blocks
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  dashboard:
                    $ref: '#/components/schemas/Dashboard'
                required:
                  - dashboard
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/dashboards' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    get:
      operationId: listDashboards
      summary: Get all dashboards
      tags:
        - Dashboards
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  dashboards:
                    type: array
                    items:
                      $ref: '#/components/schemas/Dashboard'
                required:
                  - dashboards
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/dashboards' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/dashboards/by-experiment/{experimentId}:
    get:
      operationId: getDashboardsForExperiment
      summary: Get all dashboards for an experiment
      tags:
        - Dashboards
      parameters:
        - name: experimentId
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  dashboards:
                    type: array
                    items:
                      $ref: '#/components/schemas/Dashboard'
                required:
                  - dashboards
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/dashboards/by-experiment/{experimentId}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/custom-fields:
    post:
      operationId: createCustomField
      summary: Create a single customField
      tags:
        - CustomFields
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  description: The unique key for the custom field
                  type: string
                  minLength: 1
                name:
                  description: The display name of the custom field
                  type: string
                description:
                  type: string
                placeholder:
                  type: string
                defaultValue:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                    - type: string
                      format: date-time
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    - type: string
                      format: date
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                    - type: array
                      items:
                        type: string
                    - type: array
                      items:
                        type: number
                    - type: array
                      items:
                        type: boolean
                    - type: array
                      items:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    - type: array
                      items:
                        type: string
                        format: date
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                type:
                  description: The type of value this custom field will take
                  type: string
                  enum:
                    - text
                    - textarea
                    - markdown
                    - enum
                    - multiselect
                    - url
                    - number
                    - boolean
                    - date
                    - datetime
                values:
                  type: string
                required:
                  type: boolean
                projects:
                  type: array
                  items:
                    type: string
                sections:
                  description: >-
                    What types of objects this custom field is applicable to
                    (feature, experiment)
                  type: array
                  items:
                    type: string
                    enum:
                      - feature
                      - experiment
              required:
                - id
                - name
                - type
                - required
                - sections
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  customField:
                    $ref: '#/components/schemas/CustomField'
                required:
                  - customField
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/custom-fields' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    get:
      operationId: listCustomFields
      summary: Get all custom fields
      tags:
        - CustomFields
      parameters:
        - name: projectId
          in: query
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomField'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/custom-fields' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/custom-fields/{id}:
    delete:
      operationId: deleteCustomField
      summary: Delete a single customField
      tags:
        - CustomFields
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/index'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE 'https://api.growthbook.io/api/v1/custom-fields/{id}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
    get:
      operationId: getCustomField
      summary: Get a single customField
      tags:
        - CustomFields
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  customField:
                    $ref: '#/components/schemas/CustomField'
                required:
                  - customField
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/custom-fields/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: updateCustomField
      summary: Update a single customField
      tags:
        - CustomFields
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The display name of the custom field
                  type: string
                description:
                  type: string
                placeholder:
                  type: string
                defaultValue:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                    - type: string
                      format: date-time
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    - type: string
                      format: date
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                    - type: array
                      items:
                        type: string
                    - type: array
                      items:
                        type: number
                    - type: array
                      items:
                        type: boolean
                    - type: array
                      items:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    - type: array
                      items:
                        type: string
                        format: date
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                values:
                  type: string
                required:
                  type: boolean
                projects:
                  type: array
                  items:
                    type: string
                sections:
                  description: >-
                    What types of objects this custom field is applicable to
                    (feature, experiment)
                  type: array
                  items:
                    type: string
                    enum:
                      - feature
                      - experiment
                active:
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  customField:
                    $ref: '#/components/schemas/CustomField'
                required:
                  - customField
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X PUT 'https://api.growthbook.io/api/v1/custom-fields/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/metric-groups/{id}:
    get:
      operationId: getMetricGroup
      summary: Get a single metricGroup
      tags:
        - MetricGroups
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  metricGroup:
                    $ref: '#/components/schemas/MetricGroup'
                required:
                  - metricGroup
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/metric-groups/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteMetricGroup
      summary: Delete a single metricGroup
      tags:
        - MetricGroups
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE 'https://api.growthbook.io/api/v1/metric-groups/{id}'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: updateMetricGroup
      summary: Update a single metricGroup
      tags:
        - MetricGroups
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                tags:
                  type: array
                  items:
                    type: string
                projects:
                  type: array
                  items:
                    type: string
                metrics:
                  type: array
                  items:
                    type: string
                datasource:
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                archived:
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  metricGroup:
                    $ref: '#/components/schemas/MetricGroup'
                required:
                  - metricGroup
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X PUT 'https://api.growthbook.io/api/v1/metric-groups/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/metric-groups:
    post:
      operationId: createMetricGroup
      summary: Create a single metricGroup
      tags:
        - MetricGroups
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                tags:
                  type: array
                  items:
                    type: string
                projects:
                  type: array
                  items:
                    type: string
                metrics:
                  type: array
                  items:
                    type: string
                datasource:
                  type: string
                owner:
                  description: >-
                    The userId or email address of the owner. If an email
                    address is provided, it will be used to look up the userId
                    of the matching organization member. If an ID is provided,
                    it will be validated as existing in the organization.
                  type: string
                archived:
                  type: boolean
              required:
                - name
                - description
                - projects
                - metrics
                - datasource
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  metricGroup:
                    $ref: '#/components/schemas/MetricGroup'
                required:
                  - metricGroup
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/metric-groups' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    get:
      operationId: listMetricGroups
      summary: Get all metricGroups
      tags:
        - MetricGroups
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  metricGroups:
                    type: array
                    items:
                      $ref: '#/components/schemas/MetricGroup'
                required:
                  - metricGroups
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/metric-groups' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/teams/{id}:
    get:
      operationId: getTeam
      summary: Get a single team
      tags:
        - Teams
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  team:
                    $ref: '#/components/schemas/Team'
                required:
                  - team
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/teams/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: updateTeam
      summary: Update a single team
      tags:
        - Teams
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                createdBy:
                  type: string
                description:
                  type: string
                role:
                  description: The global role for members of this team
                  type: string
                limitAccessByEnvironment:
                  type: boolean
                environments:
                  description: An empty array means 'all environments'
                  type: array
                  items:
                    type: string
                projectRoles:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                      limitAccessByEnvironment:
                        type: boolean
                      environments:
                        type: array
                        items:
                          type: string
                      teams:
                        type: array
                        items:
                          type: string
                      project:
                        type: string
                    required:
                      - role
                      - limitAccessByEnvironment
                      - environments
                      - project
                    additionalProperties: false
                managedBy:
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: vercel
                        resourceId:
                          type: string
                      required:
                        - type
                        - resourceId
                      additionalProperties: false
                defaultProject:
                  type: string
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  team:
                    $ref: '#/components/schemas/Team'
                required:
                  - team
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X PUT 'https://api.growthbook.io/api/v1/teams/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteTeam
      summary: Delete a single team
      tags:
        - Teams
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
        - $ref: '#/components/parameters/deleteMembers'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X DELETE 'https://api.growthbook.io/api/v1/teams/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/teams:
    post:
      operationId: createTeam
      summary: Create a single team
      tags:
        - Teams
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                createdBy:
                  type: string
                description:
                  type: string
                role:
                  description: The global role for members of this team
                  type: string
                limitAccessByEnvironment:
                  type: boolean
                environments:
                  description: An empty array means 'all environments'
                  type: array
                  items:
                    type: string
                projectRoles:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                      limitAccessByEnvironment:
                        type: boolean
                      environments:
                        type: array
                        items:
                          type: string
                      teams:
                        type: array
                        items:
                          type: string
                      project:
                        type: string
                    required:
                      - role
                      - limitAccessByEnvironment
                      - environments
                      - project
                    additionalProperties: false
                managedBy:
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: vercel
                        resourceId:
                          type: string
                      required:
                        - type
                        - resourceId
                      additionalProperties: false
                defaultProject:
                  type: string
              required:
                - name
                - description
                - role
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  team:
                    $ref: '#/components/schemas/Team'
                required:
                  - team
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/teams' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    get:
      operationId: listTeams
      summary: Get all teams
      tags:
        - Teams
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  teams:
                    type: array
                    items:
                      $ref: '#/components/schemas/Team'
                required:
                  - teams
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/teams' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/teams/{id}/members:
    post:
      operationId: addTeamMembers
      summary: Add members to team
      tags:
        - Teams
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                members:
                  type: array
                  items:
                    type: string
              required:
                - members
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                required:
                  - status
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v1/teams/{id}/members' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: removeTeamMember
      summary: Remove members from team
      tags:
        - Teams
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                members:
                  type: array
                  items:
                    type: string
              required:
                - members
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                required:
                  - status
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE 'https://api.growthbook.io/api/v1/teams/{id}/members'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/experiment-templates/{id}:
    get:
      operationId: getExperimentTemplate
      summary: Get a single experimentTemplate
      tags:
        - ExperimentTemplates
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  experimentTemplate:
                    $ref: '#/components/schemas/ExperimentTemplate'
                required:
                  - experimentTemplate
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/experiment-templates/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteExperimentTemplate
      summary: Delete a single experimentTemplate
      tags:
        - ExperimentTemplates
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/experiment-templates/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: updateExperimentTemplate
      summary: Update a single experimentTemplate
      tags:
        - ExperimentTemplates
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project:
                  type: string
                templateMetadata:
                  type: object
                  properties:
                    name:
                      type: string
                    description:
                      type: string
                  required:
                    - name
                  additionalProperties: false
                type:
                  type: string
                  enum:
                    - standard
                hypothesis:
                  type: string
                description:
                  type: string
                tags:
                  type: array
                  items:
                    type: string
                customFields:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                datasource:
                  type: string
                exposureQueryId:
                  type: string
                hashAttribute:
                  type: string
                fallbackAttribute:
                  type: string
                disableStickyBucketing:
                  type: boolean
                goalMetrics:
                  type: array
                  items:
                    type: string
                secondaryMetrics:
                  type: array
                  items:
                    type: string
                guardrailMetrics:
                  type: array
                  items:
                    type: string
                activationMetric:
                  type: string
                statsEngine:
                  type: string
                  enum:
                    - bayesian
                    - frequentist
                segment:
                  type: string
                skipPartialData:
                  type: boolean
                targeting:
                  type: object
                  properties:
                    coverage:
                      type: number
                    savedGroups:
                      type: array
                      items:
                        type: object
                        properties:
                          match:
                            type: string
                            enum:
                              - all
                              - none
                              - any
                          ids:
                            type: array
                            items:
                              type: string
                        required:
                          - match
                          - ids
                        additionalProperties: false
                    prerequisites:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          condition:
                            type: string
                        required:
                          - id
                          - condition
                        additionalProperties: false
                    condition:
                      type: string
                  required:
                    - coverage
                    - condition
                  additionalProperties: false
                customMetricSlices:
                  type: array
                  items:
                    type: object
                    properties:
                      slices:
                        type: array
                        items:
                          type: object
                          properties:
                            column:
                              type: string
                            levels:
                              type: array
                              items:
                                type: string
                          required:
                            - column
                            - levels
                          additionalProperties: false
                    required:
                      - slices
                    additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  experimentTemplate:
                    $ref: '#/components/schemas/ExperimentTemplate'
                required:
                  - experimentTemplate
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v1/experiment-templates/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/experiment-templates:
    post:
      operationId: createExperimentTemplate
      summary: Create a single experimentTemplate
      tags:
        - ExperimentTemplates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project:
                  type: string
                templateMetadata:
                  type: object
                  properties:
                    name:
                      type: string
                    description:
                      type: string
                  required:
                    - name
                  additionalProperties: false
                type:
                  type: string
                  enum:
                    - standard
                hypothesis:
                  type: string
                description:
                  type: string
                tags:
                  type: array
                  items:
                    type: string
                customFields:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                datasource:
                  type: string
                exposureQueryId:
                  type: string
                hashAttribute:
                  type: string
                fallbackAttribute:
                  type: string
                disableStickyBucketing:
                  type: boolean
                goalMetrics:
                  type: array
                  items:
                    type: string
                secondaryMetrics:
                  type: array
                  items:
                    type: string
                guardrailMetrics:
                  type: array
                  items:
                    type: string
                activationMetric:
                  type: string
                statsEngine:
                  type: string
                  enum:
                    - bayesian
                    - frequentist
                segment:
                  type: string
                skipPartialData:
                  type: boolean
                targeting:
                  type: object
                  properties:
                    coverage:
                      type: number
                    savedGroups:
                      type: array
                      items:
                        type: object
                        properties:
                          match:
                            type: string
                            enum:
                              - all
                              - none
                              - any
                          ids:
                            type: array
                            items:
                              type: string
                        required:
                          - match
                          - ids
                        additionalProperties: false
                    prerequisites:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          condition:
                            type: string
                        required:
                          - id
                          - condition
                        additionalProperties: false
                    condition:
                      type: string
                  required:
                    - coverage
                    - condition
                  additionalProperties: false
                customMetricSlices:
                  type: array
                  items:
                    type: object
                    properties:
                      slices:
                        type: array
                        items:
                          type: object
                          properties:
                            column:
                              type: string
                            levels:
                              type: array
                              items:
                                type: string
                          required:
                            - column
                            - levels
                          additionalProperties: false
                    required:
                      - slices
                    additionalProperties: false
              required:
                - templateMetadata
                - type
                - datasource
                - exposureQueryId
                - statsEngine
                - targeting
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  experimentTemplate:
                    $ref: '#/components/schemas/ExperimentTemplate'
                required:
                  - experimentTemplate
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST 'https://api.growthbook.io/api/v1/experiment-templates'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
    get:
      operationId: listExperimentTemplates
      summary: Get all experimentTemplates
      tags:
        - ExperimentTemplates
      parameters:
        - name: projectId
          in: query
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  experimentTemplates:
                    type: array
                    items:
                      $ref: '#/components/schemas/ExperimentTemplate'
                required:
                  - experimentTemplates
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET 'https://api.growthbook.io/api/v1/experiment-templates'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/experiment-templates/bulk-import:
    post:
      operationId: bulkImportExperimentTemplates
      summary: Bulk create or update experiment templates
      tags:
        - ExperimentTemplates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                templates:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      data:
                        type: object
                        properties:
                          project:
                            type: string
                          templateMetadata:
                            type: object
                            properties:
                              name:
                                type: string
                              description:
                                type: string
                            required:
                              - name
                            additionalProperties: false
                          type:
                            type: string
                            enum:
                              - standard
                          hypothesis:
                            type: string
                          description:
                            type: string
                          tags:
                            type: array
                            items:
                              type: string
                          customFields:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties:
                              type: string
                          datasource:
                            type: string
                          exposureQueryId:
                            type: string
                          hashAttribute:
                            type: string
                          fallbackAttribute:
                            type: string
                          disableStickyBucketing:
                            type: boolean
                          goalMetrics:
                            type: array
                            items:
                              type: string
                          secondaryMetrics:
                            type: array
                            items:
                              type: string
                          guardrailMetrics:
                            type: array
                            items:
                              type: string
                          activationMetric:
                            type: string
                          statsEngine:
                            type: string
                            enum:
                              - bayesian
                              - frequentist
                          segment:
                            type: string
                          skipPartialData:
                            type: boolean
                          targeting:
                            type: object
                            properties:
                              coverage:
                                type: number
                              savedGroups:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    match:
                                      type: string
                                      enum:
                                        - all
                                        - none
                                        - any
                                    ids:
                                      type: array
                                      items:
                                        type: string
                                  required:
                                    - match
                                    - ids
                                  additionalProperties: false
                              prerequisites:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                    condition:
                                      type: string
                                  required:
                                    - id
                                    - condition
                                  additionalProperties: false
                              condition:
                                type: string
                            required:
                              - coverage
                              - condition
                            additionalProperties: false
                          customMetricSlices:
                            type: array
                            items:
                              type: object
                              properties:
                                slices:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      column:
                                        type: string
                                      levels:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - column
                                      - levels
                                    additionalProperties: false
                              required:
                                - slices
                              additionalProperties: false
                        required:
                          - templateMetadata
                          - type
                          - datasource
                          - exposureQueryId
                          - statsEngine
                          - targeting
                        additionalProperties: false
                    required:
                      - id
                      - data
                    additionalProperties: false
              required:
                - templates
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  added:
                    type: integer
                  updated:
                    type: integer
                required:
                  - added
                  - updated
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/experiment-templates/bulk-import'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/product-analytics/metric-exploration:
    post:
      operationId: postMetricExploration
      summary: Create a Metric based visualization
      tags:
        - AnalyticsExplorations
      parameters:
        - $ref: '#/components/parameters/cache'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                datasource:
                  description: ID of the datasource to query
                  type: string
                dimensions:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: date
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          dateGranularity:
                            type: string
                            enum:
                              - auto
                              - hour
                              - day
                              - week
                              - month
                              - year
                        required:
                          - dimensionType
                          - column
                          - dateGranularity
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: dynamic
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          maxValues:
                            type: number
                        required:
                          - dimensionType
                          - column
                          - maxValues
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: static
                          column:
                            type: string
                          values:
                            type: array
                            items:
                              type: string
                        required:
                          - dimensionType
                          - column
                          - values
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: slice
                          slices:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                filters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      operator:
                                        type: string
                                        enum:
                                          - '='
                                          - '!='
                                          - <
                                          - <=
                                          - '>'
                                          - '>='
                                          - in
                                          - not_in
                                          - contains
                                          - not_contains
                                          - starts_with
                                          - ends_with
                                          - is_null
                                          - not_null
                                          - is_true
                                          - is_false
                                          - sql_expr
                                          - saved_filter
                                      column:
                                        type: string
                                      values:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - operator
                                    additionalProperties: false
                              required:
                                - name
                                - filters
                              additionalProperties: false
                        required:
                          - dimensionType
                          - slices
                        additionalProperties: false
                chartType:
                  type: string
                  enum:
                    - line
                    - area
                    - timeseries-table
                    - table
                    - bar
                    - stackedBar
                    - horizontalBar
                    - stackedHorizontalBar
                    - bigNumber
                dateRange:
                  type: object
                  properties:
                    predefined:
                      type: string
                      enum:
                        - today
                        - last7Days
                        - last30Days
                        - last90Days
                        - customLookback
                        - customDateRange
                    lookbackValue:
                      anyOf:
                        - type: number
                        - type: 'null'
                    lookbackUnit:
                      anyOf:
                        - type: string
                          enum:
                            - hour
                            - day
                            - week
                            - month
                        - type: 'null'
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                  required:
                    - predefined
                  additionalProperties: false
                showAs:
                  type: string
                  enum:
                    - total
                    - per_unit
                type:
                  type: string
                  const: metric
                dataset:
                  type: object
                  properties:
                    type:
                      type: string
                      const: metric
                    values:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          rowFilters:
                            type: array
                            items:
                              type: object
                              properties:
                                operator:
                                  type: string
                                  enum:
                                    - '='
                                    - '!='
                                    - <
                                    - <=
                                    - '>'
                                    - '>='
                                    - in
                                    - not_in
                                    - contains
                                    - not_contains
                                    - starts_with
                                    - ends_with
                                    - is_null
                                    - not_null
                                    - is_true
                                    - is_false
                                    - sql_expr
                                    - saved_filter
                                column:
                                  type: string
                                values:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - operator
                              additionalProperties: false
                          type:
                            type: string
                            const: metric
                          metricId:
                            type: string
                          unit:
                            anyOf:
                              - type: string
                              - type: 'null'
                          denominatorUnit:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - name
                          - rowFilters
                          - type
                          - metricId
                          - unit
                          - denominatorUnit
                        additionalProperties: false
                  required:
                    - type
                    - values
                  additionalProperties: false
              required:
                - datasource
                - dimensions
                - chartType
                - dateRange
                - type
                - dataset
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  exploration:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          dateCreated:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          dateUpdated:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          datasource:
                            type: string
                          status:
                            type: string
                            enum:
                              - running
                              - success
                              - error
                          dateStart:
                            type: string
                          dateEnd:
                            type: string
                          error:
                            anyOf:
                              - type: string
                              - type: 'null'
                          result:
                            type: object
                            properties:
                              rows:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    dimensions:
                                      type: array
                                      items:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                    values:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          metricId:
                                            type: string
                                          numerator:
                                            anyOf:
                                              - type: number
                                              - type: 'null'
                                          denominator:
                                            anyOf:
                                              - type: number
                                              - type: 'null'
                                        required:
                                          - metricId
                                          - numerator
                                          - denominator
                                        additionalProperties: false
                                  required:
                                    - dimensions
                                    - values
                                  additionalProperties: false
                            required:
                              - rows
                            additionalProperties: false
                          config:
                            type: object
                            properties:
                              datasource:
                                description: ID of the datasource to query
                                type: string
                              dimensions:
                                type: array
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: date
                                        column:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        dateGranularity:
                                          type: string
                                          enum:
                                            - auto
                                            - hour
                                            - day
                                            - week
                                            - month
                                            - year
                                      required:
                                        - dimensionType
                                        - column
                                        - dateGranularity
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: dynamic
                                        column:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        maxValues:
                                          type: number
                                      required:
                                        - dimensionType
                                        - column
                                        - maxValues
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: static
                                        column:
                                          type: string
                                        values:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - dimensionType
                                        - column
                                        - values
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: slice
                                        slices:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              name:
                                                type: string
                                              filters:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    operator:
                                                      type: string
                                                      enum:
                                                        - '='
                                                        - '!='
                                                        - <
                                                        - <=
                                                        - '>'
                                                        - '>='
                                                        - in
                                                        - not_in
                                                        - contains
                                                        - not_contains
                                                        - starts_with
                                                        - ends_with
                                                        - is_null
                                                        - not_null
                                                        - is_true
                                                        - is_false
                                                        - sql_expr
                                                        - saved_filter
                                                    column:
                                                      type: string
                                                    values:
                                                      type: array
                                                      items:
                                                        type: string
                                                  required:
                                                    - operator
                                                  additionalProperties: false
                                            required:
                                              - name
                                              - filters
                                            additionalProperties: false
                                      required:
                                        - dimensionType
                                        - slices
                                      additionalProperties: false
                              chartType:
                                type: string
                                enum:
                                  - line
                                  - area
                                  - timeseries-table
                                  - table
                                  - bar
                                  - stackedBar
                                  - horizontalBar
                                  - stackedHorizontalBar
                                  - bigNumber
                              dateRange:
                                type: object
                                properties:
                                  predefined:
                                    type: string
                                    enum:
                                      - today
                                      - last7Days
                                      - last30Days
                                      - last90Days
                                      - customLookback
                                      - customDateRange
                                  lookbackValue:
                                    anyOf:
                                      - type: number
                                      - type: 'null'
                                  lookbackUnit:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - hour
                                          - day
                                          - week
                                          - month
                                      - type: 'null'
                                  startDate:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  endDate:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                required:
                                  - predefined
                                additionalProperties: false
                              showAs:
                                type: string
                                enum:
                                  - total
                                  - per_unit
                              type:
                                type: string
                                const: metric
                              dataset:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    const: metric
                                  values:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        name:
                                          type: string
                                        rowFilters:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              operator:
                                                type: string
                                                enum:
                                                  - '='
                                                  - '!='
                                                  - <
                                                  - <=
                                                  - '>'
                                                  - '>='
                                                  - in
                                                  - not_in
                                                  - contains
                                                  - not_contains
                                                  - starts_with
                                                  - ends_with
                                                  - is_null
                                                  - not_null
                                                  - is_true
                                                  - is_false
                                                  - sql_expr
                                                  - saved_filter
                                              column:
                                                type: string
                                              values:
                                                type: array
                                                items:
                                                  type: string
                                            required:
                                              - operator
                                            additionalProperties: false
                                        type:
                                          type: string
                                          const: metric
                                        metricId:
                                          type: string
                                        unit:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        denominatorUnit:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                      required:
                                        - name
                                        - rowFilters
                                        - type
                                        - metricId
                                        - unit
                                        - denominatorUnit
                                      additionalProperties: false
                                required:
                                  - type
                                  - values
                                additionalProperties: false
                            required:
                              - datasource
                              - dimensions
                              - chartType
                              - dateRange
                              - type
                              - dataset
                            additionalProperties: false
                        required:
                          - id
                          - dateCreated
                          - dateUpdated
                          - datasource
                          - status
                          - dateStart
                          - dateEnd
                          - result
                          - config
                        additionalProperties: false
                      - type: 'null'
                  query:
                    anyOf:
                      - $ref: '#/components/schemas/Query'
                      - type: 'null'
                  explorationUrl:
                    description: >-
                      A direct link to view this exploration in the GrowthBook
                      Application.
                    type: string
                  message:
                    description: >-
                      Present when `exploration` is null, explaining why no
                      result was returned.
                    type: string
                required:
                  - exploration
                  - query
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/product-analytics/metric-exploration'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/product-analytics/fact-table-exploration:
    post:
      operationId: postFactTableExploration
      summary: Run a Fact Table based visualization
      tags:
        - AnalyticsExplorations
      parameters:
        - $ref: '#/components/parameters/cache'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                datasource:
                  description: ID of the datasource to query
                  type: string
                dimensions:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: date
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          dateGranularity:
                            type: string
                            enum:
                              - auto
                              - hour
                              - day
                              - week
                              - month
                              - year
                        required:
                          - dimensionType
                          - column
                          - dateGranularity
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: dynamic
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          maxValues:
                            type: number
                        required:
                          - dimensionType
                          - column
                          - maxValues
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: static
                          column:
                            type: string
                          values:
                            type: array
                            items:
                              type: string
                        required:
                          - dimensionType
                          - column
                          - values
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: slice
                          slices:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                filters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      operator:
                                        type: string
                                        enum:
                                          - '='
                                          - '!='
                                          - <
                                          - <=
                                          - '>'
                                          - '>='
                                          - in
                                          - not_in
                                          - contains
                                          - not_contains
                                          - starts_with
                                          - ends_with
                                          - is_null
                                          - not_null
                                          - is_true
                                          - is_false
                                          - sql_expr
                                          - saved_filter
                                      column:
                                        type: string
                                      values:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - operator
                                    additionalProperties: false
                              required:
                                - name
                                - filters
                              additionalProperties: false
                        required:
                          - dimensionType
                          - slices
                        additionalProperties: false
                chartType:
                  type: string
                  enum:
                    - line
                    - area
                    - timeseries-table
                    - table
                    - bar
                    - stackedBar
                    - horizontalBar
                    - stackedHorizontalBar
                    - bigNumber
                dateRange:
                  type: object
                  properties:
                    predefined:
                      type: string
                      enum:
                        - today
                        - last7Days
                        - last30Days
                        - last90Days
                        - customLookback
                        - customDateRange
                    lookbackValue:
                      anyOf:
                        - type: number
                        - type: 'null'
                    lookbackUnit:
                      anyOf:
                        - type: string
                          enum:
                            - hour
                            - day
                            - week
                            - month
                        - type: 'null'
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                  required:
                    - predefined
                  additionalProperties: false
                showAs:
                  type: string
                  enum:
                    - total
                    - per_unit
                type:
                  type: string
                  const: fact_table
                dataset:
                  type: object
                  properties:
                    type:
                      type: string
                      const: fact_table
                    factTableId:
                      anyOf:
                        - type: string
                        - type: 'null'
                    values:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          rowFilters:
                            type: array
                            items:
                              type: object
                              properties:
                                operator:
                                  type: string
                                  enum:
                                    - '='
                                    - '!='
                                    - <
                                    - <=
                                    - '>'
                                    - '>='
                                    - in
                                    - not_in
                                    - contains
                                    - not_contains
                                    - starts_with
                                    - ends_with
                                    - is_null
                                    - not_null
                                    - is_true
                                    - is_false
                                    - sql_expr
                                    - saved_filter
                                column:
                                  type: string
                                values:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - operator
                              additionalProperties: false
                          type:
                            type: string
                            const: fact_table
                          valueType:
                            type: string
                            enum:
                              - unit_count
                              - count
                              - sum
                          valueColumn:
                            anyOf:
                              - type: string
                              - type: 'null'
                          unit:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - name
                          - rowFilters
                          - type
                          - valueType
                          - valueColumn
                          - unit
                        additionalProperties: false
                  required:
                    - type
                    - factTableId
                    - values
                  additionalProperties: false
              required:
                - datasource
                - dimensions
                - chartType
                - dateRange
                - type
                - dataset
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  exploration:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          dateCreated:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          dateUpdated:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          datasource:
                            type: string
                          status:
                            type: string
                            enum:
                              - running
                              - success
                              - error
                          dateStart:
                            type: string
                          dateEnd:
                            type: string
                          error:
                            anyOf:
                              - type: string
                              - type: 'null'
                          result:
                            type: object
                            properties:
                              rows:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    dimensions:
                                      type: array
                                      items:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                    values:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          metricId:
                                            type: string
                                          numerator:
                                            anyOf:
                                              - type: number
                                              - type: 'null'
                                          denominator:
                                            anyOf:
                                              - type: number
                                              - type: 'null'
                                        required:
                                          - metricId
                                          - numerator
                                          - denominator
                                        additionalProperties: false
                                  required:
                                    - dimensions
                                    - values
                                  additionalProperties: false
                            required:
                              - rows
                            additionalProperties: false
                          config:
                            type: object
                            properties:
                              datasource:
                                description: ID of the datasource to query
                                type: string
                              dimensions:
                                type: array
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: date
                                        column:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        dateGranularity:
                                          type: string
                                          enum:
                                            - auto
                                            - hour
                                            - day
                                            - week
                                            - month
                                            - year
                                      required:
                                        - dimensionType
                                        - column
                                        - dateGranularity
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: dynamic
                                        column:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        maxValues:
                                          type: number
                                      required:
                                        - dimensionType
                                        - column
                                        - maxValues
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: static
                                        column:
                                          type: string
                                        values:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - dimensionType
                                        - column
                                        - values
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: slice
                                        slices:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              name:
                                                type: string
                                              filters:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    operator:
                                                      type: string
                                                      enum:
                                                        - '='
                                                        - '!='
                                                        - <
                                                        - <=
                                                        - '>'
                                                        - '>='
                                                        - in
                                                        - not_in
                                                        - contains
                                                        - not_contains
                                                        - starts_with
                                                        - ends_with
                                                        - is_null
                                                        - not_null
                                                        - is_true
                                                        - is_false
                                                        - sql_expr
                                                        - saved_filter
                                                    column:
                                                      type: string
                                                    values:
                                                      type: array
                                                      items:
                                                        type: string
                                                  required:
                                                    - operator
                                                  additionalProperties: false
                                            required:
                                              - name
                                              - filters
                                            additionalProperties: false
                                      required:
                                        - dimensionType
                                        - slices
                                      additionalProperties: false
                              chartType:
                                type: string
                                enum:
                                  - line
                                  - area
                                  - timeseries-table
                                  - table
                                  - bar
                                  - stackedBar
                                  - horizontalBar
                                  - stackedHorizontalBar
                                  - bigNumber
                              dateRange:
                                type: object
                                properties:
                                  predefined:
                                    type: string
                                    enum:
                                      - today
                                      - last7Days
                                      - last30Days
                                      - last90Days
                                      - customLookback
                                      - customDateRange
                                  lookbackValue:
                                    anyOf:
                                      - type: number
                                      - type: 'null'
                                  lookbackUnit:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - hour
                                          - day
                                          - week
                                          - month
                                      - type: 'null'
                                  startDate:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  endDate:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                required:
                                  - predefined
                                additionalProperties: false
                              showAs:
                                type: string
                                enum:
                                  - total
                                  - per_unit
                              type:
                                type: string
                                const: fact_table
                              dataset:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    const: fact_table
                                  factTableId:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  values:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        name:
                                          type: string
                                        rowFilters:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              operator:
                                                type: string
                                                enum:
                                                  - '='
                                                  - '!='
                                                  - <
                                                  - <=
                                                  - '>'
                                                  - '>='
                                                  - in
                                                  - not_in
                                                  - contains
                                                  - not_contains
                                                  - starts_with
                                                  - ends_with
                                                  - is_null
                                                  - not_null
                                                  - is_true
                                                  - is_false
                                                  - sql_expr
                                                  - saved_filter
                                              column:
                                                type: string
                                              values:
                                                type: array
                                                items:
                                                  type: string
                                            required:
                                              - operator
                                            additionalProperties: false
                                        type:
                                          type: string
                                          const: fact_table
                                        valueType:
                                          type: string
                                          enum:
                                            - unit_count
                                            - count
                                            - sum
                                        valueColumn:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        unit:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                      required:
                                        - name
                                        - rowFilters
                                        - type
                                        - valueType
                                        - valueColumn
                                        - unit
                                      additionalProperties: false
                                required:
                                  - type
                                  - factTableId
                                  - values
                                additionalProperties: false
                            required:
                              - datasource
                              - dimensions
                              - chartType
                              - dateRange
                              - type
                              - dataset
                            additionalProperties: false
                        required:
                          - id
                          - dateCreated
                          - dateUpdated
                          - datasource
                          - status
                          - dateStart
                          - dateEnd
                          - result
                          - config
                        additionalProperties: false
                      - type: 'null'
                  query:
                    anyOf:
                      - $ref: '#/components/schemas/Query'
                      - type: 'null'
                  explorationUrl:
                    description: >-
                      A direct link to view this exploration in the GrowthBook
                      Application.
                    type: string
                  message:
                    description: >-
                      Present when `exploration` is null, explaining why no
                      result was returned.
                    type: string
                required:
                  - exploration
                  - query
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/product-analytics/fact-table-exploration'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/product-analytics/data-source-exploration:
    post:
      operationId: postDataSourceExploration
      summary: Create a Data Source based visualization
      tags:
        - AnalyticsExplorations
      parameters:
        - $ref: '#/components/parameters/cache'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                datasource:
                  description: ID of the datasource to query
                  type: string
                dimensions:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: date
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          dateGranularity:
                            type: string
                            enum:
                              - auto
                              - hour
                              - day
                              - week
                              - month
                              - year
                        required:
                          - dimensionType
                          - column
                          - dateGranularity
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: dynamic
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          maxValues:
                            type: number
                        required:
                          - dimensionType
                          - column
                          - maxValues
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: static
                          column:
                            type: string
                          values:
                            type: array
                            items:
                              type: string
                        required:
                          - dimensionType
                          - column
                          - values
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: slice
                          slices:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                filters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      operator:
                                        type: string
                                        enum:
                                          - '='
                                          - '!='
                                          - <
                                          - <=
                                          - '>'
                                          - '>='
                                          - in
                                          - not_in
                                          - contains
                                          - not_contains
                                          - starts_with
                                          - ends_with
                                          - is_null
                                          - not_null
                                          - is_true
                                          - is_false
                                          - sql_expr
                                          - saved_filter
                                      column:
                                        type: string
                                      values:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - operator
                                    additionalProperties: false
                              required:
                                - name
                                - filters
                              additionalProperties: false
                        required:
                          - dimensionType
                          - slices
                        additionalProperties: false
                chartType:
                  type: string
                  enum:
                    - line
                    - area
                    - timeseries-table
                    - table
                    - bar
                    - stackedBar
                    - horizontalBar
                    - stackedHorizontalBar
                    - bigNumber
                dateRange:
                  type: object
                  properties:
                    predefined:
                      type: string
                      enum:
                        - today
                        - last7Days
                        - last30Days
                        - last90Days
                        - customLookback
                        - customDateRange
                    lookbackValue:
                      anyOf:
                        - type: number
                        - type: 'null'
                    lookbackUnit:
                      anyOf:
                        - type: string
                          enum:
                            - hour
                            - day
                            - week
                            - month
                        - type: 'null'
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                  required:
                    - predefined
                  additionalProperties: false
                showAs:
                  type: string
                  enum:
                    - total
                    - per_unit
                type:
                  type: string
                  const: data_source
                dataset:
                  type: object
                  properties:
                    type:
                      type: string
                      const: data_source
                    table:
                      type: string
                    path:
                      type: string
                    timestampColumn:
                      type: string
                    columnTypes:
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties:
                        type: string
                        enum:
                          - string
                          - number
                          - date
                          - boolean
                          - other
                    values:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          rowFilters:
                            type: array
                            items:
                              type: object
                              properties:
                                operator:
                                  type: string
                                  enum:
                                    - '='
                                    - '!='
                                    - <
                                    - <=
                                    - '>'
                                    - '>='
                                    - in
                                    - not_in
                                    - contains
                                    - not_contains
                                    - starts_with
                                    - ends_with
                                    - is_null
                                    - not_null
                                    - is_true
                                    - is_false
                                    - sql_expr
                                    - saved_filter
                                column:
                                  type: string
                                values:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - operator
                              additionalProperties: false
                          type:
                            type: string
                            const: data_source
                          valueType:
                            type: string
                            enum:
                              - unit_count
                              - count
                              - sum
                          valueColumn:
                            anyOf:
                              - type: string
                              - type: 'null'
                          unit:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - name
                          - rowFilters
                          - type
                          - valueType
                          - valueColumn
                          - unit
                        additionalProperties: false
                  required:
                    - type
                    - table
                    - path
                    - timestampColumn
                    - columnTypes
                    - values
                  additionalProperties: false
              required:
                - datasource
                - dimensions
                - chartType
                - dateRange
                - type
                - dataset
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  exploration:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          dateCreated:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          dateUpdated:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          datasource:
                            type: string
                          status:
                            type: string
                            enum:
                              - running
                              - success
                              - error
                          dateStart:
                            type: string
                          dateEnd:
                            type: string
                          error:
                            anyOf:
                              - type: string
                              - type: 'null'
                          result:
                            type: object
                            properties:
                              rows:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    dimensions:
                                      type: array
                                      items:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                    values:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          metricId:
                                            type: string
                                          numerator:
                                            anyOf:
                                              - type: number
                                              - type: 'null'
                                          denominator:
                                            anyOf:
                                              - type: number
                                              - type: 'null'
                                        required:
                                          - metricId
                                          - numerator
                                          - denominator
                                        additionalProperties: false
                                  required:
                                    - dimensions
                                    - values
                                  additionalProperties: false
                            required:
                              - rows
                            additionalProperties: false
                          config:
                            type: object
                            properties:
                              datasource:
                                description: ID of the datasource to query
                                type: string
                              dimensions:
                                type: array
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: date
                                        column:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        dateGranularity:
                                          type: string
                                          enum:
                                            - auto
                                            - hour
                                            - day
                                            - week
                                            - month
                                            - year
                                      required:
                                        - dimensionType
                                        - column
                                        - dateGranularity
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: dynamic
                                        column:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        maxValues:
                                          type: number
                                      required:
                                        - dimensionType
                                        - column
                                        - maxValues
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: static
                                        column:
                                          type: string
                                        values:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - dimensionType
                                        - column
                                        - values
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        dimensionType:
                                          type: string
                                          const: slice
                                        slices:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              name:
                                                type: string
                                              filters:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    operator:
                                                      type: string
                                                      enum:
                                                        - '='
                                                        - '!='
                                                        - <
                                                        - <=
                                                        - '>'
                                                        - '>='
                                                        - in
                                                        - not_in
                                                        - contains
                                                        - not_contains
                                                        - starts_with
                                                        - ends_with
                                                        - is_null
                                                        - not_null
                                                        - is_true
                                                        - is_false
                                                        - sql_expr
                                                        - saved_filter
                                                    column:
                                                      type: string
                                                    values:
                                                      type: array
                                                      items:
                                                        type: string
                                                  required:
                                                    - operator
                                                  additionalProperties: false
                                            required:
                                              - name
                                              - filters
                                            additionalProperties: false
                                      required:
                                        - dimensionType
                                        - slices
                                      additionalProperties: false
                              chartType:
                                type: string
                                enum:
                                  - line
                                  - area
                                  - timeseries-table
                                  - table
                                  - bar
                                  - stackedBar
                                  - horizontalBar
                                  - stackedHorizontalBar
                                  - bigNumber
                              dateRange:
                                type: object
                                properties:
                                  predefined:
                                    type: string
                                    enum:
                                      - today
                                      - last7Days
                                      - last30Days
                                      - last90Days
                                      - customLookback
                                      - customDateRange
                                  lookbackValue:
                                    anyOf:
                                      - type: number
                                      - type: 'null'
                                  lookbackUnit:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - hour
                                          - day
                                          - week
                                          - month
                                      - type: 'null'
                                  startDate:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  endDate:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                required:
                                  - predefined
                                additionalProperties: false
                              showAs:
                                type: string
                                enum:
                                  - total
                                  - per_unit
                              type:
                                type: string
                                const: data_source
                              dataset:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    const: data_source
                                  table:
                                    type: string
                                  path:
                                    type: string
                                  timestampColumn:
                                    type: string
                                  columnTypes:
                                    type: object
                                    propertyNames:
                                      type: string
                                    additionalProperties:
                                      type: string
                                      enum:
                                        - string
                                        - number
                                        - date
                                        - boolean
                                        - other
                                  values:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        name:
                                          type: string
                                        rowFilters:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              operator:
                                                type: string
                                                enum:
                                                  - '='
                                                  - '!='
                                                  - <
                                                  - <=
                                                  - '>'
                                                  - '>='
                                                  - in
                                                  - not_in
                                                  - contains
                                                  - not_contains
                                                  - starts_with
                                                  - ends_with
                                                  - is_null
                                                  - not_null
                                                  - is_true
                                                  - is_false
                                                  - sql_expr
                                                  - saved_filter
                                              column:
                                                type: string
                                              values:
                                                type: array
                                                items:
                                                  type: string
                                            required:
                                              - operator
                                            additionalProperties: false
                                        type:
                                          type: string
                                          const: data_source
                                        valueType:
                                          type: string
                                          enum:
                                            - unit_count
                                            - count
                                            - sum
                                        valueColumn:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        unit:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                      required:
                                        - name
                                        - rowFilters
                                        - type
                                        - valueType
                                        - valueColumn
                                        - unit
                                      additionalProperties: false
                                required:
                                  - type
                                  - table
                                  - path
                                  - timestampColumn
                                  - columnTypes
                                  - values
                                additionalProperties: false
                            required:
                              - datasource
                              - dimensions
                              - chartType
                              - dateRange
                              - type
                              - dataset
                            additionalProperties: false
                        required:
                          - id
                          - dateCreated
                          - dateUpdated
                          - datasource
                          - status
                          - dateStart
                          - dateEnd
                          - result
                          - config
                        additionalProperties: false
                      - type: 'null'
                  query:
                    anyOf:
                      - $ref: '#/components/schemas/Query'
                      - type: 'null'
                  explorationUrl:
                    description: >-
                      A direct link to view this exploration in the GrowthBook
                      Application.
                    type: string
                  message:
                    description: >-
                      Present when `exploration` is null, explaining why no
                      result was returned.
                    type: string
                required:
                  - exploration
                  - query
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/product-analytics/data-source-exploration'
            \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedule-templates/{id}:
    get:
      operationId: getRampScheduleTemplate
      summary: Get a single rampScheduleTemplate
      tags:
        - RampScheduleTemplates
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampScheduleTemplate:
                    $ref: '#/components/schemas/RampScheduleTemplate'
                required:
                  - rampScheduleTemplate
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/ramp-schedule-templates/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteRampScheduleTemplate
      summary: Delete a single rampScheduleTemplate
      tags:
        - RampScheduleTemplates
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/ramp-schedule-templates/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: updateRampScheduleTemplate
      summary: Update a single rampScheduleTemplate
      tags:
        - RampScheduleTemplates
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                steps:
                  type: array
                  items:
                    type: object
                    properties:
                      trigger:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                const: interval
                              seconds:
                                type: number
                                exclusiveMinimum: 0
                            required:
                              - type
                              - seconds
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: approval
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: scheduled
                              at:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                            required:
                              - type
                              - at
                            additionalProperties: false
                      actions:
                        type: array
                        items:
                          type: object
                          properties:
                            targetType:
                              type: string
                              const: feature-rule
                            targetId:
                              type: string
                            patch:
                              type: object
                              properties:
                                ruleId:
                                  type: string
                                coverage:
                                  anyOf:
                                    - type: number
                                      minimum: 0
                                      maximum: 1
                                    - type: 'null'
                                condition:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                savedGroups:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          match:
                                            type: string
                                            enum:
                                              - all
                                              - none
                                              - any
                                          ids:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - match
                                          - ids
                                        additionalProperties: false
                                    - type: 'null'
                                prerequisites:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    - type: 'null'
                                enabled:
                                  anyOf:
                                    - type: boolean
                                    - type: 'null'
                              required:
                                - ruleId
                              additionalProperties: false
                          required:
                            - targetType
                            - targetId
                            - patch
                          additionalProperties: false
                      approvalNotes:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - trigger
                      - actions
                    additionalProperties: false
                endPatch:
                  type: object
                  properties:
                    coverage:
                      type: number
                      minimum: 0
                      maximum: 1
                    condition:
                      type: string
                    savedGroups:
                      type: array
                      items:
                        type: object
                        properties:
                          match:
                            type: string
                            enum:
                              - all
                              - none
                              - any
                          ids:
                            type: array
                            items:
                              type: string
                        required:
                          - match
                          - ids
                        additionalProperties: false
                    prerequisites:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          condition:
                            type: string
                        required:
                          - id
                          - condition
                        additionalProperties: false
                  additionalProperties: false
                official:
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampScheduleTemplate:
                    $ref: '#/components/schemas/RampScheduleTemplate'
                required:
                  - rampScheduleTemplate
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PUT
            'https://api.growthbook.io/api/v1/ramp-schedule-templates/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedule-templates:
    post:
      operationId: createRampScheduleTemplate
      summary: Create a single rampScheduleTemplate
      tags:
        - RampScheduleTemplates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                steps:
                  type: array
                  items:
                    type: object
                    properties:
                      trigger:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                const: interval
                              seconds:
                                type: number
                                exclusiveMinimum: 0
                            required:
                              - type
                              - seconds
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: approval
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: scheduled
                              at:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                            required:
                              - type
                              - at
                            additionalProperties: false
                      actions:
                        type: array
                        items:
                          type: object
                          properties:
                            targetType:
                              type: string
                              const: feature-rule
                            targetId:
                              type: string
                            patch:
                              type: object
                              properties:
                                ruleId:
                                  type: string
                                coverage:
                                  anyOf:
                                    - type: number
                                      minimum: 0
                                      maximum: 1
                                    - type: 'null'
                                condition:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                savedGroups:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          match:
                                            type: string
                                            enum:
                                              - all
                                              - none
                                              - any
                                          ids:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - match
                                          - ids
                                        additionalProperties: false
                                    - type: 'null'
                                prerequisites:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    - type: 'null'
                                enabled:
                                  anyOf:
                                    - type: boolean
                                    - type: 'null'
                              required:
                                - ruleId
                              additionalProperties: false
                          required:
                            - targetType
                            - targetId
                            - patch
                          additionalProperties: false
                      approvalNotes:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - trigger
                      - actions
                    additionalProperties: false
                endPatch:
                  type: object
                  properties:
                    coverage:
                      type: number
                      minimum: 0
                      maximum: 1
                    condition:
                      type: string
                    savedGroups:
                      type: array
                      items:
                        type: object
                        properties:
                          match:
                            type: string
                            enum:
                              - all
                              - none
                              - any
                          ids:
                            type: array
                            items:
                              type: string
                        required:
                          - match
                          - ids
                        additionalProperties: false
                    prerequisites:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          condition:
                            type: string
                        required:
                          - id
                          - condition
                        additionalProperties: false
                  additionalProperties: false
                official:
                  type: boolean
              required:
                - name
                - steps
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampScheduleTemplate:
                    $ref: '#/components/schemas/RampScheduleTemplate'
                required:
                  - rampScheduleTemplate
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X POST
            'https://api.growthbook.io/api/v1/ramp-schedule-templates' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    get:
      operationId: listRampScheduleTemplates
      summary: Get all rampScheduleTemplates
      tags:
        - RampScheduleTemplates
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampScheduleTemplates:
                    type: array
                    items:
                      $ref: '#/components/schemas/RampScheduleTemplate'
                required:
                  - rampScheduleTemplates
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X GET
            'https://api.growthbook.io/api/v1/ramp-schedule-templates' \
              -H 'Authorization: Bearer YOUR_API_KEY'
  /v1/ramp-schedules/{id}:
    get:
      operationId: getRampSchedule
      summary: Get a single rampSchedule
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampSchedule:
                    $ref: '#/components/schemas/RampSchedule'
                required:
                  - rampSchedule
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET 'https://api.growthbook.io/api/v1/ramp-schedules/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    delete:
      operationId: deleteRampSchedule
      summary: Delete a single rampSchedule
      description: >
        Permanently deletes a ramp schedule. This does not undo any rule patches
        that

        were already applied by completed steps.
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletedId:
                    type: string
                required:
                  - deletedId
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X DELETE
            'https://api.growthbook.io/api/v1/ramp-schedules/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
    put:
      operationId: updateRampSchedule
      summary: Update a single rampSchedule
      description: >
        Updates the name, steps, endActions, startDate, or endCondition of a
        ramp schedule.


        Only allowed when the schedule is in `pending`, `ready`, or `paused`
        status.


        **targetId shorthand**: When providing `steps` or `endActions`, you may
        omit `targetId`

        (or pass `"t1"`) in each action. If the schedule has exactly one active
        target, the server

        will resolve it automatically. For schedules with multiple targets,
        provide the explicit

        target UUID from `targets[].id`.
      tags:
        - ramp-schedules
      parameters:
        - name: id
          in: path
          required: true
          description: ''
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                steps:
                  type: array
                  items:
                    type: object
                    properties:
                      trigger:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                const: interval
                              seconds:
                                type: number
                                exclusiveMinimum: 0
                            required:
                              - type
                              - seconds
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: approval
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: scheduled
                              at:
                                type: string
                            required:
                              - type
                              - at
                            additionalProperties: false
                      actions:
                        type: array
                        items:
                          type: object
                          properties:
                            patch:
                              type: object
                              properties:
                                ruleId:
                                  type: string
                                coverage:
                                  anyOf:
                                    - type: number
                                      minimum: 0
                                      maximum: 1
                                    - type: 'null'
                                condition:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                savedGroups:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          match:
                                            type: string
                                            enum:
                                              - all
                                              - none
                                              - any
                                          ids:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - match
                                          - ids
                                        additionalProperties: false
                                    - type: 'null'
                                prerequisites:
                                  anyOf:
                                    - type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                          condition:
                                            type: string
                                        required:
                                          - id
                                          - condition
                                        additionalProperties: false
                                    - type: 'null'
                                force:
                                  description: Force value (any JSON type)
                                enabled:
                                  anyOf:
                                    - type: boolean
                                    - type: 'null'
                              required:
                                - ruleId
                              additionalProperties: false
                            targetType:
                              type: string
                              const: feature-rule
                            targetId:
                              type: string
                          required:
                            - patch
                          additionalProperties: false
                      approvalNotes:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - trigger
                    additionalProperties: false
                endActions:
                  type: array
                  items:
                    type: object
                    properties:
                      patch:
                        type: object
                        properties:
                          ruleId:
                            type: string
                          coverage:
                            anyOf:
                              - type: number
                                minimum: 0
                                maximum: 1
                              - type: 'null'
                          condition:
                            anyOf:
                              - type: string
                              - type: 'null'
                          savedGroups:
                            anyOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    match:
                                      type: string
                                      enum:
                                        - all
                                        - none
                                        - any
                                    ids:
                                      type: array
                                      items:
                                        type: string
                                  required:
                                    - match
                                    - ids
                                  additionalProperties: false
                              - type: 'null'
                          prerequisites:
                            anyOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                    condition:
                                      type: string
                                  required:
                                    - id
                                    - condition
                                  additionalProperties: false
                              - type: 'null'
                          force:
                            description: Force value (any JSON type)
                          enabled:
                            anyOf:
                              - type: boolean
                              - type: 'null'
                        required:
                          - ruleId
                        additionalProperties: false
                      targetType:
                        type: string
                        const: feature-rule
                      targetId:
                        type: string
                    required:
                      - patch
                    additionalProperties: false
                startDate:
                  anyOf:
                    - type: string
                      format: date-time
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    - type: 'null'
                endCondition:
                  anyOf:
                    - type: object
                      properties:
                        trigger:
                          type: object
                          properties:
                            type:
                              type: string
                              const: scheduled
                            at:
                              type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          required:
                            - type
                            - at
                          additionalProperties: false
                      additionalProperties: false
                    - type: 'null'
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rampSchedule:
                    $ref: '#/components/schemas/RampSchedule'
                required:
                  - rampSchedule
                additionalProperties: false
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X PUT 'https://api.growthbook.io/api/v1/ramp-schedules/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
components:
  parameters:
    limit:
      name: limit
      in: query
      description: The number of items to return
      schema:
        default: 10
        description: The number of items to return
        type: integer
        minimum: 1
        maximum: 100
    offset:
      name: offset
      in: query
      description: How many items to skip (use in conjunction with limit for pagination)
      schema:
        default: 0
        description: How many items to skip (use in conjunction with limit for pagination)
        type: integer
        minimum: 0
    projectId:
      name: projectId
      in: query
      description: Filter by project id
      schema:
        description: Filter by project id
        type: string
    clientKey:
      name: clientKey
      in: query
      description: Filter by a SDK connection's client key
      schema:
        description: Filter by a SDK connection's client key
        type: string
    skipPagination:
      name: skipPagination
      in: query
      description: >-
        If true, return all matching items and ignore limit/offset.

        Self-hosted only. Has no effect unless API_ALLOW_SKIP_PAGINATION is set
        to true or 1.
      schema:
        description: >-
          If true, return all matching items and ignore limit/offset.

          Self-hosted only. Has no effect unless API_ALLOW_SKIP_PAGINATION is
          set to true or 1.
        default: false
        anyOf:
          - type: string
            const: 'true'
          - type: string
            const: 'false'
          - type: string
            const: '0'
          - type: string
            const: '1'
          - type: boolean
      x-selfHostedOnly: true
      x-requiresEnv: API_ALLOW_SKIP_PAGINATION
    id:
      name: id
      in: path
      required: true
      description: The id of the requested resource
      schema:
        description: The id of the requested resource
        type: string
    withRevisions:
      name: withRevisions
      in: query
      description: Also return feature revisions (all, draft, or published statuses)
      schema:
        description: Also return feature revisions (all, draft, or published statuses)
        type: string
        enum:
          - all
          - drafts
          - published
          - none
    ids:
      name: ids
      in: query
      required: true
      description: >
        Comma-separated list of feature IDs (URL-encoded if needed). Example:
        `my_feature,another_feature`
      schema:
        description: >
          Comma-separated list of feature IDs (URL-encoded if needed). Example:
          `my_feature,another_feature`
        type: string
    featureId:
      name: featureId
      in: query
      description: ''
      schema:
        type: string
    status:
      name: status
      in: query
      description: ''
      schema:
        type: string
        enum:
          - draft
          - published
          - discarded
          - approved
          - changes-requested
          - pending-review
          - pending-parent
    author:
      name: author
      in: query
      description: ''
      schema:
        type: string
    mine:
      name: mine
      in: query
      description: >-
        If true, return only revisions authored by or contributed to by the
        calling user. Requires a user-scoped API key. Mutually exclusive with
        `author`.
      schema:
        description: >-
          If true, return only revisions authored by or contributed to by the
          calling user. Requires a user-scoped API key. Mutually exclusive with
          `author`.
        anyOf:
          - type: string
            const: 'true'
          - type: string
            const: 'false'
          - type: string
            const: '0'
          - type: string
            const: '1'
          - type: boolean
    version:
      name: version
      in: path
      required: true
      description: ''
      schema:
        type: integer
    ruleId:
      name: ruleId
      in: path
      required: true
      description: ''
      schema:
        type: string
    datasourceId:
      name: datasourceId
      in: query
      description: Filter by Data Source
      schema:
        description: Filter by Data Source
        type: string
    trackingKey:
      name: trackingKey
      in: query
      description: Filter by experiment tracking key
      schema:
        description: Filter by experiment tracking key
        type: string
    experimentId:
      name: experimentId
      in: query
      description: >-
        Filter the returned list by the experiment tracking key (not the
        internal experiment ID). Note, this was deprecated to help reduce
        confusion, consider using `trackingKey` instead, which is functionally
        identical. You cannot use both params at the same time.
      schema:
        deprecated: true
        description: >-
          Filter the returned list by the experiment tracking key (not the
          internal experiment ID). Note, this was deprecated to help reduce
          confusion, consider using `trackingKey` instead, which is functionally
          identical. You cannot use both params at the same time.
        type: string
    phase:
      name: phase
      in: query
      description: ''
      schema:
        type: string
    dimension:
      name: dimension
      in: query
      description: ''
      schema:
        type: string
    variationId:
      name: variationId
      in: path
      required: true
      description: ''
      schema:
        type: string
    property:
      name: property
      in: path
      required: true
      description: The attribute property
      schema:
        description: The attribute property
        type: string
    withProxy:
      name: withProxy
      in: query
      description: ''
      schema:
        type: string
    multiOrg:
      name: multiOrg
      in: query
      description: ''
      schema:
        type: string
    key:
      name: key
      in: path
      required: true
      description: The key of the requested sdkConnection
      schema:
        description: The key of the requested sdkConnection
        type: string
    dataSourceId:
      name: dataSourceId
      in: path
      required: true
      description: The id of the data source
      schema:
        description: The id of the data source
        type: string
    includeExperiment:
      name: includeExperiment
      in: query
      description: Include the associated experiment in payload
      schema:
        description: Include the associated experiment in payload
        type: integer
    visualChangeId:
      name: visualChangeId
      in: path
      required: true
      description: Specify a specific visual change
      schema:
        description: Specify a specific visual change
        type: string
    search:
      name: search
      in: query
      description: >-
        Search string to search organization names, owner emails, and external
        ids by
      schema:
        description: >-
          Search string to search organization names, owner emails, and external
          ids by
        type: string
    factTableId:
      name: factTableId
      in: path
      required: true
      description: Specify a specific fact table
      schema:
        description: Specify a specific fact table
        type: string
    deleteMissing:
      name: deleteMissing
      in: query
      description: >-
        Whether to delete code references that are no longer present in the
        submitted data
      schema:
        description: >-
          Whether to delete code references that are no longer present in the
          submitted data
        default: 'false'
        type: string
        enum:
          - 'true'
          - 'false'
    userName:
      name: userName
      in: query
      description: Name of the user.
      schema:
        description: Name of the user.
        type: string
    userEmail:
      name: userEmail
      in: query
      description: Email address of the user.
      schema:
        description: Email address of the user.
        type: string
    globalRole:
      name: globalRole
      in: query
      description: Name of the global role
      schema:
        description: Name of the global role
        type: string
    tableId:
      name: tableId
      in: path
      required: true
      description: The id of the information schema table
      schema:
        description: The id of the information schema table
        type: string
    environment:
      name: environment
      in: query
      description: ''
      schema:
        type: string
    index:
      name: index
      in: query
      description: ''
      schema:
        type: string
    deleteMembers:
      name: deleteMembers
      in: query
      description: When 'true', enables deleting a team that contains members
      schema:
        description: When 'true', enables deleting a team that contains members
        type: string
    cache:
      name: cache
      in: query
      description: >-
        Controls cache behavior for this exploration: `preferred` (default)
        returns a cached result if one exists, otherwise runs a new query;
        `never` always runs a new query, ignoring any cached results; `required`
        only returns a cached result, if none exists returns exploration: null
        with a message
      schema:
        description: >-
          Controls cache behavior for this exploration: `preferred` (default)
          returns a cached result if one exists, otherwise runs a new query;
          `never` always runs a new query, ignoring any cached results;
          `required` only returns a cached result, if none exists returns
          exploration: null with a message
        type: string
        enum:
          - preferred
          - required
          - never
  schemas:
    Feature:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
        archived:
          type: boolean
        description:
          type: string
        owner:
          description: The userId of the owner (or raw owner name/email for legacy records)
          type: string
        ownerEmail:
          description: >-
            The email address of the owner, when the owner can be resolved to a
            known user.
          type: string
        project:
          type: string
        valueType:
          type: string
          enum:
            - boolean
            - string
            - number
            - json
        defaultValue:
          type: string
        tags:
          type: array
          items:
            type: string
        environments:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/FeatureEnvironment'
        prerequisites:
          description: Feature IDs. Each feature must evaluate to `true`
          type: array
          items:
            type: string
        revision:
          type: object
          properties:
            version:
              type: integer
            comment:
              type: string
            date:
              format: date-time
              type: string
            createdBy:
              type: string
            publishedBy:
              type: string
          required:
            - version
            - comment
            - date
            - createdBy
            - publishedBy
          additionalProperties: false
        customFields:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        holdout:
          anyOf:
            - type: object
              properties:
                id:
                  description: Holdout ID
                  type: string
                value:
                  description: >-
                    The feature value assigned to users in the holdout treatment
                    group
                  type: string
              required:
                - id
                - value
              additionalProperties: false
            - type: 'null'
      required:
        - id
        - dateCreated
        - dateUpdated
        - archived
        - description
        - owner
        - project
        - valueType
        - defaultValue
        - tags
        - environments
        - revision
      additionalProperties: false
    FeatureEnvironment:
      type: object
      properties:
        enabled:
          type: boolean
        defaultValue:
          type: string
        rules:
          type: array
          items:
            $ref: '#/components/schemas/FeatureRule'
        definition:
          description: A JSON stringified [FeatureDefinition](#tag/FeatureDefinition_model)
          type: string
        draft:
          type: object
          properties:
            enabled:
              type: boolean
            defaultValue:
              type: string
            rules:
              type: array
              items:
                $ref: '#/components/schemas/FeatureRule'
            definition:
              description: >-
                A JSON stringified
                [FeatureDefinition](#tag/FeatureDefinition_model)
              type: string
          required:
            - enabled
            - defaultValue
            - rules
          additionalProperties: false
      required:
        - enabled
        - defaultValue
        - rules
      additionalProperties: false
    FeatureRule:
      anyOf:
        - $ref: '#/components/schemas/FeatureForceRule'
        - $ref: '#/components/schemas/FeatureRolloutRule'
        - $ref: '#/components/schemas/FeatureExperimentRule'
        - $ref: '#/components/schemas/FeatureExperimentRefRule'
        - $ref: '#/components/schemas/FeatureSafeRolloutRule'
    FeatureForceRule:
      allOf:
        - description: >
            Common fields shared by all feature rule types. Specific rule types
            extend

            this base with their own required properties (value, coverage,
            etc.).
          type: object
          properties:
            description:
              type: string
            condition:
              type: string
            id:
              type: string
            enabled:
              type: boolean
            scheduleRules:
              description: Simple time-based on/off schedule for this rule
              type: array
              items:
                $ref: '#/components/schemas/ScheduleRule'
            scheduleType:
              description: >
                UI hint for which scheduling mode is active:

                - `none` – no schedule

                - `schedule` – simple time-based enable/disable via
                `scheduleRules`

                - `ramp` – multi-step ramp-up controlled by an associated
                RampSchedule document
              type: string
              enum:
                - none
                - schedule
                - ramp
            savedGroupTargeting:
              type: array
              items:
                type: object
                properties:
                  matchType:
                    type: string
                    enum:
                      - all
                      - any
                      - none
                  savedGroups:
                    type: array
                    items:
                      type: string
                required:
                  - matchType
                  - savedGroups
                additionalProperties: false
            prerequisites:
              type: array
              items:
                type: object
                properties:
                  id:
                    description: Feature ID of the prerequisite
                    type: string
                  condition:
                    type: string
                required:
                  - id
                  - condition
                additionalProperties: false
          required:
            - description
            - id
            - enabled
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: force
            value:
              type: string
          required:
            - type
            - value
          additionalProperties: false
    ScheduleRule:
      type: object
      properties:
        enabled:
          description: >-
            Whether the rule should be enabled or disabled at the specified
            timestamp.
          type: boolean
        timestamp:
          description: ISO timestamp when the rule should activate.
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
      required:
        - enabled
        - timestamp
      additionalProperties: false
    FeatureRolloutRule:
      allOf:
        - description: >
            Common fields shared by all feature rule types. Specific rule types
            extend

            this base with their own required properties (value, coverage,
            etc.).
          type: object
          properties:
            description:
              type: string
            condition:
              type: string
            id:
              type: string
            enabled:
              type: boolean
            scheduleRules:
              description: Simple time-based on/off schedule for this rule
              type: array
              items:
                $ref: '#/components/schemas/ScheduleRule'
            scheduleType:
              description: >
                UI hint for which scheduling mode is active:

                - `none` – no schedule

                - `schedule` – simple time-based enable/disable via
                `scheduleRules`

                - `ramp` – multi-step ramp-up controlled by an associated
                RampSchedule document
              type: string
              enum:
                - none
                - schedule
                - ramp
            savedGroupTargeting:
              type: array
              items:
                type: object
                properties:
                  matchType:
                    type: string
                    enum:
                      - all
                      - any
                      - none
                  savedGroups:
                    type: array
                    items:
                      type: string
                required:
                  - matchType
                  - savedGroups
                additionalProperties: false
            prerequisites:
              type: array
              items:
                type: object
                properties:
                  id:
                    description: Feature ID of the prerequisite
                    type: string
                  condition:
                    type: string
                required:
                  - id
                  - condition
                additionalProperties: false
          required:
            - description
            - id
            - enabled
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: rollout
            value:
              type: string
            coverage:
              type: number
              minimum: 0
              maximum: 1
            hashAttribute:
              type: string
            seed:
              description: Optional seed for the hash function; defaults to the rule id
              type: string
          required:
            - type
            - value
            - coverage
            - hashAttribute
          additionalProperties: false
    FeatureExperimentRule:
      allOf:
        - description: >
            Common fields shared by all feature rule types. Specific rule types
            extend

            this base with their own required properties (value, coverage,
            etc.).
          type: object
          properties:
            description:
              type: string
            condition:
              type: string
            id:
              type: string
            enabled:
              type: boolean
            scheduleRules:
              description: Simple time-based on/off schedule for this rule
              type: array
              items:
                $ref: '#/components/schemas/ScheduleRule'
            scheduleType:
              description: >
                UI hint for which scheduling mode is active:

                - `none` – no schedule

                - `schedule` – simple time-based enable/disable via
                `scheduleRules`

                - `ramp` – multi-step ramp-up controlled by an associated
                RampSchedule document
              type: string
              enum:
                - none
                - schedule
                - ramp
            savedGroupTargeting:
              type: array
              items:
                type: object
                properties:
                  matchType:
                    type: string
                    enum:
                      - all
                      - any
                      - none
                  savedGroups:
                    type: array
                    items:
                      type: string
                required:
                  - matchType
                  - savedGroups
                additionalProperties: false
            prerequisites:
              type: array
              items:
                type: object
                properties:
                  id:
                    description: Feature ID of the prerequisite
                    type: string
                  condition:
                    type: string
                required:
                  - id
                  - condition
                additionalProperties: false
          required:
            - description
            - id
            - enabled
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: experiment
            trackingKey:
              type: string
            hashAttribute:
              type: string
            fallbackAttribute:
              type: string
            disableStickyBucketing:
              type: boolean
            bucketVersion:
              type: number
            minBucketVersion:
              type: number
            namespace:
              type: object
              properties:
                enabled:
                  type: boolean
                name:
                  type: string
                range:
                  minItems: 2
                  maxItems: 2
                  type: array
                  items:
                    type: number
              required:
                - enabled
                - name
                - range
              additionalProperties: false
            coverage:
              type: number
              minimum: 0
              maximum: 1
            value:
              description: Variation values with weights
              type: array
              items:
                type: object
                properties:
                  value:
                    type: string
                  weight:
                    type: number
                  name:
                    type: string
                required:
                  - value
                  - weight
                additionalProperties: false
          required:
            - type
          additionalProperties: false
    FeatureExperimentRefRule:
      allOf:
        - description: >
            Common fields shared by all feature rule types. Specific rule types
            extend

            this base with their own required properties (value, coverage,
            etc.).
          type: object
          properties:
            description:
              type: string
            condition:
              type: string
            id:
              type: string
            enabled:
              type: boolean
            scheduleRules:
              description: Simple time-based on/off schedule for this rule
              type: array
              items:
                $ref: '#/components/schemas/ScheduleRule'
            scheduleType:
              description: >
                UI hint for which scheduling mode is active:

                - `none` – no schedule

                - `schedule` – simple time-based enable/disable via
                `scheduleRules`

                - `ramp` – multi-step ramp-up controlled by an associated
                RampSchedule document
              type: string
              enum:
                - none
                - schedule
                - ramp
            savedGroupTargeting:
              type: array
              items:
                type: object
                properties:
                  matchType:
                    type: string
                    enum:
                      - all
                      - any
                      - none
                  savedGroups:
                    type: array
                    items:
                      type: string
                required:
                  - matchType
                  - savedGroups
                additionalProperties: false
            prerequisites:
              type: array
              items:
                type: object
                properties:
                  id:
                    description: Feature ID of the prerequisite
                    type: string
                  condition:
                    type: string
                required:
                  - id
                  - condition
                additionalProperties: false
          required:
            - description
            - id
            - enabled
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: experiment-ref
            variations:
              type: array
              items:
                type: object
                properties:
                  value:
                    type: string
                  variationId:
                    type: string
                required:
                  - value
                  - variationId
                additionalProperties: false
            experimentId:
              type: string
          required:
            - type
            - variations
            - experimentId
          additionalProperties: false
    FeatureSafeRolloutRule:
      allOf:
        - description: >
            Common fields shared by all feature rule types. Specific rule types
            extend

            this base with their own required properties (value, coverage,
            etc.).
          type: object
          properties:
            description:
              type: string
            condition:
              type: string
            id:
              type: string
            enabled:
              type: boolean
            scheduleRules:
              description: Simple time-based on/off schedule for this rule
              type: array
              items:
                $ref: '#/components/schemas/ScheduleRule'
            scheduleType:
              description: >
                UI hint for which scheduling mode is active:

                - `none` – no schedule

                - `schedule` – simple time-based enable/disable via
                `scheduleRules`

                - `ramp` – multi-step ramp-up controlled by an associated
                RampSchedule document
              type: string
              enum:
                - none
                - schedule
                - ramp
            savedGroupTargeting:
              type: array
              items:
                type: object
                properties:
                  matchType:
                    type: string
                    enum:
                      - all
                      - any
                      - none
                  savedGroups:
                    type: array
                    items:
                      type: string
                required:
                  - matchType
                  - savedGroups
                additionalProperties: false
            prerequisites:
              type: array
              items:
                type: object
                properties:
                  id:
                    description: Feature ID of the prerequisite
                    type: string
                  condition:
                    type: string
                required:
                  - id
                  - condition
                additionalProperties: false
          required:
            - description
            - id
            - enabled
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: safe-rollout
            controlValue:
              type: string
            variationValue:
              type: string
            seed:
              type: string
            hashAttribute:
              type: string
            trackingKey:
              type: string
            safeRolloutId:
              type: string
            status:
              type: string
              enum:
                - running
                - released
                - rolled-back
                - stopped
          required:
            - type
            - controlValue
            - variationValue
          additionalProperties: false
    PaginationFields:
      type: object
      properties:
        limit:
          type: integer
        offset:
          type: integer
        count:
          type: integer
        total:
          type: integer
        hasMore:
          type: boolean
        nextOffset:
          anyOf:
            - type: integer
            - type: 'null'
      required:
        - limit
        - offset
        - count
        - total
        - hasMore
        - nextOffset
      additionalProperties: false
    FeatureWithRevisions:
      allOf:
        - $ref: '#/components/schemas/Feature'
        - type: object
          properties:
            revisions:
              type: array
              items:
                $ref: '#/components/schemas/FeatureRevision'
          additionalProperties: false
    FeatureRevision:
      type: object
      properties:
        featureId:
          description: The feature this revision belongs to
          type: string
        baseVersion:
          type: integer
        version:
          type: integer
        comment:
          type: string
        date:
          format: date-time
          type: string
        status:
          type: string
        createdBy:
          type: string
        publishedBy:
          type: string
        defaultValue:
          description: The default value at the time this revision was created
          type: string
        rules:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/FeatureRule'
        definitions:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            description: >-
              A JSON stringified
              [FeatureDefinition](#tag/FeatureDefinition_model)
            type: string
        environmentsEnabled:
          description: >-
            Per-environment enabled state captured in this revision (only
            present when kill-switch gating is enabled)
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: boolean
        envPrerequisites:
          description: >-
            Per-environment prerequisites captured in this revision (only
            present when prerequisite gating is enabled)
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: array
            items:
              type: object
              properties:
                id:
                  description: Feature ID
                  type: string
                condition:
                  type: string
              required:
                - id
                - condition
              additionalProperties: false
        prerequisites:
          description: >-
            Feature-level prerequisites captured in this revision (only present
            when prerequisite gating is enabled)
          type: array
          items:
            type: object
            properties:
              id:
                description: Feature ID
                type: string
              condition:
                type: string
            required:
              - id
              - condition
            additionalProperties: false
        metadata:
          description: >-
            Metadata fields captured in this revision (only present when
            metadata gating is enabled)
          type: object
          properties:
            description:
              type: string
            owner:
              description: >-
                The userId of the owner (or raw owner name/email for legacy
                records)
              type: string
            project:
              type: string
            tags:
              type: array
              items:
                type: string
            neverStale:
              type: boolean
            valueType:
              type: string
            jsonSchema:
              type: object
              properties:
                schemaType:
                  type: string
                  enum:
                    - schema
                    - simple
                schema:
                  type: string
                simple:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                date:
                  format: date-time
                  type: string
                enabled:
                  type: boolean
              additionalProperties: false
            customFields:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
          additionalProperties: false
      required:
        - featureId
        - baseVersion
        - version
        - comment
        - date
        - status
        - rules
      additionalProperties: false
    FeatureV2:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
        archived:
          type: boolean
        description:
          type: string
        owner:
          description: >-
            The userId or email address of the owner. If an email address is
            provided, it will be used to look up the userId of the matching
            organization member. If an ID is provided, it will be validated as
            existing in the organization.
          type: string
        project:
          type: string
        valueType:
          type: string
          enum:
            - boolean
            - string
            - number
            - json
        defaultValue:
          type: string
        tags:
          type: array
          items:
            type: string
        rules:
          description: >-
            Unified rules array. Each rule carries its own environment scope via
            `allEnvironments` / `environments`.
          type: array
          items:
            $ref: '#/components/schemas/FeatureRuleV2'
        environments:
          description: >-
            Per-environment enabled state and SDK payload. Rules are on the
            top-level `rules` field.
          type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/FeatureEnvironmentV2'
        prerequisites:
          description: Feature IDs. Each feature must evaluate to `true`
          type: array
          items:
            type: string
        revision:
          type: object
          properties:
            version:
              type: integer
            comment:
              type: string
            date:
              format: date-time
              type: string
            createdBy:
              type: string
            publishedBy:
              type: string
          required:
            - version
            - comment
            - date
            - createdBy
            - publishedBy
          additionalProperties: false
        customFields:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        holdout:
          anyOf:
            - type: object
              properties:
                id:
                  description: Holdout ID
                  type: string
                value:
                  description: >-
                    The feature value assigned to users in the holdout treatment
                    group
                  type: string
              required:
                - id
                - value
              additionalProperties: false
            - type: 'null'
      required:
        - id
        - dateCreated
        - dateUpdated
        - archived
        - description
        - owner
        - project
        - valueType
        - defaultValue
        - tags
        - rules
        - environments
        - revision
      additionalProperties: false
    FeatureRuleV2:
      allOf:
        - $ref: '#/components/schemas/FeatureRule'
        - type: object
          properties:
            allEnvironments:
              description: >-
                When true the rule applies to all environments. When false only
                the environments listed in `environments` receive the rule.
              type: boolean
            environments:
              description: >-
                The environment IDs this rule is active in. Populated when
                `allEnvironments` is false.
              type: array
              items:
                type: string
          required:
            - allEnvironments
          additionalProperties: false
    FeatureEnvironmentV2:
      type: object
      properties:
        enabled:
          type: boolean
        defaultValue:
          type: string
        definition:
          description: A JSON stringified [FeatureDefinition](#tag/FeatureDefinition_model)
          type: string
      required:
        - enabled
        - defaultValue
      additionalProperties: false
    FeatureWithRevisionsV2:
      allOf:
        - $ref: '#/components/schemas/FeatureV2'
        - type: object
          properties:
            revisions:
              type: array
              items:
                $ref: '#/components/schemas/FeatureRevisionV2'
          additionalProperties: false
    FeatureRevisionV2:
      type: object
      properties:
        featureId:
          description: The feature this revision belongs to
          type: string
        baseVersion:
          type: integer
        version:
          type: integer
        comment:
          type: string
        date:
          format: date-time
          type: string
        status:
          type: string
        createdBy:
          type: string
        publishedBy:
          type: string
        defaultValue:
          description: The default value at the time this revision was created
          type: string
        rules:
          description: >-
            Unified rules array. Each rule carries its own environment scope via
            `allEnvironments` / `environments`.
          type: array
          items:
            $ref: '#/components/schemas/FeatureRuleV2'
        definitions:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            description: >-
              A JSON stringified
              [FeatureDefinition](#tag/FeatureDefinition_model)
            type: string
        environmentsEnabled:
          description: >-
            Per-environment enabled state captured in this revision (only
            present when kill-switch gating is enabled)
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: boolean
        envPrerequisites:
          description: >-
            Per-environment prerequisites captured in this revision (only
            present when prerequisite gating is enabled)
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: array
            items:
              type: object
              properties:
                id:
                  description: Feature ID
                  type: string
                condition:
                  type: string
              required:
                - id
                - condition
              additionalProperties: false
        prerequisites:
          description: >-
            Feature-level prerequisites captured in this revision (only present
            when prerequisite gating is enabled)
          type: array
          items:
            type: object
            properties:
              id:
                description: Feature ID
                type: string
              condition:
                type: string
            required:
              - id
              - condition
            additionalProperties: false
        metadata:
          description: >-
            Metadata fields captured in this revision (only present when
            metadata gating is enabled)
          type: object
          properties:
            description:
              type: string
            owner:
              description: >-
                The userId of the owner (or raw owner name/email for legacy
                records)
              type: string
            project:
              type: string
            tags:
              type: array
              items:
                type: string
            neverStale:
              type: boolean
            valueType:
              type: string
            jsonSchema:
              type: object
              properties:
                schemaType:
                  type: string
                  enum:
                    - schema
                    - simple
                schema:
                  type: string
                simple:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                date:
                  format: date-time
                  type: string
                enabled:
                  type: boolean
              additionalProperties: false
            customFields:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
          additionalProperties: false
      required:
        - featureId
        - baseVersion
        - version
        - comment
        - date
        - status
        - rules
      additionalProperties: false
    Archetype:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          type: string
        dateUpdated:
          type: string
        name:
          type: string
        description:
          type: string
        owner:
          description: The userId of the owner (or raw owner name/email for legacy records)
          type: string
        ownerEmail:
          description: >-
            The email address of the owner, when the owner can be resolved to a
            known user.
          type: string
        isPublic:
          type: boolean
        attributes:
          description: The attributes to set when using this Archetype
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        projects:
          type: array
          items:
            type: string
      required:
        - id
        - dateCreated
        - dateUpdated
        - name
        - owner
        - isPublic
        - attributes
      additionalProperties: false
    Experiment:
      type: object
      properties:
        id:
          type: string
        trackingKey:
          type: string
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
        name:
          type: string
        type:
          type: string
          enum:
            - standard
            - multi-armed-bandit
        project:
          type: string
        hypothesis:
          type: string
        description:
          type: string
        tags:
          type: array
          items:
            type: string
        owner:
          description: The userId of the owner (or raw owner name/email for legacy records)
          type: string
        ownerEmail:
          description: >-
            The email address of the owner, when the owner can be resolved to a
            known user.
          type: string
        archived:
          type: boolean
        status:
          type: string
        autoRefresh:
          type: boolean
        hashAttribute:
          type: string
        fallbackAttribute:
          type: string
        hashVersion:
          anyOf:
            - type: number
              const: 1
            - type: number
              const: 2
        disableStickyBucketing:
          type: boolean
        bucketVersion:
          type: number
        minBucketVersion:
          type: number
        variations:
          type: array
          items:
            type: object
            properties:
              variationId:
                type: string
              key:
                type: string
              name:
                type: string
              description:
                type: string
              screenshots:
                type: array
                items:
                  type: string
            required:
              - variationId
              - key
              - name
              - description
              - screenshots
            additionalProperties: false
        phases:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              dateStarted:
                type: string
              dateEnded:
                type: string
              reasonForStopping:
                type: string
              seed:
                type: string
              coverage:
                type: number
              trafficSplit:
                type: array
                items:
                  type: object
                  properties:
                    variationId:
                      type: string
                    weight:
                      type: number
                  required:
                    - variationId
                    - weight
                  additionalProperties: false
              namespace:
                type: object
                properties:
                  namespaceId:
                    type: string
                  enabled:
                    type: boolean
                  range:
                    minItems: 2
                    maxItems: 2
                    type: array
                    items:
                      type: number
                  ranges:
                    type: array
                    items:
                      type: array
                      prefixItems:
                        - type: number
                        - type: number
                required:
                  - namespaceId
                additionalProperties: false
              targetingCondition:
                type: string
              prerequisites:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    condition:
                      type: string
                  required:
                    - id
                    - condition
                  additionalProperties: false
              savedGroupTargeting:
                type: array
                items:
                  type: object
                  properties:
                    matchType:
                      type: string
                      enum:
                        - all
                        - any
                        - none
                    savedGroups:
                      type: array
                      items:
                        type: string
                  required:
                    - matchType
                    - savedGroups
                  additionalProperties: false
            required:
              - name
              - dateStarted
              - dateEnded
              - reasonForStopping
              - seed
              - coverage
              - trafficSplit
              - targetingCondition
            additionalProperties: false
        settings:
          $ref: '#/components/schemas/ExperimentAnalysisSettings'
        resultSummary:
          type: object
          properties:
            status:
              type: string
            winner:
              type: string
            conclusions:
              type: string
            releasedVariationId:
              type: string
            excludeFromPayload:
              type: boolean
          required:
            - status
            - winner
            - conclusions
            - releasedVariationId
            - excludeFromPayload
          additionalProperties: false
        shareLevel:
          type: string
          enum:
            - public
            - organization
        publicUrl:
          type: string
        banditScheduleValue:
          type: number
        banditScheduleUnit:
          type: string
          enum:
            - days
            - hours
        banditBurnInValue:
          type: number
        banditBurnInUnit:
          type: string
          enum:
            - days
            - hours
        banditConversionWindowValue:
          type: number
        banditConversionWindowUnit:
          type: string
          enum:
            - days
            - hours
        linkedFeatures:
          type: array
          items:
            type: string
        hasVisualChangesets:
          type: boolean
        hasURLRedirects:
          type: boolean
        customFields:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        customMetricSlices:
          description: Custom slices that apply to ALL applicable metrics in the experiment
          type: array
          items:
            type: object
            properties:
              slices:
                type: array
                items:
                  type: object
                  properties:
                    column:
                      type: string
                    levels:
                      type: array
                      items:
                        type: string
                  required:
                    - column
                    - levels
                  additionalProperties: false
            required:
              - slices
            additionalProperties: false
        defaultDashboardId:
          description: ID of the default dashboard for this experiment.
          type: string
        templateId:
          type: string
      required:
        - id
        - trackingKey
        - dateCreated
        - dateUpdated
        - name
        - type
        - project
        - hypothesis
        - description
        - tags
        - owner
        - archived
        - status
        - autoRefresh
        - hashAttribute
        - hashVersion
        - variations
        - phases
        - settings
      additionalProperties: false
    ExperimentAnalysisSettings:
      type: object
      properties:
        datasourceId:
          type: string
        assignmentQueryId:
          type: string
        experimentId:
          type: string
        segmentId:
          type: string
        queryFilter:
          type: string
        inProgressConversions:
          type: string
          enum:
            - include
            - exclude
        attributionModel:
          description: >-
            Setting attribution model to `"experimentDuration"` is the same as
            selecting "Ignore Conversion Windows" for the Conversion Window
            Override. Setting it to `"lookbackOverride"` requires a
            `lookbackOverride` object to be provided.
          type: string
          enum:
            - firstExposure
            - experimentDuration
            - lookbackOverride
        lookbackOverride:
          $ref: '#/components/schemas/LookbackOverride'
        statsEngine:
          type: string
          enum:
            - bayesian
            - frequentist
        regressionAdjustmentEnabled:
          type: boolean
        sequentialTestingEnabled:
          type: boolean
        sequentialTestingTuningParameter:
          type: number
        postStratificationEnabled:
          description: When null, the organization default is used.
          anyOf:
            - description: When null, the organization default is used.
              type: boolean
            - description: When null, the organization default is used.
              type: 'null'
        decisionFrameworkSettings:
          $ref: '#/components/schemas/ExperimentDecisionFrameworkSettings'
        metricOverrides:
          description: >-
            Per-metric analysis overrides; also reflected in
            goals/secondaryMetrics/guardrails overrides when applicable. On
            create/update, this replaces the entire stored array (it does not
            patch individual entries).
          type: array
          items:
            $ref: '#/components/schemas/ExperimentMetricOverrideEntry'
        goals:
          type: array
          items:
            $ref: '#/components/schemas/ExperimentMetric'
        secondaryMetrics:
          type: array
          items:
            $ref: '#/components/schemas/ExperimentMetric'
        guardrails:
          type: array
          items:
            $ref: '#/components/schemas/ExperimentMetric'
        activationMetric:
          $ref: '#/components/schemas/ExperimentMetric'
      required:
        - datasourceId
        - assignmentQueryId
        - experimentId
        - segmentId
        - queryFilter
        - inProgressConversions
        - attributionModel
        - statsEngine
        - goals
        - secondaryMetrics
        - guardrails
      additionalProperties: false
    LookbackOverride:
      description: >-
        Controls the lookback override for the experiment. For type "window",
        value must be a non-negative number and valueUnit is required.
      type: object
      properties:
        type:
          type: string
          enum:
            - date
            - window
        value:
          description: >-
            For "window" type - non-negative numeric value (e.g. 7 for 7 days).
            For "date" type a date string.
          anyOf:
            - description: >-
                For "window" type - non-negative numeric value (e.g. 7 for 7
                days). For "date" type a date string.
              type: number
            - format: date-time
              description: >-
                For "window" type - non-negative numeric value (e.g. 7 for 7
                days). For "date" type a date string.
              type: string
        valueUnit:
          description: Used when type is "window". Defaults to "days".
          type: string
          enum:
            - minutes
            - hours
            - days
            - weeks
      required:
        - type
        - value
      additionalProperties: false
    ExperimentDecisionFrameworkSettings:
      description: >-
        Controls the decision framework and metric overrides for the experiment.
        Replaces the entire stored object on update (does not patch individual
        fields).
      type: object
      properties:
        decisionCriteriaId:
          type: string
        decisionFrameworkMetricOverrides:
          type: array
          items:
            type: object
            properties:
              id:
                description: ID of the metric to override settings for.
                type: string
              targetMDE:
                description: >-
                  The target relative MDE to use for the metric, expressed as
                  proportions (e.g. use 0.1 for 10%). Must be greater than 0.
                type: number
                exclusiveMinimum: 0
            required:
              - id
            additionalProperties: false
      additionalProperties: false
    ExperimentMetricOverrideEntry:
      description: >-
        Per-metric analysis overrides stored on the experiment (matches internal
        metricOverrides).
      type: object
      properties:
        id:
          description: ID of the metric to override settings for.
          type: string
        windowType:
          type: string
          enum:
            - conversion
            - lookback
            - ''
        windowHours:
          type: number
        delayHours:
          type: number
        properPriorOverride:
          description: >-
            Must be true for the override to take effect. If true, the other
            proper prior settings in this object will be used if present.
          type: boolean
        properPriorEnabled:
          type: boolean
        properPriorMean:
          type: number
        properPriorStdDev:
          type: number
        regressionAdjustmentOverride:
          description: >-
            Must be true for the override to take effect. If true, the other
            regression adjustment settings in this object will be used if
            present.
          type: boolean
        regressionAdjustmentEnabled:
          type: boolean
        regressionAdjustmentDays:
          type: number
      required:
        - id
      additionalProperties: false
    ExperimentMetric:
      type: object
      properties:
        metricId:
          type: string
        overrides:
          type: object
          properties:
            delayHours:
              type: number
            windowHours:
              type: number
            window:
              type: string
              enum:
                - conversion
                - lookback
                - ''
            winRiskThreshold:
              deprecated: true
              type: number
            loseRiskThreshold:
              deprecated: true
              type: number
            properPriorOverride:
              type: boolean
            properPriorEnabled:
              type: boolean
            properPriorMean:
              type: number
            properPriorStdDev:
              type: number
            regressionAdjustmentOverride:
              type: boolean
            regressionAdjustmentEnabled:
              type: boolean
            regressionAdjustmentDays:
              type: number
          additionalProperties: false
      required:
        - metricId
        - overrides
      additionalProperties: false
    ExperimentWithEnhancedStatus:
      allOf:
        - type: object
          properties:
            id:
              type: string
            trackingKey:
              type: string
            dateCreated:
              format: date-time
              type: string
            dateUpdated:
              format: date-time
              type: string
            name:
              type: string
            type:
              type: string
              enum:
                - standard
                - multi-armed-bandit
            project:
              type: string
            hypothesis:
              type: string
            description:
              type: string
            tags:
              type: array
              items:
                type: string
            owner:
              description: >-
                The userId of the owner (or raw owner name/email for legacy
                records)
              type: string
            ownerEmail:
              description: >-
                The email address of the owner, when the owner can be resolved
                to a known user.
              type: string
            archived:
              type: boolean
            status:
              type: string
            autoRefresh:
              type: boolean
            hashAttribute:
              type: string
            fallbackAttribute:
              type: string
            hashVersion:
              anyOf:
                - type: number
                  const: 1
                - type: number
                  const: 2
            disableStickyBucketing:
              type: boolean
            bucketVersion:
              type: number
            minBucketVersion:
              type: number
            variations:
              type: array
              items:
                type: object
                properties:
                  variationId:
                    type: string
                  key:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                  screenshots:
                    type: array
                    items:
                      type: string
                required:
                  - variationId
                  - key
                  - name
                  - description
                  - screenshots
                additionalProperties: false
            phases:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  dateStarted:
                    type: string
                  dateEnded:
                    type: string
                  reasonForStopping:
                    type: string
                  seed:
                    type: string
                  coverage:
                    type: number
                  trafficSplit:
                    type: array
                    items:
                      type: object
                      properties:
                        variationId:
                          type: string
                        weight:
                          type: number
                      required:
                        - variationId
                        - weight
                      additionalProperties: false
                  namespace:
                    type: object
                    properties:
                      namespaceId:
                        type: string
                      enabled:
                        type: boolean
                      range:
                        minItems: 2
                        maxItems: 2
                        type: array
                        items:
                          type: number
                      ranges:
                        type: array
                        items:
                          type: array
                          prefixItems:
                            - type: number
                            - type: number
                    required:
                      - namespaceId
                    additionalProperties: false
                  targetingCondition:
                    type: string
                  prerequisites:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        condition:
                          type: string
                      required:
                        - id
                        - condition
                      additionalProperties: false
                  savedGroupTargeting:
                    type: array
                    items:
                      type: object
                      properties:
                        matchType:
                          type: string
                          enum:
                            - all
                            - any
                            - none
                        savedGroups:
                          type: array
                          items:
                            type: string
                      required:
                        - matchType
                        - savedGroups
                      additionalProperties: false
                required:
                  - name
                  - dateStarted
                  - dateEnded
                  - reasonForStopping
                  - seed
                  - coverage
                  - trafficSplit
                  - targetingCondition
                additionalProperties: false
            settings:
              $ref: '#/components/schemas/ExperimentAnalysisSettings'
            resultSummary:
              type: object
              properties:
                status:
                  type: string
                winner:
                  type: string
                conclusions:
                  type: string
                releasedVariationId:
                  type: string
                excludeFromPayload:
                  type: boolean
              required:
                - status
                - winner
                - conclusions
                - releasedVariationId
                - excludeFromPayload
              additionalProperties: false
            shareLevel:
              type: string
              enum:
                - public
                - organization
            publicUrl:
              type: string
            banditScheduleValue:
              type: number
            banditScheduleUnit:
              type: string
              enum:
                - days
                - hours
            banditBurnInValue:
              type: number
            banditBurnInUnit:
              type: string
              enum:
                - days
                - hours
            banditConversionWindowValue:
              type: number
            banditConversionWindowUnit:
              type: string
              enum:
                - days
                - hours
            linkedFeatures:
              type: array
              items:
                type: string
            hasVisualChangesets:
              type: boolean
            hasURLRedirects:
              type: boolean
            customFields:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
            customMetricSlices:
              description: >-
                Custom slices that apply to ALL applicable metrics in the
                experiment
              type: array
              items:
                type: object
                properties:
                  slices:
                    type: array
                    items:
                      type: object
                      properties:
                        column:
                          type: string
                        levels:
                          type: array
                          items:
                            type: string
                      required:
                        - column
                        - levels
                      additionalProperties: false
                required:
                  - slices
                additionalProperties: false
            defaultDashboardId:
              description: ID of the default dashboard for this experiment.
              type: string
            templateId:
              type: string
          required:
            - id
            - trackingKey
            - dateCreated
            - dateUpdated
            - name
            - type
            - project
            - hypothesis
            - description
            - tags
            - owner
            - archived
            - status
            - autoRefresh
            - hashAttribute
            - hashVersion
            - variations
            - phases
            - settings
          additionalProperties: false
        - type: object
          properties:
            enhancedStatus:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - Running
                    - Stopped
                    - Draft
                    - Archived
                detailedStatus:
                  type: string
              required:
                - status
              additionalProperties: false
          additionalProperties: false
    ExperimentResults:
      type: object
      properties:
        id:
          type: string
        dateUpdated:
          type: string
        experimentId:
          type: string
        phase:
          type: string
        dateStart:
          type: string
        dateEnd:
          type: string
        dimension:
          type: object
          properties:
            type:
              type: string
            id:
              type: string
          required:
            - type
          additionalProperties: false
        settings:
          $ref: '#/components/schemas/ExperimentAnalysisSettings'
        queryIds:
          type: array
          items:
            type: string
        results:
          type: array
          items:
            type: object
            properties:
              dimension:
                type: string
              totalUsers:
                type: number
              checks:
                type: object
                properties:
                  srm:
                    type: number
                required:
                  - srm
                additionalProperties: false
              metrics:
                type: array
                items:
                  type: object
                  properties:
                    metricId:
                      type: string
                    variations:
                      type: array
                      items:
                        type: object
                        properties:
                          variationId:
                            type: string
                          users:
                            type: number
                          analyses:
                            type: array
                            items:
                              type: object
                              properties:
                                engine:
                                  type: string
                                  enum:
                                    - bayesian
                                    - frequentist
                                numerator:
                                  type: number
                                denominator:
                                  type: number
                                mean:
                                  type: number
                                stddev:
                                  type: number
                                percentChange:
                                  type: number
                                ciLow:
                                  type: number
                                ciHigh:
                                  type: number
                                pValue:
                                  type: number
                                risk:
                                  type: number
                                chanceToBeatControl:
                                  type: number
                              required:
                                - engine
                                - numerator
                                - denominator
                                - mean
                                - stddev
                                - percentChange
                                - ciLow
                                - ciHigh
                              additionalProperties: false
                        required:
                          - variationId
                          - analyses
                        additionalProperties: false
                  required:
                    - metricId
                    - variations
                  additionalProperties: false
            required:
              - dimension
              - totalUsers
              - checks
              - metrics
            additionalProperties: false
      required:
        - id
        - dateUpdated
        - experimentId
        - phase
        - dateStart
        - dateEnd
        - dimension
        - settings
        - queryIds
        - results
      additionalProperties: false
    VisualChangeset:
      type: object
      properties:
        id:
          type: string
        urlPatterns:
          type: array
          items:
            type: object
            properties:
              include:
                type: boolean
              type:
                type: string
                enum:
                  - simple
                  - regex
              pattern:
                type: string
            required:
              - type
              - pattern
            additionalProperties: false
        editorUrl:
          type: string
        experiment:
          type: string
        visualChanges:
          type: array
          items:
            type: object
            properties:
              description:
                type: string
              css:
                type: string
              js:
                type: string
              variation:
                type: string
              domMutations:
                type: array
                items:
                  type: object
                  properties:
                    selector:
                      type: string
                    action:
                      type: string
                      enum:
                        - append
                        - set
                        - remove
                    attribute:
                      type: string
                    value:
                      type: string
                    parentSelector:
                      type: string
                    insertBeforeSelector:
                      type: string
                  required:
                    - selector
                    - action
                    - attribute
                  additionalProperties: false
            required:
              - variation
              - domMutations
            additionalProperties: false
      required:
        - urlPatterns
        - editorUrl
        - experiment
        - visualChanges
      additionalProperties: false
    Metric:
      type: object
      properties:
        id:
          type: string
        managedBy:
          description: >-
            Where this metric must be managed from. If not set (empty string),
            it can be managed from anywhere.
          type: string
          enum:
            - ''
            - api
            - config
            - admin
        dateCreated:
          type: string
        dateUpdated:
          type: string
        owner:
          description: The userId of the owner (or raw owner name/email for legacy records)
          type: string
        ownerEmail:
          description: >-
            The email address of the owner, when the owner can be resolved to a
            known user.
          type: string
        datasourceId:
          type: string
        name:
          type: string
        description:
          type: string
        type:
          type: string
          enum:
            - binomial
            - count
            - duration
            - revenue
        tags:
          type: array
          items:
            type: string
        projects:
          type: array
          items:
            type: string
        archived:
          type: boolean
        behavior:
          type: object
          properties:
            goal:
              type: string
              enum:
                - increase
                - decrease
            cappingSettings:
              description: Controls how outliers are handled
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - none
                    - absolute
                    - percentile
                value:
                  description: >-
                    When type is absolute, this is the absolute value. When type
                    is percentile, this is the percentile value (from 0.0 to
                    1.0).
                  type: number
                ignoreZeros:
                  description: >-
                    If true and capping is `percentile`, zeros will be ignored
                    when calculating the percentile.
                  type: boolean
              required:
                - type
              additionalProperties: false
            cap:
              deprecated: true
              type: number
            capping:
              deprecated: true
              anyOf:
                - type: string
                  enum:
                    - absolute
                    - percentile
                - type: 'null'
            capValue:
              deprecated: true
              type: number
            windowSettings:
              description: Controls the conversion window for the metric
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - none
                    - conversion
                    - lookback
                delayValue:
                  description: >-
                    Wait this long after experiment exposure before counting
                    conversions
                  type: number
                delayUnit:
                  type: string
                  enum:
                    - minutes
                    - hours
                    - days
                    - weeks
                windowValue:
                  type: number
                windowUnit:
                  type: string
                  enum:
                    - minutes
                    - hours
                    - days
                    - weeks
              required:
                - type
              additionalProperties: false
            priorSettings:
              description: Controls the bayesian prior for the metric.
              type: object
              properties:
                override:
                  description: >-
                    If false, the organization default settings will be used
                    instead of the other settings in this object
                  type: boolean
                proper:
                  description: >-
                    If true, the `mean` and `stddev` will be used, otherwise we
                    will use an improper flat prior.
                  type: boolean
                mean:
                  description: >-
                    The mean of the prior distribution of relative effects in
                    proportion terms (e.g. 0.01 is 1%)
                  type: number
                stddev:
                  description: >-
                    Must be > 0. The standard deviation of the prior
                    distribution of relative effects in proportion terms.
                  type: number
              required:
                - override
                - proper
                - mean
                - stddev
              additionalProperties: false
            conversionWindowStart:
              deprecated: true
              type: number
            conversionWindowEnd:
              deprecated: true
              type: number
            riskThresholdSuccess:
              type: number
            riskThresholdDanger:
              type: number
            minPercentChange:
              type: number
            maxPercentChange:
              type: number
            minSampleSize:
              type: number
            targetMDE:
              type: number
          required:
            - goal
            - windowSettings
            - riskThresholdSuccess
            - riskThresholdDanger
            - minPercentChange
            - maxPercentChange
            - minSampleSize
            - targetMDE
          additionalProperties: false
        sql:
          type: object
          properties:
            identifierTypes:
              type: array
              items:
                type: string
            conversionSQL:
              type: string
            userAggregationSQL:
              type: string
            denominatorMetricId:
              type: string
          required:
            - identifierTypes
            - conversionSQL
            - userAggregationSQL
            - denominatorMetricId
          additionalProperties: false
        sqlBuilder:
          type: object
          properties:
            identifierTypeColumns:
              type: array
              items:
                type: object
                properties:
                  identifierType:
                    type: string
                  columnName:
                    type: string
                required:
                  - identifierType
                  - columnName
                additionalProperties: false
            tableName:
              type: string
            valueColumnName:
              type: string
            timestampColumnName:
              type: string
            conditions:
              type: array
              items:
                type: object
                properties:
                  column:
                    type: string
                  operator:
                    type: string
                  value:
                    type: string
                required:
                  - column
                  - operator
                  - value
                additionalProperties: false
          required:
            - identifierTypeColumns
            - tableName
            - valueColumnName
            - timestampColumnName
            - conditions
          additionalProperties: false
        mixpanel:
          type: object
          properties:
            eventName:
              type: string
            eventValue:
              type: string
            userAggregation:
              type: string
            conditions:
              type: array
              items:
                type: object
                properties:
                  property:
                    type: string
                  operator:
                    type: string
                  value:
                    type: string
                required:
                  - property
                  - operator
                  - value
                additionalProperties: false
          required:
            - eventName
            - eventValue
            - userAggregation
            - conditions
          additionalProperties: false
      required:
        - id
        - managedBy
        - dateCreated
        - dateUpdated
        - owner
        - datasourceId
        - name
        - description
        - type
        - tags
        - projects
        - archived
        - behavior
      additionalProperties: false
    MetricUsage:
      type: object
      properties:
        metricId:
          description: The metric ID
          type: string
        error:
          description: >-
            Set when the metric does not exist or the caller has no permission
            to read it.
          type: string
        experiments:
          description: List of experiments using this metric
          type: array
          items:
            type: object
            properties:
              experimentId:
                description: The experiment ID
                type: string
              experimentStatus:
                description: The current status of the experiment
                type: string
                enum:
                  - draft
                  - running
                  - stopped
              lastSnapshotAttempt:
                description: The last time a snapshot was attempted for this experiment
                anyOf:
                  - format: date-time
                    type: string
                  - type: 'null'
            required:
              - experimentId
              - experimentStatus
              - lastSnapshotAttempt
            additionalProperties: false
        lastSnapshotAttempt:
          description: >-
            The most recent snapshot attempt across all experiments using this
            metric
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
      required:
        - metricId
      additionalProperties: false
    Segment:
      type: object
      properties:
        id:
          type: string
        owner:
          description: The userId of the owner (or raw owner name/email for legacy records)
          type: string
        ownerEmail:
          description: >-
            The email address of the owner, when the owner can be resolved to a
            known user.
          type: string
        datasourceId:
          type: string
        identifierType:
          type: string
        name:
          type: string
        description:
          type: string
        query:
          type: string
        dateCreated:
          type: string
        dateUpdated:
          type: string
        managedBy:
          description: >-
            Where this segment must be managed from. If not set (empty string),
            it can be managed from anywhere.
          type: string
          enum:
            - ''
            - api
            - config
        type:
          type: string
          enum:
            - SQL
            - FACT
        factTableId:
          type: string
        filters:
          type: array
          items:
            type: string
        projects:
          type: array
          items:
            type: string
      required:
        - id
        - owner
        - datasourceId
        - identifierType
        - name
        - dateCreated
        - dateUpdated
      additionalProperties: false
    Dimension:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          type: string
        dateUpdated:
          type: string
        owner:
          description: The userId of the owner (or raw owner name/email for legacy records)
          type: string
        ownerEmail:
          description: >-
            The email address of the owner, when the owner can be resolved to a
            known user.
          type: string
        datasourceId:
          type: string
        identifierType:
          type: string
        name:
          type: string
        description:
          type: string
        query:
          type: string
        managedBy:
          description: >-
            Where this dimension must be managed from. If not set (empty
            string), it can be managed from anywhere.
          type: string
          enum:
            - ''
            - api
            - config
      required:
        - id
        - dateCreated
        - dateUpdated
        - owner
        - datasourceId
        - identifierType
        - name
        - query
      additionalProperties: false
    Project:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
        description:
          type: string
        publicId:
          description: >-
            URL-safe slug used in SDK payload metadata. Auto-generated from name
            if not provided.
          type: string
        settings:
          type: object
          properties:
            statsEngine:
              type: string
            confidenceLevel:
              type: number
            pValueThreshold:
              type: number
          additionalProperties: false
      required:
        - id
        - name
        - dateCreated
        - dateUpdated
      additionalProperties: false
    Environment:
      type: object
      properties:
        id:
          type: string
        description:
          type: string
        toggleOnList:
          type: boolean
        defaultState:
          type: boolean
        projects:
          type: array
          items:
            type: string
        parent:
          type: string
      required:
        - id
        - description
        - toggleOnList
        - defaultState
        - projects
      additionalProperties: false
    Attribute:
      type: object
      properties:
        property:
          type: string
        datatype:
          type: string
          enum:
            - boolean
            - string
            - number
            - secureString
            - enum
            - string[]
            - number[]
            - secureString[]
        description:
          type: string
        hashAttribute:
          type: boolean
        archived:
          type: boolean
        enum:
          type: string
        format:
          type: string
          enum:
            - ''
            - version
            - date
            - isoCountryCode
        projects:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
      required:
        - property
        - datatype
      additionalProperties: false
    SdkConnection:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
        name:
          type: string
        organization:
          type: string
        languages:
          type: array
          items:
            type: string
        sdkVersion:
          type: string
        environment:
          type: string
        project:
          description: >-
            Use 'projects' instead. This is only for backwards compatibility and
            contains the first project only.
          type: string
        projects:
          type: array
          items:
            type: string
        encryptPayload:
          type: boolean
        encryptionKey:
          type: string
        includeVisualExperiments:
          type: boolean
        includeDraftExperiments:
          type: boolean
        includeExperimentNames:
          type: boolean
        includeRedirectExperiments:
          type: boolean
        includeRuleIds:
          type: boolean
        includeProjectIdInMetadata:
          type: boolean
        includeCustomFieldsInMetadata:
          type: boolean
        allowedCustomFieldsInMetadata:
          type: array
          items:
            type: string
        includeTagsInMetadata:
          type: boolean
        key:
          type: string
        proxyEnabled:
          type: boolean
        proxyHost:
          type: string
        proxySigningKey:
          type: string
        sseEnabled:
          type: boolean
        hashSecureAttributes:
          type: boolean
        remoteEvalEnabled:
          type: boolean
        savedGroupReferencesEnabled:
          type: boolean
      required:
        - id
        - dateCreated
        - dateUpdated
        - name
        - organization
        - languages
        - environment
        - project
        - encryptPayload
        - encryptionKey
        - key
        - proxyEnabled
        - proxyHost
        - proxySigningKey
      additionalProperties: false
    DataSource:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
        type:
          type: string
        name:
          type: string
        description:
          type: string
        projectIds:
          type: array
          items:
            type: string
        eventTracker:
          type: string
        identifierTypes:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              description:
                type: string
            required:
              - id
              - description
            additionalProperties: false
        assignmentQueries:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              description:
                type: string
              identifierType:
                type: string
              sql:
                type: string
              includesNameColumns:
                type: boolean
              dimensionColumns:
                type: array
                items:
                  type: string
            required:
              - id
              - name
              - description
              - identifierType
              - sql
              - includesNameColumns
              - dimensionColumns
            additionalProperties: false
        identifierJoinQueries:
          type: array
          items:
            type: object
            properties:
              identifierTypes:
                type: array
                items:
                  type: string
              sql:
                type: string
            required:
              - identifierTypes
              - sql
            additionalProperties: false
        mixpanelSettings:
          type: object
          properties:
            viewedExperimentEventName:
              type: string
            experimentIdProperty:
              type: string
            variationIdProperty:
              type: string
            extraUserIdProperty:
              type: string
          required:
            - viewedExperimentEventName
            - experimentIdProperty
            - variationIdProperty
            - extraUserIdProperty
          additionalProperties: false
      required:
        - id
        - dateCreated
        - dateUpdated
        - type
        - name
        - description
        - projectIds
        - eventTracker
        - identifierTypes
        - assignmentQueries
        - identifierJoinQueries
      additionalProperties: false
    InformationSchema:
      type: object
      properties:
        id:
          type: string
        datasourceId:
          type: string
        status:
          type: string
          enum:
            - PENDING
            - COMPLETE
        error:
          type: object
          properties:
            errorType:
              type: string
              enum:
                - generic
                - not_supported
                - missing_params
            message:
              type: string
          required:
            - errorType
            - message
          additionalProperties: false
        databases:
          type: array
          items:
            type: object
            properties:
              databaseName:
                type: string
              path:
                type: string
              dateCreated:
                format: date-time
                type: string
              dateUpdated:
                format: date-time
                type: string
              schemas:
                type: array
                items:
                  type: object
                  properties:
                    schemaName:
                      type: string
                    path:
                      type: string
                    dateCreated:
                      format: date-time
                      type: string
                    dateUpdated:
                      format: date-time
                      type: string
                    tables:
                      type: array
                      items:
                        type: object
                        properties:
                          tableName:
                            type: string
                          path:
                            type: string
                          id:
                            type: string
                          numOfColumns:
                            type: number
                          dateCreated:
                            format: date-time
                            type: string
                          dateUpdated:
                            format: date-time
                            type: string
                        required:
                          - tableName
                          - id
                          - numOfColumns
                          - dateCreated
                          - dateUpdated
                        additionalProperties: false
                  required:
                    - schemaName
                    - dateCreated
                    - dateUpdated
                    - tables
                  additionalProperties: false
            required:
              - databaseName
              - dateCreated
              - dateUpdated
              - schemas
            additionalProperties: false
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
      required:
        - id
        - datasourceId
        - status
        - databases
        - dateCreated
        - dateUpdated
      additionalProperties: false
    SavedGroup:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - condition
            - list
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
        name:
          type: string
        owner:
          description: The userId of the owner (or raw owner name/email for legacy records)
          type: string
        ownerEmail:
          description: >-
            The email address of the owner, when the owner can be resolved to a
            known user.
          type: string
        condition:
          description: >-
            When type = 'condition', this is the JSON-encoded condition for the
            group
          type: string
        attributeKey:
          description: When type = 'list', this is the attribute key the group is based on
          type: string
        values:
          description: When type = 'list', this is the list of values for the attribute key
          type: array
          items:
            type: string
        description:
          type: string
        projects:
          type: array
          items:
            type: string
      required:
        - id
        - type
        - dateCreated
        - dateUpdated
        - name
      additionalProperties: false
    Organization:
      type: object
      properties:
        id:
          description: The Growthbook unique identifier for the organization
          type: string
        externalId:
          description: >-
            An optional identifier that you use within your company for the
            organization
          type: string
        dateCreated:
          format: date-time
          description: The date the organization was created
          type: string
        name:
          description: The name of the organization
          type: string
        ownerEmail:
          description: The email address of the organization owner
          type: string
      additionalProperties: false
    FactTable:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        owner:
          description: The userId of the owner (or raw owner name/email for legacy records)
          type: string
        ownerEmail:
          description: >-
            The email address of the owner, when the owner can be resolved to a
            known user.
          type: string
        projects:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
        datasource:
          type: string
        userIdTypes:
          type: array
          items:
            type: string
        sql:
          type: string
        eventName:
          description: The event name used in SQL template variables
          type: string
        columns:
          description: Array of column definitions for this fact table
          type: array
          items:
            $ref: '#/components/schemas/FactTableColumn'
        columnsError:
          description: Error message if there was an issue parsing the SQL schema
          anyOf:
            - type: string
            - type: 'null'
        archived:
          type: boolean
        managedBy:
          description: >-
            Where this fact table must be managed from. If not set (empty
            string), it can be managed from anywhere.
          type: string
          enum:
            - ''
            - api
            - admin
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
      required:
        - id
        - name
        - description
        - owner
        - projects
        - tags
        - datasource
        - userIdTypes
        - sql
        - managedBy
        - dateCreated
        - dateUpdated
      additionalProperties: false
    FactTableColumn:
      type: object
      properties:
        column:
          description: The actual column name in the database/SQL query
          type: string
        datatype:
          type: string
          enum:
            - number
            - string
            - date
            - boolean
            - json
            - binary
            - other
            - ''
        numberFormat:
          type: string
          enum:
            - ''
            - currency
            - time:seconds
            - memory:bytes
            - memory:kilobytes
        jsonFields:
          description: For JSON columns, defines the structure of nested fields
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: object
            properties:
              datatype:
                type: string
                enum:
                  - number
                  - string
                  - date
                  - boolean
                  - json
                  - binary
                  - other
                  - ''
            additionalProperties: false
        name:
          description: >-
            Display name for the column (can be different from the actual column
            name)
          type: string
        description:
          type: string
        alwaysInlineFilter:
          default: false
          description: >-
            Whether this column should always be included as an inline filter in
            queries
          type: boolean
        deleted:
          default: false
          type: boolean
        isAutoSliceColumn:
          default: false
          description: >-
            Whether this column can be used for auto slice analysis. This is an
            enterprise feature.
          type: boolean
        autoSlices:
          description: Specific slices to automatically analyze for this column.
          type: array
          items:
            type: string
        lockedAutoSlices:
          description: >-
            Locked slices that are protected from automatic updates. These will
            always be included in the slice levels even if they're not in the
            top values query results.
          type: array
          items:
            type: string
        dateCreated:
          readOnly: true
          format: date-time
          type: string
        dateUpdated:
          readOnly: true
          format: date-time
          type: string
      required:
        - column
        - datatype
      additionalProperties: false
    FactTableFilter:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        value:
          type: string
        managedBy:
          description: >-
            Where this fact table filter must be managed from. If not set (empty
            string), it can be managed from anywhere.
          type: string
          enum:
            - ''
            - api
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
      required:
        - id
        - name
        - description
        - value
        - managedBy
        - dateCreated
        - dateUpdated
      additionalProperties: false
    FactMetric:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        owner:
          description: The userId of the owner (or raw owner name/email for legacy records)
          type: string
        ownerEmail:
          description: >-
            The email address of the owner, when the owner can be resolved to a
            known user.
          type: string
        projects:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
        datasource:
          type: string
        metricType:
          type: string
          enum:
            - proportion
            - retention
            - mean
            - quantile
            - ratio
            - dailyParticipation
        numerator:
          type: object
          properties:
            factTableId:
              type: string
            column:
              type: string
            aggregation:
              type: string
              enum:
                - sum
                - max
                - count distinct
                - hll merge
                - kll merge
            filters:
              deprecated: true
              description: >-
                Array of Fact Table Filter Ids. Deprecated, use rowFilters
                instead.
              type: array
              items:
                type: string
            inlineFilters:
              deprecated: true
              description: >-
                Inline filters to apply to the fact table. Keys are column
                names, values are arrays of values to filter by. Deprecated, use
                rowFilters instead.
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type: array
                items:
                  type: string
            rowFilters:
              description: >-
                Filters to apply to the rows of the fact table before
                aggregation.
              type: array
              items:
                type: object
                properties:
                  operator:
                    type: string
                    enum:
                      - '='
                      - '!='
                      - '>'
                      - <
                      - '>='
                      - <=
                      - in
                      - not_in
                      - is_null
                      - not_null
                      - is_true
                      - is_false
                      - contains
                      - not_contains
                      - starts_with
                      - ends_with
                      - sql_expr
                      - saved_filter
                  values:
                    description: >-
                      Not required for is_null, not_null, is_true, is_false
                      operators.
                    type: array
                    items:
                      type: string
                  column:
                    description: >-
                      Required for all operators except sql_expr and
                      saved_filter.
                    type: string
                required:
                  - operator
                additionalProperties: false
            aggregateFilterColumn:
              description: >-
                Column to use to filter users after aggregation. Either
                '$$count' of rows or the name of a numeric column that will be
                summed by user. Must specify `aggregateFilter` if using this.
                Only can be used with 'retention' and 'proportion' metrics.
              type: string
            aggregateFilter:
              description: >-
                Simple comparison operator and value to apply after aggregation
                (e.g. '= 10' or '>= 1'). Requires `aggregateFilterColumn`.
              type: string
          required:
            - factTableId
            - column
          additionalProperties: false
        denominator:
          type: object
          properties:
            factTableId:
              type: string
            column:
              type: string
            filters:
              deprecated: true
              description: >-
                Array of Fact Table Filter Ids. Deprecated, use rowFilters
                instead.
              type: array
              items:
                type: string
            inlineFilters:
              deprecated: true
              description: >-
                Inline filters to apply to the fact table. Keys are column
                names, values are arrays of values to filter by. Deprecated, use
                rowFilters instead.
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type: array
                items:
                  type: string
            rowFilters:
              description: >-
                Filters to apply to the rows of the fact table before
                aggregation.
              type: array
              items:
                type: object
                properties:
                  operator:
                    type: string
                    enum:
                      - '='
                      - '!='
                      - '>'
                      - <
                      - '>='
                      - <=
                      - in
                      - not_in
                      - is_null
                      - not_null
                      - is_true
                      - is_false
                      - contains
                      - not_contains
                      - starts_with
                      - ends_with
                      - sql_expr
                      - saved_filter
                  values:
                    description: >-
                      Not required for is_null, not_null, is_true, is_false
                      operators.
                    type: array
                    items:
                      type: string
                  column:
                    description: >-
                      Required for all operators except sql_expr and
                      saved_filter.
                    type: string
                required:
                  - operator
                additionalProperties: false
          required:
            - factTableId
            - column
          additionalProperties: false
        inverse:
          description: >-
            Set to true for things like Bounce Rate, where you want the metric
            to decrease
          type: boolean
        quantileSettings:
          description: >-
            Controls the settings for quantile metrics (mandatory if metricType
            is "quantile")
          type: object
          properties:
            type:
              description: >-
                Whether the quantile is over unit aggregations or raw event
                values
              type: string
              enum:
                - event
                - unit
            ignoreZeros:
              description: >-
                If true, zero values will be ignored when calculating the
                quantile
              type: boolean
            quantile:
              description: The quantile value (from 0.001 to 0.999)
              type: number
              minimum: 0.001
              maximum: 0.999
              multipleOf: 0.001
            quantileEventCountColumn:
              description: >-
                Optional override for the source-column name used to recover
                per-row event counts when numerator.aggregation is 'kll merge'.
                Defaults to '<numerator.column>_n_events'. Only valid for
                event-quantile metrics with a 'kll merge' numerator.
              type: string
          required:
            - type
            - ignoreZeros
            - quantile
          additionalProperties: false
        cappingSettings:
          description: Controls how outliers are handled
          type: object
          properties:
            type:
              type: string
              enum:
                - none
                - absolute
                - percentile
            value:
              description: >-
                When type is absolute, this is the absolute value. When type is
                percentile, this is the percentile value (from 0.0 to 1.0).
              type: number
            ignoreZeros:
              description: >-
                If true and capping is `percentile`, zeros will be ignored when
                calculating the percentile.
              type: boolean
          required:
            - type
          additionalProperties: false
        windowSettings:
          description: Controls the conversion window for the metric
          type: object
          properties:
            type:
              type: string
              enum:
                - none
                - conversion
                - lookback
            delayValue:
              description: >-
                Wait this long after experiment exposure before counting
                conversions.
              type: number
            delayUnit:
              type: string
              enum:
                - minutes
                - hours
                - days
                - weeks
            windowValue:
              type: number
            windowUnit:
              type: string
              enum:
                - minutes
                - hours
                - days
                - weeks
          required:
            - type
          additionalProperties: false
        priorSettings:
          description: Controls the bayesian prior for the metric
          type: object
          properties:
            override:
              description: >-
                If false, the organization default settings will be used instead
                of the other settings in this object
              type: boolean
            proper:
              description: >-
                If true, the `mean` and `stddev` will be used, otherwise we will
                use an improper flat prior.
              type: boolean
            mean:
              description: >-
                The mean of the prior distribution of relative effects in
                proportion terms (e.g. 0.01 is 1%)
              type: number
            stddev:
              description: >-
                Must be > 0. The standard deviation of the prior distribution of
                relative effects in proportion terms.
              type: number
          required:
            - override
            - proper
            - mean
            - stddev
          additionalProperties: false
        regressionAdjustmentSettings:
          description: Controls the regression adjustment (CUPED) settings for the metric
          type: object
          properties:
            override:
              description: If false, the organization default settings will be used
              type: boolean
            enabled:
              description: >-
                Controls whether or not regresion adjustment is applied to the
                metric
              type: boolean
            days:
              description: Number of pre-exposure days to use for the regression adjustment
              type: number
          required:
            - override
          additionalProperties: false
        riskThresholdSuccess:
          type: number
        riskThresholdDanger:
          type: number
        displayAsPercentage:
          description: >-
            If true and the metric is a ratio metric, variation means will be
            displayed as a percentage
          type: boolean
        minPercentChange:
          type: number
        maxPercentChange:
          type: number
        minSampleSize:
          type: number
        targetMDE:
          type: number
        managedBy:
          description: >-
            Where this fact metric must be managed from. If not set (empty
            string), it can be managed from anywhere.
          type: string
          enum:
            - ''
            - api
            - admin
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
        archived:
          type: boolean
        metricAutoSlices:
          description: >-
            Array of slice column names that will be automatically included in
            metric analysis. This is an enterprise feature.
          type: array
          items:
            type: string
      required:
        - id
        - name
        - description
        - owner
        - projects
        - tags
        - datasource
        - metricType
        - numerator
        - inverse
        - cappingSettings
        - windowSettings
        - priorSettings
        - regressionAdjustmentSettings
        - riskThresholdSuccess
        - riskThresholdDanger
        - minPercentChange
        - maxPercentChange
        - minSampleSize
        - targetMDE
        - managedBy
        - dateCreated
        - dateUpdated
      additionalProperties: false
    MetricAnalysis:
      type: object
      properties:
        id:
          description: The ID of the created metric analysis
          type: string
        status:
          description: The status of the analysis (e.g., "running", "completed", "error")
          type: string
        settings:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - id
        - status
      additionalProperties: false
    CodeRef:
      type: object
      properties:
        organization:
          description: The organization name
          type: string
        dateUpdated:
          format: date-time
          description: When the code references were last updated
          type: string
        feature:
          description: Feature identifier
          type: string
        repo:
          description: Repository name
          type: string
        branch:
          description: Branch name
          type: string
        platform:
          description: Source control platform
          type: string
          enum:
            - github
            - gitlab
            - bitbucket
        refs:
          type: array
          items:
            type: object
            properties:
              filePath:
                description: Path to the file containing the reference
                type: string
              startingLineNumber:
                description: Line number where the reference starts
                type: integer
              lines:
                description: The code lines containing the reference
                type: string
              flagKey:
                description: The feature flag key referenced
                type: string
            required:
              - filePath
              - startingLineNumber
              - lines
              - flagKey
            additionalProperties: false
      required:
        - organization
        - dateUpdated
        - feature
        - repo
        - branch
        - refs
      additionalProperties: false
    Member:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
        globalRole:
          type: string
        environments:
          type: array
          items:
            type: string
        limitAccessByEnvironment:
          type: boolean
        managedbyIdp:
          type: boolean
        teams:
          type: array
          items:
            type: string
        projectRoles:
          type: array
          items:
            type: object
            properties:
              project:
                type: string
              role:
                type: string
              limitAccessByEnvironment:
                type: boolean
              environments:
                type: array
                items:
                  type: string
            required:
              - project
              - role
              - limitAccessByEnvironment
              - environments
            additionalProperties: false
        lastLoginDate:
          format: date-time
          type: string
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
      required:
        - id
        - email
        - globalRole
      additionalProperties: false
    Query:
      type: object
      properties:
        id:
          type: string
        organization:
          type: string
        datasource:
          type: string
        language:
          type: string
        query:
          type: string
        queryType:
          type: string
        createdAt:
          type: string
        startedAt:
          type: string
        status:
          type: string
          enum:
            - running
            - queued
            - failed
            - partially-succeeded
            - succeeded
        externalId:
          type: string
        dependencies:
          type: array
          items:
            type: string
        runAtEnd:
          type: boolean
      required:
        - id
        - organization
        - datasource
        - language
        - query
        - queryType
        - createdAt
        - startedAt
        - status
        - externalId
        - dependencies
        - runAtEnd
      additionalProperties: false
    Settings:
      type: object
      properties:
        confidenceLevel:
          type: number
        northStar:
          anyOf:
            - type: object
              properties:
                title:
                  type: string
                metricIds:
                  type: array
                  items:
                    type: string
              additionalProperties: false
            - type: 'null'
        metricDefaults:
          type: object
          properties:
            priorSettings:
              type: object
              properties:
                override:
                  type: boolean
                proper:
                  type: boolean
                mean:
                  type: number
                stddev:
                  type: number
              required:
                - override
                - proper
                - mean
                - stddev
              additionalProperties: false
            minimumSampleSize:
              type: number
            maxPercentageChange:
              type: number
            minPercentageChange:
              type: number
            targetMDE:
              type: number
          additionalProperties: false
        pastExperimentsMinLength:
          type: number
        metricAnalysisDays:
          type: number
        updateSchedule:
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - cron
                    - never
                    - stale
                cron:
                  anyOf:
                    - type: string
                    - type: 'null'
                hours:
                  anyOf:
                    - type: number
                    - type: 'null'
              additionalProperties: false
            - type: 'null'
        multipleExposureMinPercent:
          type: number
        defaultRole:
          type: object
          properties:
            role:
              type: string
            limitAccessByEnvironment:
              type: boolean
            environments:
              type: array
              items:
                type: string
          additionalProperties: false
        statsEngine:
          type: string
        pValueThreshold:
          type: number
        regressionAdjustmentEnabled:
          type: boolean
        regressionAdjustmentDays:
          type: number
        sequentialTestingEnabled:
          type: boolean
        sequentialTestingTuningParameter:
          type: number
        attributionModel:
          type: string
          enum:
            - firstExposure
            - experimentDuration
            - lookbackOverride
        targetMDE:
          type: number
        delayHours:
          type: number
        windowType:
          type: string
        windowHours:
          type: number
        winRisk:
          type: number
        loseRisk:
          type: number
        secureAttributeSalt:
          type: string
        killswitchConfirmation:
          type: boolean
        featureKillSwitchBehavior:
          type: string
          enum:
            - 'off'
            - warn
        requireReviews:
          type: array
          items:
            type: object
            properties:
              requireReviewOn:
                type: boolean
              resetReviewOnChange:
                type: boolean
              environments:
                type: array
                items:
                  type: string
              projects:
                type: array
                items:
                  type: string
              featureRequireEnvironmentReview:
                type: boolean
              featureRequireMetadataReview:
                type: boolean
            additionalProperties: false
        restApiBypassesReviews:
          type: boolean
        featureKeyExample:
          type: string
        featureRegexValidator:
          type: string
        banditScheduleValue:
          type: number
        banditScheduleUnit:
          type: string
          enum:
            - hours
            - days
        banditBurnInValue:
          type: number
        banditBurnInUnit:
          type: string
          enum:
            - hours
            - days
        experimentMinLengthDays:
          type: number
        experimentMaxLengthDays:
          anyOf:
            - type: number
            - type: 'null'
        preferredEnvironment:
          anyOf:
            - type: string
            - type: 'null'
        maxMetricSliceLevels:
          type: number
      required:
        - confidenceLevel
        - northStar
        - metricDefaults
        - pastExperimentsMinLength
        - metricAnalysisDays
        - updateSchedule
        - multipleExposureMinPercent
        - defaultRole
        - statsEngine
        - pValueThreshold
        - regressionAdjustmentEnabled
        - regressionAdjustmentDays
        - sequentialTestingEnabled
        - sequentialTestingTuningParameter
        - attributionModel
        - targetMDE
        - delayHours
        - windowType
        - windowHours
        - winRisk
        - loseRisk
        - secureAttributeSalt
        - killswitchConfirmation
        - requireReviews
        - featureKeyExample
        - featureRegexValidator
        - banditScheduleValue
        - banditScheduleUnit
        - banditBurnInValue
        - banditBurnInUnit
        - experimentMinLengthDays
      additionalProperties: false
    InformationSchemaTable:
      type: object
      properties:
        id:
          type: string
        datasourceId:
          type: string
        informationSchemaId:
          type: string
        tableName:
          type: string
        tableSchema:
          type: string
        databaseName:
          type: string
        columns:
          type: array
          items:
            type: object
            properties:
              columnName:
                type: string
              dataType:
                type: string
            required:
              - columnName
              - dataType
            additionalProperties: false
        refreshMS:
          type: number
        dateCreated:
          format: date-time
          type: string
        dateUpdated:
          format: date-time
          type: string
      required:
        - id
        - datasourceId
        - informationSchemaId
        - tableName
        - tableSchema
        - databaseName
        - columns
        - refreshMS
        - dateCreated
        - dateUpdated
      additionalProperties: false
    RampSchedule:
      type: object
      properties:
        id:
          description: Unique identifier (rs_ prefix)
          type: string
        dateCreated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        dateUpdated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        name:
          type: string
        entityType:
          type: string
          enum:
            - feature
        entityId:
          type: string
        targets:
          description: Controlled entity references
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              entityType:
                type: string
                enum:
                  - feature
              entityId:
                type: string
              ruleId:
                anyOf:
                  - type: string
                  - type: 'null'
              environment:
                deprecated: true
                description: >-
                  Legacy disambiguator used alongside `ruleId` for pre-v2 ramps.
                  May be null on newer targets.
                anyOf:
                  - type: string
                  - type: 'null'
              status:
                type: string
                enum:
                  - pending-join
                  - active
              activatingRevisionVersion:
                description: >-
                  Feature revision version that activates this ramp; cleared
                  once published
                anyOf:
                  - type: integer
                  - type: 'null'
            required:
              - id
              - entityType
              - entityId
              - status
            additionalProperties: false
        steps:
          description: Ordered ramp steps
          type: array
          items:
            type: object
            properties:
              trigger:
                anyOf:
                  - type: object
                    properties:
                      type:
                        type: string
                        const: interval
                      seconds:
                        type: number
                        exclusiveMinimum: 0
                    required:
                      - type
                      - seconds
                    additionalProperties: false
                  - type: object
                    properties:
                      type:
                        type: string
                        const: approval
                    required:
                      - type
                    additionalProperties: false
                  - type: object
                    properties:
                      type:
                        type: string
                        const: scheduled
                      at:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    required:
                      - type
                      - at
                    additionalProperties: false
              actions:
                type: array
                items:
                  type: object
                  properties:
                    targetType:
                      type: string
                      const: feature-rule
                    targetId:
                      type: string
                    patch:
                      type: object
                      properties:
                        ruleId:
                          type: string
                        coverage:
                          anyOf:
                            - type: number
                              minimum: 0
                              maximum: 1
                            - type: 'null'
                        condition:
                          anyOf:
                            - type: string
                            - type: 'null'
                        savedGroups:
                          anyOf:
                            - type: array
                              items:
                                type: object
                                properties:
                                  match:
                                    type: string
                                    enum:
                                      - all
                                      - none
                                      - any
                                  ids:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - match
                                  - ids
                                additionalProperties: false
                            - type: 'null'
                        prerequisites:
                          anyOf:
                            - type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  condition:
                                    type: string
                                required:
                                  - id
                                  - condition
                                additionalProperties: false
                            - type: 'null'
                        force:
                          description: Force value (any JSON type)
                        enabled:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                      required:
                        - ruleId
                      additionalProperties: false
                  required:
                    - targetType
                    - targetId
                    - patch
                  additionalProperties: false
              approvalNotes:
                anyOf:
                  - type: string
                  - type: 'null'
            required:
              - trigger
              - actions
            additionalProperties: false
        endActions:
          description: >-
            Actions applied on top of all step patches when the ramp completes.
            Represents the final desired rule state.
          type: array
          items:
            type: object
            properties:
              targetType:
                type: string
                const: feature-rule
              targetId:
                type: string
              patch:
                type: object
                properties:
                  ruleId:
                    type: string
                  coverage:
                    anyOf:
                      - type: number
                        minimum: 0
                        maximum: 1
                      - type: 'null'
                  condition:
                    anyOf:
                      - type: string
                      - type: 'null'
                  savedGroups:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          properties:
                            match:
                              type: string
                              enum:
                                - all
                                - none
                                - any
                            ids:
                              type: array
                              items:
                                type: string
                          required:
                            - match
                            - ids
                          additionalProperties: false
                      - type: 'null'
                  prerequisites:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            condition:
                              type: string
                          required:
                            - id
                            - condition
                          additionalProperties: false
                      - type: 'null'
                  force:
                    description: Force value (any JSON type)
                  enabled:
                    anyOf:
                      - type: boolean
                      - type: 'null'
                required:
                  - ruleId
                additionalProperties: false
            required:
              - targetType
              - targetId
              - patch
            additionalProperties: false
        startDate:
          description: >-
            When the ramp fires. Absent/null means immediately on publish; set
            to a future datetime to delay start and keep the rule disabled until
            that time.
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            - type: 'null'
        endCondition:
          description: Optional hard deadline for standard (no-step) schedules
          anyOf:
            - type: object
              properties:
                trigger:
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: scheduled
                        at:
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      required:
                        - type
                        - at
                      additionalProperties: false
              additionalProperties: false
            - type: 'null'
        status:
          type: string
          enum:
            - pending
            - ready
            - running
            - paused
            - pending-approval
            - completed
            - rolled-back
        currentStepIndex:
          description: Index of current step; -1 = not yet started
          type: integer
          minimum: -1
        startedAt:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            - type: 'null'
        phaseStartedAt:
          description: >-
            Anchor for cumulative interval timing; resets after each approval
            gate
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            - type: 'null'
        pausedAt:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            - type: 'null'
        nextStepAt:
          description: >-
            When the next step fires; null for approval steps and terminal
            states
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            - type: 'null'
        nextProcessAt:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            - type: 'null'
        elapsedMs:
          description: Milliseconds since startedAt (computed at response time, not stored)
          anyOf:
            - type: integer
            - type: 'null'
      required:
        - id
        - dateCreated
        - dateUpdated
        - name
        - entityType
        - entityId
        - targets
        - steps
        - status
        - currentStepIndex
        - nextStepAt
      additionalProperties: false
    Namespace:
      type: object
      properties:
        id:
          description: The unique internal identifier for the namespace (e.g. 'ns-abc123').
          type: string
        displayName:
          description: Human-readable display name.
          type: string
        description:
          type: string
        status:
          type: string
          enum:
            - active
            - inactive
        format:
          description: >-
            Namespace format. 'multiRange' supports multiple ranges per
            experiment and a configurable hash attribute.
          type: string
          enum:
            - legacy
            - multiRange
        hashAttribute:
          description: >-
            The user attribute used to assign bucket membership. Only present on
            multiRange namespaces.
          type: string
        seed:
          description: >-
            The seed used for bucket hashing. Changing this re-randomizes which
            traffic is eligible for which experiment. Use the rotateSeed
            endpoint to change it.
          type: string
      required:
        - id
        - displayName
        - description
        - status
        - format
      additionalProperties: false
    NamespaceExperimentMember:
      type: object
      properties:
        id:
          description: The internal experiment ID.
          type: string
        name:
          description: Display name of the experiment.
          type: string
        trackingKey:
          description: The experiment tracking key used by the SDK.
          type: string
        status:
          description: The current status of the experiment.
          type: string
          enum:
            - draft
            - running
            - stopped
        ranges:
          description: >-
            The ranges claimed within this namespace, as [start, end] pairs
            between 0 and 1.
          type: array
          items:
            type: array
            prefixItems:
              - type: number
              - type: number
      required:
        - id
        - name
        - trackingKey
        - status
        - ranges
      additionalProperties: false
    Dashboard:
      type: object
      properties:
        id:
          type: string
        uid:
          type: string
        organization:
          type: string
        experimentId:
          type: string
        isDefault:
          type: boolean
        isDeleted:
          type: boolean
        userId:
          type: string
        editLevel:
          type: string
          enum:
            - published
            - private
        shareLevel:
          type: string
          enum:
            - published
            - private
        enableAutoUpdates:
          type: boolean
        updateSchedule:
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                  const: stale
                hours:
                  type: number
              required:
                - type
                - hours
              additionalProperties: false
            - type: object
              properties:
                type:
                  type: string
                  const: cron
                cron:
                  type: string
              required:
                - type
                - cron
              additionalProperties: false
        title:
          type: string
        projects:
          type: array
          items:
            type: string
        nextUpdate:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        lastUpdated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        dateCreated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        dateUpdated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        blocks:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  organization:
                    type: string
                  id:
                    type: string
                  uid:
                    type: string
                  type:
                    type: string
                    const: metric-explorer
                  title:
                    type: string
                  description:
                    type: string
                  snapshotId:
                    type: string
                  factMetricId:
                    type: string
                  visualizationType:
                    type: string
                    enum:
                      - histogram
                      - bigNumber
                      - timeseries
                  valueType:
                    type: string
                    enum:
                      - avg
                      - sum
                  metricAnalysisId:
                    type: string
                  analysisSettings:
                    type: object
                    properties:
                      userIdType:
                        type: string
                      lookbackDays:
                        type: number
                      populationType:
                        type: string
                        enum:
                          - metric
                          - factTable
                          - exposureQuery
                          - population
                          - segment
                      populationId:
                        anyOf:
                          - type: string
                          - type: 'null'
                      additionalNumeratorFilters:
                        type: array
                        items:
                          type: string
                      additionalDenominatorFilters:
                        type: array
                        items:
                          type: string
                      startDate:
                        type: string
                      endDate:
                        type: string
                    required:
                      - userIdType
                      - lookbackDays
                      - populationType
                      - populationId
                      - startDate
                      - endDate
                    additionalProperties: false
                required:
                  - organization
                  - id
                  - uid
                  - type
                  - title
                  - description
                  - factMetricId
                  - visualizationType
                  - valueType
                  - metricAnalysisId
                  - analysisSettings
                additionalProperties: false
              - type: object
                properties:
                  organization:
                    type: string
                  id:
                    type: string
                  uid:
                    type: string
                  type:
                    type: string
                    const: markdown
                  title:
                    type: string
                  description:
                    type: string
                  snapshotId:
                    type: string
                  content:
                    type: string
                required:
                  - organization
                  - id
                  - uid
                  - type
                  - title
                  - description
                  - content
                additionalProperties: false
              - type: object
                properties:
                  organization:
                    type: string
                  id:
                    type: string
                  uid:
                    type: string
                  type:
                    type: string
                    const: experiment-metadata
                  title:
                    type: string
                  description:
                    type: string
                  snapshotId:
                    type: string
                  experimentId:
                    type: string
                  showDescription:
                    type: boolean
                  showHypothesis:
                    type: boolean
                  showVariationImages:
                    type: boolean
                  variationIds:
                    type: array
                    items:
                      type: string
                required:
                  - organization
                  - id
                  - uid
                  - type
                  - title
                  - description
                  - experimentId
                  - showDescription
                  - showHypothesis
                  - showVariationImages
                additionalProperties: false
              - type: object
                properties:
                  organization:
                    type: string
                  id:
                    type: string
                  uid:
                    type: string
                  type:
                    type: string
                    const: experiment-metric
                  title:
                    type: string
                  description:
                    type: string
                  snapshotId:
                    type: string
                  experimentId:
                    type: string
                  metricIds:
                    type: array
                    items:
                      type: string
                  variationIds:
                    type: array
                    items:
                      type: string
                  baselineRow:
                    type: number
                  differenceType:
                    type: string
                    enum:
                      - absolute
                      - relative
                      - scaled
                  columnsFilter:
                    type: array
                    items:
                      type: string
                      enum:
                        - Metric & Variation Names
                        - Baseline Average
                        - Variation Averages
                        - Chance to Win
                        - CI Graph
                        - Lift
                  sliceTagsFilter:
                    type: array
                    items:
                      type: string
                  metricTagFilter:
                    type: array
                    items:
                      type: string
                  sortBy:
                    anyOf:
                      - type: string
                        enum:
                          - metrics
                          - metricTags
                          - significance
                          - change
                      - type: 'null'
                  sortDirection:
                    anyOf:
                      - type: string
                        enum:
                          - asc
                          - desc
                      - type: 'null'
                required:
                  - organization
                  - id
                  - uid
                  - type
                  - title
                  - description
                  - snapshotId
                  - experimentId
                  - metricIds
                  - variationIds
                  - baselineRow
                  - differenceType
                  - columnsFilter
                  - sliceTagsFilter
                  - metricTagFilter
                  - sortBy
                  - sortDirection
                additionalProperties: false
              - type: object
                properties:
                  organization:
                    type: string
                  id:
                    type: string
                  uid:
                    type: string
                  type:
                    type: string
                    const: experiment-dimension
                  title:
                    type: string
                  description:
                    type: string
                  snapshotId:
                    type: string
                  experimentId:
                    type: string
                  dimensionId:
                    type: string
                  dimensionValues:
                    type: array
                    items:
                      type: string
                  metricIds:
                    type: array
                    items:
                      type: string
                  variationIds:
                    type: array
                    items:
                      type: string
                  baselineRow:
                    type: number
                  differenceType:
                    type: string
                    enum:
                      - absolute
                      - relative
                      - scaled
                  columnsFilter:
                    type: array
                    items:
                      type: string
                      enum:
                        - Metric & Variation Names
                        - Baseline Average
                        - Variation Averages
                        - Chance to Win
                        - CI Graph
                        - Lift
                  metricTagFilter:
                    type: array
                    items:
                      type: string
                  sortBy:
                    anyOf:
                      - type: string
                        enum:
                          - metrics
                          - metricTags
                          - significance
                          - change
                      - type: 'null'
                  sortDirection:
                    anyOf:
                      - type: string
                        enum:
                          - asc
                          - desc
                      - type: 'null'
                required:
                  - organization
                  - id
                  - uid
                  - type
                  - title
                  - description
                  - snapshotId
                  - experimentId
                  - dimensionId
                  - dimensionValues
                  - metricIds
                  - variationIds
                  - baselineRow
                  - differenceType
                  - columnsFilter
                  - metricTagFilter
                  - sortBy
                  - sortDirection
                additionalProperties: false
              - type: object
                properties:
                  organization:
                    type: string
                  id:
                    type: string
                  uid:
                    type: string
                  type:
                    type: string
                    const: experiment-time-series
                  title:
                    type: string
                  description:
                    type: string
                  snapshotId:
                    type: string
                  experimentId:
                    type: string
                  metricId:
                    type: string
                  metricIds:
                    type: array
                    items:
                      type: string
                  variationIds:
                    type: array
                    items:
                      type: string
                  differenceType:
                    type: string
                    enum:
                      - absolute
                      - relative
                      - scaled
                  sliceTagsFilter:
                    type: array
                    items:
                      type: string
                  metricTagFilter:
                    type: array
                    items:
                      type: string
                  sortBy:
                    anyOf:
                      - type: string
                        enum:
                          - metrics
                          - metricTags
                          - significance
                          - change
                      - type: 'null'
                  sortDirection:
                    anyOf:
                      - type: string
                        enum:
                          - asc
                          - desc
                      - type: 'null'
                required:
                  - organization
                  - id
                  - uid
                  - type
                  - title
                  - description
                  - snapshotId
                  - experimentId
                  - metricIds
                  - variationIds
                  - differenceType
                  - sliceTagsFilter
                  - metricTagFilter
                  - sortBy
                  - sortDirection
                additionalProperties: false
              - type: object
                properties:
                  organization:
                    type: string
                  id:
                    type: string
                  uid:
                    type: string
                  type:
                    type: string
                    const: experiment-traffic
                  title:
                    type: string
                  description:
                    type: string
                  snapshotId:
                    type: string
                  experimentId:
                    type: string
                  showTable:
                    type: boolean
                  showTimeseries:
                    type: boolean
                required:
                  - organization
                  - id
                  - uid
                  - type
                  - title
                  - description
                  - experimentId
                  - showTable
                  - showTimeseries
                additionalProperties: false
              - type: object
                properties:
                  organization:
                    type: string
                  id:
                    type: string
                  uid:
                    type: string
                  type:
                    type: string
                    const: sql-explorer
                  title:
                    type: string
                  description:
                    type: string
                  snapshotId:
                    type: string
                  savedQueryId:
                    type: string
                  dataVizConfigIndex:
                    type: number
                  blockConfig:
                    type: array
                    items:
                      type: string
                required:
                  - organization
                  - id
                  - uid
                  - type
                  - title
                  - description
                  - savedQueryId
                  - blockConfig
                additionalProperties: false
              - type: object
                properties:
                  organization:
                    type: string
                  id:
                    type: string
                  uid:
                    type: string
                  type:
                    type: string
                    const: metric-exploration
                  title:
                    type: string
                  description:
                    type: string
                  snapshotId:
                    type: string
                  explorerAnalysisId:
                    type: string
                  config:
                    type: object
                    properties:
                      datasource:
                        description: ID of the datasource to query
                        type: string
                      dimensions:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: date
                                column:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                dateGranularity:
                                  type: string
                                  enum:
                                    - auto
                                    - hour
                                    - day
                                    - week
                                    - month
                                    - year
                              required:
                                - dimensionType
                                - column
                                - dateGranularity
                              additionalProperties: false
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: dynamic
                                column:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                maxValues:
                                  type: number
                              required:
                                - dimensionType
                                - column
                                - maxValues
                              additionalProperties: false
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: static
                                column:
                                  type: string
                                values:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - dimensionType
                                - column
                                - values
                              additionalProperties: false
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: slice
                                slices:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                      filters:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - '='
                                                - '!='
                                                - <
                                                - <=
                                                - '>'
                                                - '>='
                                                - in
                                                - not_in
                                                - contains
                                                - not_contains
                                                - starts_with
                                                - ends_with
                                                - is_null
                                                - not_null
                                                - is_true
                                                - is_false
                                                - sql_expr
                                                - saved_filter
                                            column:
                                              type: string
                                            values:
                                              type: array
                                              items:
                                                type: string
                                          required:
                                            - operator
                                          additionalProperties: false
                                    required:
                                      - name
                                      - filters
                                    additionalProperties: false
                              required:
                                - dimensionType
                                - slices
                              additionalProperties: false
                      chartType:
                        type: string
                        enum:
                          - line
                          - area
                          - timeseries-table
                          - table
                          - bar
                          - stackedBar
                          - horizontalBar
                          - stackedHorizontalBar
                          - bigNumber
                      dateRange:
                        type: object
                        properties:
                          predefined:
                            type: string
                            enum:
                              - today
                              - last7Days
                              - last30Days
                              - last90Days
                              - customLookback
                              - customDateRange
                          lookbackValue:
                            anyOf:
                              - type: number
                              - type: 'null'
                          lookbackUnit:
                            anyOf:
                              - type: string
                                enum:
                                  - hour
                                  - day
                                  - week
                                  - month
                              - type: 'null'
                          startDate:
                            anyOf:
                              - type: string
                              - type: 'null'
                          endDate:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - predefined
                        additionalProperties: false
                      showAs:
                        type: string
                        enum:
                          - total
                          - per_unit
                      type:
                        type: string
                        const: metric
                      dataset:
                        type: object
                        properties:
                          type:
                            type: string
                            const: metric
                          values:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                rowFilters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      operator:
                                        type: string
                                        enum:
                                          - '='
                                          - '!='
                                          - <
                                          - <=
                                          - '>'
                                          - '>='
                                          - in
                                          - not_in
                                          - contains
                                          - not_contains
                                          - starts_with
                                          - ends_with
                                          - is_null
                                          - not_null
                                          - is_true
                                          - is_false
                                          - sql_expr
                                          - saved_filter
                                      column:
                                        type: string
                                      values:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - operator
                                    additionalProperties: false
                                type:
                                  type: string
                                  const: metric
                                metricId:
                                  type: string
                                unit:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                denominatorUnit:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - name
                                - rowFilters
                                - type
                                - metricId
                                - unit
                                - denominatorUnit
                              additionalProperties: false
                        required:
                          - type
                          - values
                        additionalProperties: false
                    required:
                      - datasource
                      - dimensions
                      - chartType
                      - dateRange
                      - type
                      - dataset
                    additionalProperties: false
                required:
                  - organization
                  - id
                  - uid
                  - type
                  - title
                  - description
                  - explorerAnalysisId
                  - config
                additionalProperties: false
              - type: object
                properties:
                  organization:
                    type: string
                  id:
                    type: string
                  uid:
                    type: string
                  type:
                    type: string
                    const: fact-table-exploration
                  title:
                    type: string
                  description:
                    type: string
                  snapshotId:
                    type: string
                  explorerAnalysisId:
                    type: string
                  config:
                    type: object
                    properties:
                      datasource:
                        description: ID of the datasource to query
                        type: string
                      dimensions:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: date
                                column:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                dateGranularity:
                                  type: string
                                  enum:
                                    - auto
                                    - hour
                                    - day
                                    - week
                                    - month
                                    - year
                              required:
                                - dimensionType
                                - column
                                - dateGranularity
                              additionalProperties: false
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: dynamic
                                column:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                maxValues:
                                  type: number
                              required:
                                - dimensionType
                                - column
                                - maxValues
                              additionalProperties: false
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: static
                                column:
                                  type: string
                                values:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - dimensionType
                                - column
                                - values
                              additionalProperties: false
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: slice
                                slices:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                      filters:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - '='
                                                - '!='
                                                - <
                                                - <=
                                                - '>'
                                                - '>='
                                                - in
                                                - not_in
                                                - contains
                                                - not_contains
                                                - starts_with
                                                - ends_with
                                                - is_null
                                                - not_null
                                                - is_true
                                                - is_false
                                                - sql_expr
                                                - saved_filter
                                            column:
                                              type: string
                                            values:
                                              type: array
                                              items:
                                                type: string
                                          required:
                                            - operator
                                          additionalProperties: false
                                    required:
                                      - name
                                      - filters
                                    additionalProperties: false
                              required:
                                - dimensionType
                                - slices
                              additionalProperties: false
                      chartType:
                        type: string
                        enum:
                          - line
                          - area
                          - timeseries-table
                          - table
                          - bar
                          - stackedBar
                          - horizontalBar
                          - stackedHorizontalBar
                          - bigNumber
                      dateRange:
                        type: object
                        properties:
                          predefined:
                            type: string
                            enum:
                              - today
                              - last7Days
                              - last30Days
                              - last90Days
                              - customLookback
                              - customDateRange
                          lookbackValue:
                            anyOf:
                              - type: number
                              - type: 'null'
                          lookbackUnit:
                            anyOf:
                              - type: string
                                enum:
                                  - hour
                                  - day
                                  - week
                                  - month
                              - type: 'null'
                          startDate:
                            anyOf:
                              - type: string
                              - type: 'null'
                          endDate:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - predefined
                        additionalProperties: false
                      showAs:
                        type: string
                        enum:
                          - total
                          - per_unit
                      type:
                        type: string
                        const: fact_table
                      dataset:
                        type: object
                        properties:
                          type:
                            type: string
                            const: fact_table
                          factTableId:
                            anyOf:
                              - type: string
                              - type: 'null'
                          values:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                rowFilters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      operator:
                                        type: string
                                        enum:
                                          - '='
                                          - '!='
                                          - <
                                          - <=
                                          - '>'
                                          - '>='
                                          - in
                                          - not_in
                                          - contains
                                          - not_contains
                                          - starts_with
                                          - ends_with
                                          - is_null
                                          - not_null
                                          - is_true
                                          - is_false
                                          - sql_expr
                                          - saved_filter
                                      column:
                                        type: string
                                      values:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - operator
                                    additionalProperties: false
                                type:
                                  type: string
                                  const: fact_table
                                valueType:
                                  type: string
                                  enum:
                                    - unit_count
                                    - count
                                    - sum
                                valueColumn:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                unit:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - name
                                - rowFilters
                                - type
                                - valueType
                                - valueColumn
                                - unit
                              additionalProperties: false
                        required:
                          - type
                          - factTableId
                          - values
                        additionalProperties: false
                    required:
                      - datasource
                      - dimensions
                      - chartType
                      - dateRange
                      - type
                      - dataset
                    additionalProperties: false
                required:
                  - organization
                  - id
                  - uid
                  - type
                  - title
                  - description
                  - explorerAnalysisId
                  - config
                additionalProperties: false
              - type: object
                properties:
                  organization:
                    type: string
                  id:
                    type: string
                  uid:
                    type: string
                  type:
                    type: string
                    const: data-source-exploration
                  title:
                    type: string
                  description:
                    type: string
                  snapshotId:
                    type: string
                  explorerAnalysisId:
                    type: string
                  config:
                    type: object
                    properties:
                      datasource:
                        description: ID of the datasource to query
                        type: string
                      dimensions:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: date
                                column:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                dateGranularity:
                                  type: string
                                  enum:
                                    - auto
                                    - hour
                                    - day
                                    - week
                                    - month
                                    - year
                              required:
                                - dimensionType
                                - column
                                - dateGranularity
                              additionalProperties: false
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: dynamic
                                column:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                maxValues:
                                  type: number
                              required:
                                - dimensionType
                                - column
                                - maxValues
                              additionalProperties: false
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: static
                                column:
                                  type: string
                                values:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - dimensionType
                                - column
                                - values
                              additionalProperties: false
                            - type: object
                              properties:
                                dimensionType:
                                  type: string
                                  const: slice
                                slices:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                      filters:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - '='
                                                - '!='
                                                - <
                                                - <=
                                                - '>'
                                                - '>='
                                                - in
                                                - not_in
                                                - contains
                                                - not_contains
                                                - starts_with
                                                - ends_with
                                                - is_null
                                                - not_null
                                                - is_true
                                                - is_false
                                                - sql_expr
                                                - saved_filter
                                            column:
                                              type: string
                                            values:
                                              type: array
                                              items:
                                                type: string
                                          required:
                                            - operator
                                          additionalProperties: false
                                    required:
                                      - name
                                      - filters
                                    additionalProperties: false
                              required:
                                - dimensionType
                                - slices
                              additionalProperties: false
                      chartType:
                        type: string
                        enum:
                          - line
                          - area
                          - timeseries-table
                          - table
                          - bar
                          - stackedBar
                          - horizontalBar
                          - stackedHorizontalBar
                          - bigNumber
                      dateRange:
                        type: object
                        properties:
                          predefined:
                            type: string
                            enum:
                              - today
                              - last7Days
                              - last30Days
                              - last90Days
                              - customLookback
                              - customDateRange
                          lookbackValue:
                            anyOf:
                              - type: number
                              - type: 'null'
                          lookbackUnit:
                            anyOf:
                              - type: string
                                enum:
                                  - hour
                                  - day
                                  - week
                                  - month
                              - type: 'null'
                          startDate:
                            anyOf:
                              - type: string
                              - type: 'null'
                          endDate:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - predefined
                        additionalProperties: false
                      showAs:
                        type: string
                        enum:
                          - total
                          - per_unit
                      type:
                        type: string
                        const: data_source
                      dataset:
                        type: object
                        properties:
                          type:
                            type: string
                            const: data_source
                          table:
                            type: string
                          path:
                            type: string
                          timestampColumn:
                            type: string
                          columnTypes:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties:
                              type: string
                              enum:
                                - string
                                - number
                                - date
                                - boolean
                                - other
                          values:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                rowFilters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      operator:
                                        type: string
                                        enum:
                                          - '='
                                          - '!='
                                          - <
                                          - <=
                                          - '>'
                                          - '>='
                                          - in
                                          - not_in
                                          - contains
                                          - not_contains
                                          - starts_with
                                          - ends_with
                                          - is_null
                                          - not_null
                                          - is_true
                                          - is_false
                                          - sql_expr
                                          - saved_filter
                                      column:
                                        type: string
                                      values:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - operator
                                    additionalProperties: false
                                type:
                                  type: string
                                  const: data_source
                                valueType:
                                  type: string
                                  enum:
                                    - unit_count
                                    - count
                                    - sum
                                valueColumn:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                unit:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - name
                                - rowFilters
                                - type
                                - valueType
                                - valueColumn
                                - unit
                              additionalProperties: false
                        required:
                          - type
                          - table
                          - path
                          - timestampColumn
                          - columnTypes
                          - values
                        additionalProperties: false
                    required:
                      - datasource
                      - dimensions
                      - chartType
                      - dateRange
                      - type
                      - dataset
                    additionalProperties: false
                required:
                  - organization
                  - id
                  - uid
                  - type
                  - title
                  - description
                  - explorerAnalysisId
                  - config
                additionalProperties: false
      required:
        - id
        - uid
        - organization
        - isDefault
        - isDeleted
        - userId
        - editLevel
        - shareLevel
        - enableAutoUpdates
        - title
        - dateCreated
        - dateUpdated
        - blocks
      additionalProperties: false
    CustomField:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        dateUpdated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        name:
          type: string
        description:
          type: string
        placeholder:
          type: string
        defaultValue:
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            - type: string
              format: date
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
            - type: array
              items:
                type: string
            - type: array
              items:
                type: number
            - type: array
              items:
                type: boolean
            - type: array
              items:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            - type: array
              items:
                type: string
                format: date
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
        type:
          type: string
          enum:
            - text
            - textarea
            - markdown
            - enum
            - multiselect
            - url
            - number
            - boolean
            - date
            - datetime
        values:
          type: string
        required:
          type: boolean
        creator:
          type: string
        projects:
          type: array
          items:
            type: string
        sections:
          type: array
          items:
            type: string
            enum:
              - feature
              - experiment
        active:
          type: boolean
      required:
        - id
        - dateCreated
        - dateUpdated
        - name
        - type
        - required
        - sections
      additionalProperties: false
    MetricGroup:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        dateUpdated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        owner:
          description: The userId of the owner (or raw owner name/email for legacy records)
          type: string
        ownerEmail:
          description: >-
            The email address of the owner, when the owner can be resolved to a
            known user.
          type: string
        name:
          type: string
        description:
          type: string
        tags:
          type: array
          items:
            type: string
        projects:
          type: array
          items:
            type: string
        metrics:
          type: array
          items:
            type: string
        datasource:
          type: string
        archived:
          type: boolean
      required:
        - id
        - dateCreated
        - dateUpdated
        - owner
        - name
        - description
        - tags
        - projects
        - metrics
        - datasource
        - archived
      additionalProperties: false
    Team:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        dateUpdated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        name:
          type: string
        createdBy:
          type: string
        description:
          type: string
        role:
          type: string
        limitAccessByEnvironment:
          type: boolean
        environments:
          type: array
          items:
            type: string
        projectRoles:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
              limitAccessByEnvironment:
                type: boolean
              environments:
                type: array
                items:
                  type: string
              teams:
                type: array
                items:
                  type: string
              project:
                type: string
            required:
              - role
              - limitAccessByEnvironment
              - environments
              - project
            additionalProperties: false
        members:
          readOnly: true
          type: array
          items:
            type: string
        managedByIdp:
          type: boolean
        managedBy:
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                  const: vercel
                resourceId:
                  type: string
              required:
                - type
                - resourceId
              additionalProperties: false
        defaultProject:
          type: string
      required:
        - id
        - dateCreated
        - dateUpdated
        - name
        - createdBy
        - description
        - role
        - limitAccessByEnvironment
        - environments
        - members
        - managedByIdp
      additionalProperties: false
    ExperimentTemplate:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        dateUpdated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        project:
          type: string
        owner:
          description: The userId of the owner (or raw owner name/email for legacy records)
          type: string
        ownerEmail:
          description: >-
            The email address of the owner, when the owner can be resolved to a
            known user.
          type: string
        templateMetadata:
          type: object
          properties:
            name:
              type: string
            description:
              type: string
          required:
            - name
          additionalProperties: false
        type:
          type: string
          enum:
            - standard
        hypothesis:
          type: string
        description:
          type: string
        tags:
          type: array
          items:
            type: string
        customFields:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
        datasource:
          type: string
        exposureQueryId:
          type: string
        hashAttribute:
          type: string
        fallbackAttribute:
          type: string
        disableStickyBucketing:
          type: boolean
        goalMetrics:
          type: array
          items:
            type: string
        secondaryMetrics:
          type: array
          items:
            type: string
        guardrailMetrics:
          type: array
          items:
            type: string
        activationMetric:
          type: string
        statsEngine:
          type: string
          enum:
            - bayesian
            - frequentist
        segment:
          type: string
        skipPartialData:
          type: boolean
        targeting:
          type: object
          properties:
            coverage:
              type: number
            savedGroups:
              type: array
              items:
                type: object
                properties:
                  match:
                    type: string
                    enum:
                      - all
                      - none
                      - any
                  ids:
                    type: array
                    items:
                      type: string
                required:
                  - match
                  - ids
                additionalProperties: false
            prerequisites:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  condition:
                    type: string
                required:
                  - id
                  - condition
                additionalProperties: false
            condition:
              type: string
          required:
            - coverage
            - condition
          additionalProperties: false
        customMetricSlices:
          type: array
          items:
            type: object
            properties:
              slices:
                type: array
                items:
                  type: object
                  properties:
                    column:
                      type: string
                    levels:
                      type: array
                      items:
                        type: string
                  required:
                    - column
                    - levels
                  additionalProperties: false
            required:
              - slices
            additionalProperties: false
      required:
        - id
        - dateCreated
        - dateUpdated
        - owner
        - templateMetadata
        - type
        - datasource
        - exposureQueryId
        - statsEngine
        - targeting
      additionalProperties: false
    RampScheduleTemplate:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        dateUpdated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        name:
          type: string
        steps:
          type: array
          items:
            type: object
            properties:
              trigger:
                anyOf:
                  - type: object
                    properties:
                      type:
                        type: string
                        const: interval
                      seconds:
                        type: number
                        exclusiveMinimum: 0
                    required:
                      - type
                      - seconds
                    additionalProperties: false
                  - type: object
                    properties:
                      type:
                        type: string
                        const: approval
                    required:
                      - type
                    additionalProperties: false
                  - type: object
                    properties:
                      type:
                        type: string
                        const: scheduled
                      at:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    required:
                      - type
                      - at
                    additionalProperties: false
              actions:
                type: array
                items:
                  type: object
                  properties:
                    targetType:
                      type: string
                      const: feature-rule
                    targetId:
                      type: string
                    patch:
                      type: object
                      properties:
                        ruleId:
                          type: string
                        coverage:
                          anyOf:
                            - type: number
                              minimum: 0
                              maximum: 1
                            - type: 'null'
                        condition:
                          anyOf:
                            - type: string
                            - type: 'null'
                        savedGroups:
                          anyOf:
                            - type: array
                              items:
                                type: object
                                properties:
                                  match:
                                    type: string
                                    enum:
                                      - all
                                      - none
                                      - any
                                  ids:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - match
                                  - ids
                                additionalProperties: false
                            - type: 'null'
                        prerequisites:
                          anyOf:
                            - type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  condition:
                                    type: string
                                required:
                                  - id
                                  - condition
                                additionalProperties: false
                            - type: 'null'
                        enabled:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                      required:
                        - ruleId
                      additionalProperties: false
                  required:
                    - targetType
                    - targetId
                    - patch
                  additionalProperties: false
              approvalNotes:
                anyOf:
                  - type: string
                  - type: 'null'
            required:
              - trigger
              - actions
            additionalProperties: false
        endPatch:
          type: object
          properties:
            coverage:
              type: number
              minimum: 0
              maximum: 1
            condition:
              type: string
            savedGroups:
              type: array
              items:
                type: object
                properties:
                  match:
                    type: string
                    enum:
                      - all
                      - none
                      - any
                  ids:
                    type: array
                    items:
                      type: string
                required:
                  - match
                  - ids
                additionalProperties: false
            prerequisites:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  condition:
                    type: string
                required:
                  - id
                  - condition
                additionalProperties: false
          additionalProperties: false
        official:
          type: boolean
      required:
        - id
        - dateCreated
        - dateUpdated
        - name
        - steps
      additionalProperties: false
    ExperimentSnapshot:
      type: object
      properties:
        id:
          type: string
        experiment:
          type: string
        status:
          type: string
      required:
        - id
        - experiment
        - status
      additionalProperties: false
    FeatureBaseRule:
      type: object
      properties:
        description:
          type: string
        condition:
          type: string
        id:
          type: string
        enabled:
          type: boolean
        scheduleRules:
          description: Simple time-based on/off schedule for this rule
          type: array
          items:
            $ref: '#/components/schemas/ScheduleRule'
        scheduleType:
          description: >
            UI hint for which scheduling mode is active:

            - `none` – no schedule

            - `schedule` – simple time-based enable/disable via `scheduleRules`

            - `ramp` – multi-step ramp-up controlled by an associated
            RampSchedule document
          type: string
          enum:
            - none
            - schedule
            - ramp
        savedGroupTargeting:
          type: array
          items:
            type: object
            properties:
              matchType:
                type: string
                enum:
                  - all
                  - any
                  - none
              savedGroups:
                type: array
                items:
                  type: string
            required:
              - matchType
              - savedGroups
            additionalProperties: false
        prerequisites:
          type: array
          items:
            type: object
            properties:
              id:
                description: Feature ID of the prerequisite
                type: string
              condition:
                type: string
            required:
              - id
              - condition
            additionalProperties: false
      required:
        - description
        - id
        - enabled
      additionalProperties: false
      $defs:
        ScheduleRule:
          id: ScheduleRule
          type: object
          properties:
            enabled:
              description: >-
                Whether the rule should be enabled or disabled at the specified
                timestamp.
              type: boolean
            timestamp:
              description: ISO timestamp when the rule should activate.
              anyOf:
                - format: date-time
                  type: string
                - type: 'null'
          required:
            - enabled
            - timestamp
          additionalProperties: false
    FeatureDefinition:
      type: object
      properties:
        defaultValue:
          anyOf:
            - type: string
            - type: number
            - type: array
              items: {}
            - type: object
              propertyNames:
                type: string
              additionalProperties: {}
            - type: 'null'
        rules:
          type: array
          items:
            type: object
            properties:
              force:
                anyOf:
                  - type: string
                  - type: number
                  - type: array
                    items: {}
                  - type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                  - type: 'null'
              weights:
                type: array
                items:
                  type: number
              variations:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
                    - type: array
                      items: {}
                    - type: object
                      propertyNames:
                        type: string
                      additionalProperties: {}
                    - type: 'null'
              hashAttribute:
                type: string
              namespace:
                minItems: 3
                maxItems: 3
                type: array
                items:
                  anyOf:
                    - type: number
                    - type: string
              key:
                type: string
              coverage:
                type: number
              condition:
                type: object
                propertyNames:
                  type: string
                additionalProperties: {}
            additionalProperties: false
      required:
        - defaultValue
      additionalProperties: false
    AnalyticsExploration:
      type: object
      properties:
        id:
          type: string
        dateCreated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        dateUpdated:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        datasource:
          type: string
        status:
          type: string
          enum:
            - running
            - success
            - error
        dateStart:
          type: string
        dateEnd:
          type: string
        error:
          anyOf:
            - type: string
            - type: 'null'
        result:
          type: object
          properties:
            rows:
              type: array
              items:
                type: object
                properties:
                  dimensions:
                    type: array
                    items:
                      anyOf:
                        - type: string
                        - type: 'null'
                  values:
                    type: array
                    items:
                      type: object
                      properties:
                        metricId:
                          type: string
                        numerator:
                          anyOf:
                            - type: number
                            - type: 'null'
                        denominator:
                          anyOf:
                            - type: number
                            - type: 'null'
                      required:
                        - metricId
                        - numerator
                        - denominator
                      additionalProperties: false
                required:
                  - dimensions
                  - values
                additionalProperties: false
          required:
            - rows
          additionalProperties: false
        config:
          anyOf:
            - type: object
              properties:
                datasource:
                  description: ID of the datasource to query
                  type: string
                dimensions:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: date
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          dateGranularity:
                            type: string
                            enum:
                              - auto
                              - hour
                              - day
                              - week
                              - month
                              - year
                        required:
                          - dimensionType
                          - column
                          - dateGranularity
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: dynamic
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          maxValues:
                            type: number
                        required:
                          - dimensionType
                          - column
                          - maxValues
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: static
                          column:
                            type: string
                          values:
                            type: array
                            items:
                              type: string
                        required:
                          - dimensionType
                          - column
                          - values
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: slice
                          slices:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                filters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      operator:
                                        type: string
                                        enum:
                                          - '='
                                          - '!='
                                          - <
                                          - <=
                                          - '>'
                                          - '>='
                                          - in
                                          - not_in
                                          - contains
                                          - not_contains
                                          - starts_with
                                          - ends_with
                                          - is_null
                                          - not_null
                                          - is_true
                                          - is_false
                                          - sql_expr
                                          - saved_filter
                                      column:
                                        type: string
                                      values:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - operator
                                    additionalProperties: false
                              required:
                                - name
                                - filters
                              additionalProperties: false
                        required:
                          - dimensionType
                          - slices
                        additionalProperties: false
                chartType:
                  type: string
                  enum:
                    - line
                    - area
                    - timeseries-table
                    - table
                    - bar
                    - stackedBar
                    - horizontalBar
                    - stackedHorizontalBar
                    - bigNumber
                dateRange:
                  type: object
                  properties:
                    predefined:
                      type: string
                      enum:
                        - today
                        - last7Days
                        - last30Days
                        - last90Days
                        - customLookback
                        - customDateRange
                    lookbackValue:
                      anyOf:
                        - type: number
                        - type: 'null'
                    lookbackUnit:
                      anyOf:
                        - type: string
                          enum:
                            - hour
                            - day
                            - week
                            - month
                        - type: 'null'
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                  required:
                    - predefined
                  additionalProperties: false
                showAs:
                  type: string
                  enum:
                    - total
                    - per_unit
                type:
                  type: string
                  const: metric
                dataset:
                  type: object
                  properties:
                    type:
                      type: string
                      const: metric
                    values:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          rowFilters:
                            type: array
                            items:
                              type: object
                              properties:
                                operator:
                                  type: string
                                  enum:
                                    - '='
                                    - '!='
                                    - <
                                    - <=
                                    - '>'
                                    - '>='
                                    - in
                                    - not_in
                                    - contains
                                    - not_contains
                                    - starts_with
                                    - ends_with
                                    - is_null
                                    - not_null
                                    - is_true
                                    - is_false
                                    - sql_expr
                                    - saved_filter
                                column:
                                  type: string
                                values:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - operator
                              additionalProperties: false
                          type:
                            type: string
                            const: metric
                          metricId:
                            type: string
                          unit:
                            anyOf:
                              - type: string
                              - type: 'null'
                          denominatorUnit:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - name
                          - rowFilters
                          - type
                          - metricId
                          - unit
                          - denominatorUnit
                        additionalProperties: false
                  required:
                    - type
                    - values
                  additionalProperties: false
              required:
                - datasource
                - dimensions
                - chartType
                - dateRange
                - type
                - dataset
              additionalProperties: false
            - type: object
              properties:
                datasource:
                  description: ID of the datasource to query
                  type: string
                dimensions:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: date
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          dateGranularity:
                            type: string
                            enum:
                              - auto
                              - hour
                              - day
                              - week
                              - month
                              - year
                        required:
                          - dimensionType
                          - column
                          - dateGranularity
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: dynamic
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          maxValues:
                            type: number
                        required:
                          - dimensionType
                          - column
                          - maxValues
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: static
                          column:
                            type: string
                          values:
                            type: array
                            items:
                              type: string
                        required:
                          - dimensionType
                          - column
                          - values
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: slice
                          slices:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                filters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      operator:
                                        type: string
                                        enum:
                                          - '='
                                          - '!='
                                          - <
                                          - <=
                                          - '>'
                                          - '>='
                                          - in
                                          - not_in
                                          - contains
                                          - not_contains
                                          - starts_with
                                          - ends_with
                                          - is_null
                                          - not_null
                                          - is_true
                                          - is_false
                                          - sql_expr
                                          - saved_filter
                                      column:
                                        type: string
                                      values:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - operator
                                    additionalProperties: false
                              required:
                                - name
                                - filters
                              additionalProperties: false
                        required:
                          - dimensionType
                          - slices
                        additionalProperties: false
                chartType:
                  type: string
                  enum:
                    - line
                    - area
                    - timeseries-table
                    - table
                    - bar
                    - stackedBar
                    - horizontalBar
                    - stackedHorizontalBar
                    - bigNumber
                dateRange:
                  type: object
                  properties:
                    predefined:
                      type: string
                      enum:
                        - today
                        - last7Days
                        - last30Days
                        - last90Days
                        - customLookback
                        - customDateRange
                    lookbackValue:
                      anyOf:
                        - type: number
                        - type: 'null'
                    lookbackUnit:
                      anyOf:
                        - type: string
                          enum:
                            - hour
                            - day
                            - week
                            - month
                        - type: 'null'
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                  required:
                    - predefined
                  additionalProperties: false
                showAs:
                  type: string
                  enum:
                    - total
                    - per_unit
                type:
                  type: string
                  const: fact_table
                dataset:
                  type: object
                  properties:
                    type:
                      type: string
                      const: fact_table
                    factTableId:
                      anyOf:
                        - type: string
                        - type: 'null'
                    values:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          rowFilters:
                            type: array
                            items:
                              type: object
                              properties:
                                operator:
                                  type: string
                                  enum:
                                    - '='
                                    - '!='
                                    - <
                                    - <=
                                    - '>'
                                    - '>='
                                    - in
                                    - not_in
                                    - contains
                                    - not_contains
                                    - starts_with
                                    - ends_with
                                    - is_null
                                    - not_null
                                    - is_true
                                    - is_false
                                    - sql_expr
                                    - saved_filter
                                column:
                                  type: string
                                values:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - operator
                              additionalProperties: false
                          type:
                            type: string
                            const: fact_table
                          valueType:
                            type: string
                            enum:
                              - unit_count
                              - count
                              - sum
                          valueColumn:
                            anyOf:
                              - type: string
                              - type: 'null'
                          unit:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - name
                          - rowFilters
                          - type
                          - valueType
                          - valueColumn
                          - unit
                        additionalProperties: false
                  required:
                    - type
                    - factTableId
                    - values
                  additionalProperties: false
              required:
                - datasource
                - dimensions
                - chartType
                - dateRange
                - type
                - dataset
              additionalProperties: false
            - type: object
              properties:
                datasource:
                  description: ID of the datasource to query
                  type: string
                dimensions:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: date
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          dateGranularity:
                            type: string
                            enum:
                              - auto
                              - hour
                              - day
                              - week
                              - month
                              - year
                        required:
                          - dimensionType
                          - column
                          - dateGranularity
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: dynamic
                          column:
                            anyOf:
                              - type: string
                              - type: 'null'
                          maxValues:
                            type: number
                        required:
                          - dimensionType
                          - column
                          - maxValues
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: static
                          column:
                            type: string
                          values:
                            type: array
                            items:
                              type: string
                        required:
                          - dimensionType
                          - column
                          - values
                        additionalProperties: false
                      - type: object
                        properties:
                          dimensionType:
                            type: string
                            const: slice
                          slices:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                filters:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      operator:
                                        type: string
                                        enum:
                                          - '='
                                          - '!='
                                          - <
                                          - <=
                                          - '>'
                                          - '>='
                                          - in
                                          - not_in
                                          - contains
                                          - not_contains
                                          - starts_with
                                          - ends_with
                                          - is_null
                                          - not_null
                                          - is_true
                                          - is_false
                                          - sql_expr
                                          - saved_filter
                                      column:
                                        type: string
                                      values:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - operator
                                    additionalProperties: false
                              required:
                                - name
                                - filters
                              additionalProperties: false
                        required:
                          - dimensionType
                          - slices
                        additionalProperties: false
                chartType:
                  type: string
                  enum:
                    - line
                    - area
                    - timeseries-table
                    - table
                    - bar
                    - stackedBar
                    - horizontalBar
                    - stackedHorizontalBar
                    - bigNumber
                dateRange:
                  type: object
                  properties:
                    predefined:
                      type: string
                      enum:
                        - today
                        - last7Days
                        - last30Days
                        - last90Days
                        - customLookback
                        - customDateRange
                    lookbackValue:
                      anyOf:
                        - type: number
                        - type: 'null'
                    lookbackUnit:
                      anyOf:
                        - type: string
                          enum:
                            - hour
                            - day
                            - week
                            - month
                        - type: 'null'
                    startDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                    endDate:
                      anyOf:
                        - type: string
                        - type: 'null'
                  required:
                    - predefined
                  additionalProperties: false
                showAs:
                  type: string
                  enum:
                    - total
                    - per_unit
                type:
                  type: string
                  const: data_source
                dataset:
                  type: object
                  properties:
                    type:
                      type: string
                      const: data_source
                    table:
                      type: string
                    path:
                      type: string
                    timestampColumn:
                      type: string
                    columnTypes:
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties:
                        type: string
                        enum:
                          - string
                          - number
                          - date
                          - boolean
                          - other
                    values:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          rowFilters:
                            type: array
                            items:
                              type: object
                              properties:
                                operator:
                                  type: string
                                  enum:
                                    - '='
                                    - '!='
                                    - <
                                    - <=
                                    - '>'
                                    - '>='
                                    - in
                                    - not_in
                                    - contains
                                    - not_contains
                                    - starts_with
                                    - ends_with
                                    - is_null
                                    - not_null
                                    - is_true
                                    - is_false
                                    - sql_expr
                                    - saved_filter
                                column:
                                  type: string
                                values:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - operator
                              additionalProperties: false
                          type:
                            type: string
                            const: data_source
                          valueType:
                            type: string
                            enum:
                              - unit_count
                              - count
                              - sum
                          valueColumn:
                            anyOf:
                              - type: string
                              - type: 'null'
                          unit:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - name
                          - rowFilters
                          - type
                          - valueType
                          - valueColumn
                          - unit
                        additionalProperties: false
                  required:
                    - type
                    - table
                    - path
                    - timestampColumn
                    - columnTypes
                    - values
                  additionalProperties: false
              required:
                - datasource
                - dimensions
                - chartType
                - dateRange
                - type
                - dataset
              additionalProperties: false
      required:
        - id
        - dateCreated
        - dateUpdated
        - datasource
        - status
        - dateStart
        - dateEnd
        - result
        - config
      additionalProperties: false
    VisualChange:
      type: object
      properties:
        description:
          type: string
        css:
          type: string
        js:
          type: string
        variation:
          type: string
        domMutations:
          type: array
          items:
            type: object
            properties:
              selector:
                type: string
              action:
                type: string
                enum:
                  - append
                  - set
                  - remove
              attribute:
                type: string
              value:
                type: string
              parentSelector:
                type: string
              insertBeforeSelector:
                type: string
            required:
              - selector
              - action
              - attribute
            additionalProperties: false
      required:
        - variation
      additionalProperties: false
    features:
      description: >-
        Map of feature ID to stale status. Only requested features that were
        found and readable are included.
      type: object
      propertyNames:
        type: string
      additionalProperties:
        type: object
        properties:
          featureId:
            description: The feature key
            type: string
          isStale:
            description: >-
              Whether the feature is considered stale overall (all enabled
              environments are stale). Always false when neverStale is true.
            type: boolean
          staleReason:
            description: >
              Reason for the feature's stale or non-stale status. `never-stale`
              when stale detection is disabled. Non-stale reasons:
              `recently-updated`, `active-draft`, `has-dependents`. Stale
              reasons: `no-rules`, `rules-one-sided`, `abandoned-draft`,
              `toggled-off`. Null when non-stale with no single cause (see
              staleByEnv).
            anyOf:
              - type: string
                enum:
                  - never-stale
                  - recently-updated
                  - active-draft
                  - has-dependents
                  - no-rules
                  - rules-one-sided
                  - abandoned-draft
                  - toggled-off
                  - active-experiment
                  - has-rules
              - type: 'null'
          neverStale:
            description: >-
              When true the feature is permanently excluded from stale
              detection.
            type: boolean
          staleByEnv:
            description: >-
              Per-environment staleness breakdown, keyed by environment ID.
              Present when environments exist and neverStale is false.
            type: object
            propertyNames:
              type: string
            additionalProperties:
              type: object
              properties:
                isStale:
                  description: Whether this environment is stale
                  type: boolean
                reason:
                  description: Reason for the stale status in this environment
                  anyOf:
                    - type: string
                      enum:
                        - no-rules
                        - rules-one-sided
                        - abandoned-draft
                        - toggled-off
                        - active-experiment
                        - has-rules
                        - recently-updated
                        - active-draft
                        - has-dependents
                    - type: 'null'
                evaluatesTo:
                  description: >
                    The deterministic value this feature evaluates to in this
                    environment. Uses the same raw string encoding as
                    `feature.defaultValue`. Only present when the value is
                    deterministic or the environment is toggled off.
                  type: string
              required:
                - isStale
                - reason
              additionalProperties: false
        required:
          - featureId
          - isStale
          - staleReason
          - neverStale
        additionalProperties: false
    conflicts:
      type: object
      properties:
        name:
          type: string
        key:
          type: string
        resolved:
          type: boolean
        base:
          type: string
        live:
          type: string
        revision:
          type: string
      required:
        - name
        - key
        - resolved
        - base
        - live
        - revision
      additionalProperties: false
    result:
      type: object
      properties:
        defaultValue:
          type: string
        rules:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  description:
                    type: string
                  condition:
                    type: string
                  id:
                    type: string
                  allEnvironments:
                    type: boolean
                  environments:
                    type: array
                    items:
                      type: string
                  enabled:
                    type: boolean
                  scheduleRules:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          anyOf:
                            - type: string
                            - type: 'null'
                        enabled:
                          type: boolean
                      required:
                        - timestamp
                        - enabled
                      additionalProperties: false
                  savedGroups:
                    type: array
                    items:
                      type: object
                      properties:
                        match:
                          type: string
                          enum:
                            - all
                            - none
                            - any
                        ids:
                          type: array
                          items:
                            type: string
                      required:
                        - match
                        - ids
                      additionalProperties: false
                  prerequisites:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        condition:
                          type: string
                      required:
                        - id
                        - condition
                      additionalProperties: false
                  scheduleType:
                    type: string
                    enum:
                      - none
                      - schedule
                      - ramp
                  type:
                    type: string
                    const: force
                  value:
                    type: string
                required:
                  - description
                  - id
                  - allEnvironments
                  - type
                  - value
                additionalProperties: false
              - type: object
                properties:
                  description:
                    type: string
                  condition:
                    type: string
                  id:
                    type: string
                  allEnvironments:
                    type: boolean
                  environments:
                    type: array
                    items:
                      type: string
                  enabled:
                    type: boolean
                  scheduleRules:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          anyOf:
                            - type: string
                            - type: 'null'
                        enabled:
                          type: boolean
                      required:
                        - timestamp
                        - enabled
                      additionalProperties: false
                  savedGroups:
                    type: array
                    items:
                      type: object
                      properties:
                        match:
                          type: string
                          enum:
                            - all
                            - none
                            - any
                        ids:
                          type: array
                          items:
                            type: string
                      required:
                        - match
                        - ids
                      additionalProperties: false
                  prerequisites:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        condition:
                          type: string
                      required:
                        - id
                        - condition
                      additionalProperties: false
                  scheduleType:
                    type: string
                    enum:
                      - none
                      - schedule
                      - ramp
                  type:
                    type: string
                    const: rollout
                  value:
                    type: string
                  coverage:
                    type: number
                  hashAttribute:
                    type: string
                  seed:
                    type: string
                required:
                  - description
                  - id
                  - allEnvironments
                  - type
                  - value
                  - coverage
                  - hashAttribute
                additionalProperties: false
              - type: object
                properties:
                  description:
                    type: string
                  condition:
                    type: string
                  id:
                    type: string
                  allEnvironments:
                    type: boolean
                  environments:
                    type: array
                    items:
                      type: string
                  enabled:
                    type: boolean
                  scheduleRules:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          anyOf:
                            - type: string
                            - type: 'null'
                        enabled:
                          type: boolean
                      required:
                        - timestamp
                        - enabled
                      additionalProperties: false
                  savedGroups:
                    type: array
                    items:
                      type: object
                      properties:
                        match:
                          type: string
                          enum:
                            - all
                            - none
                            - any
                        ids:
                          type: array
                          items:
                            type: string
                      required:
                        - match
                        - ids
                      additionalProperties: false
                  prerequisites:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        condition:
                          type: string
                      required:
                        - id
                        - condition
                      additionalProperties: false
                  scheduleType:
                    type: string
                    enum:
                      - none
                      - schedule
                      - ramp
                  type:
                    type: string
                    const: experiment
                  experimentType:
                    type: string
                    enum:
                      - standard
                      - multi-armed-bandit
                  hypothesis:
                    type: string
                  trackingKey:
                    type: string
                  hashAttribute:
                    type: string
                  fallbackAttribute:
                    type: string
                  hashVersion:
                    type: number
                  disableStickyBucketing:
                    type: boolean
                  bucketVersion:
                    type: number
                  minBucketVersion:
                    type: number
                  namespace:
                    anyOf:
                      - type: object
                        properties:
                          enabled:
                            type: boolean
                          name:
                            type: string
                          range:
                            type: array
                            prefixItems:
                              - type: number
                              - type: number
                          format:
                            type: string
                            const: legacy
                        required:
                          - enabled
                          - name
                          - range
                        additionalProperties: false
                      - type: object
                        properties:
                          enabled:
                            type: boolean
                          name:
                            type: string
                          ranges:
                            type: array
                            items:
                              type: array
                              prefixItems:
                                - type: number
                                - type: number
                          hashAttribute:
                            type: string
                          hashVersion:
                            type: number
                          format:
                            type: string
                            const: multiRange
                        required:
                          - enabled
                          - name
                          - ranges
                          - format
                        additionalProperties: false
                  coverage:
                    type: number
                  datasource:
                    type: string
                  exposureQueryId:
                    type: string
                  goalMetrics:
                    type: array
                    items:
                      type: string
                  secondaryMetrics:
                    type: array
                    items:
                      type: string
                  guardrailMetrics:
                    type: array
                    items:
                      type: string
                  activationMetric:
                    type: string
                  segment:
                    type: string
                  skipPartialData:
                    type: boolean
                  values:
                    type: array
                    items:
                      type: object
                      properties:
                        value:
                          type: string
                        weight:
                          type: number
                        name:
                          type: string
                      required:
                        - value
                        - weight
                      additionalProperties: false
                  regressionAdjustmentEnabled:
                    type: boolean
                  sequentialTestingEnabled:
                    type: boolean
                  sequentialTestingTuningParameter:
                    type: number
                  statsEngine:
                    type: string
                    enum:
                      - bayesian
                      - frequentist
                  banditStage:
                    type: string
                    enum:
                      - explore
                      - exploit
                      - paused
                  banditStageDateStarted: {}
                  banditScheduleValue:
                    type: number
                  banditScheduleUnit:
                    type: string
                    enum:
                      - hours
                      - days
                  banditBurnInValue:
                    type: number
                  banditBurnInUnit:
                    type: string
                    enum:
                      - hours
                      - days
                  banditConversionWindowValue:
                    anyOf:
                      - type: number
                      - type: 'null'
                  banditConversionWindowUnit:
                    anyOf:
                      - type: string
                        enum:
                          - hours
                          - days
                      - type: 'null'
                  templateId:
                    type: string
                  customFields:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                required:
                  - description
                  - id
                  - allEnvironments
                  - type
                  - trackingKey
                  - hashAttribute
                  - values
                additionalProperties: false
              - type: object
                properties:
                  description:
                    type: string
                  condition:
                    type: string
                  id:
                    type: string
                  allEnvironments:
                    type: boolean
                  environments:
                    type: array
                    items:
                      type: string
                  enabled:
                    type: boolean
                  scheduleRules:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          anyOf:
                            - type: string
                            - type: 'null'
                        enabled:
                          type: boolean
                      required:
                        - timestamp
                        - enabled
                      additionalProperties: false
                  savedGroups:
                    type: array
                    items:
                      type: object
                      properties:
                        match:
                          type: string
                          enum:
                            - all
                            - none
                            - any
                        ids:
                          type: array
                          items:
                            type: string
                      required:
                        - match
                        - ids
                      additionalProperties: false
                  prerequisites:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        condition:
                          type: string
                      required:
                        - id
                        - condition
                      additionalProperties: false
                  scheduleType:
                    type: string
                    enum:
                      - none
                      - schedule
                      - ramp
                  type:
                    type: string
                    const: experiment-ref
                  experimentId:
                    type: string
                  variations:
                    type: array
                    items:
                      type: object
                      properties:
                        variationId:
                          type: string
                        value:
                          type: string
                      required:
                        - variationId
                        - value
                      additionalProperties: false
                required:
                  - description
                  - id
                  - allEnvironments
                  - type
                  - experimentId
                  - variations
                additionalProperties: false
              - type: object
                properties:
                  description:
                    type: string
                  condition:
                    type: string
                  id:
                    type: string
                  allEnvironments:
                    type: boolean
                  environments:
                    type: array
                    items:
                      type: string
                  enabled:
                    type: boolean
                  scheduleRules:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          anyOf:
                            - type: string
                            - type: 'null'
                        enabled:
                          type: boolean
                      required:
                        - timestamp
                        - enabled
                      additionalProperties: false
                  savedGroups:
                    type: array
                    items:
                      type: object
                      properties:
                        match:
                          type: string
                          enum:
                            - all
                            - none
                            - any
                        ids:
                          type: array
                          items:
                            type: string
                      required:
                        - match
                        - ids
                      additionalProperties: false
                  prerequisites:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        condition:
                          type: string
                      required:
                        - id
                        - condition
                      additionalProperties: false
                  scheduleType:
                    type: string
                    enum:
                      - none
                      - schedule
                      - ramp
                  type:
                    type: string
                    const: safe-rollout
                  controlValue:
                    type: string
                  variationValue:
                    type: string
                  safeRolloutId:
                    type: string
                  status:
                    default: running
                    type: string
                    enum:
                      - running
                      - rolled-back
                      - released
                      - stopped
                  hashAttribute:
                    type: string
                  seed:
                    type: string
                  trackingKey:
                    type: string
                required:
                  - description
                  - id
                  - allEnvironments
                  - type
                  - controlValue
                  - variationValue
                  - safeRolloutId
                  - status
                  - hashAttribute
                  - seed
                  - trackingKey
                additionalProperties: false
        environmentsEnabled:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: boolean
        prerequisites:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              condition:
                type: string
            required:
              - id
              - condition
            additionalProperties: false
        archived:
          type: boolean
        metadata:
          type: object
          properties:
            releaseType:
              type: string
            riskLevel:
              type: string
          additionalProperties: {}
        holdout:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                value:
                  type: string
              required:
                - id
                - value
              additionalProperties: false
            - type: 'null'
      additionalProperties: false
    snapshot:
      type: object
      properties:
        id:
          type: string
        experiment:
          type: string
        status:
          type: string
      required:
        - id
        - experiment
        - status
      additionalProperties: false
    screenshot:
      type: object
      properties:
        path:
          description: URL or path to the uploaded screenshot
          type: string
        description:
          description: Description of the screenshot
          type: string
      required:
        - path
        - description
      additionalProperties: false
    experiments:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      additionalProperties: false
    updatedMember:
      type: object
      properties:
        id:
          type: string
        role:
          type: string
        environments:
          type: array
          items:
            type: string
        limitAccessByEnvironment:
          type: boolean
        projectRoles:
          type: array
          items:
            type: object
            properties:
              project:
                type: string
              role:
                type: string
              limitAccessByEnvironment:
                type: boolean
              environments:
                type: array
                items:
                  type: string
            required:
              - project
              - role
              - limitAccessByEnvironment
              - environments
            additionalProperties: false
      required:
        - id
        - role
        - environments
        - limitAccessByEnvironment
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        If using Bearer auth, pass the Secret Key as the token:

        ```bash

        curl https://api.growthbook.io/api/v1/features   -H "Authorization:
        Bearer secret_abc123DEF456"

        ```
    basicAuth:
      type: http
      scheme: basic
      description: >
        If using HTTP Basic auth, pass the Secret Key as the username and leave
        the password blank:

        ```bash

        curl https://api.growthbook.io/api/v1/features   -u secret_abc123DEF456:

        # The ":" at the end stops curl from asking for a password

        ```
x-tagGroups:
  - name: Endpoints
    tags:
      - projects
      - environments
      - features-v2
      - feature-revisions-v2
      - features
      - feature-revisions
      - ramp-schedules
      - data-sources
      - fact-tables
      - fact-metrics
      - metrics
      - experiments
      - namespaces
      - snapshots
      - dimensions
      - segments
      - sdk-connections
      - visual-changesets
      - saved-groups
      - organizations
      - members
      - code-references
      - archetypes
      - queries
      - settings
      - attributes
      - usage
      - Dashboards
      - CustomFields
      - MetricGroups
      - Teams
      - ExperimentTemplates
      - AnalyticsExplorations
      - RampScheduleTemplates
  - name: Models
    tags:
      - AnalyticsExploration_model
      - Archetype_model
      - Attribute_model
      - CodeRef_model
      - CustomField_model
      - Dashboard_model
      - DataSource_model
      - Dimension_model
      - Environment_model
      - Experiment_model
      - ExperimentAnalysisSettings_model
      - ExperimentDecisionFrameworkSettings_model
      - ExperimentMetric_model
      - ExperimentMetricOverrideEntry_model
      - ExperimentResults_model
      - ExperimentSnapshot_model
      - ExperimentTemplate_model
      - ExperimentWithEnhancedStatus_model
      - FactMetric_model
      - FactTable_model
      - FactTableColumn_model
      - FactTableFilter_model
      - Feature_model
      - FeatureBaseRule_model
      - FeatureDefinition_model
      - FeatureEnvironment_model
      - FeatureEnvironmentV2_model
      - FeatureExperimentRefRule_model
      - FeatureExperimentRule_model
      - FeatureForceRule_model
      - FeatureRevision_model
      - FeatureRevisionV2_model
      - FeatureRolloutRule_model
      - FeatureRule_model
      - FeatureRuleV2_model
      - FeatureSafeRolloutRule_model
      - FeatureV2_model
      - FeatureWithRevisions_model
      - FeatureWithRevisionsV2_model
      - InformationSchema_model
      - InformationSchemaTable_model
      - LookbackOverride_model
      - Member_model
      - Metric_model
      - MetricAnalysis_model
      - MetricGroup_model
      - MetricUsage_model
      - Namespace_model
      - NamespaceExperimentMember_model
      - Organization_model
      - PaginationFields_model
      - Project_model
      - Query_model
      - RampSchedule_model
      - RampScheduleTemplate_model
      - SavedGroup_model
      - ScheduleRule_model
      - SdkConnection_model
      - Segment_model
      - Settings_model
      - Team_model
      - VisualChange_model
      - VisualChangeset_model
