Skip to main content
GET /api/v1/projects/{project_id}/flags/{id} Returns the flag and all rules attached to it. Authentication is required.

Path parameters

project_id
string
required
UUID of the project.
id
string
required
UUID of the flag.

Response

flag
object
required
The flag.
rules
Rule[]
required
Rules attached to this flag, ordered by priority (lowest number = highest priority).

Errors

StatusWhen
401Missing or invalid Bearer token
404Flag not found

Example

curl http://localhost:8080/api/v1/projects/550e8400-e29b-41d4-a716-446655440000/flags/f1a2b3c4-d5e6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer <token>"
{
  "flag": {
    "id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
    "environment_id": "e1a2b3c4-d5e6-7890-abcd-ef1234567890",
    "key": "new-dashboard",
    "name": "New Dashboard",
    "description": "Enables the redesigned dashboard UI",
    "enabled": true,
    "default_value": false,
    "salt": "a8f3d2c1",
    "created_at": "2026-01-15T09:00:00Z",
    "updated_at": "2026-03-10T14:30:00Z"
  },
  "rules": [
    {
      "id": "r1a2b3c4-d5e6-7890-abcd-ef1234567890",
      "flag_id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
      "priority": 1,
      "rule_type": "percentage",
      "attribute": null,
      "operator": null,
      "value_json": null,
      "rollout_percentage": 50,
      "bucket_by": "user_id",
      "return_value": true,
      "is_active": true,
      "created_at": "2026-01-20T11:00:00Z",
      "updated_at": "2026-01-20T11:00:00Z"
    }
  ]
}

Build docs developers (and LLMs) love