Skip to content
Docs

List flags

GEThttps://api.vercel.com/v1/projects/{projectIdOrName}/feature-flags/flags
Retrieve 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

projectIdOrNamestringRequired
The project id or name
statestringOptional
The state of the flags to retrieve. Defaults to active.
withMetadatabooleanOptionalDeprecated
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.
limitintegerOptional
Maximum number of flags to return. When not set, all flags are returned.
cursorstringOptional
Pagination cursor to continue from.
tagsarrayOptional
Filter flags by tag. Repeat the parameter for multiple tags (all must match).
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200Success
dataarrayRequired
400One of the provided values in the request query is invalid.
401The request is not authorized.
402The account is missing a payment so payment method must be updated
403You do not have permission to access this resource.
404Error
410Error