Skip to main content
PATCH /api/v1/projects/{project_id}/flags/{id} Requires flags.write permission. Only the fields you include in the request body are updated; omitted fields are left unchanged.

Path parameters

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

Request body

name
string
Updated display name.
description
string | null
Updated description, or null to clear it.
enabled
boolean
Set to false to disable the flag. Disabled flags always return default_value.
default_value
boolean
Updated fallback value returned when no rule matches.

Response

flag
object
required
The updated flag.

Errors

StatusWhen
403Caller lacks flags.write permission
404Flag not found

Example

curl -X PATCH http://localhost:8080/api/v1/projects/550e8400-e29b-41d4-a716-446655440000/flags/f1a2b3c4-d5e6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'
{
  "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": false,
    "default_value": false,
    "salt": "a8f3d2c1",
    "created_at": "2026-01-15T09:00:00Z",
    "updated_at": "2026-03-21T12:00:00Z"
  }
}

Build docs developers (and LLMs) love