cURL
curl --request GET \ --url https://api.example.com/api/users
{ "users": [ { "id": "<string>", "email": "<string>", "role": "<string>", "isActive": true, "firstName": "<string>", "lastName": "<string>", "phone": "<string>", "profileImage": "<string>", "supervisorId": "<string>", "lastLoginAt": "<string>", "loginCount": 123, "createdAt": "<string>" } ], "pagination": { "page": 123, "limit": 123, "total": 123, "totalPages": 123 } }
Show User object
Show Pagination metadata
curl -X GET "https://api.millenium-potters.com/api/users?page=1&limit=10&role=CREDIT_OFFICER" \ -H "Authorization: Bearer YOUR_TOKEN"
const response = await fetch('/api/users?role=CREDIT_OFFICER', { headers: { 'Authorization': `Bearer ${token}` } }); const data = await response.json();
{ "users": [ { "id": "clx123abc", "email": "[email protected]", "role": "CREDIT_OFFICER", "isActive": true, "firstName": "John", "lastName": "Doe", "phone": "+234-800-0000", "profileImage": "/uploads/profiles/profile-123.jpg", "supervisorId": "clx456def", "lastLoginAt": "2026-03-11T10:30:00Z", "loginCount": 45, "createdAt": "2026-01-01T00:00:00Z" } ], "pagination": { "page": 1, "limit": 10, "total": 15, "totalPages": 2 } }
401 Unauthorized
400 Bad Request