---
title: "List flags"
method: GET
path: "/v1/projects/{projectIdOrName}/feature-flags/flags"
tags: ["feature-flags"]
---

# List flags

`GET /v1/projects/{projectIdOrName}/feature-flags/flags`

Retrieve feature flags for a project. The list can be filtered by state and supports pagination.

## Path parameters

- `projectIdOrName` string, required — The project id or name

## Query parameters

- `state` 'active' | 'archived' — The state of the flags to retrieve. Defaults to `active`.
- `withMetadata` boolean — Deprecated. Whether to include creator metadata in each flag in the response. Resolve creator identity client-side (e.g. via the team members endpoint) instead; this parameter will be removed in a future release. Use `GET /v1/projects/:id/feature-flags/flags/:flagIdOrSlug?withMetadata=true` for single-flag lookups that need creator metadata.
- `limit` integer — Maximum number of flags to return. When not set, all flags are returned.
- `cursor` string — Pagination cursor to continue from.
- `search` string — Search flags by their slug or description. Case-insensitive.
- `tags` string[] — Filter flags by tag. Repeat the parameter for multiple tags (all must match).
- `teamId` string
- `slug` string

## Response `200`

- object
  - `data` Flag[], required
    - `description` string
    - `maintainerIds` string[]
    - `permanent` false | true
    - `tags` string[]
    - `experiment` object
      - `id` string
      - `name` string
      - `numVariants` number
      - `surfaceArea` string
      - `stickyRequirement` false | true
      - `layer` string
      - `guardrailMetrics` object[]
        - `description` string
        - `metricFormula` string
        - `name` string, required
        - `metricType` 'count' | 'currency' | 'percentage', required
        - `metricUnit` 'session' | 'user' | 'visitor', required
        - `directionality` 'decreaseIsGood' | 'increaseIsGood', required
      - `hypothesis` string
      - `device` 'android' | 'desktop' | 'ios' | 'mweb'
      - `controlVariantId` string
      - `startedAt` number
      - `endedAt` number
      - `decision` string
      - `decisionReason` string
      - `duration` number
      - `durationUnit` 'days' | 'exposures'
      - `allocationPercent` number
      - `allocationUnit` 'cookieId' | 'userId' | 'visitorId', required
      - `primaryMetrics` object[], required
        - `description` string
        - `metricFormula` string
        - `name` string, required
        - `metricType` 'count' | 'currency' | 'percentage', required
        - `metricUnit` 'session' | 'user' | 'visitor', required
        - `directionality` 'decreaseIsGood' | 'increaseIsGood', required
      - `status` 'closed' | 'draft' | 'paused' | 'running', required
    - `updatedBy` string
    - `variants` object[], required
    - `id` string, required
    - `environments` object, required
    - `kind` 'boolean' | 'json' | 'number' | 'string', required
    - `revision` number, required
    - `seed` number, required
    - `state` 'active' | 'archived', required
    - `slug` string, required
    - `createdAt` number, required
    - `updatedAt` number, required
    - `createdBy` string, required
    - `ownerId` string, required
    - `projectId` string, required
    - `typeName` 'flag', required
    - `metadata` object
      - `creator` object
        - `id` string, required
        - `name` string, required
  - `pagination` object, required
    - `next` string, nullable, required

## Other responses

- `400` — One of the provided values in the request query is invalid.
- `401` — The request is not authorized.
- `402` — The account is missing a payment so payment method must be updated
- `403` — You do not have permission to access this resource.
- `404`
- `410`

---

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