---
title: "Add flag to an experiment"
method: POST
path: "/api/v1/experiments/{id}/set_flag_as"
tags: ["Experiments"]
---

# Add flag to an experiment

`POST /api/v1/experiments/{id}/set_flag_as`

## Path parameters

- `id` integer, required

## Request body

- object
  - `token` string, required
  - `flag_id` integer, required — The ID of the flag

## Response `200`

ok

- object
  - `id` integer — The ID of the experiment
  - `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

---

[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)
