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 keyReturns all flag definitions and their environment-specific configurations for a property.
| Parameter | Type | Required | Description |
|---|---|---|---|
| propertyId (query) | string | ✓ | Property 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:
| Field | Type | Description |
|---|---|---|
id | string | Flag ID |
key | string | Flag key used in code |
name | string | Human-readable name |
description | string? | Optional description |
type | string | "boolean" or "string" |
defaultValue | boolean \| string | Default value when no rules match |
createdAt | number | Unix timestamp |
configs: array of per-environment configurations:
| Field | Type | Description |
|---|---|---|
id | string | Config ID |
flagId | string | Which flag this config belongs to |
environmentId | string | Which environment |
enabled | boolean | Whether the flag is enabled in this environment |
value | boolean \| string | The default value for this environment |
rules | array | Targeting rules (conditions, rollout percentage, value overrides) |