Skip to main content
GET
/
v1
/
users
List users
curl --request GET \
  --url https://api.light.inc/v1/users \
  --header 'Authorization: <api-key>'
{
  "records": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "email": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "phoneNumber": {
        "countryCode": "UNDEFINED",
        "localNumber": "<string>"
      },
      "avatarUrl": "<string>",
      "notificationChannel": "MS_TEAMS",
      "country": "UNDEFINED",
      "city": "<string>",
      "zipcode": "<string>",
      "address": "<string>",
      "status": "ACTIVE",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "roles": [
        "SUPERUSER"
      ],
      "groups": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "name": "<string>",
          "description": "<string>",
          "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "memberCount": 123,
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z"
        }
      ],
      "managerIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ]
    }
  ],
  "hasMore": true,
  "total": 123,
  "nextCursor": "<string>",
  "prevCursor": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

Query Parameters

sort
string

Sort string in the format field:direction. To provide multiple sort fields, separate them with commas.

Available directions: asc, desc.

Available fields: firstName, lastName, status, createdAt, updatedAt.

Example:

"amount:desc,createdAt:asc"

filter
string

Filter string in the format field:operator:value. To provide multiple filters, separate them with commas.

Available operators: eq, ne, in, not_in, gt, gte, lt, lte.

  • For in and not_in operators, provide multiple values separated by the pipe character (|).

Available fields: id, userGroupId, status, email, createdAt, updatedAt, role, assignedRole.

Example:

"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null"

limit
integer
Required range: x <= 200
offset
integer
deprecated

Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.

cursor
string

The cursor position to start returning results from. To opt-in into cursor-based pagination, provide 0 for the initial request. For subsequent requests, use nextCursor and prevCursor from the previous response to navigate.

includeRoles
boolean
includeGroups
boolean

Response

default - application/json;charset=UTF-8

default response

records
object[]

List of records for the current page

hasMore
boolean

Boolean flag indicating if there are more records available

total
integer | null
deprecated

Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.

nextCursor
string | null

Cursor for fetching the next page (only for cursor pagination)

prevCursor
string | null

Cursor for fetching the previous page (only for cursor pagination)