Get paginated list of users with hierarchical authorization
Query parameters
-
Page number
Minimum value is
1. Default value is1. -
Items per page
Minimum value is
1, maximum value is200. Default value is20. -
Search term. For organizations (distributors, resellers, customers), searches across name, description, and all custom_data fields (vat, address, city, contact, email, phone, language, notes, etc.). For systems, also searches across ipv4_address, ipv6_address and the organization name.
Minimum length is
1. -
Field to sort users by
Values are
name,email,username,created_at,updated_at,latest_login_at,organization,creator_name, orstatus. -
Sort direction
Values are
ascordesc. Default value isasc. -
Filter by organization logto_id. Supports multiple values.
-
Filter by user status. Supports multiple values, OR'd together.
- enabled: not suspended and not deleted
- suspended: suspended but not deleted
- deleted: soft-deleted
- no_login: virtual status matching accounts that never signed in (latest_login_at IS NULL)
"no_login" is additive rather than exclusive: such an account is also enabled or suspended, so it matches both filters. Selecting it alone yields exactly the users flagged with the "no login" badge in the UI. Deleted accounts stay hidden unless "deleted" is selected.
Values are
enabled,suspended,deleted, orno_login. -
Filter by user role ID. Supports multiple values.
-
Filter users by creator user ID or creator organization ID (exact match). Each provided ID is checked against both the user_id and organization_id fields of the user creator snapshot. Supports multiple values for checkbox filtering. Allowed values come from GET /api/filters/users.
curl \
--request GET 'https://my.nethesis.it/backend/api/users' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"code": 200,
"message": "users retrieved successfully",
"data": {
"users": [
{
"id": "usr_123456789",
"logto_id": "user_abc123def456",
"username": "john.doe",
"email": "john@example.com",
"name": "John Doe",
"phone": "+39 333 123456",
"organization": {
"id": "12345678-1234-1234-1234-123456789abc",
"logto_id": "org_123456789",
"name": "ACME Corp",
"type": "customer"
},
"roles": [
{
"id": "rol_admin_123",
"name": "Admin"
}
],
"custom_data": {
"department": "IT",
"position": "Senior Developer"
},
"created_at": "2025-06-20T14:30:00Z",
"updated_at": "2025-06-21T10:45:00Z",
"logto_synced_at": "2025-06-21T10:45:00Z",
"latest_login_at": "2025-06-21T15:30:45Z",
"deleted_at": "2026-05-04T09:42:00Z",
"suspended_at": "2026-05-04T09:42:00Z",
"created_by": {
"user_id": "aa15fcvgzw1y",
"username": "owner",
"name": "Nethesis Owner",
"email": "owner@nethesis.it",
"organization_id": "2wl3iixbc8ua",
"organization_name": "Owner",
"organization_type": "owner",
"on_behalf_of": true
},
"can_be_impersonated": true,
"has_avatar": false
}
],
"pagination": {
"page": 1,
"page_size": 20,
"total_count": 156,
"total_pages": 8,
"has_next": true,
"has_prev": false,
"next_page": 2,
"prev_page": 42,
"sort_by": "name",
"sort_direction": "asc"
}
}
}
{
"code": 401,
"message": "invalid token",
"data": {}
}
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}