---
title: "Update"
method: PATCH
path: "/v1/workbooks/{workbookId}/flags/{slug}"
tags: ["flags"]
---

# Update

`PATCH /v1/workbooks/{workbookId}/flags/{slug}`

Updates an existing flag

## Path parameters

- `workbookId` string, required — Workbook ID
- `slug` string, required

## Headers

- `Authorization` string, required
- `X-Disable-Hooks` 'true', required

## Request body

- TypeFlagsUpdateFlagRequest — Request to update an existing flag
  - `label` string — The new label for the flag
  - `colorHex` string — The new hex color code for the flag
  - `newSlug` string — The new slug for the flag

## Response `200`

Response with status 200

- TypeFlagsFlagResponse — A flag object
  - `id` string, required — The unique identifier for the flag
  - `slug` string, required — The flag slug
  - `label` string, required — The flag label
  - `colorHex` string, required — The hex color code for the flag
  - `workbookId` string, required — Workbook ID
  - `createdAt` string, date-time, required — When the flag was created
  - `updatedAt` string, date-time, required — When the flag was last updated

---

[API](https://skmtc.net/flatfile/apis/api-reference.md) · [All operations](https://skmtc.net/flatfile/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flatfile/api-reference/versions/9d3a9979cd96/schema)
