List Users
Returns a paginated list of all users in the organization.
GET
/api/v1/usersReturns a paginated list of users belonging to your organization. Results are sorted by createdAt descending by default.
Tip
Use the
limit parameter to control page size. For large organizations, keep the limit below 50 for best performance.Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| page | integer | — | Page number, starting from 1. Default: 1. |
| limit | integer | — | Number of results per page. Max: 100. Default: 20. |
| sort | string | — | Sort field. Allowed values: name, email, createdAt. |
| order | string | — | Sort direction. Allowed values: asc, desc. Default: asc. |
Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization* | string | ✓ | Bearer token. Format: Bearer <token>. |
| Accept | string | — | Response format. Default: application/json. |
Responses
| Status | Description |
|---|---|
| 200 | List of users retrieved successfully. |
| 401 | Unauthorized. Missing or invalid Bearer token. |
| 403 | Forbidden. The token does not have the required users:read scope. |
Examples
curl -X GET "https://api.example.com/v1/users?page=1&limit=20" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"
const res = await fetch('/api/v1/users?page=1&limit=20', {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const { data, meta } = await res.json();
console.log(`Found ${meta.total} users`);
import requests
r = requests.get(
'https://api.example.com/v1/users',
params={'page': 1, 'limit': 20},
headers={'Authorization': 'Bearer YOUR_TOKEN'}
)
payload = r.json()
print(f"Found {payload['meta']['total']} users")
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.example.com/v1/users?page=1&limit=20"))
.header("Authorization", "Bearer YOUR_TOKEN")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());