Skip to main content
POST
/
environments
cURL
curl -X POST https://api.growthbook.io/api/v1/environments \
   -d '{"id": "new-env", "description": "My new environment" }' \
  -u secret_abc123DEF456:
{
  "environment": {
    "id": "<string>",
    "description": "<string>",
    "toggleOnList": true,
    "defaultState": true,
    "projects": [
      "<string>"
    ],
    "parent": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://growthbook-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

If using Bearer auth, pass the Secret Key as the token:

curl https://api.growthbook.io/api/v1 \
-H "Authorization: Bearer secret_abc123DEF456"

Body

application/json
id
string
required

The ID of the new environment

description
string

The description of the new environment

toggleOnList
bool

Show toggle on feature list

defaultState
bool

Default state for new features

projects
string[]
parent
string

An environment that the new environment should inherit feature rules from. Requires an enterprise license

Response

200 - application/json

Success

environment
object
required