FlagdeckFlagdeck
Pricing
Docs
Get Started

Documentation

Environments

Environments live under a project. All endpoints require environments:read or environments:write.

List environments

GET /v1/projects/{projectId}/environments (scope: environments:read)

Get an environment

GET /v1/projects/{projectId}/environments/{key} (scope: environments:read)

Create an environment

POST /v1/projects/{projectId}/environments (scope: environments:write)

FieldTypeRequired
namestringyes
keystringyes

bash

curl -X POST https://api.flagdeck.com/v1/projects/PROJECT_ID/environments \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Staging", "key": "staging" }'

Update an environment

PATCH /v1/projects/{projectId}/environments/{key} (scope: environments:write)

Toggle an environment

POST /v1/projects/{projectId}/environments/{key}/toggle (scope: environments:write)

Delete an environment

DELETE /v1/projects/{projectId}/environments/{key} (scope: environments:write)