v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
User settings

Update flag settings for user

Enable or disable a feature flag for a user based on their key.

Omitting the setting attribute from the request body, or including a setting of null, erases the current setting for a user.

If you previously patched the flag, and the patch included the user's data, LaunchDarkly continues to use that data. If LaunchDarkly has never encountered the user's key before, it calculates the flag values based on the user key alone.

put/api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey}

Path parameters

projectKeystring string required

The project key

The project key

environmentKeystring string required

The environment key

The environment key

userKeystring string required

The user key

The user key

featureFlagKeystring string required

The feature flag key

The feature flag key

Request body

settingstring

The variation value to set for the context. Must match the flag's variation type.

commentstring

Optional comment describing the change

Example request

{
  "setting": "existing_variation_value_to_use",
  "comment": "make sure this context experiences a specific variation"
}

Response

Action succeeded