Skip to main content
PUT
/
api
/
v2
/
users
/
{projectKey}
/
{environmentKey}
/
{userKey}
/
flags
/
{featureFlagKey}
Update flag settings for user
curl --request PUT \
  --url https://app.launchdarkly.com/api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "setting": "existing_variation_value_to_use",
  "comment": "make sure this context experiences a specific variation"
}
'
{
  "code": "invalid_request",
  "message": "Invalid request body"
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Path Parameters

projectKey
string<string>
required

The project key

environmentKey
string<string>
required

The environment key

userKey
string<string>
required

The user key

featureFlagKey
string<string>
required

The feature flag key

Body

application/json
setting
any

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

Example:

"existing_variation_value_to_use"

comment
string

Optional comment describing the change

Example:

"make sure this context experiences a specific variation"

Response

Action succeeded