v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
Feature flags

Copy feature flag

Copying flag settings is an Enterprise feature

Copying flag settings is available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.

Copy flag settings from a source environment to a target environment.

By default, this operation copies the entire flag configuration. You can use the includedActions or excludedActions to specify that only part of the flag configuration is copied.

If you provide the optional currentVersion of a flag, this operation tests to ensure that the current flag version in the environment matches the version you've specified. The operation rejects attempts to copy flag settings if the environment's current version of the flag does not match the version you've specified. You can use this to enforce optimistic locking on copy attempts.

post/api/v2/flags/{projectKey}/{featureFlagKey}/copy

Path parameters

projectKeystring string required

The project key

The project key

featureFlagKeystring string required

The feature flag key. The key identifies the flag in your code.

The feature flag key. The key identifies the flag in your code.

Request body

commentstring

Optional comment

includedActionsstring[]

Optional list of the flag changes to copy from the source environment to the target environment. You may include either <code>includedActions</code> or <code>excludedActions</code>, but not both. If you include neither, then all flag changes will be copied.

excludedActionsstring[]

Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either <code>includedActions</code> or <code>excludedActions</code>, but not both. If you include neither, then all flag changes will be copied.

Example request

{
  "includedActions": [
    "updateOn"
  ],
  "excludedActions": [
    "updateOn"
  ]
}

Response

Global flag response

namestring required

A human-friendly name for the feature flag

kind'boolean' | 'multivariate' required

Kind of feature flag

descriptionstring

Description of the feature flag

keystring required

A unique key used to reference the flag in your code

_versioninteger required

Version of the feature flag

creationDateinteger required
includeInSnippetboolean

Deprecated, use <code>clientSideAvailability</code>. Whether this flag should be made available to the client-side JavaScript SDK

temporaryboolean required

Whether the flag is a temporary flag

tagsstring[] required

Tags for the feature flag

_linksobject required

The location and content type of related resources

maintainerIdstring

Associated maintainerId for the feature flag

maintainerTeamKeystring

The key of the associated team that maintains this feature flag

goalIdsstring[]

Deprecated, use <code>experiments</code> instead

customPropertiesCustomProperties required
archivedboolean required

Boolean indicating if the feature flag is archived

archivedDateinteger
deprecatedboolean

Boolean indicating if the feature flag is deprecated

deprecatedDateinteger
_purposestring
environmentsobject

Details on the environments for this flag. Only returned if the request is filtered by environment, using the <code>filterEnv</code> query parameter.