This endpoint can return all users scoped to the organization you are authenticated to, but it can also be scoped down by attributes. For example, you might use this endpoint see all users living in a given state, to send them all an email about a state specific weather event.
How it works
This endpoint returns a list of users scoped to the org that is authenticated. To access users on a suborg, you'll need to specify an org_id
within the query parameters of your request.
Passing multiple parameters returns users that match any of those parameters. It's not required that the returned users match all parameters; there only needs to be one match. For example, jobs_need_approval=true&admin=true
returns both admin users and users that need to have their jobs approved. The lone exception is using the search parameter, which uses AND/OR logic:
(search AND (filter1 OR filter2 OR filter3))
Response Code Snippet
See an example 200 response here, listing the users in a JSON blob, then follow below to learn more about the request, and what makes up the responses.
{
"pagination": {
"current_page": 1,
"total_pages": 1,
"total": 2
},
"results": [
{
"id": 1537943,
"first_name": "George",
"last_name": "Bluth",
"email": "[email protected]",
"time_zone": "Pacific Time (US & Canada)",
"aasm_state": "invited",
"updated_at": "2023-07-26T15:47:04.634Z",
"created_at": "2023-07-26T15:47:01.546Z",
"require_job_approval": false,
"last_sign_in_at": null,
"acl_template": "admin",
"test_data": true
},
{
"id": 1537006,
"first_name": "Buster",
"last_name": "Bluth",
"email": "[email protected]",
"time_zone": "Pacific Time (US & Canada)",
"aasm_state": "activated",
"updated_at": "2023-07-25T23:46:52.171Z",
"created_at": "2023-07-25T20:21:05.574Z",
"require_job_approval": false,
"last_sign_in_at": "2023-07-25T20:22:11.745Z",
"acl_template": "admin",
"test_data": true
}
]
}