---
title: "Create a flag, off in every environment"
method: POST
path: "/api/v1/flags"
tags: ["Management"]
---

# Create a flag, off in every environment

`POST /api/v1/flags`

## Request

- Base URL: `https://launchflag.dev`
- URL: `https://launchflag.dev/api/v1/flags`
- Auth: HTTP bearer

## Request body

- Flag
  - `key` string, required
  - `description` string
  - `type` 'boolean' | 'multivariate'
  - `failMode` 'open' | 'closed': What your app should answer when it cannot reach us. Closed for money and auth.
  - `essential` boolean: Essential flags are left alone by emergency off.
  - `requires` string, nullable: Key of a flag this one depends on. While that flag is off for a user, this one is off for them too. Cycles are refused.
  - `variants` string[]

## Response `200`

The created flag

## Other responses

- `401`: A JSON error with a message that says how to fix it

---

[API](https://skmtc.dev/launchflag/apis/launchflag-api.md) · [All operations](https://skmtc.dev/launchflag/apis/launchflag-api/llms.txt) · [OpenAPI document](https://skmtc.dev/launchflag/apis/launchflag-api/revisions/e1b50c6effea?raw)
