/v1/workspaces/{workspace_id}/projects/{project_id}AuthGet a project
The project with its environments and configs.
Path parameters
project_id*string · uuidId of the project.
workspace_id*string · uuidId of the workspace.
Response · 200 The project.
id*string · uuidThe project's id.
workspace_id*string · uuidThe workspace that owns the project.
name*stringDisplay name, unique in the workspace (case-insensitive).
Example: "Storefront"
description*stringFree-text description (may be empty).
Example: ""
ordinal*integerSort position in the workspace (ascending).
Example: 0
stale_after_days*integerDays without a value or targeting change before the stale-flag report lists a flag as unchanged.
Example: 30
stale_digest*booleanWhether flag owners get the weekly stale-flag digest email for this project.
Example: true
environments*arrayThe project's environments, in `ordinal` order.
configs*arrayThe project's configs, in `ordinal` order.
created_at*string · date-timeWhen the project was created.
updated_at*string · date-timeWhen the project last changed.
Example
Request
GET https://api.flags.productcraft.co/v1/workspaces/{workspace_id}/projects/{project_id}
Authorization: Bearer YOUR_TOKENimport { Flags } from "@productcraft/flags";
// Reads PRODUCTCRAFT_API_KEY from the environment
const flags = new Flags();
const project = await flags.projects.retrieve("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");flags.projects.retrieve(projectId, options?): Flags.Project
Response
{
"id": "00000000-0000-0000-0000-000000000000",
"workspace_id": "00000000-0000-0000-0000-000000000000",
"name": "Storefront",
"description": "",
"ordinal": 0,
"stale_after_days": 30,
"stale_digest": true,
"environments": [
{
"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,
"approval_policy": "agents",
"required_approvals": 1,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"configs": [
{
"id": "00000000-0000-0000-0000-000000000000",
"workspace_id": "00000000-0000-0000-0000-000000000000",
"project_id": "00000000-0000-0000-0000-000000000000",
"key": "main",
"name": "Main",
"description": "",
"ordinal": 0,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}