For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
13.5kProductPricingSign inStart free trialBook a demo
DocsAPIsSDKsEnterprise EdgeGuidesAcademyRelease notes
DocsAPIsSDKsEnterprise EdgeGuidesAcademyRelease notes
    • API overview
  • Client API
  • Frontend API
  • Admin API
      • GETGet all environments
      • POSTCreates a new environment
      • POSTValidates if an environment name exists
      • PUTUpdates an environment by name
      • GETGet the environment with `name`
      • DELDeletes an environment by name
      • POSTClones an environment
      • GETGet the environments available to a project
      • PUTUpdate environment sort orders
      • POSTToggle the environment with `name` on
      • POSTToggle the environment with `name` off

Unleash reduces the risk of releasing new features, drives innovation by streamlining the software release process, and increases revenue by optimizing end-user experience. While we serve the needs of the world's largest, most security-conscious organizations, we are also rated the “Easiest Feature Management system to use” by G2.

GitHubGitHubLinkedInLinkedInX (Twitter)X (Twitter)SlackSlackStack OverflowStack OverflowYouTubeYouTube

Server SDKs

  • Node.js
  • Java
  • Go
  • Rust
  • Ruby
  • Python
  • .NET
  • PHP
  • All SDKs

Frontend SDKs

  • JavaScript
  • React
  • Next.js
  • Vue
  • iOS
  • Android
  • Flutter

Feature Flag use cases

  • Secure, scalable feature flags
  • Rollbacks
  • FedRAMP, SOC2, ISO2700 compliance
  • Progressive or gradual rollouts
  • Trunk-based development
  • Software kill switches
  • A/B testing
  • Feature management
  • Canary releases

Product

  • Quickstart
  • Unleash architecture
  • Pricing
  • Product vision
  • Open live demo
  • Open source
  • Enterprise feature management platform
  • Unleash vs LaunchDarkly

Support

  • Help center
  • Status
  • Changelog
Made in a cosy atmosphere in the Nordic countries.Copyright © 2026 Unleash
LogoLogo
13.5kProductPricingSign inStart free trialBook a demo
Admin APIEnvironments

Creates a new environment

||View as Markdown|
POST
https://app.unleash-instance.example.com/api/admin/environments
POST
/api/admin/environments
$curl -X POST https://app.unleash-instance.example.com/api/admin/environments \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "staging-environment",
> "type": "preproduction"
>}'
1{
2 "name": "staging-environment",
3 "type": "preproduction",
4 "enabled": true,
5 "protected": false,
6 "sortOrder": 2,
7 "projectCount": 5,
8 "apiTokenCount": 3,
9 "enabledToggleCount": 7,
10 "requiredApprovals": 2
11}

Enterprise feature

Uses the details provided in the payload to create a new environment

Was this page helpful?
Previous

Validates if an environment name exists

Next
Built with

Authentication

Authorizationstring
API key needed to access this API
OR
AuthorizationBearer
API key needed to access this API, in Bearer token format

Request

createEnvironmentSchema
namestringRequiredformat: "^[a-zA-Z0-9~_.-]+$"

The name of the environment. Must be a URL-friendly string according to RFC 3968, section 2.3

typestringRequired>=1 character

The type of environment you would like to create. Unleash officially recognizes the following values:

  • development
  • test
  • preproduction
  • production

If you pass a string that is not one of the recognized values, Unleash will accept it, but it will carry no special semantics.

enabledbooleanOptional

Newly created environments are enabled by default. Set this property to false to create the environment in a disabled state.

sortOrderintegerOptional
Defines where in the list of environments to place this environment. The list uses an ascending sort, so lower numbers are shown first. You can change this value later.
requiredApprovalsinteger or nullOptional>=1
Experimental field. The number of approvals required before a change request can be applied in this environment.

Response headers

locationstring
The location of the newly created resource.

Response

The resource was successfully created.
namestring
The name of the environment
typestring

The type of environment.

enabledboolean

true if the environment is enabled for the project, otherwise false.

protectedboolean

true if the environment is protected, otherwise false. A protected environment can not be deleted.

sortOrderinteger
Priority of the environment in a list of environments, the lower the value, the higher up in the list the environment will appear. Needs to be an integer
projectCountinteger or null>=0
The number of projects with this environment
apiTokenCountinteger or null>=0
The number of API tokens for the project environment
enabledToggleCountinteger or null>=0
The number of enabled toggles for the project environment
requiredApprovalsinteger or null>=1
Experimental field. The number of approvals required before a change request can be applied in this environment.

Errors

400
Bad Request Error
401
Unauthorized Error