---
title: Feature Flags
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Feature Flags
---

# Feature Flags

Manage feature flags and environments.

## Delete an environment →{% #delete-an-environment %}

| Datadog site      | API endpoint                                                                            |
| ----------------- | --------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | DELETE https://api.ap1.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |
| ap2.datadoghq.com | DELETE https://api.ap2.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |
| app.datadoghq.eu  | DELETE https://api.datadoghq.eu/api/v2/feature-flags/environments/{environment_id}      |
| app.ddog-gov.com  | DELETE https://api.ddog-gov.com/api/v2/feature-flags/environments/{environment_id}      |
| us2.ddog-gov.com  | DELETE https://api.us2.ddog-gov.com/api/v2/feature-flags/environments/{environment_id}  |
| app.datadoghq.com | DELETE https://api.datadoghq.com/api/v2/feature-flags/environments/{environment_id}     |
| us3.datadoghq.com | DELETE https://api.us3.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |
| us5.datadoghq.com | DELETE https://api.us5.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |

## Update an environment →{% #update-an-environment %}

| Datadog site      | API endpoint                                                                         |
| ----------------- | ------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/feature-flags/environments/{environment_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v2/feature-flags/environments/{environment_id}      |
| us2.ddog-gov.com  | PUT https://api.us2.ddog-gov.com/api/v2/feature-flags/environments/{environment_id}  |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v2/feature-flags/environments/{environment_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |

## Get an environment →{% #get-an-environment %}

| Datadog site      | API endpoint                                                                         |
| ----------------- | ------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/feature-flags/environments/{environment_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/feature-flags/environments/{environment_id}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/feature-flags/environments/{environment_id}  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/feature-flags/environments/{environment_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/feature-flags/environments/{environment_id} |

## Create an environment →{% #create-an-environment %}

| Datadog site      | API endpoint                                                         |
| ----------------- | -------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/feature-flags/environments |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/feature-flags/environments |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/feature-flags/environments      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/feature-flags/environments      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/feature-flags/environments  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/feature-flags/environments     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/feature-flags/environments |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/feature-flags/environments |

## List environments →{% #list-environments %}

| Datadog site      | API endpoint                                                        |
| ----------------- | ------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/feature-flags/environments |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/feature-flags/environments |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/feature-flags/environments      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/feature-flags/environments      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/feature-flags/environments  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/feature-flags/environments     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/feature-flags/environments |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/feature-flags/environments |

## Stop a progressive rollout →{% #stop-a-progressive-rollout %}

| Datadog site      | API endpoint                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stop |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stop |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stop      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stop      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stop  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stop     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stop |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/stop |

## Resume a progressive rollout →{% #resume-a-progressive-rollout %}

| Datadog site      | API endpoint                                                                                             |
| ----------------- | -------------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/resume |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/resume |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/resume      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/resume      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/resume  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/resume     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/resume |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/resume |

## Pause a progressive rollout →{% #pause-a-progressive-rollout %}

| Datadog site      | API endpoint                                                                                            |
| ----------------- | ------------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/pause |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/pause |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/pause      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/pause      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/pause  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/pause     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/pause |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/pause |

## Start a progressive rollout →{% #start-a-progressive-rollout %}

| Datadog site      | API endpoint                                                                                            |
| ----------------- | ------------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/start |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/start |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/start      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/start      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/start  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/start     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/start |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/feature-flags/exposure-schedules/{exposure_schedule_id}/start |

## Update targeting rules for a flag →{% #update-targeting-rules-for-a-flag %}

| Datadog site      | API endpoint                                                                                                       |
| ----------------- | ------------------------------------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations      |
| us2.ddog-gov.com  | PUT https://api.us2.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations  |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations |

## Create targeting rules for a flag env →{% #create-targeting-rules-for-a-flag-env %}

| Datadog site      | API endpoint                                                                                                        |
| ----------------- | ------------------------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/allocations |

## Disable a feature flag in an environment →{% #disable-a-feature-flag-in-an-environment %}

| Datadog site      | API endpoint                                                                                                    |
| ----------------- | --------------------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable |

## Enable a feature flag in an environment →{% #enable-a-feature-flag-in-an-environment %}

| Datadog site      | API endpoint                                                                                                   |
| ----------------- | -------------------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable |

## Unarchive a feature flag →{% #unarchive-a-feature-flag %}

| Datadog site      | API endpoint                                                                        |
| ----------------- | ----------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/unarchive |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/unarchive |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/feature-flags/{feature_flag_id}/unarchive      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/unarchive      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/unarchive  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/unarchive     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/unarchive |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/unarchive |

## Archive a feature flag →{% #archive-a-feature-flag %}

| Datadog site      | API endpoint                                                                      |
| ----------------- | --------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/archive |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/archive |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/feature-flags/{feature_flag_id}/archive      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/archive      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/archive  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/archive     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/archive |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/archive |

## Update a feature flag →{% #update-a-feature-flag %}

| Datadog site      | API endpoint                                                             |
| ----------------- | ------------------------------------------------------------------------ |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v2/feature-flags/{feature_flag_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v2/feature-flags/{feature_flag_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/feature-flags/{feature_flag_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}      |
| us2.ddog-gov.com  | PUT https://api.us2.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}  |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v2/feature-flags/{feature_flag_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v2/feature-flags/{feature_flag_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v2/feature-flags/{feature_flag_id} |

## Get a feature flag →{% #get-a-feature-flag %}

| Datadog site      | API endpoint                                                             |
| ----------------- | ------------------------------------------------------------------------ |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/feature-flags/{feature_flag_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/feature-flags/{feature_flag_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/feature-flags/{feature_flag_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/feature-flags/{feature_flag_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/feature-flags/{feature_flag_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/feature-flags/{feature_flag_id} |

## Create a feature flag →{% #create-a-feature-flag %}

| Datadog site      | API endpoint                                            |
| ----------------- | ------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/feature-flags |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/feature-flags |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/feature-flags      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/feature-flags      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/feature-flags  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/feature-flags     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/feature-flags |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/feature-flags |

## List feature flags →{% #list-feature-flags %}

| Datadog site      | API endpoint                                           |
| ----------------- | ------------------------------------------------------ |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/feature-flags |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/feature-flags |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/feature-flags      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/feature-flags      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/feature-flags  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/feature-flags     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/feature-flags |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/feature-flags |
