Docs

List

Retrieve all feature flag definitions for a property

Last updated:

Retrieve all feature flags and their per-environment configurations for a property. Useful for building admin UIs, syncing flag state, or auditing.

List All Flags

GET /v1/flags/list Secret key
Returns all flag definitions and their environment-specific configurations for a property.
ParameterTypeRequiredDescription
propertyId (query)stringProperty to list flags for
Response
{
  "flags": [
    {
      "id": "flag_abc123",
      "key": "new-checkout",
      "name": "New Checkout Flow",
      "description": "Redesigned checkout experience",
      "type": "boolean",
      "defaultValue": false,
      "createdAt": 1711234567890
    },
    {
      "id": "flag_def456",
      "key": "cta-color",
      "name": "CTA Button Color",
      "type": "string",
      "defaultValue": "blue",
      "createdAt": 1711234600000
    }
  ],
  "configs": [
    {
      "id": "cfg_001",
      "flagId": "flag_abc123",
      "environmentId": "env_prod",
      "enabled": true,
      "value": true,
      "rules": []
    }
  ]
}
Example
bash
curl -X GET "https://api.sessionsight.com/v1/flags/list" \
  -H "x-api-key: YOUR_SECRET_API_KEY"

Response Shape

flags: array of flag definitions:

FieldTypeDescription
idstringFlag ID
keystringFlag key used in code
namestringHuman-readable name
descriptionstring?Optional description
typestring"boolean" or "string"
defaultValueboolean \| stringDefault value when no rules match
createdAtnumberUnix timestamp

configs: array of per-environment configurations:

FieldTypeDescription
idstringConfig ID
flagIdstringWhich flag this config belongs to
environmentIdstringWhich environment
enabledbooleanWhether the flag is enabled in this environment
valueboolean \| stringThe default value for this environment
rulesarrayTargeting rules (conditions, rollout percentage, value overrides)