---
title: "Get Feature Flag Definitions"
method: GET
path: "/flags/definitions"
tags: ["Get Flag Definitions"]
---

# Get Feature Flag Definitions

`GET /flags/definitions`

Retrieve all enabled feature flag definitions for the authenticated project. Returns complete flag metadata including rulesets, variants, and rollout configurations.

## Path parameters

- `project_id` integer, required

## Query parameters

- `token` string

## Response `200`

Success

- FlagDefinitionsResponse — Response containing all enabled feature flag definitions
  - `flags` ExperimentationFlagMetadata[], required — Array of enabled feature flag definitions
    - `id` string, required — Unique identifier for the flag
    - `name` string, required — Human-readable name of the flag
    - `key` string, required — Unique key used to reference the flag
    - `status` 'enabled' | 'disabled' | 'archived', required — Current status of the flag
    - `project_id` integer, required — ID of the project this flag belongs to
    - `workspace_id` integer, required — ID of the workspace (dataview) this flag belongs to
    - `ruleset` RuleSet, required — Complete ruleset for a feature flag including variants and rollout configuration
      - `variants` Variant[], required — Array of variant definitions for this flag
        - `key` string, required — Unique key for this variant
        - `value` union, required — The value for this variant (can be any type)
          - string
          - number
          - boolean
          - object
        - `is_control` boolean, required — Whether this is the control variant
        - `is_sticky` boolean — Whether users should stick to this variant once assigned
        - `split` number, double, required — The proportion of users that should receive this variant (0.0 to 1.0)
      - `rollout` Rollout[], required — Array of rollout rules defining how the flag is distributed
        - `rollout_percentage` number, double, required — The percentage of the cohort that should receive this flag (0.0 to 1.0)
        - `cohort_hash` string — Hash of the cohort definition for lookup
        - `runtime_evaluation_rule` object — JsonLogic rule that's evaluated at request time based on runtime parameters in the request
        - `runtime_evaluation_definition` object — Key-value pairs that are evaluated at request time for cohort matching, replaced by the more powerful runtime_evaluation_rule
        - `variant_splits` object — Dictionary mapping variant keys to their allocation splits within this rollout
        - `variant_override` VariantOverride — Override to force a specific variant for a rollout rule (replaced by variant_splits)
          - `key` string — The variant key to force
      - `test` TestUsers — Mapping of test users to their assigned variants
        - `users` object — Map of distinct_id to variant_key for QA testing
    - `context` string, required — The context variable used for flag evaluation (e.g., distinct_id, device_id)
    - `experiment_id` string — ID of the associated experiment, if any
    - `is_experiment_active` boolean — Whether the associated experiment is currently active

## Other responses

- `401` — Unauthorized
- `403` — Forbidden

---

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