provider Environments POST
/api/v2/projects/{projectKey}/environments @utdk/launchdarkly
/api/v2/projects/{projectKey}/environments Create environment
> ### Approval settings
>
> You cannot configure approval settings when you create a new environment. Use [Update environment](https://launchdarkly.com/docs/api/environments/patch-environment) to update approval settings.
>
> The `approvalSettings` and `resourceApprovalSettings` keys are only returned when the [approvals](https://launchdarkly.com/docs/home/releases/approvals/) feature is enabled.
Create a new environment in a specified project with a given name, key, swatch color, and default TTL.
- projectKey path required
- The project key
- 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.postenvironment()