List flags
GET
https://api.vercel.com/v1/projects/{projectIdOrName}/feature-flags/flagsRetrieve feature flags for a project. The list can be filtered by state and supports pagination.
https://api.vercel.com/v1/projects/{projectIdOrName}/feature-flags/flags
const response = await fetch('https://api.vercel.com/v1/projects/projectIdOrName/feature-flags/flags?state=string&withMetadata=true&limit=123&cursor=string&search=string&tags=[]&teamId=string&slug=string', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);Response
{ "data": [ { "createdAt": "123", "createdBy": "string", "description": "string", "environments": "value", "id": "icfg_1234567890", "kind": "boolean", "maintainerIds": [], "ownerId": "example_id", "permanent": "false", "projectId": "example_id", "revision": "123", "seed": "123", "slug": "string", "state": "active", "tags": [], "typeName": "flag", "updatedAt": "123", "updatedBy": "string", "variants": [ { "description": "string", "id": "icfg_1234567890", "label": "string", "value": "string" } ], "metadata": { "creator": { "id": "icfg_1234567890", "name": "Example Name" } } } ], "pagination": { "next": "string" }}AuthorizationbearerToken
Default authentication mechanism
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.