List Users
curl --request GET \
--url https://api.example.com/api/usersimport requests
url = "https://api.example.com/api/users"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/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://api.example.com/api/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/users"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/users")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"users": [
{
"id": "<string>",
"email": "<string>",
"username": "<string>",
"role": "<string>",
"name": "<string>",
"profile_image_url": "<string>",
"profile_banner_image_url": "<string>",
"bio": "<string>",
"gender": "<string>",
"date_of_birth": "<string>",
"timezone": "<string>",
"presence_state": "<string>",
"status_emoji": "<string>",
"status_message": "<string>",
"status_expires_at": 123,
"info": {},
"settings": {
"ui": {}
},
"oauth": {},
"scim": {},
"last_active_at": 123,
"updated_at": 123,
"created_at": 123,
"group_ids": [
{}
]
}
],
"total": 123
}Users & Groups
List Users
GET
/
api
/
users
List Users
curl --request GET \
--url https://api.example.com/api/usersimport requests
url = "https://api.example.com/api/users"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/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://api.example.com/api/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/users"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/users")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"users": [
{
"id": "<string>",
"email": "<string>",
"username": "<string>",
"role": "<string>",
"name": "<string>",
"profile_image_url": "<string>",
"profile_banner_image_url": "<string>",
"bio": "<string>",
"gender": "<string>",
"date_of_birth": "<string>",
"timezone": "<string>",
"presence_state": "<string>",
"status_emoji": "<string>",
"status_message": "<string>",
"status_expires_at": 123,
"info": {},
"settings": {
"ui": {}
},
"oauth": {},
"scim": {},
"last_active_at": 123,
"updated_at": 123,
"created_at": 123,
"group_ids": [
{}
]
}
],
"total": 123
}Retrieves a paginated list of users with their group memberships and total count.
Authentication
Requires admin authentication.Query Parameters
string
Search query to filter users by name or email
string
Field to order results by. Options:
name, email, created_at, last_active_at, updated_at, role, or group_id:{group_id} for custom group orderingstring
Sort direction. Options:
asc or descinteger
default:"1"
Page number for pagination (minimum: 1)
Response
array
Array of user objects with group IDs
Show User Object
Show User Object
string
Unique user identifier
string
User email address
string
Username (optional)
string
User role:
admin, user, or pendingstring
User display name
string
URL to user’s profile image
string
URL to user’s profile banner image
string
User biography
string
User gender
string
User date of birth (ISO date format)
string
User timezone
string
User presence state
string
Status emoji
string
Status message text
integer
Unix timestamp when status expires
object
Additional user information (JSON)
object
OAuth authentication data
object
SCIM provisioning data
integer
Unix timestamp of last activity
integer
Unix timestamp of last update
integer
Unix timestamp of creation
array
Array of group IDs the user belongs to
integer
Total number of users matching the query
Example Request
curl -X GET "https://your-domain.com/api/users?page=1&order_by=name&direction=asc" \
-H "Authorization: Bearer YOUR_TOKEN"
Example Response
{
"users": [
{
"id": "user-123",
"email": "user@example.com",
"username": "johndoe",
"role": "user",
"name": "John Doe",
"profile_image_url": "/api/v1/users/user-123/profile/image",
"bio": "Software developer",
"last_active_at": 1709424000,
"updated_at": 1709424000,
"created_at": 1709337600,
"group_ids": ["group-1", "group-2"]
}
],
"total": 1
}
Notes
- Returns 30 users per page
- Users are returned with their associated group IDs
- Profile image URLs default to
/api/v1/users/{id}/profile/imageif not set