curl --request GET \
--url https://myorg.tribalhabits.com/papi/users \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/users"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://myorg.tribalhabits.com/papi/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://myorg.tribalhabits.com/papi/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://myorg.tribalhabits.com/papi/users");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://myorg.tribalhabits.com/papi/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_records": 47,
"max_per_page": 25,
"current_page": 1,
"total_pages": 2,
"records": [
{
"user_name": "12345",
"first_name": "Bilbo",
"last_name": "Baggins",
"email": "bilbo@myorg.com",
"manager_email": "manager@company.com",
"manager_2_email": "manager2@company.com",
"manager_3_email": null,
"manager_4_email": null,
"manager_5_email": null,
"mentor_email": "mentor@company.com",
"lms_learner_id": "456",
"lms_reference": "Testlms",
"org_admin": false,
"creator": false,
"team_leader": false,
"created_at": "2019-04-01T15:46:31.586+11:00",
"updated_at": "2021-06-15T09:25:25.756+10:00",
"current_sign_in_at": "2022-06-15T09:25:25.756+10:00",
"admin_type": null,
"deactivate_scheduled_date": "2022-06-15T00:00:00.000+10:00",
"reactivate_scheduled_date": null,
"language": "en",
"created_by": "API",
"timezone": "Australia/Sydney",
"user_notifications_enabled": true,
"team_leader_report_frequency": "every_thursday",
"learner_report_frequency": null,
"assessor_report_frequency": "every_wednesday",
"default_landing_page": "Default",
"org_admin_access": "none",
"login": "internal",
"type": "Client",
"active": true,
"X-Country": "Australia",
"X-State": "Queensland",
"X-Preferred Name": "Jack",
"platform_champion": false,
"role_1": "Instructor",
"role_2": null,
"role_3": null,
"role_4": null,
"role_5": null,
"groups": "Brisbane;Bundaberg",
"goals": "Goal1;Goal2"
}
]
}"Bad request: Illegal value 'maybe' for 'active'"{
"error": "Rate limit exceeded. Please slow down.",
"retry_after_seconds": 23
}Get all users
This endpoint retrieves all users (paginated), newest first.
Results are paginated. For example, GET /papi/users?page=2 returns the second page.
curl --request GET \
--url https://myorg.tribalhabits.com/papi/users \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/users"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://myorg.tribalhabits.com/papi/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://myorg.tribalhabits.com/papi/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://myorg.tribalhabits.com/papi/users");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://myorg.tribalhabits.com/papi/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_records": 47,
"max_per_page": 25,
"current_page": 1,
"total_pages": 2,
"records": [
{
"user_name": "12345",
"first_name": "Bilbo",
"last_name": "Baggins",
"email": "bilbo@myorg.com",
"manager_email": "manager@company.com",
"manager_2_email": "manager2@company.com",
"manager_3_email": null,
"manager_4_email": null,
"manager_5_email": null,
"mentor_email": "mentor@company.com",
"lms_learner_id": "456",
"lms_reference": "Testlms",
"org_admin": false,
"creator": false,
"team_leader": false,
"created_at": "2019-04-01T15:46:31.586+11:00",
"updated_at": "2021-06-15T09:25:25.756+10:00",
"current_sign_in_at": "2022-06-15T09:25:25.756+10:00",
"admin_type": null,
"deactivate_scheduled_date": "2022-06-15T00:00:00.000+10:00",
"reactivate_scheduled_date": null,
"language": "en",
"created_by": "API",
"timezone": "Australia/Sydney",
"user_notifications_enabled": true,
"team_leader_report_frequency": "every_thursday",
"learner_report_frequency": null,
"assessor_report_frequency": "every_wednesday",
"default_landing_page": "Default",
"org_admin_access": "none",
"login": "internal",
"type": "Client",
"active": true,
"X-Country": "Australia",
"X-State": "Queensland",
"X-Preferred Name": "Jack",
"platform_champion": false,
"role_1": "Instructor",
"role_2": null,
"role_3": null,
"role_4": null,
"role_5": null,
"groups": "Brisbane;Bundaberg",
"goals": "Goal1;Goal2"
}
]
}"Bad request: Illegal value 'maybe' for 'active'"{
"error": "Rate limit exceeded. Please slow down.",
"retry_after_seconds": 23
}Authorizations
Your organisation's API key, sent as Authorization: my_api_key. The key can also be passed as an api_key query parameter. See Authentication.
Query Parameters
Results page to return
Maximum number of results per page. Maximum permitted page size is 100. Larger values are reduced to 100.
Only users updated after this time, in UTC. Use the ISO 8601 form "yyyy-mm-ddThh:mm:ss", eg "2023-02-01T15:12:13". Do not include a time zone offset
"2023-02-01T15:12:13"
Only users updated before this time, in UTC. Same form as updated_at, eg "2023-02-01T15:12:13"
"2023-02-01T15:12:13"
If empty will show all users. true, 1 or yes returns only active users. false, 0 or no returns only inactive users. Values are case-insensitive. Any other value returns 400.
Filter by exact email address (case-insensitive), eg "john@myorg.com"
Filter by Custom Field value. Replace [custom field name] with the name of the custom field, eg x-city=Brisbane.
Custom Fields can be any of the following types; String, Number, Date or List. A String matches partially: for example, 'hello', 'he' and 'lo' all match a custom field with the value 'hello'. Numbers and Dates match by exact value so 23, would match 23 but not 233, and a Date matches given a format of 'YYYY-MM-DD' ex. '2025-03-20'. Custom Field of type List can also be filtered when given a comma separated list as the value, ex. x-city=Brisbane,Sydney would match all city custom fields with either 'Brisbane' or 'Sydney'. Each List value is a partial match on the list item name, so 'Syd' matches 'Sydney'. The values and custom field names are case insensitive. Unknown custom field names are ignored.

