Get Users
Used to retrieve a paginated list of users with support for filtering, sorting, and searching across the system.
API Endpoint
| Property | Value |
|---|---|
| Request Method | POST |
| Request URL | https://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
| Field | Type | Description |
|---|---|---|
| Content-Type | application/json | Data type, must be application/json. |
| x-blocks-key | string | Project key for authentication. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| page | integer | No | Page number for pagination (1-based). |
| pageSize | integer | No | Number of records per page. |
| sort | object | No | Sort configuration with property and direction. |
| filter | object | No | Filter criteria for searching users. |
| projectKey | string | No | The project key for filtering results. |
Sort Object
| Field | Type | Description |
|---|---|---|
| property | string | Property to sort by (e.g., createdDate). |
| isDescending | boolean | Sort in descending order if true. |
Filter Object
| Field | Type | Description |
|---|---|---|
| string | Filter by email address. | |
| name | string | Filter by user name. |
| userIds | array | Filter by specific user IDs. |
| status | object | Filter by user status (active/inactive). |
| mfa | object | Filter by MFA status. |
| joinedOn | string(date-time) | Filter by join date. |
| lastLogin | string(date-time) | Filter by last login date. |
| organizationId | string | Filter by organization ID. |
Status Filter Object
| Field | Type | Description |
|---|---|---|
| active | boolean | Include active users. |
| inactive | boolean | Include inactive users. |
MFA Filter Object
| Field | Type | Description |
|---|---|---|
| enabled | boolean | Include MFA enabled users. |
| disabled | boolean | Include 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
| Field | Type | Description |
|---|---|---|
| data | array | List of user objects. |
| errors | object | Any errors encountered during retrieval. |
| totalCount | integer | Total count of users matching the filter. |
User Object Fields
| Field | Type | Description |
|---|---|---|
| itemId | string | Unique user identifier. |
| createdDate | string(date-time) | Account creation date. |
| lastUpdatedDate | string(date-time) | Last update date. |
| language | string | User's preferred language. |
| salutation | string | User's salutation. |
| firstName | string | User's first name. |
| lastName | string | User's last name. |
| string | User's email address. | |
| userName | string | User's username. |
| phoneNumber | string | User's phone number. |
| memberships | array | Organization memberships. |
| active | boolean | Whether user is active. |
| isVarified | boolean | Whether email is verified. |
| profileImageUrl | string | User's profile image URL. |
| mfaEnabled | boolean | Whether MFA is enabled. |
| isMfaVerified | boolean | Whether MFA is verified. |
| userMfaType | integer | Type of MFA (0-based). |
| userCreationType | integer | Type of user creation (0-based). |
| lastLoggedInTime | string(date-time) | Last login timestamp. |
| lastLoggedInDeviceInfo | string | Device information from last login. |
| logInCount | integer | Total number of logins. |