Skip to main content

Get Users

Used to retrieve a paginated list of users with support for filtering, sorting, and searching across the system.

API Endpoint

PropertyValue
Request MethodPOST
Request URLhttps://api.seliseblocks.com/idp/v1/Iam/GetUsers

Request

Request Example

curl -X POST 'https://api.seliseblocks.com/idp/v1/Iam/GetUsers' \
-H 'Content-Type: application/json' \
-H 'x-blocks-key: YOUR_PROJECT_KEY' \
-d '{
"page": 1,
"pageSize": 10,
"sort": {
"property": "createdDate",
"isDescending": true
},
"filter": {
"email": "user@example.com",
"name": "John",
"userIds": ["user_123"],
"status": {
"active": true,
"inactive": false
},
"mfa": {
"enabled": true,
"disabled": false
},
"joinedOn": "2026-01-01T00:00:00Z",
"lastLogin": "2026-03-01T00:00:00Z",
"organizationId": "org_123"
},
"projectKey": "YOUR_PROJECT_KEY"
}'

Request Headers

FieldTypeDescription
Content-Typeapplication/jsonData type, must be application/json.
x-blocks-keystringProject key for authentication.

Request Body

FieldTypeRequiredDescription
pageintegerNoPage number for pagination (1-based).
pageSizeintegerNoNumber of records per page.
sortobjectNoSort configuration with property and direction.
filterobjectNoFilter criteria for searching users.
projectKeystringNoThe project key for filtering results.

Sort Object

FieldTypeDescription
propertystringProperty to sort by (e.g., createdDate).
isDescendingbooleanSort in descending order if true.

Filter Object

FieldTypeDescription
emailstringFilter by email address.
namestringFilter by user name.
userIdsarrayFilter by specific user IDs.
statusobjectFilter by user status (active/inactive).
mfaobjectFilter by MFA status.
joinedOnstring(date-time)Filter by join date.
lastLoginstring(date-time)Filter by last login date.
organizationIdstringFilter by organization ID.

Status Filter Object

FieldTypeDescription
activebooleanInclude active users.
inactivebooleanInclude inactive users.

MFA Filter Object

FieldTypeDescription
enabledbooleanInclude MFA enabled users.
disabledbooleanInclude MFA disabled users.

Response

Success Response

Returns HTTP status 200 OK with paginated user list.

{
"data": [
{
"itemId": "user_123",
"createdDate": "2026-01-15T10:30:00Z",
"lastUpdatedDate": "2026-03-20T14:00:00Z",
"language": "en-US",
"salutation": "Mr.",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"userName": "johndoe",
"phoneNumber": "+1234567890",
"memberships": [
{
"organizationId": "org_123",
"roles": ["admin"],
"permissions": ["read", "write", "delete"]
}
],
"active": true,
"isVarified": true,
"profileImageUrl": "https://example.com/image.jpg",
"mfaEnabled": true,
"isMfaVerified": true,
"userMfaType": 1,
"userCreationType": 0,
"lastLoggedInTime": "2026-03-20T10:00:00Z",
"lastLoggedInDeviceInfo": "Windows Chrome",
"logInCount": 42
}
],
"errors": {},
"totalCount": 1
}

Response Fields

FieldTypeDescription
dataarrayList of user objects.
errorsobjectAny errors encountered during retrieval.
totalCountintegerTotal count of users matching the filter.

User Object Fields

FieldTypeDescription
itemIdstringUnique user identifier.
createdDatestring(date-time)Account creation date.
lastUpdatedDatestring(date-time)Last update date.
languagestringUser's preferred language.
salutationstringUser's salutation.
firstNamestringUser's first name.
lastNamestringUser's last name.
emailstringUser's email address.
userNamestringUser's username.
phoneNumberstringUser's phone number.
membershipsarrayOrganization memberships.
activebooleanWhether user is active.
isVarifiedbooleanWhether email is verified.
profileImageUrlstringUser's profile image URL.
mfaEnabledbooleanWhether MFA is enabled.
isMfaVerifiedbooleanWhether MFA is verified.
userMfaTypeintegerType of MFA (0-based).
userCreationTypeintegerType of user creation (0-based).
lastLoggedInTimestring(date-time)Last login timestamp.
lastLoggedInDeviceInfostringDevice information from last login.
logInCountintegerTotal number of logins.