> ## Documentation Index
> Fetch the complete documentation index at: https://feather.mupeni.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Flag

> Updates flag metadata. Does not change the flag config — use Update Flag Config for that.

## Path parameters

<ParamField path="projectId" type="string" required />

<ParamField path="flagKey" type="string" required>
  The flag's `key`, not its `id`.
</ParamField>

## Body

All fields are optional. The flag `key` is immutable — it cannot be changed after creation.

<ParamField body="name" type="string">
  New display name.
</ParamField>

<ParamField body="description" type="string">
  New description.
</ParamField>

<ParamField body="clientSafe" type="boolean">
  Toggle browser SDK visibility.
</ParamField>

<ParamField body="archived" type="boolean">
  Pass `true` to archive the flag (sets `archivedAt` to now). Pass `false` to unarchive.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X PATCH https://nest.feather.mupeni.dev/v1/projects/proj_01hx.../flags/new-checkout \
    -H "Authorization: Bearer <server_key>" \
    -H "Content-Type: application/json" \
    -d '{ "archived": true }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "flag_01hx...",
    "key": "new-checkout",
    "name": "New Checkout Flow",
    "type": "boolean",
    "clientSafe": false,
    "archivedAt": "2024-05-01T10:00:00.000Z",
    "createdAt": "2024-04-01T09:00:00.000Z"
  }
  ```

  ```json 207 theme={null}
  {
    "id": "flag_01hx...",
    "key": "new-checkout",
    "syncWarning": "Edge cache sync failed: timeout. Config saved but evaluations may serve stale data."
  }
  ```
</ResponseExample>
