Skip to content
Docs

List flags

GEThttps://api.vercel.com/v2/projects/{projectIdOrName}/feature-flags/flags
Retrieve feature flags for a project. Returns an opaque cursor for pagination.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.featureFlags.listFlagsV2({
projectIdOrName: "<value>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Response
{
"pagination": {
"next": "string"
},
"data": [
{
"description": "string",
"variants": [
{
"description": "string",
"label": "string",
"value": "string",
"id": "icfg_1234567890"
}
],
"id": "icfg_1234567890",
"environments": "value",
"kind": "boolean",
"revision": "123",
"seed": "123",
"state": "active",
"maintainerIds": [],
"permanent": "false",
"tags": [],
"slug": "string",
"createdAt": "123",
"updatedAt": "123",
"updatedBy": "string",
"createdBy": "string",
"ownerId": "example_id",
"projectId": "example_id",
"typeName": "flag",
"metadata": {
"creator": {
"id": "icfg_1234567890",
"name": "Example Name"
}
}
}
]
}
AuthorizationbearerToken

Default authentication mechanism

projectIdOrNamestringRequired
The project id or name
statestringOptional
The state of the flags to retrieve. Defaults to active.
limitintegerOptional
Maximum number of flags to return.
cursorstringOptional
Pagination cursor to continue from.
tagsarrayOptional
Filter flags by tag. Repeat the parameter for multiple tags (all must match).
createdBystringOptional
Filter flags by the id of the entity that created them (a user or team id).
maintainerIdsarrayOptional
Filter flags by maintainer user id. Repeat the parameter for multiple maintainers (any may match).
includeMarketplaceFlagsbooleanOptional
Whether to include Marketplace experimentation items in the paginated response. Defaults to false.
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