PATCH /v1/projects/{projectIdOrName}/feature-flags/flags/{flagIdOrSlug}
Update an existing feature flag. This endpoint supports partial updates, allowing you to modify specific properties like variants, environments, or state without providing the full flag configuration.
Servers
- https://api.vercel.com
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectIdOrName |
String | Yes |
The project id or name |
flagIdOrSlug |
String | Yes |
The flag id or name |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
teamId |
String | No |
The Team identifier to perform the request on behalf of. |
slug |
String | No |
The Team slug to perform the request on behalf of. |
withMetadata |
Boolean | No |
Whether to include metadata in the response |
ifMatch |
String | No |
Etag to match, can be used interchangeably with the |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
environments |
Object | No |
The configuration for the flag in different environments |
environments.name |
Object | No | |
environments.name.rules[] |
Array | Yes | |
environments.name.rules[].id |
String | Yes | |
environments.name.rules[].conditions[] |
Array | Yes | |
environments.name.rules[].conditions[].rhs |
No | ||
environments.name.rules[].conditions[].cmp |
String | Yes |
Valid values:
|
environments.name.rules[].conditions[].lhs |
Yes | ||
environments.name.rules[].outcome |
Yes | ||
environments.name.active |
Boolean | Yes | |
environments.name.revision |
Number | No |
The revision of the environment config |
environments.name.pausedOutcome |
Object | Yes | |
environments.name.pausedOutcome.type |
Yes | ||
environments.name.pausedOutcome.variantId |
String | Yes | |
environments.name.targets |
Object | No |
Allows assigning targets to variants while bypassing the flag's rules |
environments.name.fallthrough |
Yes | ||
environments.name.reuse |
Object | No |
Allows linking this environment to another environment so this flag will be evaluated with the other flag's configuration |
environments.name.reuse.active |
Boolean | Yes |
Whether the reuse is active or not |
environments.name.reuse.environment |
String | Yes |
The environment to link to |
seed |
Number | No |
A random seed to prevent split points in different flags from having the same targets |
description |
String | No |
A description of the flag |
variants[] |
Array | No |
The variants of the flag |
variants[].id |
String | Yes |
The id of the variant |
variants[].description |
String | No |
A description of the variant |
variants[].label |
String | No |
A label for the variant |
variants[].value |
Yes | ||
message |
String | No |
Additional message for this version |
state |
String | No |
Valid values:
|
createdBy |
String | No |
The user who created this patch |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.