For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
      • GETGet expiring dates on flags for user
      • GETGet flag setting for user
      • GETList flag settings for user
      • PATCHUpdate expiring user target for flags
      • PUTUpdate flag settings for user
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewUser Settings

Get flag setting for user

Deprecated
GET
/api/v2/users/:projectKey/:environmentKey/:userKey/flags/:featureFlagKey
GET
/api/v2/users/:projectKey/:environmentKey/:userKey/flags/:featureFlagKey
$curl https://app.launchdarkly.com/api/v2/users/projectKey/environmentKey/userKey/flags/featureFlagKey \
> -H "Authorization: <apiKey>"
1{
2 "_links": {
3 "sort.order": {
4 "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order",
5 "type": "application/json"
6 }
7 },
8 "_value": null,
9 "setting": null,
10 "reason": {
11 "kind": "OFF"
12 }
13}
Get a single flag setting for a user by flag key. <br /><br />The `_value` is the flag variation that the user receives. The `setting` indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled.
Was this page helpful?
Previous

List flag settings for user

Next
Built with

Get a single flag setting for a user by flag key.

The _value is the flag variation that the user receives. The setting indicates whether you’ve explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be false. The example response indicates that the user Abbie_Braun has the sort.order flag enabled.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequiredformat: "string"
The project key
environmentKeystringRequiredformat: "string"
The environment key
userKeystringRequiredformat: "string"
The user key
featureFlagKeystringRequiredformat: "string"
The feature flag key

Response

User flag settings response
_linksmap from strings to objects
The location and content type of related resources.
_valueany
The value of the flag variation that the user receives. If there is no defined default rule, this is null.
settingany
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.
reasonobject
Contains information about why that variation was selected.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error