Flags API reference

Flags API · Environments

get/v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}Auth

Get an environment

Path parameters

environment_id*string · uuid

Id of the environment.

project_id*string · uuid

Id of the project.

workspace_id*string · uuid

Id of the workspace.

Response · 200 The environment.

id*string · uuid

The environment's id.

workspace_id*string · uuid

The workspace that owns the environment.

project_id*string · uuid

The project the environment belongs to.

key*string

Stable key, unique in the project. Cannot change.

Example: "production"

name*string

Display name.

Example: "Production"

color*string

Display color, `#rrggbb`.

Example: "#c92a2a"

ordinal*integer

Sort position in the project (ascending).

Example: 1

protected*boolean

Protected environments need `flags.protected.update` (owners and admins by default) for any value change, on top of `flags.value.update`.

Example: true

require_note*boolean

Value changes in this environment must carry a `note`.

Example: false

created_at*string · date-time

When the environment was created.

updated_at*string · date-time

When the environment last changed.

Example

Request

GET https://api.flags.productcraft.co/v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}
Authorization: Bearer YOUR_TOKEN

Response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "workspace_id": "00000000-0000-0000-0000-000000000000",
  "project_id": "00000000-0000-0000-0000-000000000000",
  "key": "production",
  "name": "Production",
  "color": "#c92a2a",
  "ordinal": 1,
  "protected": true,
  "require_note": false,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}