v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
Users

List users

Use contexts instead

After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use Search for contexts instead of this endpoint.

List all users in the environment. Includes the total count of users. This is useful for exporting all users in the system for further analysis.

Each page displays users up to a set limit. The default is 20. To page through, follow the next link in the _links object. To learn more, read Representations.

get/api/v2/users/{projectKey}/{environmentKey}

Path parameters

projectKeystring string required

The project key

The project key

environmentKeystring string required

The environment key

The environment key

Query parameters

limitinteger

The number of elements to return per page

The number of elements to return per page

searchAfterstring string

Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the next link we provide instead.

Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the next link we provide instead.

Response

Users collection response

_linksobject

The location and content type of related resources

totalCountinteger required

The total number of users in the environment

Example response

{
  "_links": {
    "next": {
      "href": "/api/v2/users/my-project/my-environment?after=1647993600000&limit=20&searchAfter=my-user",
      "type": "application/json"
    },
    "self": {
      "href": "/api/v2/users/my-project/my-environment?after=1647993600000&limit=20",
      "type": "application/json"
    }
  },
  "totalCount": 245,
  "items": [
    {
      "lastPing": "2022-06-28T23:21:29.176609596Z",
      "user": {
        "key": "user-key-123abc",
        "secondary": "2398127",
        "ip": "10.10.10.10",
        "country": "United States",
        "email": "sandy@example.com",
        "firstName": "Sandy",
        "lastName": "Smith",
        "avatar": "http://example.com/avatar.png",
        "name": "Sandy Smith"
      },
      "sortValue": "user-key-123abc",
      "_links": {
        "parent": {
          "href": "/api/v2/users/my-project/my-environment",
          "type": "application/json"
        },
        "self": {
          "href": "/api/v2/users/my-project/my-environment/my-user",
          "type": "application/json"
        },
        "settings": {
          "href": "/api/v2/users/my-project/my-environment/my-user/flags",
          "type": "text/html"
        },
        "site": {
          "href": "/my-project/my-environment/users/my-user",
          "type": "text/html"
        }
      },
      "_access": {
        "denied": [
          {
            "reason": {
              "resources": [
                "proj/*:env/*;qa_*:/flag/*"
              ],
              "actions": [
                "*"
              ],
              "effect": "allow"
            }
          }
        ],
        "allowed": [
          {
            "reason": {
              "resources": [
                "proj/*:env/*;qa_*:/flag/*"
              ],
              "actions": [
                "*"
              ],
              "effect": "allow"
            }
          }
        ]
      }
    }
  ]
}