---
title: "Update flag"
method: PUT
path: "/flags/{flag_id}"
tags: ["features"]
---

# Update flag

`PUT /flags/{flag_id}`

## Path parameters

- `flag_id` string, required

## Request body

- CreateFlagRequestBody
  - `default_value` boolean, required
  - `description` string, required
  - `feature_id` string, nullable
  - `flag_type` 'boolean', required
  - `key` string, required
  - `maintainer_account_member_id` string, nullable
  - `name` string, required

## Response `200`

OK

- object
  - `data` FlagDetailResponseData, required
    - `created_at` string, date-time, required
    - `default_value` boolean, required
    - `description` string, required
    - `feature` FeatureResponseData
      - `created_at` string, date-time, required
      - `description` string, required
      - `event_subtype` string, nullable
      - `feature_type` 'boolean' | 'event' | 'license' | 'trait', required
      - `icon` string, required
      - `id` string, required
      - `license_id` string, nullable — The license sold through this feature. Set only on features of type license, and created automatically with them.
      - `lifecycle_phase` 'add_on' | 'alpha' | 'beta' | 'deprecated' | 'ga' | 'inactive' | 'in_plan' | 'internal_testing' | 'legacy'
      - `maintainer_account_member_id` string, nullable
      - `name` string, required
      - `plural_name` string, nullable
      - `singular_name` string, nullable
      - `trait_id` string, nullable
      - `updated_at` string, date-time, required
      - `usage_limit_trait_id` string, nullable — Set when the feature carries a pay-in-advance quantity. Provisioned lazily for other feature types, and at creation for license features.
    - `feature_id` string, nullable
    - `flag_type` 'boolean', required
    - `id` string, required
    - `key` string, required
    - `last_checked_at` string, date-time, nullable
    - `maintainer` AccountMemberResponseData
      - `created_at` string, date-time, required
      - `email` string, nullable
      - `first_name` string, nullable
      - `id` string, required
      - `image_url` string, nullable
      - `last_name` string, nullable
      - `name` string, nullable
      - `permissions` object, required
      - `role` 'admin' | 'member'
      - `updated_at` string, date-time, required
    - `maintainer_account_member_id` string, nullable
    - `name` string, required
    - `rules` RuleDetailResponseData[], required
      - `condition_groups` RuleConditionGroupDetailResponseData[], required
        - `conditions` RuleConditionDetailResponseData[], required
          - `comparison_trait` EntityTraitDefinitionResponseData
            - `created_at` string, date-time, required
            - `display_name` string, required
            - `entity_type` 'company' | 'user', required
            - `hierarchy` string[], required
            - `id` string, required
            - `trait_type` 'boolean' | 'currency' | 'date' | 'number' | 'string' | 'url', required
            - `updated_at` string, date-time, required
          - `comparison_trait_id` string, nullable
          - `condition_group_id` string, nullable
          - `condition_type` 'base_plan' | 'billing_product' | 'company' | 'credit' | 'metric' | 'plan' | 'plan_version' | 'trait' | 'user', required
          - `created_at` string, date-time, required
          - `environment_id` string, required
          - `event_subtype` string, nullable
          - `flag_id` string, nullable
          - `id` string, required
          - `metric_period` 'all_time' | 'current_day' | 'current_month' | 'current_week'
          - `metric_period_month_reset` 'billing_cycle' | 'first_of_month'
          - `metric_value` integer, nullable
          - `operator` 'eq' | 'gt' | 'gte' | 'is_empty' | 'lt' | 'lte' | 'not_empty' | 'ne', required
          - `resource_ids` string[], required
          - `resources` PreviewObjectResponseData[], required
            - `description` string, nullable
            - `id` string, required
            - `image_url` string, nullable
            - `name` string, required
          - `rule_id` string, required
          - `trait` EntityTraitDefinitionResponseData
            - `created_at` string, date-time, required
            - `display_name` string, required
            - `entity_type` 'company' | 'user', required
            - `hierarchy` string[], required
            - `id` string, required
            - `trait_type` 'boolean' | 'currency' | 'date' | 'number' | 'string' | 'url', required
            - `updated_at` string, date-time, required
          - `trait_entity_type` 'company' | 'user'
          - `trait_id` string, nullable
          - `trait_value` string, required
          - `updated_at` string, date-time, required
        - `created_at` string, date-time, required
        - `environment_id` string, required
        - `flag_id` string, nullable
        - `id` string, required
        - `rule_id` string, required
        - `updated_at` string, date-time, required
      - `conditions` RuleConditionDetailResponseData[], required
        - `comparison_trait` EntityTraitDefinitionResponseData
          - `created_at` string, date-time, required
          - `display_name` string, required
          - `entity_type` 'company' | 'user', required
          - `hierarchy` string[], required
          - `id` string, required
          - `trait_type` 'boolean' | 'currency' | 'date' | 'number' | 'string' | 'url', required
          - `updated_at` string, date-time, required
        - `comparison_trait_id` string, nullable
        - `condition_group_id` string, nullable
        - `condition_type` 'base_plan' | 'billing_product' | 'company' | 'credit' | 'metric' | 'plan' | 'plan_version' | 'trait' | 'user', required
        - `created_at` string, date-time, required
        - `environment_id` string, required
        - `event_subtype` string, nullable
        - `flag_id` string, nullable
        - `id` string, required
        - `metric_period` 'all_time' | 'current_day' | 'current_month' | 'current_week'
        - `metric_period_month_reset` 'billing_cycle' | 'first_of_month'
        - `metric_value` integer, nullable
        - `operator` 'eq' | 'gt' | 'gte' | 'is_empty' | 'lt' | 'lte' | 'not_empty' | 'ne', required
        - `resource_ids` string[], required
        - `resources` PreviewObjectResponseData[], required
          - `description` string, nullable
          - `id` string, required
          - `image_url` string, nullable
          - `name` string, required
        - `rule_id` string, required
        - `trait` EntityTraitDefinitionResponseData
          - `created_at` string, date-time, required
          - `display_name` string, required
          - `entity_type` 'company' | 'user', required
          - `hierarchy` string[], required
          - `id` string, required
          - `trait_type` 'boolean' | 'currency' | 'date' | 'number' | 'string' | 'url', required
          - `updated_at` string, date-time, required
        - `trait_entity_type` 'company' | 'user'
        - `trait_id` string, nullable
        - `trait_value` string, required
        - `updated_at` string, date-time, required
      - `created_at` string, date-time, required
      - `environment_id` string, required
      - `flag_id` string, nullable
      - `id` string, required
      - `name` string, required
      - `priority` integer, required
      - `rule_type` 'company_override' | 'company_override_usage_exceeded' | 'default' | 'global_override' | 'plan_entitlement' | 'plan_entitlement_usage_exceeded' | 'standard', required
      - `updated_at` string, date-time, required
      - `value` boolean, required
    - `updated_at` string, date-time, required
  - `params` object, required — Input parameters

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Server error

## Changes

> 125 revisions in range; 38 could not be searched.

- **2026-07-27** `e83d3358bab3` — 1 warning, 2 info
  - added the new `license` enum value to the `data/feature/feature_type` response property for the response status `200`
  - added the optional property `data/feature/license_id` to the response with the `200` status
  - added the optional property `data/feature/usage_limit_trait_id` to the response with the `200` status
- **2026-07-10** `6bbade913b33` — 1 warning
  - added the new `custom_plans_edit` enum value to the `data/maintainer/permissions/additionalProperties/items/` response property for the response status `200`
- **2026-06-17** `269daccabb5b` — 1 info
  - removed the `billing_credits_edit` enum value from the `data/maintainer/permissions/additionalProperties/items/` response property for the response status `200`
- **2026-06-01** `23c90026c637` — 2 info
  - added the optional property `data/maintainer/first_name` to the response with the `200` status
  - added the optional property `data/maintainer/last_name` to the response with the `200` status

[Change history](https://skmtc.dev/schematichq/apis/schematic-api/changes/flags/:flag_id/put.md)

---

[API](https://skmtc.dev/schematichq/apis/schematic-api.md) · [All operations](https://skmtc.dev/schematichq/apis/schematic-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/schematichq/schematic-api/revisions/0b238e148fa1/schema)
