> ## Documentation Index
> Fetch the complete documentation index at: https://docs.growthbook.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Partially update a feature

> Updates the Feature Flag and immediately publishes a new revision. The caller needs Edit access in the Feature Flag's Project and Publish access for every affected environment. When approval is required, use the revision endpoints instead, unless the caller can bypass draft approvals.

Other top-level fields are patch-merged: omit a field to leave it unchanged. The `rules` field, when supplied, replaces the entire `rules` array in one operation. To preserve existing rules, fetch the Feature Flag, update the returned `rules` array, and send the complete array back. Safe-rollout rules round-trip through `safeRolloutId`; use `POST /v2/features/:id/revisions/:version/rules` to create new ones.



## OpenAPI

````yaml openapi.yaml POST /v2/features/{id}
openapi: 3.1.0
info:
  version: 5.1.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. Feature-flag and metric
    v1 routes are deprecated: they are tagged **LEGACY** in the sidebar and
    collapsed by default. Use the matching v2 group when both exist.


    ## 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, or less if the token's
    permissions are limited. These can be created by going to `Personal Access
    Tokens` under your user menu. Members with the API Keys **Manage members'
    tokens** permission can disable a member's token under `Settings -> Manage
    PATs`, and admins can require new tokens to expire within a maximum
    lifetime.

    - **Secret Keys**: These are sensitive and provide the level of access of
    the role they are given, which can be any built-in or custom role, with
    optional per-project role overrides and environment limits. Managing Secret
    Keys on behalf of an organization takes the [API Keys
    permissions](/account/user-permissions). These can be created by going to
    `Settings -> API Keys`, where Admins can also require new Secret Keys to
    expire within a maximum lifetime.


    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"

    ```


    If a key has an expiration date, every response includes it in the
    `X-GrowthBook-Key-Expires-At` header (ISO 8601), so scripts can warn before
    the key stops working. Requests made with an expired key fail with a `401`
    that says where to create a replacement. See
    [Expiration](/integrations/ai-agents/api-keys#expiration) for choosing a
    key's expiration, the warnings before it lapses, and the organization
    policies.


    ## Naming who asked


    Requests made with a Secret Key may add an `X-GrowthBook-Requested-By`
    header naming the organization member who asked for the change, as a user id
    or an email address. History, revision logs and webhooks show that member
    next to the key.


    Each key acts as **System** (the default) or **User**, set under `Settings
    -> API Keys`:


    - **System**: the header is optional. The key acts as itself, with its own
    permissions, and the named member is only recorded in history.

    - **User**: a request without the header is rejected with a 400. The request
    acts as the named member, with only what both the key and the member can do,
    so the header can narrow a key but never widen it. Drafts, owners, `mine`
    filters and reviews are the member's. The member's rights over their own
    drafts, comments and verdicts apply only where the key's own role allows the
    same action.


    A System key, or any key that names no one, acts as itself: it can draft and
    review with its own permissions, and its verdicts are judged on its role. A
    key belongs to no team, so its approval never satisfies a rule that requires
    approval from a team. No one can rule on a draft they created, and a key
    acting as itself can't rule on a draft it created or edited. An approval a
    User key gives counts only where both the key and the member could approve,
    and stops counting if the key is disabled, expires or is deleted. Because
    the header isn't verified, whoever holds the key can act as any member. A
    value that does not match a member of the organization is rejected with a
    400. A create request that omits `owner` defaults it to the member a User
    key names. Scheduled and auto-publishes run later with the permissions of
    the request that armed them, and don't run if that member has left the
    organization, the key has expired, or the key no longer acts as User.
    Personal Access Tokens and OAuth tokens already act as their user and reject
    the header.


    ```bash

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

    -H "Authorization: Bearer secret_abc123DEF456" \

    -H "X-GrowthBook-Requested-By: alice@example.com"

    ```


    ## Naming and human review


    People review what the API creates in the GrowthBook UI.


    - Keep keys and names short (2-5 words). Follow your organization's Feature
    Flag key format (`featureRegexValidator` and `featureKeyExample` in `GET
    /v1/settings`), or use kebab-case if it has none. Feature Flag keys can't be
    changed after creation, and an experiment's tracking key shouldn't change
    after launch.

    - Put context (why, plan, tickets, links) in `description`, not in names or
    keys.

    - Group with `tags`, not name prefixes. Projects (`project` or `projects`)
    control access and where a resource can be used, so set them deliberately
    instead of using them as labels.

    - To create a Feature Flag disabled with `POST /v2/features`, list every
    environment in `environments` with `enabled: false` (on `POST /v1/features`,
    each entry also needs `rules: []`). An environment you leave out uses its
    default state, which may be enabled.

    - Leave publishing and production changes to a person unless asked.

    - If a request is blocked (an approval requirement, a warning, a Custom
    Hook, schema validation or a permission error), stop and ask a person. Don't
    retry with an override field, a different key or another workaround unless a
    person asked you to. If a write answers `202` with a `confirmation`, give a
    person its `url` and wait (see [Waiting for
    confirmation](#waiting-for-confirmation)).


    ## Waiting for confirmation


    A key can require a person to confirm some writes before they run (see [API
    Keys for Agents](/integrations/ai-agents/api-keys#require-confirmation)). A
    held write doesn't run. It answers `202 Accepted` with the confirmation, a
    `Location` header to poll, and a `Retry-After` header with the seconds to
    wait between polls:


    ```json

    {
      "confirmation": {
        "id": "cnf_abc123",
        "status": "pending",
        "actions": [
          { "action": "feature.publish", "environments": ["production"] }
        ],
        "summary": "Publish revision 3 of checkout-redesign",
        "url": "https://app.growthbook.io/confirmations/cnf_abc123",
        "expiresAt": "2026-10-15T18:00:00.000Z",
        "response": null,
        "note": null
      },
      "message": "A person must confirm this in GrowthBook. Give them the url, then poll the Location."
    }

    ```


    Give the person the `url`, then poll [`GET
    /v1/confirmations/{id}`](/api/meta/operation/getConfirmation). Pass `wait`
    (in seconds, up to 30) to hold the poll open until the status changes:


    ```bash

    curl "https://api.growthbook.io/api/v1/confirmations/cnf_abc123?wait=30" \

    -H "Authorization: Bearer secret_abc123DEF456"

    ```


    | `status`    |
    Meaning                                                                                                              
    |

    | ----------- |
    ---------------------------------------------------------------------------------------------------------------------
    |

    | `pending`   | Waiting for a person, until `expiresAt` (an hour after the
    request)                                                   |

    | `running`   | Confirmed, and running
    now                                                                                           
    |

    | `completed` | It ran. `response` holds the status and body the request
    returned, which may be an error                              |

    | `rejected`  | A person declined it, and nothing
    ran                                                                                
    |

    | `expired`   | Nobody decided in time, or it acts on something that changed
    after it was held (with a `400` `response`). Nothing ran |


    `note` carries anything the person left for the agent when they decided.
    `actions` lists what the request was held for, each with the environments it
    touches.


    - Only the key that made the request, or another token of the same person,
    can read the confirmation.

    - Sending the same request again while it's pending returns the same
    confirmation.

    - A request that publishes, reverts or archives, or that changes a Feature
    Flag or an Experiment's status, schedule, targeting or traffic, isn't run if
    what it acts on changed after it was held. Other writes, such as editing
    settings or a draft, run as sent, so they can overwrite changes made while
    they waited.

    - A confirmed request runs once, with the key's permissions (or the member's
    role it assumes), not the confirmer's. Send it again to retry, which asks
    for a new confirmation.

    - Confirming isn't a review approval.


    ## 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

    - **422** - Unprocessable Entity - The request is valid, but a warning,
    validation rule, approval requirement, or another publishing gate blocked
    it. Do not assume that `ignoreWarnings` clears every 422 response.

    - **429** - Too Many Requests - You exceeded the rate limit of 60 requests
    per minute, or the limit your self-hosted server sets. 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


    ### Publishing gates


    Automated callers, including AI agents, should report a blocked response to
    a person instead of retrying with an override. Use an override only when a
    person has explicitly asked for it.


    Publish responses include a `gates` array that explains every blocker:


    - `type`, `severity`, and `messages` identify the problem.

    - `override` names the request-body field that can bypass it. This is
    `ignoreWarnings` for warnings, `skipSchemaValidation` for schema and
    invariant failures, or `skipHooks` for Custom Hook rejections. A value of
    `null` means there is no request-body override.

    - `requiresPermission` identifies any additional permission needed to use
    the override.

    - `resolution` provides an API action, method, and path when the blocker
    must be resolved another way.


    For example, an approval gate is cleared by approving the revision or by
    using a caller with **Bypass draft approvals** access. A Config lock is
    cleared through the unlock route in `resolution`.


    When a successful publish bypasses a gate, the response includes
    `bypassedGates`. Each entry reports the gate `type` and how it was bypassed
    in `via`, which is one of `ignoreWarnings`, `skipSchemaValidation`,
    `skipHooks`, `bypassApprovalPermission`, `restApiBypassesReviews`, or
    `revertsBypassApproval` (reverts only). This field is omitted when no gates
    were bypassed.
servers:
  - url: https://api.growthbook.io/api
    description: GrowthBook Cloud
  - url: https://{domain}/api
    description: Self-hosted GrowthBook
    variables:
      domain:
        default: localhost:3100
        description: Your self-hosted GrowthBook host (and port)
security:
  - bearerAuth: []
  - basicAuth: []
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 programmatically.


      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 programmatically.


      **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 increase feature rule traffic
      over time, with optional real-time monitoring. Each step supports interval
      timers, approval gates, and hold conditions. Monitored steps are backed by
      a live analysis experiment that can automatically hold, roll back, or
      advance the ramp based on guardrail and signal metric health.
  - 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: reports
    x-displayName: Experiment Reports
    description: >-
      Custom analysis reports built on top of experiment snapshots. Reports let
      you re-run analysis with different metrics, date ranges, stats engines,
      and other settings without modifying the underlying experiment.
  - 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: saved-group-revisions
    x-displayName: Saved Group Revisions
    description: >-
      Draft revisions for saved groups, including pending changes, approvals,
      and lifecycle (publish, discard, revert).


      Most callers can interact with these endpoints via shorthand actions
      (`/items/add`, `/items/remove`, single-field PUTs) instead of authoring
      JSON Patch ops directly. Pass `version: "new"` on edit endpoints to
      auto-create a draft.
  - name: constants
    x-displayName: Constants
    description: >-
      **Beta** — these endpoints are new and may change in
      backwards-incompatible ways.


      Reusable named values referenced from feature flag values as `@const:key`
      and resolved into the SDK payload at build time. String constants are
      interpolated via `{{ @const:key }}`; JSON (object) constants are composed
      via an `$extends` array. A constant's own keys **replace** what its
      `$extends` bases provide, wholesale — constants are atomic building
      blocks. (Config and feature values compose as deep, targeted patches
      instead.)
  - name: constant-revisions
    x-displayName: Constant Revisions
    description: >-
      **Beta** — these endpoints are new and may change in
      backwards-incompatible ways.


      Draft revisions for constants, including pending changes, approvals, and
      lifecycle (publish, discard, revert). Pass `version: "new"` on edit
      endpoints to auto-create a draft.
  - name: configs
    x-displayName: Configs
    description: >-
      **Beta** — these endpoints are new and may change in
      backwards-incompatible ways.


      Reusable, typed, inheritable JSON objects referenced from feature flag
      values as `@config:key`. A config carries a field `schema` (with
      TypeScript/JSON Schema import-export) and a lineage `parent`. Inheritance
      is expressed via `parent`, never an in-value `@config:` entry. Values
      layer as a **deep, targeted patch**: a child (or a config-backed feature
      value) restates only the leaves it changes and inherits the rest — unlike
      a constant's `$extends`, whose own keys replace wholesale. Schema fields
      colliding with a published ancestor's key follow 'base wins': identical
      re-declarations are stripped with a warning, differing ones are rejected.
  - name: config-revisions
    x-displayName: Config Revisions
    description: >-
      **Beta** — these endpoints are new and may change in
      backwards-incompatible ways.


      Draft revisions for configs, including value and schema edits, schema
      import (JSON Schema / TypeScript / inferred), approvals, and lifecycle
      (publish, discard, revert). Publishing a schema change cascades the "base
      wins" normalization to descendant configs; a publish that removes or
      retypes fields descendants still use soft-blocks with a 422 unless the
      request body sets `ignoreWarnings: true`. Pass `version: "new"` on edit
      endpoints to auto-create a draft.
  - name: releases
    x-displayName: Releases
    description: >-
      **Beta** — these endpoints are new and may change in
      backwards-incompatible ways.


      Coordinated multi-entity publishing: publish a set of revisions across
      Feature Flags, Saved Groups, configs, and constants as one all-or-nothing
      operation, validated against the combined end-state instead of each
      in-between state. Requires the `releases` commercial feature.
  - name: custom-hooks
    x-displayName: Custom Hooks
    description: >-
      Sandboxed JavaScript validation hooks that run when features, configs, or
      their revisions are saved or published. Throwing an Error blocks the save;
      `addWarning(msg)` raises a soft warning. Hooks are scoped by projects, or
      pinned to a single feature/config via `entityType`/`entityId`; a
      config-scoped hook also runs for every config inheriting from it (its
      whole descendant lineage). Scope can be retargeted on update (or cleared
      with nulls). Requires an enterprise plan; not available on GrowthBook
      Cloud.
  - 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: meta
    x-displayName: Meta
    description: >-
      Server metadata, including the running build's version and commit for
      version-skew checks.
  - name: ContextualBandits
    x-displayName: Contextual Bandits
    description: ''
  - name: Dashboards
    x-displayName: Dashboards
    description: ''
  - name: ContextualBanditQueries
    x-displayName: Contextual Bandit Queries
    description: ''
  - name: Interleavings
    x-displayName: Interleaving Experiments
    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: Learnings
    x-displayName: Learnings
    description: >-
      Saved learnings captured across experiments, including AI-discovered
      patterns.
  - name: Holdouts
    x-displayName: Holdouts
    description: >-
      Hold a share of traffic out of all experiments to measure their combined
      effect.
  - name: AutoRuns
    x-displayName: Auto Runs
    description: ''
  - name: Populations
    x-displayName: Populations
    description: >-
      **Beta** — these endpoints are new and may change in
      backwards-incompatible ways.


      Populations define a set of units by the steps they must complete, such as
      appearing in a fact table. Populations are not yet used in analysis.
  - name: AggregatedFactTable_model
    x-displayName: Aggregated Fact Table
    description: <SchemaDefinition schemaRef="#/components/schemas/AggregatedFactTable" />
  - name: AnalyticsExploration_model
    x-displayName: Analytics Exploration
    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: AutoRun_model
    x-displayName: Auto Run
    description: <SchemaDefinition schemaRef="#/components/schemas/AutoRun" />
  - name: CodeRef_model
    x-displayName: Code Ref
    description: <SchemaDefinition schemaRef="#/components/schemas/CodeRef" />
  - name: Config_model
    x-displayName: Config
    description: <SchemaDefinition schemaRef="#/components/schemas/Config" />
  - name: ConfigKeyUsage_model
    x-displayName: Config Key Usage
    description: <SchemaDefinition schemaRef="#/components/schemas/ConfigKeyUsage" />
  - name: ConfigLineage_model
    x-displayName: Config Lineage
    description: <SchemaDefinition schemaRef="#/components/schemas/ConfigLineage" />
  - name: ConfigReferences_model
    x-displayName: Config References
    description: <SchemaDefinition schemaRef="#/components/schemas/ConfigReferences" />
  - name: ConfigRevision_model
    x-displayName: Config Revision
    description: <SchemaDefinition schemaRef="#/components/schemas/ConfigRevision" />
  - name: ConfigRevisionActivityLogEntry_model
    x-displayName: Config Revision Activity Log Entry
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/ConfigRevisionActivityLogEntry" />
  - name: ConfigRevisionRef_model
    x-displayName: Config Revision Ref
    description: <SchemaDefinition schemaRef="#/components/schemas/ConfigRevisionRef" />
  - name: ConfigRevisionReview_model
    x-displayName: Config Revision Review
    description: <SchemaDefinition schemaRef="#/components/schemas/ConfigRevisionReview" />
  - name: ConfigSchemaExport_model
    x-displayName: Config Schema Export
    description: <SchemaDefinition schemaRef="#/components/schemas/ConfigSchemaExport" />
  - name: ConfigSchemaSource_model
    x-displayName: Config Schema Source
    description: <SchemaDefinition schemaRef="#/components/schemas/ConfigSchemaSource" />
  - name: ConfigSchemaVerify_model
    x-displayName: Config Schema Verify
    description: <SchemaDefinition schemaRef="#/components/schemas/ConfigSchemaVerify" />
  - name: ConfigSchemaWarning_model
    x-displayName: Config Schema Warning
    description: <SchemaDefinition schemaRef="#/components/schemas/ConfigSchemaWarning" />
  - name: Confirmation_model
    x-displayName: Confirmation
    description: <SchemaDefinition schemaRef="#/components/schemas/Confirmation" />
  - name: ConfirmationHeld_model
    x-displayName: Confirmation Held
    description: <SchemaDefinition schemaRef="#/components/schemas/ConfirmationHeld" />
  - name: Constant_model
    x-displayName: Constant
    description: <SchemaDefinition schemaRef="#/components/schemas/Constant" />
  - name: ConstantReferences_model
    x-displayName: Constant References
    description: <SchemaDefinition schemaRef="#/components/schemas/ConstantReferences" />
  - name: ConstantRevision_model
    x-displayName: Constant Revision
    description: <SchemaDefinition schemaRef="#/components/schemas/ConstantRevision" />
  - name: ConstantRevisionActivityLogEntry_model
    x-displayName: Constant Revision Activity Log Entry
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/ConstantRevisionActivityLogEntry" />
  - name: ConstantRevisionRef_model
    x-displayName: Constant Revision Ref
    description: <SchemaDefinition schemaRef="#/components/schemas/ConstantRevisionRef" />
  - name: ConstantRevisionReview_model
    x-displayName: Constant Revision Review
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/ConstantRevisionReview"
      />
  - name: ContextualBandit_model
    x-displayName: Contextual Bandit
    description: <SchemaDefinition schemaRef="#/components/schemas/ContextualBandit" />
  - name: ContextualBanditQuery_model
    x-displayName: Contextual Bandit Query
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/ContextualBanditQuery"
      />
  - name: CustomField_model
    x-displayName: Custom Field
    description: <SchemaDefinition schemaRef="#/components/schemas/CustomField" />
  - name: CustomHook_model
    x-displayName: Custom Hook
    description: <SchemaDefinition schemaRef="#/components/schemas/CustomHook" />
  - name: Dashboard_model
    x-displayName: Dashboard
    description: <SchemaDefinition schemaRef="#/components/schemas/Dashboard" />
  - name: DataSource_model
    x-displayName: Data Source
    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: EventUser_model
    x-displayName: Event User
    description: <SchemaDefinition schemaRef="#/components/schemas/EventUser" />
  - name: Experiment_model
    x-displayName: Experiment
    description: <SchemaDefinition schemaRef="#/components/schemas/Experiment" />
  - name: Experiment Rule_model
    x-displayName: Experiment Rule
    description: <SchemaDefinition schemaRef="#/components/schemas/Experiment Rule" />
  - name: ExperimentAnalysisSettings_model
    x-displayName: Experiment Analysis Settings
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/ExperimentAnalysisSettings" />
  - name: ExperimentDecisionFrameworkSettings_model
    x-displayName: Experiment Decision Framework Settings
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/ExperimentDecisionFrameworkSettings" />
  - name: ExperimentMetric_model
    x-displayName: Experiment Metric
    description: <SchemaDefinition schemaRef="#/components/schemas/ExperimentMetric" />
  - name: ExperimentMetricOverrideEntry_model
    x-displayName: Experiment Metric Override Entry
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/ExperimentMetricOverrideEntry" />
  - name: ExperimentResults_model
    x-displayName: Experiment Results
    description: <SchemaDefinition schemaRef="#/components/schemas/ExperimentResults" />
  - name: ExperimentSnapshot_model
    x-displayName: Experiment Snapshot
    description: <SchemaDefinition schemaRef="#/components/schemas/ExperimentSnapshot" />
  - name: ExperimentTemplate_model
    x-displayName: Experiment Template
    description: <SchemaDefinition schemaRef="#/components/schemas/ExperimentTemplate" />
  - name: ExperimentWithEnhancedStatus_model
    x-displayName: Experiment With Enhanced Status
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/ExperimentWithEnhancedStatus" />
  - name: FactMetric_model
    x-displayName: Fact Metric
    description: <SchemaDefinition schemaRef="#/components/schemas/FactMetric" />
  - name: FactTable_model
    x-displayName: Fact Table
    description: <SchemaDefinition schemaRef="#/components/schemas/FactTable" />
  - name: FactTableColumn_model
    x-displayName: Fact Table Column
    description: <SchemaDefinition schemaRef="#/components/schemas/FactTableColumn" />
  - name: FactTableFilter_model
    x-displayName: Fact Table Filter
    description: <SchemaDefinition schemaRef="#/components/schemas/FactTableFilter" />
  - name: FeatureBaseRule_model
    x-displayName: Feature Base Rule
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureBaseRule" />
  - name: FeatureContextualBanditRefRule_model
    x-displayName: Feature Contextual Bandit Ref Rule
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/FeatureContextualBanditRefRule" />
  - name: FeatureDefinition_model
    x-displayName: Feature Definition
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureDefinition" />
  - name: FeatureEnvironmentV1_model
    x-displayName: Feature Environment V1
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureEnvironmentV1" />
  - name: FeatureEnvironmentV2_model
    x-displayName: Feature Environment V2
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureEnvironmentV2" />
  - name: FeatureExperimentRefRule_model
    x-displayName: Feature Experiment Ref Rule
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/FeatureExperimentRefRule" />
  - name: FeatureExperimentRule_model
    x-displayName: Feature Experiment Rule
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/FeatureExperimentRule"
      />
  - name: FeatureForceRule_model
    x-displayName: Feature Force Rule
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureForceRule" />
  - name: FeatureRevisionRef_model
    x-displayName: Feature Revision Ref
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureRevisionRef" />
  - name: FeatureRevisionSummary_model
    x-displayName: Feature Revision Summary
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/FeatureRevisionSummary"
      />
  - name: FeatureRevisionV1_model
    x-displayName: Feature Revision V1
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureRevisionV1" />
  - name: FeatureRevisionV2_model
    x-displayName: Feature Revision V2
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureRevisionV2" />
  - name: FeatureRolloutRule_model
    x-displayName: Feature Rollout Rule
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureRolloutRule" />
  - name: FeatureRuleV1_model
    x-displayName: Feature Rule V1
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureRuleV1" />
  - name: FeatureRuleV2_model
    x-displayName: Feature Rule V2
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureRuleV2" />
  - name: FeatureSafeRolloutRule_model
    x-displayName: Feature Safe Rollout Rule
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/FeatureSafeRolloutRule"
      />
  - name: FeatureV1_model
    x-displayName: Feature V1
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureV1" />
  - name: FeatureV2_model
    x-displayName: Feature V2
    description: <SchemaDefinition schemaRef="#/components/schemas/FeatureV2" />
  - name: FeatureWithRevisionsV1_model
    x-displayName: Feature With Revisions V1
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/FeatureWithRevisionsV1"
      />
  - name: FeatureWithRevisionsV2_model
    x-displayName: Feature With Revisions V2
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/FeatureWithRevisionsV2"
      />
  - name: Holdout_model
    x-displayName: Holdout
    description: <SchemaDefinition schemaRef="#/components/schemas/Holdout" />
  - name: InformationSchema_model
    x-displayName: Information Schema
    description: <SchemaDefinition schemaRef="#/components/schemas/InformationSchema" />
  - name: InformationSchemaTable_model
    x-displayName: Information Schema Table
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/InformationSchemaTable"
      />
  - name: Interleaving_model
    x-displayName: Interleaving
    description: <SchemaDefinition schemaRef="#/components/schemas/Interleaving" />
  - name: Learning_model
    x-displayName: Learning
    description: <SchemaDefinition schemaRef="#/components/schemas/Learning" />
  - name: LookbackOverride_model
    x-displayName: Lookback Override
    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: Metric Analysis
    description: <SchemaDefinition schemaRef="#/components/schemas/MetricAnalysis" />
  - name: MetricGroup_model
    x-displayName: Metric Group
    description: <SchemaDefinition schemaRef="#/components/schemas/MetricGroup" />
  - name: MetricUsage_model
    x-displayName: Metric Usage
    description: <SchemaDefinition schemaRef="#/components/schemas/MetricUsage" />
  - name: Namespace_model
    x-displayName: Namespace
    description: <SchemaDefinition schemaRef="#/components/schemas/Namespace" />
  - name: NamespaceExperimentMember_model
    x-displayName: Namespace Experiment Member
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/NamespaceExperimentMember" />
  - name: Organization_model
    x-displayName: Organization
    description: <SchemaDefinition schemaRef="#/components/schemas/Organization" />
  - name: PaginationFields_model
    x-displayName: Pagination Fields
    description: <SchemaDefinition schemaRef="#/components/schemas/PaginationFields" />
  - name: Population_model
    x-displayName: Population
    description: <SchemaDefinition schemaRef="#/components/schemas/Population" />
  - 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: Ramp Schedule
    description: <SchemaDefinition schemaRef="#/components/schemas/RampSchedule" />
  - name: RampScheduleTemplate_model
    x-displayName: Ramp Schedule Template
    description: <SchemaDefinition schemaRef="#/components/schemas/RampScheduleTemplate" />
  - name: Report_model
    x-displayName: Report
    description: <SchemaDefinition schemaRef="#/components/schemas/Report" />
  - name: RequireReviewRule_model
    x-displayName: Require Review Rule
    description: <SchemaDefinition schemaRef="#/components/schemas/RequireReviewRule" />
  - name: RequireReviewRuleInput_model
    x-displayName: Require Review Rule Input
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/RequireReviewRuleInput"
      />
  - name: RevisionIdRef_model
    x-displayName: Revision Id Ref
    description: <SchemaDefinition schemaRef="#/components/schemas/RevisionIdRef" />
  - name: Safe Rollout Rule_model
    x-displayName: Safe Rollout Rule
    description: <SchemaDefinition schemaRef="#/components/schemas/Safe Rollout Rule" />
  - name: SavedGroup_model
    x-displayName: Saved Group
    description: <SchemaDefinition schemaRef="#/components/schemas/SavedGroup" />
  - name: SavedGroupApprovalRule_model
    x-displayName: Saved Group Approval Rule
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/SavedGroupApprovalRule"
      />
  - name: SavedGroupReferenceResource_model
    x-displayName: Saved Group Reference Resource
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/SavedGroupReferenceResource" />
  - name: SavedGroupReferences_model
    x-displayName: Saved Group References
    description: <SchemaDefinition schemaRef="#/components/schemas/SavedGroupReferences" />
  - name: SavedGroupRevision_model
    x-displayName: Saved Group Revision
    description: <SchemaDefinition schemaRef="#/components/schemas/SavedGroupRevision" />
  - name: SavedGroupRevisionActivityLogEntry_model
    x-displayName: Saved Group Revision Activity Log Entry
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/SavedGroupRevisionActivityLogEntry" />
  - name: SavedGroupRevisionRef_model
    x-displayName: Saved Group Revision Ref
    description: >-
      <SchemaDefinition schemaRef="#/components/schemas/SavedGroupRevisionRef"
      />
  - name: SavedGroupRevisionReview_model
    x-displayName: Saved Group Revision Review
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/SavedGroupRevisionReview" />
  - name: ScheduleRule_model
    x-displayName: Schedule Rule
    description: <SchemaDefinition schemaRef="#/components/schemas/ScheduleRule" />
  - name: ScheduledStopPlan_model
    x-displayName: Scheduled Stop Plan
    description: <SchemaDefinition schemaRef="#/components/schemas/ScheduledStopPlan" />
  - name: SdkConnection_model
    x-displayName: Sdk Connection
    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: Targeting Rule_model
    x-displayName: Targeting Rule
    description: <SchemaDefinition schemaRef="#/components/schemas/Targeting Rule" />
  - name: TargetingReviewRule_model
    x-displayName: Targeting Review Rule
    description: <SchemaDefinition schemaRef="#/components/schemas/TargetingReviewRule" />
  - name: Team_model
    x-displayName: Team
    description: <SchemaDefinition schemaRef="#/components/schemas/Team" />
  - name: VisualChange_model
    x-displayName: Visual Change
    description: <SchemaDefinition schemaRef="#/components/schemas/VisualChange" />
  - name: VisualChangeset_model
    x-displayName: Visual Changeset
    description: <SchemaDefinition schemaRef="#/components/schemas/VisualChangeset" />
  - name: VisualEditorCbExperimentStub_model
    x-displayName: Visual Editor Cb Experiment Stub
    description: >-
      <SchemaDefinition
      schemaRef="#/components/schemas/VisualEditorCbExperimentStub" />
paths:
  /v2/features/{id}:
    post:
      tags:
        - features-v2
      summary: Partially update a feature
      description: >-
        Updates the Feature Flag and immediately publishes a new revision. The
        caller needs Edit access in the Feature Flag's Project and Publish
        access for every affected environment. When approval is required, use
        the revision endpoints instead, unless the caller can bypass draft
        approvals.


        Other top-level fields are patch-merged: omit a field to leave it
        unchanged. The `rules` field, when supplied, replaces the entire `rules`
        array in one operation. To preserve existing rules, fetch the Feature
        Flag, update the returned `rules` array, and send the complete array
        back. Safe-rollout rules round-trip through `safeRolloutId`; use `POST
        /v2/features/:id/revisions/:version/rules` to create new ones.
      operationId: updateFeatureV2
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/skipSchemaValidation'
        - $ref: '#/components/parameters/ignoreWarnings'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  description: >-
                    Markdown. What the Feature Flag gates and why, rollout plan,
                    and links. Put context here, not in the key.
                  type: string
                  maxLength: 10000
                archived:
                  type: boolean
                project:
                  description: An associated project ID
                  type: string
                targetingAllProjects:
                  description: >-
                    Make this feature discoverable in — and served to — every
                    project, beyond its primary `project`. Requires the
                    `targetFeatures` permission (FlagsTarget policy) unscoped to
                    any project. Governance stays with `project`.
                  type: boolean
                targetingProjects:
                  description: >-
                    Secondary project IDs this feature is targeted in and served
                    to, beyond its primary `project`. Adding a project requires
                    the `targetFeatures` permission (FlagsTarget policy) in that
                    project. Governance stays with `project`.
                  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
                defaultValue:
                  type: string
                baseConfig:
                  description: >-
                    The config backing this flag, fixed at creation. Cannot be
                    changed by an update — resend the current value or omit it;
                    a different value is rejected.
                  anyOf:
                    - type: string
                    - type: 'null'
                defaultValueConfig:
                  description: >-
                    Optional. A config within `baseConfig`'s family that the
                    default value resolves to instead of `baseConfig` itself.
                    null or omitted means the default is `baseConfig`. The
                    default is exactly this config and carries no overrides of
                    its own.
                  anyOf:
                    - type: string
                    - type: 'null'
                tags:
                  description: >-
                    Tags for filtering and grouping. Use these instead of
                    encoding groups in names. Replaces the existing tags
                    completely.
                  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:
                            description: >-
                              Short note on why the rule exists (e.g. `Beta
                              testers only`).
                            type: string
                            maxLength: 10000
                          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
                          savedGroupTargeting:
                            description: >-
                              Deprecated — use `savedGroups`. Accepted so a GET
                              response can be posted back unchanged;
                              `savedGroups` takes precedence if both are sent.
                            deprecated: true
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          pendingRamp:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          rampScheduleId:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          scheduleType:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          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:
                                  description: >-
                                    ISO 8601 date-time, e.g.
                                    "2025-06-01T00:00:00Z".
                                  anyOf:
                                    - format: date-time
                                      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
                          config:
                            description: >-
                              Key of a config to back this value. When set,
                              `value` is a JSON override patch merged on top of
                              the config; omit or null for a plain value.
                            anyOf:
                              - type: string
                              - type: 'null'
                          sparse:
                            description: >-
                              JSON features only. When true, the rule value is a
                              partial object merged onto the feature's default
                              value instead of replacing it.
                            type: boolean
                          allEnvironments:
                            description: >-
                              When true the rule applies to all environments
                              (default).
                            type: boolean
                          environments:
                            description: >-
                              Environment IDs the rule applies to. Ignored when
                              allEnvironments is true; with allEnvironments
                              false, an omitted or empty list scopes the rule to
                              no environment.
                            type: array
                            items:
                              type: string
                          allProjects:
                            description: >-
                              When true (the default) the rule applies to every
                              project the feature is delivered to. Set false and
                              supply `projects` to scope the rule.
                            type: boolean
                          projects:
                            description: >-
                              Specific project IDs this rule applies to. Used
                              when allProjects is false. An empty array scopes
                              the rule to no project. When the organization
                              requires registered attributes with project
                              scoping, the rule's attributes are validated
                              against these projects rather than the whole
                              feature's.
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - value
                        additionalProperties: false
                      - type: object
                        properties:
                          description:
                            description: >-
                              Short note on why the rule exists (e.g. `Beta
                              testers only`).
                            type: string
                            maxLength: 10000
                          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
                          savedGroupTargeting:
                            description: >-
                              Deprecated — use `savedGroups`. Accepted so a GET
                              response can be posted back unchanged;
                              `savedGroups` takes precedence if both are sent.
                            deprecated: true
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          pendingRamp:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          rampScheduleId:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          scheduleType:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          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:
                                  description: >-
                                    ISO 8601 date-time, e.g.
                                    "2025-06-01T00:00:00Z".
                                  anyOf:
                                    - format: date-time
                                      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
                          config:
                            description: >-
                              Key of a config to back this value. When set,
                              `value` is a JSON override patch merged on top of
                              the config; omit or null for a plain value.
                            anyOf:
                              - type: string
                              - type: 'null'
                          sparse:
                            description: >-
                              JSON features only. When true, the rule value is a
                              partial object merged onto the feature's default
                              value instead of replacing it.
                            type: boolean
                          coverage:
                            type: number
                          hashAttribute:
                            type: string
                          seed:
                            description: >-
                              Optional seed for the hash function; defaults to
                              the rule id
                            type: string
                          hashVersion:
                            anyOf:
                              - type: number
                                const: 1
                              - type: number
                                const: 2
                          allEnvironments:
                            description: >-
                              When true the rule applies to all environments
                              (default).
                            type: boolean
                          environments:
                            description: >-
                              Environment IDs the rule applies to. Ignored when
                              allEnvironments is true; with allEnvironments
                              false, an omitted or empty list scopes the rule to
                              no environment.
                            type: array
                            items:
                              type: string
                          allProjects:
                            description: >-
                              When true (the default) the rule applies to every
                              project the feature is delivered to. Set false and
                              supply `projects` to scope the rule.
                            type: boolean
                          projects:
                            description: >-
                              Specific project IDs this rule applies to. Used
                              when allProjects is false. An empty array scopes
                              the rule to no project. When the organization
                              requires registered attributes with project
                              scoping, the rule's attributes are validated
                              against these projects rather than the whole
                              feature's.
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - value
                          - coverage
                          - hashAttribute
                        additionalProperties: false
                      - type: object
                        properties:
                          description:
                            description: >-
                              Short note on why the rule exists (e.g. `Beta
                              testers only`).
                            type: string
                            maxLength: 10000
                          id:
                            type: string
                          enabled:
                            type: boolean
                          type:
                            type: string
                            const: experiment-ref
                          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
                          savedGroupTargeting:
                            description: >-
                              Deprecated — use `savedGroups`. Accepted so a GET
                              response can be posted back unchanged;
                              `savedGroups` takes precedence if both are sent.
                            deprecated: true
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          pendingRamp:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          rampScheduleId:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          scheduleType:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          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:
                                  description: >-
                                    ISO 8601 date-time, e.g.
                                    "2025-06-01T00:00:00Z".
                                  anyOf:
                                    - format: date-time
                                      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
                                config:
                                  description: >-
                                    Key of a config to back this value. When
                                    set, `value` is a JSON override patch merged
                                    on top of the config; omit or null for a
                                    plain value.
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - value
                                - variationId
                              additionalProperties: false
                          experimentId:
                            type: string
                          sparse:
                            description: >-
                              JSON features only. When true, the rule value is a
                              partial object merged onto the feature's default
                              value instead of replacing it.
                            type: boolean
                          allEnvironments:
                            description: >-
                              When true the rule applies to all environments
                              (default).
                            type: boolean
                          environments:
                            description: >-
                              Environment IDs the rule applies to. Ignored when
                              allEnvironments is true; with allEnvironments
                              false, an omitted or empty list scopes the rule to
                              no environment.
                            type: array
                            items:
                              type: string
                          allProjects:
                            description: >-
                              When true (the default) the rule applies to every
                              project the feature is delivered to. Set false and
                              supply `projects` to scope the rule.
                            type: boolean
                          projects:
                            description: >-
                              Specific project IDs this rule applies to. Used
                              when allProjects is false. An empty array scopes
                              the rule to no project. When the organization
                              requires registered attributes with project
                              scoping, the rule's attributes are validated
                              against these projects rather than the whole
                              feature's.
                            type: array
                            items:
                              type: string
                        required:
                          - type
                          - variations
                          - experimentId
                        additionalProperties: false
                      - type: object
                        properties:
                          description:
                            description: >-
                              Short note on why the rule exists (e.g. `Beta
                              testers only`).
                            type: string
                            maxLength: 10000
                          id:
                            type: string
                          enabled:
                            type: boolean
                          type:
                            type: string
                            const: safe-rollout
                          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
                          savedGroupTargeting:
                            description: >-
                              Deprecated — use `savedGroups`. Accepted so a GET
                              response can be posted back unchanged;
                              `savedGroups` takes precedence if both are sent.
                            deprecated: true
                            type: array
                            items:
                              type: object
                              properties:
                                matchType:
                                  type: string
                                  enum:
                                    - all
                                    - any
                                    - none
                                savedGroups:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - matchType
                                - savedGroups
                              additionalProperties: false
                          pendingRamp:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          rampScheduleId:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          scheduleType:
                            description: >-
                              Read-only; ignored on write. Accepted so a GET
                              response can be posted back unchanged.
                          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:
                                  description: >-
                                    ISO 8601 date-time, e.g.
                                    "2025-06-01T00:00:00Z".
                                  anyOf:
                                    - format: date-time
                                      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: >-
                              Environment IDs the rule applies to. Ignored when
                              allEnvironments is true; with allEnvironments
                              false, an omitted or empty list scopes the rule to
                              no environment.
                            type: array
                            items:
                              type: string
                          allProjects:
                            description: >-
                              When true (the default) the rule applies to every
                              project the feature is delivered to. Set false and
                              supply `projects` to scope the rule.
                            type: boolean
                          projects:
                            description: >-
                              Specific project IDs this rule applies to. Used
                              when allProjects is false. An empty array scopes
                              the rule to no project. When the organization
                              requires registered attributes with project
                              scoping, the rule's attributes are validated
                              against these projects rather than the whole
                              feature's.
                            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:
                        description: >-
                          Whether the Feature Flag is enabled in this
                          environment.
                        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'
                comment:
                  description: >-
                    Comment to record on the revision this update publishes,
                    when it publishes one. Defaults to "Created via REST API".
                  type: string
                ignoreWarnings:
                  description: >-
                    Set to true to acknowledge the warnings listed in a blocked
                    response and continue. This covers experiment guards, locked
                    dependents, and references affected by an archive. When the
                    organization treats schema failures as warnings, it also
                    covers schema and invariant warnings. It never bypasses a
                    rejected Custom Hook. On revision publish endpoints, it can
                    also force-publish an out-of-date draft when the caller has
                    Bypass draft approvals access. Only set this when a person
                    has explicitly asked you to. If a check blocks you, stop and
                    ask a person instead of working around it.
                  type: boolean
                skipSchemaValidation:
                  description: >-
                    Set to true to publish despite schema validation errors,
                    failed invariants, or schema changes that invalidate
                    dependent resources. This does not bypass a rejected Custom
                    Hook; use `skipHooks` for that. The caller must have Bypass
                    draft approvals access for Feature Flags, Configs, and
                    Constants in every Project. Otherwise, this field is
                    ignored. Only set this when a person has explicitly asked
                    you to. If a check blocks you, stop and ask a person instead
                    of working around it.
                  type: boolean
                skipHooks:
                  description: >-
                    Set to true to publish despite a Custom Hook rejection. This
                    does not bypass schema validation; use
                    `skipSchemaValidation` for that. The caller must have Bypass
                    draft approvals access for Feature Flags, Configs, and
                    Constants in every Project. Otherwise, this field is
                    ignored. Only set this when a person has explicitly asked
                    you to. If a check blocks you, stop and ask a person instead
                    of working around it.
                  type: boolean
                allowUnscopedRules:
                  description: >-
                    When the organization requires rules to target specific
                    environments or Projects, set to true to save a rule that
                    applies to All Environments and All Projects. Only set this
                    when a person has explicitly asked you to. If a check blocks
                    you, stop and ask a person instead of working around it.
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          description: Resource created
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    $ref: '#/components/schemas/FeatureV2'
                  bypassedGates:
                    description: >-
                      Gates that would have blocked this publish but were
                      bypassed by the caller's authority. Present only when at
                      least one gate was bypassed.
                    type: array
                    items:
                      $ref: '#/components/schemas/bypassedGates'
                required:
                  - feature
                additionalProperties: false
        '202':
          $ref: '#/components/responses/ConfirmationHeld'
        '422':
          description: Error
          content:
            application/json:
              schema:
                type: object
                description: >-
                  A rule applies to All Environments and All Projects, which the
                  organization doesn't allow without `allowUnscopedRules`
                properties:
                  message:
                    type: string
                  code:
                    type: string
                    enum:
                      - unscoped_rule
                  details:
                    $ref: '#/components/schemas/ApiErrorUnscopedRuleDetails'
                required:
                  - message
                  - code
                  - details
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X POST 'https://api.growthbook.io/api/v2/features/{id}' \
              -H 'Authorization: Bearer YOUR_API_KEY'
components:
  parameters:
    id:
      name: id
      in: path
      required: true
      description: The id of the requested resource
      schema:
        description: The id of the requested resource
        type: string
    skipSchemaValidation:
      name: skipSchemaValidation
      in: query
      description: Deprecated — pass `skipSchemaValidation` in the request body instead.
      schema:
        description: Deprecated — pass `skipSchemaValidation` in the request body instead.
        deprecated: true
        anyOf:
          - type: string
            const: 'true'
          - type: string
            const: 'false'
          - type: string
            const: '0'
          - type: string
            const: '1'
          - type: boolean
    ignoreWarnings:
      name: ignoreWarnings
      in: query
      description: Deprecated — pass `ignoreWarnings` in the request body instead.
      schema:
        description: Deprecated — pass `ignoreWarnings` in the request body instead.
        deprecated: true
        anyOf:
          - type: string
            const: 'true'
          - type: string
            const: 'false'
          - type: string
            const: '0'
          - type: string
            const: '1'
          - type: boolean
  schemas:
    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
          maxLength: 10000
        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
        targetingAllProjects:
          type: boolean
        targetingProjects:
          type: array
          items:
            type: string
        valueType:
          type: string
          enum:
            - boolean
            - string
            - number
            - json
        defaultValue:
          type: string
        baseConfig:
          description: >-
            Key of the config backing this flag ("Config mode"). Requires
            `valueType: "json"` and a live config. The config supplies the base
            JSON and schema; `defaultValue` and rule values are override patches
            on top. null or omitted for a plain flag.
          anyOf:
            - type: string
            - type: 'null'
        defaultValueConfig:
          description: >-
            Optional. A config within `baseConfig`'s family that the default
            value resolves to instead of `baseConfig` itself. null or omitted
            means the default is `baseConfig`. The default is exactly this
            config and carries no overrides of its own.
          anyOf:
            - type: string
            - type: 'null'
        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:
          $ref: '#/components/schemas/FeatureRevisionSummary'
        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
    bypassedGates:
      type: object
      properties:
        type:
          description: >-
            The gate that was bypassed (e.g. "approval-required", "stale-base",
            "schema-break").
          type: string
        outcome:
          type: string
          const: bypassed
        via:
          description: >-
            How the gate was bypassed. The value identifies a request field
            (`ignoreWarnings`, `skipSchemaValidation`, or `skipHooks`), the
            caller's permission (`bypassApprovalPermission`), or an organization
            setting (`restApiBypassesReviews`, or `revertsBypassApproval` on a
            revert).
          type: string
          enum:
            - ignoreWarnings
            - skipSchemaValidation
            - skipHooks
            - bypassApprovalPermission
            - restApiBypassesReviews
            - revertsBypassApproval
      required:
        - type
        - outcome
        - via
      additionalProperties: false
    ApiErrorUnscopedRuleDetails:
      type: object
      properties:
        ruleIds:
          type: array
          items:
            type: string
      required:
        - ruleIds
      additionalProperties: false
    FeatureRuleV2:
      allOf:
        - anyOf:
            - allOf:
                - $ref: '#/components/schemas/FeatureForceRule'
                - type: object
                  properties:
                    config:
                      description: >-
                        Key of the config backing this value, or null when the
                        value is not config-backed. The config supplies the base
                        JSON (and its schema); the value is an override patch
                        merged on top.
                      anyOf:
                        - type: string
                        - type: 'null'
                  additionalProperties: false
            - allOf:
                - $ref: '#/components/schemas/FeatureRolloutRule'
                - type: object
                  properties:
                    config:
                      description: >-
                        Key of the config backing this value, or null when the
                        value is not config-backed. The config supplies the base
                        JSON (and its schema); the value is an override patch
                        merged on top.
                      anyOf:
                        - type: string
                        - type: 'null'
                  additionalProperties: false
            - $ref: '#/components/schemas/FeatureExperimentRule'
              title: Feature Experiment Rule
            - allOf:
                - $ref: '#/components/schemas/FeatureBaseRule'
                - type: object
                  properties:
                    type:
                      type: string
                      const: experiment-ref
                    variations:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                          variationId:
                            type: string
                          config:
                            description: >-
                              Key of the config backing this value, or null when
                              the value is not config-backed. The config
                              supplies the base JSON (and its schema); the value
                              is an override patch merged on top.
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - value
                          - variationId
                        additionalProperties: false
                    experimentId:
                      type: string
                    sparse:
                      description: >-
                        JSON features only. When true, each variation `value` is
                        a partial object merged onto the feature's default value
                        instead of replacing it.
                      type: boolean
                  required:
                    - type
                    - variations
                    - experimentId
                  additionalProperties: false
            - allOf:
                - $ref: '#/components/schemas/FeatureBaseRule'
                - type: object
                  properties:
                    type:
                      type: string
                      const: contextual-bandit-ref
                    variations:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                          variationId:
                            type: string
                          config:
                            description: >-
                              Key of the config backing this value, or null when
                              the value is not config-backed. The config
                              supplies the base JSON (and its schema); the value
                              is an override patch merged on top.
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - value
                          - variationId
                        additionalProperties: false
                    contextualBanditId:
                      type: string
                  required:
                    - type
                    - variations
                    - contextualBanditId
                  additionalProperties: false
            - $ref: '#/components/schemas/FeatureSafeRolloutRule'
              title: Feature Safe Rollout Rule
        - 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
            pendingRamp:
              description: >-
                Present on draft revisions only. "create" means a ramp schedule
                will be created for this rule on publish. "detach" means an
                existing live ramp schedule will be removed on publish. Use
                PUT/DELETE .../rules/{ruleId}/ramp-schedule to modify.
              type: string
              enum:
                - create
                - detach
          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
    FeatureRevisionSummary:
      type: object
      properties:
        id:
          description: Stable id of the feature's live revision.
          type: string
        version:
          type: integer
        comment:
          type: string
        date:
          format: date-time
          type: string
        createdBy:
          $ref: '#/components/schemas/EventUser'
        publishedBy:
          $ref: '#/components/schemas/EventUser'
      required:
        - version
        - comment
        - date
      additionalProperties: false
    ConfirmationHeld:
      type: object
      properties:
        confirmation:
          $ref: '#/components/schemas/Confirmation'
        message:
          type: string
      required:
        - confirmation
        - message
      additionalProperties: false
      $defs:
        Confirmation:
          id: Confirmation
          type: object
          properties:
            id:
              type: string
            status:
              type: string
              enum:
                - pending
                - running
                - completed
                - rejected
                - expired
            actions:
              type: array
              items:
                type: object
                properties:
                  action:
                    type: string
                    enum:
                      - feature.create
                      - feature.draft
                      - feature.review
                      - feature.publish
                      - feature.archive
                      - feature.delete
                      - feature.other
                      - experiment.create
                      - experiment.draft
                      - experiment.start
                      - experiment.stop
                      - experiment.targeting
                      - experiment.traffic
                      - experiment.phases
                      - experiment.visualEditor
                      - experiment.other
                      - savedGroup.create
                      - savedGroup.draft
                      - savedGroup.review
                      - savedGroup.publish
                      - savedGroup.archive
                      - savedGroup.delete
                      - savedGroup.other
                      - constant.create
                      - constant.draft
                      - constant.review
                      - constant.publish
                      - constant.archive
                      - constant.delete
                      - constant.other
                      - config.create
                      - config.draft
                      - config.review
                      - config.publish
                      - config.archive
                      - config.delete
                      - config.other
                      - rampSchedule.create
                      - rampSchedule.start
                      - rampSchedule.pause
                      - rampSchedule.progression
                      - rampSchedule.approve
                      - rampSchedule.edit
                      - rampSchedule.delete
                      - rampSchedule.other
                      - settings.approvals
                      - settings.other
                      - access.members
                      - access.teams
                      - customHook.create
                      - customHook.edit
                      - customHook.delete
                      - environment.create
                      - environment.edit
                      - environment.delete
                      - project.create
                      - project.edit
                      - project.delete
                      - attribute.create
                      - attribute.edit
                      - attribute.delete
                      - customField.create
                      - customField.edit
                      - customField.delete
                      - sdkConnection.create
                      - sdkConnection.edit
                      - sdkConnection.delete
                      - metric.create
                      - metric.edit
                      - metric.delete
                      - factTable.create
                      - factTable.edit
                      - factTable.delete
                      - segment.create
                      - segment.edit
                      - segment.delete
                      - dimension.create
                      - dimension.edit
                      - dimension.delete
                      - override.ignoreWarnings
                      - override.skipSchemaValidation
                      - override.skipHooks
                      - override.bypassApproval
                      - override.restBypassesReviews
                      - override.draftLimit
                      - override.skipChecklist
                      - override.bypassDuplicateKeyCheck
                      - override.unscopedRules
                      - other.write
                  environments:
                    type: array
                    items:
                      type: string
                required:
                  - action
                  - environments
                additionalProperties: false
            summary:
              type: string
            url:
              type: string
            expiresAt:
              type: string
            response:
              anyOf:
                - type: object
                  properties:
                    status:
                      type: number
                    body: {}
                  required:
                    - status
                    - body
                  additionalProperties: false
                - type: 'null'
            note:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - id
            - status
            - actions
            - summary
            - url
            - expiresAt
            - response
            - note
          additionalProperties: false
    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
              maxLength: 10000
            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
            rampScheduleId:
              description: >-
                ID of the active RampSchedule document controlling this rule.
                Present when `scheduleType` is `ramp` and a live schedule
                exists.
              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 of the prerequisite
                    type: string
                  condition:
                    type: string
                required:
                  - id
                  - condition
                additionalProperties: false
            allProjects:
              description: >-
                When true (the default) the rule applies to every project the
                feature is delivered to. When false the rule is limited to
                `projects`.
              type: boolean
            projects:
              description: >-
                Project IDs this rule is scoped to when `allProjects` is false.
                An empty array scopes the rule to no project.
              type: array
              items:
                type: string
          required:
            - description
            - id
            - enabled
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: force
            value:
              type: string
            sparse:
              description: >-
                JSON features only. When true, `value` is a partial object
                merged onto the feature's default value instead of replacing it.
              type: boolean
          required:
            - type
            - value
          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
              maxLength: 10000
            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
            rampScheduleId:
              description: >-
                ID of the active RampSchedule document controlling this rule.
                Present when `scheduleType` is `ramp` and a live schedule
                exists.
              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 of the prerequisite
                    type: string
                  condition:
                    type: string
                required:
                  - id
                  - condition
                additionalProperties: false
            allProjects:
              description: >-
                When true (the default) the rule applies to every project the
                feature is delivered to. When false the rule is limited to
                `projects`.
              type: boolean
            projects:
              description: >-
                Project IDs this rule is scoped to when `allProjects` is false.
                An empty array scopes the rule to no project.
              type: array
              items:
                type: string
          required:
            - description
            - id
            - enabled
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: rollout
            value:
              type: string
            sparse:
              description: >-
                JSON features only. When true, `value` is a partial object
                merged onto the feature's default value instead of replacing it.
              type: boolean
            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
            hashVersion:
              description: >-
                Hash algorithm version for bucketing. Defaults to 2 (preferred)
                when not specified.
              anyOf:
                - type: number
                  const: 1
                - type: number
                  const: 2
          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
              maxLength: 10000
            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
            rampScheduleId:
              description: >-
                ID of the active RampSchedule document controlling this rule.
                Present when `scheduleType` is `ramp` and a live schedule
                exists.
              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 of the prerequisite
                    type: string
                  condition:
                    type: string
                required:
                  - id
                  - condition
                additionalProperties: false
            allProjects:
              description: >-
                When true (the default) the rule applies to every project the
                feature is delivered to. When false the rule is limited to
                `projects`.
              type: boolean
            projects:
              description: >-
                Project IDs this rule is scoped to when `allProjects` is false.
                An empty array scopes the rule to no project.
              type: array
              items:
                type: string
          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
    FeatureBaseRule:
      type: object
      properties:
        description:
          type: string
          maxLength: 10000
        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
        rampScheduleId:
          description: >-
            ID of the active RampSchedule document controlling this rule.
            Present when `scheduleType` is `ramp` and a live schedule exists.
          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 of the prerequisite
                type: string
              condition:
                type: string
            required:
              - id
              - condition
            additionalProperties: false
        allProjects:
          description: >-
            When true (the default) the rule applies to every project the
            feature is delivered to. When false the rule is limited to
            `projects`.
          type: boolean
        projects:
          description: >-
            Project IDs this rule is scoped to when `allProjects` is false. An
            empty array scopes the rule to no project.
          type: array
          items:
            type: string
      required:
        - description
        - id
        - enabled
      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
              maxLength: 10000
            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
            rampScheduleId:
              description: >-
                ID of the active RampSchedule document controlling this rule.
                Present when `scheduleType` is `ramp` and a live schedule
                exists.
              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 of the prerequisite
                    type: string
                  condition:
                    type: string
                required:
                  - id
                  - condition
                additionalProperties: false
            allProjects:
              description: >-
                When true (the default) the rule applies to every project the
                feature is delivered to. When false the rule is limited to
                `projects`.
              type: boolean
            projects:
              description: >-
                Project IDs this rule is scoped to when `allProjects` is false.
                An empty array scopes the rule to no project.
              type: array
              items:
                type: string
          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
    EventUser:
      description: Who performed an action
      type: object
      properties:
        type:
          description: >-
            `dashboard` (signed-in member), `api_key` (API key or personal
            access token) or `system`
          type: string
          enum:
            - dashboard
            - api_key
            - system
        id:
          description: The member's user ID. Absent for an organization API key
          type: string
        apiKey:
          description: The API key's ID, when the action came through one
          type: string
        name:
          description: The member's name, or the organization API key's name
          type: string
        email:
          description: The member's email. Absent for an organization API key
          type: string
        requestedBy:
          description: The member named with `X-GrowthBook-Requested-By`
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            email:
              type: string
          required:
            - id
            - name
            - email
          additionalProperties: false
        assumedRole:
          description: Whether the key assumed the named member's role
          type: boolean
      required:
        - type
      additionalProperties: false
    Confirmation:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - rejected
            - expired
        actions:
          type: array
          items:
            type: object
            properties:
              action:
                type: string
                enum:
                  - feature.create
                  - feature.draft
                  - feature.review
                  - feature.publish
                  - feature.archive
                  - feature.delete
                  - feature.other
                  - experiment.create
                  - experiment.draft
                  - experiment.start
                  - experiment.stop
                  - experiment.targeting
                  - experiment.traffic
                  - experiment.phases
                  - experiment.visualEditor
                  - experiment.other
                  - savedGroup.create
                  - savedGroup.draft
                  - savedGroup.review
                  - savedGroup.publish
                  - savedGroup.archive
                  - savedGroup.delete
                  - savedGroup.other
                  - constant.create
                  - constant.draft
                  - constant.review
                  - constant.publish
                  - constant.archive
                  - constant.delete
                  - constant.other
                  - config.create
                  - config.draft
                  - config.review
                  - config.publish
                  - config.archive
                  - config.delete
                  - config.other
                  - rampSchedule.create
                  - rampSchedule.start
                  - rampSchedule.pause
                  - rampSchedule.progression
                  - rampSchedule.approve
                  - rampSchedule.edit
                  - rampSchedule.delete
                  - rampSchedule.other
                  - settings.approvals
                  - settings.other
                  - access.members
                  - access.teams
                  - customHook.create
                  - customHook.edit
                  - customHook.delete
                  - environment.create
                  - environment.edit
                  - environment.delete
                  - project.create
                  - project.edit
                  - project.delete
                  - attribute.create
                  - attribute.edit
                  - attribute.delete
                  - customField.create
                  - customField.edit
                  - customField.delete
                  - sdkConnection.create
                  - sdkConnection.edit
                  - sdkConnection.delete
                  - metric.create
                  - metric.edit
                  - metric.delete
                  - factTable.create
                  - factTable.edit
                  - factTable.delete
                  - segment.create
                  - segment.edit
                  - segment.delete
                  - dimension.create
                  - dimension.edit
                  - dimension.delete
                  - override.ignoreWarnings
                  - override.skipSchemaValidation
                  - override.skipHooks
                  - override.bypassApproval
                  - override.restBypassesReviews
                  - override.draftLimit
                  - override.skipChecklist
                  - override.bypassDuplicateKeyCheck
                  - override.unscopedRules
                  - other.write
              environments:
                type: array
                items:
                  type: string
            required:
              - action
              - environments
            additionalProperties: false
        summary:
          type: string
        url:
          type: string
        expiresAt:
          type: string
        response:
          anyOf:
            - type: object
              properties:
                status:
                  type: number
                body: {}
              required:
                - status
                - body
              additionalProperties: false
            - type: 'null'
        note:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - id
        - status
        - actions
        - summary
        - url
        - expiresAt
        - response
        - note
      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
  responses:
    ConfirmationHeld:
      description: >-
        Held until a person confirms it in GrowthBook. Poll the Location until
        the confirmation completes.
      headers:
        Location:
          description: The confirmation to poll
          schema:
            type: string
        Retry-After:
          description: Seconds to wait before polling
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConfirmationHeld'
  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

        ```

````