---
title: "Set an app's feature flag"
method: PUT
path: "/feature-flags/2026-09/{appId}/flags/{flagName}"
tags: ["Basic"]
---

# Set an app's feature flag

`PUT /feature-flags/2026-09/{appId}/flags/{flagName}`

## Request

- Base URL: `https://api.hubapi.com`
- URL: `https://api.hubapi.com/feature-flags/2026-09/{appId}/flags/{flagName}`
- Auth: API key in query parameter `hapikey`

Set a feature flag for an app. For example, update the `hs-hide-crm-cards` flag's `defaultState` to `ON` to hide classic CRM cards from new installs.

## Path parameters

- `appId` integer, required
- `flagName` string, required

## Request body

- FlagPutRequest
  - `defaultState` 'ABSENT' | 'OFF' | 'ON', required: The state that the flag should have if there are no overrides for a particular portal
  - `overrideState` 'ABSENT' | 'OFF' | 'ON': A flag value that supercedes all other overrides, including portal-level values. Mostly used for things like emergency overrides

## Response `200`

successful operation

- FlagResponse
  - `appId` integer, required: The ID of the app
  - `defaultState` 'ABSENT' | 'OFF' | 'ON', required: The flag state for any portal that doesn't have an override value
  - `flagName` string, required: The name of the flag
  - `overrideState` 'ABSENT' | 'OFF' | 'ON': An optional flag value that overrides all others for this flag name and app, including portal-level values

## Other responses

- `default`: An error occurred.

## Changes

- **2026-10-10** (2026-09) `de25edbdcd67`: 2 info
  - the endpoint scheme security `developer_hapikey` was added to the API
  - the endpoint scheme security `oauth2` was removed from the API

[Operation history](https://skmtc.dev/hubspot/apis/crm-public-app-feature-flags-v3/changes/feature-flags/2026-09/:appId/flags/:flagName/put.md)

---

[API](https://skmtc.dev/hubspot/apis/crm-public-app-feature-flags-v3.md) - [All operations](https://skmtc.dev/hubspot/apis/crm-public-app-feature-flags-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/hubspot/apis/crm-public-app-feature-flags-v3/revisions/de25edbdcd67?raw)
