Skip to main content
GET
/
v1
/
projects
/
{projectIdOrName}
/
feature-flags
/
flags
listFlags
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.featureFlags.listFlags({
    projectIdOrName: "<value>",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
  });

  console.log(result);
}

run();
{
  "data": [
    {
      "variants": [
        {
          "value": "<string>",
          "id": "<string>",
          "description": "<string>",
          "label": "<string>"
        }
      ],
      "id": "<string>",
      "environments": {},
      "kind": "string",
      "revision": 123,
      "seed": 123,
      "state": "active",
      "slug": "<string>",
      "createdAt": 123,
      "updatedAt": 123,
      "createdBy": "<string>",
      "ownerId": "<string>",
      "projectId": "<string>",
      "typeName": "flag",
      "description": "<string>",
      "metadata": {
        "creator": {
          "id": "<string>",
          "name": "<string>"
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

projectIdOrName
string
required

The project id or name

Query Parameters

state
enum<string>

The state of the flags to retrieve. Defaults to active.

Available options:
active,
archived
withMetadata
boolean

Whether to include metadata in the response

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Response

data
object[]
required