---
title: "GET /projects/{project_id}/flags"
method: GET
path: "/projects/{project_id}/flags"
tags: ["Feature Flags"]
---

# GET /projects/{project_id}/flags

`GET /projects/{project_id}/flags`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/flags`
- Auth: HTTP bearer

## Path parameters

- `project_id` integer, required

## Query parameters

- `include_archived` boolean
- `page` integer, nullable
- `page_size` integer, nullable

## Response `200`

Flags listed

- FlagListResponse: Note the absence of `salt`: it is never exposed. Publishing the bucketing salt would let a client predict, and self-select into, a rollout cohort.
  - `flags` FlagResponse[], required
    - `archived_at` string, nullable
    - `client_visible` boolean, required
    - `created_at` string, required
    - `default_value` unknown, required
    - `description` string, nullable
    - `environments` FlagEnvironmentResponse[], required: Per-environment overrides. Empty means the flag inherits its default everywhere.
      - `enabled` boolean, required
      - `environment_id` integer, required
      - `rules` FlagRule[], required: Ordered targeting rules; first match wins.
        - `conditions` RuleCondition[]: All must hold. Empty means every subject.
          - `attribute` string, required: Context attribute name, e.g. `plan`, `country`, `email`.
          - `operator` 'eq' | 'neq' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'matches' | 'gt' | 'gte' | 'lt' | 'lte' | 'exists' | 'not_exists', required: Comparison applied by one rule condition.
          - `value` union: The right-hand side of a condition: one value, or a list for `in`/`not_in`.
            - AttributeValue[]
              - …
            - union: A targeting attribute: what the caller (or the server, implicitly) knows about the subject.
              - …
        - `description` string, nullable: Free text shown in the console, e.g. "Beta customers".
        - `rollout_percentage` number, double, nullable: Share of matching subjects the rule applies to, `0..=100`. `None` means all of them. Ramping it up never removes anyone already included.
        - `serve` union, required: What a matching rule serves.
          - object: A literal value of the flag's type.
            - `kind` 'value', required
            - `value` unknown, required
          - object: One declared variant.
            - `kind` 'variant', required
            - `variant` string, required
          - object: Subjects split across declared variants by weight, stably per subject.
            - `kind` 'split', required
            - `split` VariantWeight[], required
              - …
      - `rules_valid` boolean, required: `false` when the stored rules could not be decoded. The flag then serves its default with reason `ERROR` until they are replaced.
      - `updated_at` string, required: Send back as `expected_updated_at` when replacing the rules.
      - `value` unknown
    - `exposure_sample_rate` number, double, required: Share of subjects whose browser records exposure events. 0 = off.
    - `id` integer, required
    - `key` string, required
    - `last_evaluated_at` string, nullable: When an app last actually evaluated this flag. `None` means never seen, which is a real answer rather than missing data.
    - `updated_at` string, required: Send back as `expected_updated_at` to make an update conditional.
    - `value_type` string, required
    - `variants` FlagVariant[], required: Named values targeting rules may serve.
      - `description` string, nullable
      - `key` string, required: `[a-z0-9][a-z0-9._-]*`, unique within the flag.
      - `value` unknown, required
  - `page` integer, required
  - `page_size` integer, required
  - `total` integer, required: Total flags matching the filter, across all pages.
  - `total_pages` integer, required

## Other responses

- `401`: Unauthorized
- `403`: Insufficient permissions
- `500`: Internal server error

## Changes

- **2026-11-20** `68c970dc603c`: 5 info
  - added the required property `flags/items/environments/items/rules` to the response with the `200` status
  - added the required property `flags/items/environments/items/rules_valid` to the response with the `200` status
  - added the required property `flags/items/environments/items/updated_at` to the response with the `200` status
  - added the required property `flags/items/exposure_sample_rate` to the response with the `200` status
  - …1 more
- **2026-08-04** `c647b6ab1d2c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/flags/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
