feature-flags

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.

patch/v1/projects/{projectIdOrName}/feature-flags/flags/{flagIdOrSlug}

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/v1/projects/{projectIdOrName}/feature-flags/flags/{flagIdOrSlug}
  • Auth: HTTP bearer

Path parameters

projectIdOrNamestring required

The project id or name

flagIdOrSlugstring required

The flag id or name

Query parameters

ifMatchstring

Etag to match, can be used interchangeably with the if-match header

withMetadataboolean

Whether to include metadata in the response

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Request body

createdBystring

The user who created this patch

messagestring

Additional message for this version

environmentsobject

The configuration for the flag in different environments

seednumber

A random seed to prevent split points in different flags from having the same targets

descriptionstring

A description of the flag

state'active' | 'archived'
maintainerIdsstring[]

The user ids of the maintainers of the flag

permanentboolean

Whether this flag is marked as permanent, indicating it should not be removed

tagsstring[]

Tags for categorizing the flag

Response

createdAtnumber required
createdBystring required
descriptionstring
environmentsobject required
idstring required
kind'boolean' | 'json' | 'number' | 'string' required
maintainerIdsstring[]
ownerIdstring required
permanentfalse | true
projectIdstring required
revisionnumber required
seednumber required
seenInProductionfalse | true
slugstring required
state'active' | 'archived' required
tagsstring[]
typeName'flag' required
updatedAtnumber required
updatedBystring

Changes

    • info

      added the optional property to the response with the status

    • breaking

      the response's body type changed from no type to object for status

    • info

      removed subschema #1 from the response body oneOf list for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status