# Manage flags

Part of **Vercel**. Route queries via `POST https://www.company-skill.com/api/route`.

## What You Want to Do

Create, override, share, or programmatically control feature flags and A/B test experiments in Vercel to support gradual rollouts, development debugging, or automated deployment workflows.

**Typical User Questions**:
- How do I create a feature flag in Vercel?
- How do I set up A/B testing in Vercel?
- What ways does Vercel support managing feature flags?

## Decision Tree

Pick the path that best matches your situation:

- **If** you need to override flags quickly through the UI in your browser for development debugging, and **Vercel Toolbar** is enabled → Use **Manage feature flags via the dashboard** (jump to *vercel/vercel-feature_flags*)
- **If** you need to create, delete, or manage flags programmatically in a CI/CD pipeline by calling the **REST API** (e.g., using `Authorization: Bearer` authentication) → Use **Manage feature flags programmatically via API** (jump to *vercel/vercel-feature_flags*)
- **If** you plan to use the CLI to manage feature flags but the official documentation provides no related commands or workflows → **CLI path is not recommended** (no supporting evidence at this time)
- **Otherwise (default)** → **Manage feature flags via the dashboard** is the safest starting point and works for most development and testing scenarios.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation Friendly | Key Fact | Detail Skill |
|------|----------|------------|---------------|---------------------|----------|--------------|
| Manage feature flags via the dashboard | Visual configuration, quickly create and override flags; suited to development and testing. | low | No | No | Depends on the Vercel Toolbar; only supports temporary override sessions | `vercel/guide/vercel-feature_flags` |
| Manage feature flags programmatically via API | Automated integration, CI/CD pipelines, or dynamic flag-value evaluation. | medium | Yes | Yes | Supports A/B testing; requires Bearer Token authentication | `vercel/api/vercel-feature_flags` |
| Roll out features via CLI | Control feature release within a scripted deployment flow. | medium | Yes | Yes | Documentation does not mention any CLI command supporting feature flag management | `vercel/cli/vercel-feature_flags` |

## Path Details

### Path 1: Manage feature flags via the dashboard

**Best For**: Visual configuration, quickly create and override flags; suited to development and testing.

**Brief Description**: Flags Explorer is a feature of the Vercel Toolbar that lets users view and override an application's feature flags directly in the browser. It supports sharing configurations through **branch-based recommendations** or **URL-based recommendations**, and applies them instantly via **soft reload**. Users can click **Apply**, **Save Recommendations**, or **Share** to perform actions.

**When to Use**:
- Need to override feature flags visually and quickly during development or testing
- Want to debug feature behavior on the fly without modifying code
- Team members need to share flag configuration suggestions via branch or URL

**When NOT to Use**:
- Need to manage flags automatically in a CI/CD pipeline
- Require scripted or programmatic control of feature releases
- Cannot access the Vercel Toolbar in the target environment (e.g., production has no Toolbar)

**Known Limitations**:
- Only supports temporary overrides (personal session); not suitable for persistent configuration
- Depends on the Vercel Toolbar being active; cannot be used in environments without the Toolbar
- Does not support automated or scripted operations
- Cannot be used for CI/CD pipeline integration

### Path 2: Manage feature flags programmatically via API

**Best For**: Automated integration, CI/CD pipelines, or dynamic flag-value evaluation.

**Brief Description**: The Vercel Feature Management REST API allows feature flag management programmatically through HTTP requests. Key endpoints include `https://api.vercel.com/v1/projects/{projectIdOrName}/feature-flags/flags/{flagIdOrSlug}` and SDK key management endpoints. All requests must use **Bearer Token authentication** (via the `Authorization: Bearer` header) and support parameters such as `withMetadata`, `teamId`, `slug`, and `sdkKeyType`.

**Key technical facts**:
- A/B testing supported: Yes

**When to Use**:
- Need to create or delete feature flags automatically in a CI/CD pipeline
- Need to dynamically evaluate flag values and integrate them into server-side logic
- Need programmatic management of A/B testing experiments
- Need integration with external systems (e.g., an internal release platform)

**When NOT to Use**:
- Only need to temporarily override flags for local debugging (use Flags Explorer instead)
- No permission to obtain a Vercel Access Token
- Want to work entirely without code

**Known Limitations**:
- All management APIs (except /flags/discovery) require a valid Bearer Token authentication
- Does not support asynchronous operations; all requests are synchronous HTTP calls
- Cannot be used directly for client-side real-time evaluation (use @vercel/flags-core or the OpenFeature SDK)
- Pagination (cursor) and ETag conditional requests must be handled manually

### Path 3: Roll out features via CLI

**Best For**: Control feature release within a scripted deployment flow.

**Brief Description**: The documentation provides no specific Vercel CLI commands, parameters, or workflows for managing feature flags or A/B tests. There are no examples, navigation paths, or technical details supporting this path.

**When NOT to Use**:
- User expects to manage feature flags via the CLI, but the official documentation provides no supporting evidence

**Known Limitations**:
- The documentation does not mention any Vercel CLI commands for feature flag or A/B testing management
- No examples, parameter explanations, or navigation paths support the CLI path
- Cannot confirm whether the CLI actually supports this capability

## FAQ

Q: Which path should I start with?
A: If you're a developer debugging in a local or preview environment, start with **Manage feature flags via the dashboard** (Vercel Toolbar must be enabled). If you're building an automated release system, go directly to **Manage feature flags programmatically via API**.

Q: What if I need to automatically enable a feature flag in CI/CD but use Flags Explorer?
A: It will fail, because Flags Explorer only supports temporary **override sessions**, cannot run in CI environments without a browser or Toolbar, and does not support scripted operations.

Q: What if I try to manage feature flags with the Vercel CLI but no related commands are provided?
A: You will not find any working commands or supporting documentation, causing your scripts to fail and wasting development time. There is currently no evidence of feature flag management via the CLI.

Q: Can I use Flags Explorer in production to override flags?
A: No, unless you manually inject and log into the Vercel Toolbar on a production page — this is generally disallowed, and the override only applies to your session (**override session**); other users are unaffected.

Q: When managing flags via the API, are special permissions required?
A: Yes, all management APIs require valid **Bearer Token authentication**, and the token must have appropriate project-level permissions (typically supplied via the `VERCEL_ACCESS_TOKEN` environment variable).

Q: Can I share my flag configuration with the team through Flags Explorer?
A: Yes, through **Save Recommendations** and **Share** you can generate share links based on a branch (**branch-based recommendations**) or a URL (**URL-based recommendations**).

## Related queries

manage feature flags, A/B testing, feature flags, AB testing, how to set up A/B test, how to create a feature flag, Vercel feature rollout, control feature release, feature toggle, Flags Explorer, Vercel Toolbar, override session, branch-based recommendations, URL-based recommendations, soft reload

---
Part of [Vercel](https://www.company-skill.com/p/vercel.md) · https://www.company-skill.com/llms.txt
