Skip to content

Listing Workspace Members

List members belonging to your workspace.

The list members endpoint allows you to retrieve a paginated list of the members in your workspace. We also support filtering by user email and status.

Endpoint

MethodUrl
GET/v1.0/members

Request Parameters

filter
string

The filter string. See the Filtering section for details on member filtering. Additionally, check the filtering documentation for more information.

page_size
number

The page size for search result pagination. If not provided, the service will default to 50 items.

page_token
string

The page to fetch. If any, this would be the next_page_token value returned from the previous request.

Sample Request

Copied
1curl -X GET 'https://api.worklayer.com/v1.0/members' \
2-H 'Authorization: Bearer {token}'

Response

data
list

The members belonging to that workspace. See the member reference page.

next_page_token
string

The pagination token to retrieve the next page of results. If the value is "", it means no further results for the request.

Sample Response

Copied
1{
2 "data": [
3 {
4 "email": "tony@stark.com",
5 "user_id": "a6e5ea2f-7d96-4852-9f46-2383dfd572f7",
6 "create_time": "2022-04-11T15:18:00.701Z",
7 "update_time": "2022-04-11T15:18:00.701Z",
8 "custom_fields": []
9 },
10 {
11 "email": "tony@stark.com",
12 "user_id": "781350c1-14cd-4790-88ef-841af4097aad",
13 "create_time": "2020-07-10T17:49:00.223Z",
14 "update_time": "2021-04-20T15:27:21.850Z",
15 "custom_fields": []
16 },
17 ],
18 "next_page_token": "c3RyaW5nL3dvcmtzcGFjZV9tZW1iZXIudXNlcl9pZC9hc2MvbG9jYWwlN0NlMmNlMTM0ZC03NmYyLTVhNzctOWQ2Yy05MDY2NjVkM2VlNTQ="
19}

Filtering

The following fields are supported:

FieldComparatorsDescriptionExample
email=The member's email.email = "test@email.com"
inactive=, !=The member's inactive status. Valid values are true and false.inactive = true

Currently, only AND is allowed when combining filters.

Sample Request with Filters

Copied
1curl -X GET 'https://api.worklayer.com/v1.0/members?filter=email="test@email.com" AND inactive = false' \
2-H 'Authorization: Bearer {token}'

Errors

  1. Forbidden: API Client cannot list workspace members.
  2. Unauthorized: API Client does not have valid credentials.
  3. NotFound: One or more members weren't found.
  4. BadRequest: Either the filter that was provided is in an incorrect format, or there was a malformed request.

Last updated on July 25, 2022