Flags API reference

Flags API · Environments

get/v1/workspaces/{workspace_id}/projects/{project_id}/environmentsAuth

List environments

Every environment of the project, in `ordinal` order.

Path parameters

project_id*string · uuid

Id of the project.

workspace_id*string · uuid

Id of the workspace.

Response · 200 The environments.

data*array

Every environment of the project (at most 5), in `ordinal` order.

Example

Request

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

Response

{
  "data": [
    {
      "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"
    }
  ]
}