User settings

Update flag settings for user

Deprecated

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

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.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string

The project key

Formatstring
environmentKey*string

The environment key

Formatstring
userKey*string

The user key

Formatstring
featureFlagKey*string

The feature flag key

Formatstring

Request Body

application/json

setting?unknown

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

comment?string

Optional comment describing the change

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/v2/users/string/string/string/flags/string" \  -H "Content-Type: application/json" \  -d '{}'
Empty