Skip to main content

Environments API

Environments represent deployment stages (e.g., dev, staging, production). Each environment has independent flag states and API keys.

Create Environment

POST /v1/projects/{projectID}/environments

Auth: JWT (Owner, Admin, Developer)

Request

{
"name": "QA",
"slug": "qa",
"color": "#8b5cf6"
}
FieldTypeRequiredDefaultDescription
namestringYesEnvironment name
slugstringNoAuto-generatedURL-friendly identifier
colorstringNo#6B7280Hex color for dashboard display

Response 201 Created

{
"id": "uuid",
"name": "QA",
"slug": "qa",
"color": "#8b5cf6",
"created_at": "2026-04-01T00:00:00Z"
}

List Environments

GET /v1/projects/{projectID}/environments?limit=50&offset=0

Auth: JWT (All roles)

Query Parameters

ParameterDefaultMaxDescription
limit50100Number of environments to return
offset0Pagination offset

Response 200 OK

{
"data": [
{"id": "uuid", "name": "Development", "slug": "dev", "color": "#22c55e"},
{"id": "uuid", "name": "Staging", "slug": "staging", "color": "#f59e0b"},
{"id": "uuid", "name": "Production", "slug": "production", "color": "#ef4444"}
],
"total": 3,
"limit": 50,
"offset": 0,
"has_more": false
}

Delete Environment

DELETE /v1/projects/{projectID}/environments/{envID}

Auth: JWT (Owner, Admin)

Response 204 No Content

warning

Deleting an environment removes all associated flag states and API keys.