Creates a new environment
POST<your-unleash-url>/api/admin/environments
Uses the details provided in the payload to create a new environment
Request
Responses
- 201
- 400
- 401
The resource was successfully created.
Response Headers
The request data does not match what we expect.
Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.
Authorization: Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L '<your-unleash-url>/api/admin/environments' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
-d '{
"name": "string",
"type": "string",
"enabled": true,
"sortOrder": 0
}'
ResponseClear