---
title: "Create a Flag"
method: POST
path: "/api/v1/flags"
tags: ["Flags"]
---

# Create a Flag

`POST /api/v1/flags`

Create a flag.

## Request body

- CreateFlag
  - `token` string, required
  - `item` object
    - `title` string, required — Specifies the name of the flag
    - `icon` 'star' | 'bolt' | 'thumbs-up' | 'thumbs-down' | 'question' | 'exclamation' | 'bell' | 'bell-slash' | 'fire' | 'sun' — The icon of the flag
    - `color` 'green-light' | 'green' | 'green-dark' | 'red-light' | 'red' | 'red-dark' | 'blue-light' | 'blue' | 'blue-dark' | 'orange-light' | 'orange' | 'orange-dark' | 'grey-light' | 'grey' | 'grey-dark' — The color of the flag
    - `description` string — General description of the flag

## Response `200`

ok

- object
  - `flag` object
    - `id` integer — The ID of the flag
    - `title` string
    - `description` string
    - `color` string
    - `icon` string
    - `active` boolean
    - `default` boolean
  - `state` string

## Other responses

- `401` — Unauthorized
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/labguru/apis/labguru-api.md) · [All operations](https://skmtc.net/labguru/apis/labguru-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/labguru/labguru-api/revisions/0534e4d70b77/schema)
