Skip to content

Get list of users

The users listing endpoint returns every user in the workspace together with their identifiers, contact details, organizational placement, and status. It supports pagination, status filtering, and optional expansion of related records such as location, department, and public holidays.

Endpoint and authorization

Query parameters

All query parameters are optional. The table below summarizes each one; the exact schema definitions live in protected modules schema0001 through schema0007 and schema0008 through schema0014.

How limit and filters interact

The limit parameter sets how many users the endpoint pulls before any filtering happens, not how many records come back. Filters are applied after that pull, so a request with limit=300 and a narrow status, location, department, or label filter can return far fewer than 300 records even when more matching users exist in the workspace. For example, a call with limit=300 and status=INACTIVE may return a handful of users while many more inactive users remain unfetched. To page through a filtered set reliably, keep the limit stable across calls and follow the nextToken returned in each response until it is absent.

Response body

A successful call returns a JSON object with a status field, an optional nextToken for pagination, and a data array of user objects. Each user object carries id, name, email, isAdmin, locationId, departmentId, labels, status, employeeId, startDate, and endDate. When the expand parameter is used, the user object also includes nested location, department, and holidays records. The exact response schema, including field types and formats, is delivered in protected module schema0015; the example payload is in code0002.

Field map for a user record

Use this map to decide which fields to read and which to request via expand.

Error responses

The endpoint documents five error statuses. A 400 returns a standard error body with a status of error and a human-readable message; the example shown is a validation message about a required startDate. A 403 returns a gateway-style body with a single message field, used when the API key is missing or unrecognized. A 404 returns either a gateway-style body or the standard error body, used when the key is not authorized for the resource. A 500 returns the standard error body with a message such as Failed to list users. The exact error schemas are in protected modules schema0016 through schema0019, and the example bodies are in code0003 through code0006.

Telling the two authorization failures apart

A 403 with a Forbidden message means the request did not carry a usable API key. A 404 with a Not Found message means the key was recognized but is not permitted to reach this resource. Treating both as a single auth failure hides whether the fix is to supply a key or to change the key's permissions. Log the status code and the message field separately so the two cases stay distinguishable.

Pre-flight checklist

Query parameter summary
ParameterTypeRequiredNotes
nextTokenstringNoThe nextToken returned by the previous API call.
limitstringNoNumber of users to return, between 25 and 500, default 300. Filters apply after the limit; returned count may be less than the limit.
statusstringNoFilter by status. Allowed values: ACTIVE, INACTIVE, DELETED. Default is ACTIVE.
locationsstringNoComma-separated list of locations. Filters users to those in one of the provided locations. Default includes any location.
departmentsstringNoComma-separated list of departments. Filters users to those in one of the provided departments. Default includes any department.
labelsstringNoComma-separated list of labels. Filters users to those with one of the provided labels. Default includes users with or without labels.
expandstringNoExpand related records. Allowed values: location, department, holidays.

Parameter descriptions follow the endpoint's own documentation. The source text for locations, departments, and labels refers to "leaves by users"; in this endpoint those parameters filter the returned users, not leaves. The exact schema definitions are in protected modules schema0001 through schema0014.

User record field map
FieldTypeNotes
idstring (UUID)user ID
namestringuser name
emailstringuser email
isAdminbooleanwhether the user is an admin
locationIdstringthe ID of the user's location
departmentIdstringthe ID of the user's department
labelsarray of stringslabels
statusstringusers status, one of ACTIVE, INACTIVE, DELETED
employeeIdstringan employee ID if it is set on the user profile page
startDatestring (ISO 8601)a timestamp in the ISO 8601 format
endDatestring (ISO 8601)a timestamp in the ISO 8601 format, if the end date is set on the user profile page
locationobjectlocation ID, name, timezone, isDefault, createdAt
departmentobjectdepartment ID, name, isDefault, createdAt
holidaysarraypublic holidays for the user's location, grouped by year (only when expand=holidays)

Field types and descriptions are taken from the endpoint's response schema, delivered in protected module schema0015.

Error status map
StatusBody shapeExample messageMeaning
400status + message"startDate" is requiredValidation error on the request.
403message onlyForbiddenMissing or unrecognized API key.
404message only or status + messageNot FoundAPI key not authorized for this resource.
500status + messageFailed to list usersServer-side failure while listing users.

Error bodies and status meanings are taken from the endpoint's own documentation; exact schemas are in protected modules schema0016 through schema0019.

Frequently asked questions

What is the default status filter?

The status parameter defaults to ACTIVE. To include inactive or deleted users, set status explicitly to INACTIVE or DELETED.

How do I get location, department, or holiday details in the response?

Set the expand parameter to location, department, or holidays. The corresponding nested object or array is then included in each user record. Without expand, only the ID fields locationId and departmentId are present.

What is the difference between a 403 and a 404 from this endpoint?

A 403 with a Forbidden message means the API key is missing or unrecognized. A 404 with a Not Found message means the key was recognized but is not authorized for this resource. The two cases point to different fixes.

curl -X GET "$API_BASE_URL/v1/users" \
  -H "x-api-key: "
{
  "status": "ok",
  "nextToken": "next-token",
  "data": [
    {
      "id": "user-cfe5d39b-f1f0-45aa-85cd-ce93e637a262",
      "name": "Jomh Chao",
      "email": "[email protected]",
      "isAdmin": false,
      "locationId": "location-79c77ac8-e5bf-479f-9488-648a58379ff1",
      "departmentId": "team-0a21c25e-6925-4a5b-90ee-ecf82096c4f6",
      "labels": [
        "contractor"
      ],
      "status": "ACTIVE",
      "employeeId": "uuid-id",
      "startDate": "2022-11-08",
      "endDate": "2022-11-08",
      "location": {
        "id": "locations-6ca89536-be55-42c5-8e52-c5c4215afb9f",
        "name": "Los Angeles",
        "timezone": "America/Los_Angeles",
        "isDefault": false,
        "createdAt": "2022-08-22T15:00:00.000Z"
      },
      "department": {
        "id": "teams-969f8429-7dc3-48a1-96b1-6049a99dda06",
        "name": "Dev Team",
        "isDefault": false,
        "createdAt": "2022-08-22T15:00:00.000Z"
      },
      "holidays": [
        {
          "year": 2025,
          "holidays": [
            {
              "id": "h-12345",
              "name": "Christmas Day",
              "date": "2025-12-25",
              "isHalfDay": false
            }
          ]
        }
      ]
    }
  ]
}
{
  "status": "error",
  "message": "\"startDate\" is required"
}
{
  "message": "Forbidden"
}
{
  "message": "Not Found"
}
{
  "status": "error",
  "message": "Failed to list users"
}

nextToken

FieldTypeRequiredDescriptionConstraints
nextTokenstringNoThe nextToken returned by the previous API call.

limit

FieldTypeRequiredDescriptionConstraints
limitstringNoa number of users to return, between 25 and 500, default is 300. If the filters are provided, they'll be applied after the limit. The number of returned users might be less than the provided limit.

status

FieldTypeRequiredDescriptionConstraints
statusstringNofilter users by status, default is 'ACTIVE'Allowed values: "ACTIVE" | "INACTIVE" | "DELETED"

locations

FieldTypeRequiredDescriptionConstraints
locationsstringNoa comma-sparated list of locations. Used for filtering, if provided, the API method will return leaves by users in one of the provided locations. By default, the API method returns leaves by users in any location.

departments

FieldTypeRequiredDescriptionConstraints
departmentsstringNoa comma-sparated list of departments. Used for filtering, if provided, the API method will return leaves by users in one of the provided departments. By default, the API method returns leaves by users in any department.

labels

FieldTypeRequiredDescriptionConstraints
labelsstringNoa comma-sparated list of labels. Used for filtering, if provided, the API method will return leaves by users with one of the provided labels. By default, the API method returns leaves by users with or without labels.

expand

FieldTypeRequiredDescriptionConstraints
expandstringNoexpand leave requestAllowed values: "location" | "department" | "holidays"

response

FieldTypeRequiredDescriptionConstraints
responseobject
response.statusstringNoAllowed values: "ok" | "error"
response.nextTokenstringNo
response.dataarray<Users>No
response.data[]object
response.data[].idstringNouser IDFormat: UUID
response.data[].namestringNouser name
response.data[].emailstringNouser email
response.data[].isAdminbooleanNoa boolean that tells you if the selected user is an admin
response.data[].locationIdstringNothe ID of the user's location
response.data[].departmentIdstringNothe ID of the user's department
response.data[].labelsarray<string>Nolabels
response.data[].labels[]string
response.data[].statusstringNousers status, one of the followingAllowed values: "ACTIVE" | "INACTIVE" | "DELETED"
response.data[].employeeIdstringNoan employee ID if it is set on the user profile page
response.data[].startDatestringNoa timestamp in the ISO 8601 format
response.data[].endDatestringNoa timestamp in the ISO 8601 format, if the end date is set on the user profile page
response.data[].locationobjectNo
response.data[].location.idstringNolocation IDFormat: UUID
response.data[].location.namestringNolocation name
response.data[].location.timezonestringNolocation time zone
response.data[].location.isDefaultbooleanNoa boolean that tells you if the location is default or not
response.data[].location.createdAtstringNoa timestamp in the ISO 8601 formatFormat: Date ISO 8601 format
response.data[].departmentobjectNo
response.data[].department.idstringNodepartment IDFormat: UUID
response.data[].department.namestringNodepartment name
response.data[].department.isDefaultbooleanNoa boolean that tells you if the department is default or not
response.data[].department.createdAtstringNoa timestamp in the ISO 8601 formatDate ISO 8601 format
response.data[].holidaysarray<PublicHolidaysByYear>Nopublic holidays for the user's location, grouped by year (only when expand=holidays)
response.data[].holidays[]object
response.data[].holidays[].yearintegerNothe year for the holidays
response.data[].holidays[].holidaysarray<PublicHoliday>No
response.data[].holidays[].holidays[]object
response.data[].holidays[].holidays[].idstringNoholiday ID
response.data[].holidays[].holidays[].namestringNoholiday name
response.data[].holidays[].holidays[].datestringNodate in YYYY-MM-DD format
response.data[].holidays[].holidays[].isHalfDaybooleanNowhether it is a half-day holiday

response

FieldTypeRequiredDescriptionConstraints
responseobjectStandard error body returned by all validated endpoints.
response.statusstringYesAllowed values: "error"
response.messagestringYesHuman-readable description of what went wrong.

response

FieldTypeRequiredDescriptionConstraints
responseGatewayErrorResponse | ErrorResponse
response[variant1]objectError body returned when the request is rejected before reaching the endpoint (missing API key, unknown path).
response[variant1].messagestringYes
response[variant2]objectStandard error body returned by all validated endpoints.
response[variant2].statusstringYesAllowed values: "error"
response[variant2].messagestringYesHuman-readable description of what went wrong.

response

FieldTypeRequiredDescriptionConstraints
responseobjectError body returned when the request is rejected before reaching the endpoint (missing API key, unknown path).
response.messagestringYes

response

FieldTypeRequiredDescriptionConstraints
responseobjectStandard error body returned by all validated endpoints.
response.statusstringYesAllowed values: "error"
response.messagestringYesHuman-readable description of what went wrong.