Skip to main content

Get Account

Used to retrieve the current account details including permissions and organization memberships.

API Endpoint

PropertyValue
Request MethodGET
Request URLhttps://api.seliseblocks.com/idp/v1/Iam/GetAccount

Request

Request Example

curl -X GET 'https://api.seliseblocks.com/idp/v1/Iam/GetAccount' \
-H 'x-blocks-key: YOUR_PROJECT_KEY'

Request Headers

FieldTypeDescription
x-blocks-keystringProject key for authentication.

Response

Success Response

Returns HTTP status 200 OK with current account details.

{
"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", "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": {},
"permissions": [
{
"itemId": "perm_123",
"name": "read",
"type": 0,
"description": "Permission to read resources",
"resource": "documents"
}
]
}

Response Fields

FieldTypeDescription
dataobjectCurrent account details.
errorsobjectAny errors encountered.
permissionsarrayList of granted permissions.

Account Data 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).
lastLoggedInTimestring(date-time)Last login timestamp.
lastLoggedInDeviceInfostringDevice information from last login.
logInCountintegerTotal number of logins.

Permission Object

FieldTypeDescription
itemIdstringUnique permission identifier.
namestringPermission name.
typeintegerPermission type (0-based).
descriptionstringPermission description.
resourcestringResource this permission applies to.