For the complete documentation index, see llms.txt. For the full documentation snapshot, see llms-full.txt.
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.
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.
The project key
The environment key
The user key
The feature flag key
Action succeeded
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"
}