provider Feature flags POST
/api/v2/flags/{projectKey}/{featureFlagKey}/copy @utdk/launchdarkly
/api/v2/flags/{projectKey}/{featureFlagKey}/copy 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](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/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.
- projectKey path required
- The project key
- string
- featureFlagKey path required
- The feature flag key. The key identifies the flag in your code.
- string
Try it
Authentication
Configure credentials for LaunchDarkly REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import launchdarkly from '@utdk/launchdarkly';
await launchdarkly.copyfeatureflag()