Skip to main content

Get Accounts

Used to retrieve a paginated list of accounts with support for filtering, sorting, and searching.

API Endpoint

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

Request

Request Example

curl -X POST 'https://api.seliseblocks.com/idp/v1/Iam/GetAccounts' \
-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"
}
}'

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 accounts.

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 account name.
userIdsarrayFilter by specific user IDs.
statusobjectFilter by account status.
mfaobjectFilter by MFA status.
joinedOnstring(date-time)Filter by join date.
lastLoginstring(date-time)Filter by last login date.
organizationIdstringFilter by organization ID.

Response

Success Response

Returns HTTP status 200 OK with paginated accounts list.

{
"data": [
{
"itemId": "account_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"]
}
],
"active": true,
"isVarified": true,
"profileImageUrl": "https://example.com/image.jpg",
"mfaEnabled": true,
"isMfaVerified": true,
"userMfaType": 1,
"userCreationType": 0
}
],
"errors": {},
"totalCount": 1
}

Response Fields

FieldTypeDescription
dataarrayList of account objects.
errorsobjectAny errors encountered during retrieval.
totalCountintegerTotal count of accounts matching filter.

Account Object Fields

FieldTypeDescription
itemIdstringUnique account identifier.
createdDatestring(date-time)Account creation date.
lastUpdatedDatestring(date-time)Last update date.
languagestringAccount's preferred language.
salutationstringAccount holder's salutation.
firstNamestringAccount holder's first name.
lastNamestringAccount holder's last name.
emailstringAccount email address.
userNamestringAccount username.
phoneNumberstringAccount phone number.
membershipsarrayOrganization memberships.
activebooleanWhether account is active.
isVarifiedbooleanWhether email is verified.
profileImageUrlstringAccount's profile image URL.
mfaEnabledbooleanWhether MFA is enabled.
isMfaVerifiedbooleanWhether MFA is verified.
userMfaTypeintegerType of MFA (0-based).
userCreationTypeintegerType of account creation (0-based).