---
title: "Enable or disable a feature flag"
method: PUT
path: "/app/{appId}/release/{releaseId}/featureFlag/{flagId}"
tags: ["release"]
---

# Enable or disable a feature flag

`PUT /app/{appId}/release/{releaseId}/featureFlag/{flagId}`

## Request

- Base URL: `https://api.runway.team`
- URL: `https://api.runway.team/app/{appId}/release/{releaseId}/featureFlag/{flagId}`
- Auth: API key in header `X-API-Key`

Enables or disables a single feature flag for a release. The change is propagated to the app's connected feature flagging provider (LaunchDarkly, Statsig, or Optimizely) and recorded on the release timeline. Obtain `flagId` from `GET /app/{appId}/release/{releaseId}/featureFlags`. Read-only flags cannot be toggled and return a 400. Returns 404 when no flag matches `flagId` (including when the app has no feature flagging integration installed). Returns the updated feature flag on success.

## Path parameters

- `appId` string, required
- `releaseId` string, required
- `flagId` string, required

## Request body

- object
  - `enabled` boolean, required: Set to `true` to enable the flag or `false` to disable it. This field is required; omitting it returns a 400.

## Response `200`

The updated feature flag after being enabled or disabled

- FeatureFlag: A feature flag on a release, sourced from the app's connected feature flagging integration (LaunchDarkly, Statsig, or Optimizely).
  - `id` string: The feature flag's unique id. Use this with the toggle endpoint to enable or disable the flag.
  - `name` string: The human-readable name of the feature flag.
  - `description` string, nullable: An optional description of the feature flag.
  - `createdAt` string, date-time: When the flag was created.
  - `updatedAt` string, date-time, nullable: When the flag was last updated.
  - `enabledAt` string, date-time, nullable: When the flag was enabled, if applicable.
  - `isEstimatedEnabledAt` boolean: Whether `enabledAt` is an estimate rather than an exact timestamp.
  - `estimatedDisabledAt` string, date-time, nullable: The estimated time the flag was disabled, if applicable.
  - `minimumVersion` string, nullable: The minimum app version the flag targets, if version-scoped.
  - `maximumVersion` string, nullable: The maximum app version the flag targets, if version-scoped.
  - `equalVersions` string[]: Specific app versions the flag targets.
  - `rolloutPercentage` number, nullable: The percentage of users the flag is rolled out to, if applicable.
  - `status` 'enabled' | 'disabled' | 'archived' | 'paused': The current status of the flag.
  - `type` 'featureFlagOptimizelyExperiment' | 'featureFlagOptimizelyFeature' | 'featureFlagOptimizelyFlag' | 'featureFlagLaunchDarklyFlag' | 'featureFlagStatsigGate' | 'featureFlagStatsigDynamicConfig' | 'featureFlagFirebaseRemoteConfigParam' | 'featureFlagFirebaseRemoteConfigBoolParam' | 'featureFlagAmplitudeExperimentFlag' | 'featureFlagAmplitudeExperimentExperiment' | 'featureFlagUnleashFeature': The provider-specific type of the flag.
  - `owner` string, nullable: The owner of the flag, if set in the provider.
  - `variations` FeatureFlagVariation[]: The flag's variations.
    - `name` string
    - `key` string
    - `rolloutPercentage` number, nullable
    - `variables` FeatureFlagVariationVariable[]
      - `type` string
      - `key` string
      - `value` string
  - `rules` FeatureFlagRule[]: The flag's targeting rules.
    - `id` string
    - `name` string
    - `isDefault` boolean: Whether this is the default rule applied when no other rule matches.
    - `audienceConditions` FeatureFlagAudienceCondition[]
      - `audiences` FeatureFlagAudience[]
        - `id` string
        - `name` string
        - `url` string, nullable
      - `negate` boolean
      - `predicate` 'matches' | 'endsWith' | 'startsWith' | 'contains' | 'lessThan' | 'greaterThan' | 'lessThanOrEqual' | 'greaterThanOrEqual' | 'before' | 'after' | 'unknown': The comparison predicate used by a feature flag condition.
      - `weight` number
    - `conditions` FeatureFlagRuleCondition[]
      - `attribute` string
      - `negate` boolean
      - `predicate` 'matches' | 'endsWith' | 'startsWith' | 'contains' | 'lessThan' | 'greaterThan' | 'lessThanOrEqual' | 'greaterThanOrEqual' | 'before' | 'after' | 'unknown': The comparison predicate used by a feature flag condition.
      - `values` unknown[]: The values the attribute is compared against; entries may be strings, numbers, or booleans.
        - unknown
    - `variations` FeatureFlagWeightedVariation[]
      - `key` string
      - `name` string, nullable
      - `weight` number
  - `platforms` string[]: The platforms the flag applies to.
  - `url` string, nullable: A link to the flag in the provider's dashboard, if available.
  - `isReadOnly` boolean: Whether the flag is read-only. Read-only flags cannot be enabled or disabled via the toggle endpoint.
  - `isNewlyEnabledInThisVersion` boolean: Whether the flag was newly enabled in this release version.
  - `isNewlyDisabledInThisVersion` boolean: Whether the flag was newly disabled in this release version.
  - `isSpecificallyTargetingThisVersion` boolean: Whether the flag specifically targets this release version.
  - `isSpecificallyNotTargetingThisVersion` boolean: Whether the flag specifically excludes this release version.
  - `didChangeInThisVersion` boolean: Whether the flag changed in this release version.
  - `shouldHighlight` boolean: Whether the UI should highlight this flag.
  - `highlightTooltipText` string: The tooltip text to show when the flag is highlighted.

## Other responses

- `400`: Bad request response
- `404`: Resource not found response

---

[API](https://skmtc.dev/runway/apis/runway-rest-api.md) - [All operations](https://skmtc.dev/runway/apis/runway-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/runway/apis/runway-rest-api/revisions/081109863a9a?raw)
