Skip to main content
GET
/
api
/
v2
/
users
/
{projectKey}
/
{environmentKey}
/
{userKey}
/
flags
/
{featureFlagKey}
Get flag setting for user
curl --request GET \
  --url https://app.launchdarkly.com/api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} \
  --header 'Authorization: <api-key>'
{
  "_links": {
    "sort.order": {
      "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order",
      "type": "application/json"
    }
  },
  "_value": "true",
  "setting": "null",
  "reason": "{\"kind\": \"RULE_MATCH\"}"
}

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

Response

User flag settings response

The location and content type of related resources.

Example:
{
"sort.order": {
"href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order",
"type": "application/json"
}
}
_value
any
required

The value of the flag variation that the user receives. If there is no defined default rule, this is null.

Example:

"true"

setting
any
required

Whether the user is explicitly targeted to receive a particular variation. The setting is false if you have turned off a feature flag for a user. It is null if you haven't assigned that user to a specific variation.

Example:

null

reason
object

Contains information about why that variation was selected.

Example:

"{\"kind\": \"RULE_MATCH\"}"