Update User
Used to update existing user account information, including profile details, MFA settings, roles, and permissions.
API Endpoint
| Property | Value |
|---|---|
| Request Method | POST |
| Request URL | https://api.seliseblocks.com/idp/v1/Iam/Update |
Request
Request Example
curl -X POST 'https://api.seliseblocks.com/idp/v1/Iam/Update' \
-H 'Content-Type: application/json' \
-H 'x-blocks-key: YOUR_PROJECT_KEY' \
-d '{
"itemId": "user_123",
"salutation": "Dr.",
"firstName": "John",
"lastName": "Smith",
"phoneNumber": "+1234567890",
"tags": ["vip", "developer"],
"profileImageUrl": "https://example.com/new-image.jpg",
"profileImageId": "img_456",
"userMfaType": 1,
"mfaEnabled": true,
"roles": ["admin", "manager"],
"permissions": ["read", "write", "delete"],
"projectKey": "YOUR_PROJECT_KEY",
"memberships": [
{
"organizationId": "org_123",
"roles": ["admin"],
"permissions": ["read", "write"]
}
]
}'
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 |
|---|---|---|---|
| itemId | string | Yes | The unique identifier of the user to update. |
| salutation | string | No | Salutation (e.g., Mr., Ms., Dr.). |
| firstName | string | No | User's first name. |
| lastName | string | No | User's last name. |
| phoneNumber | string | No | User's phone number. |
| tags | array | No | Tags for categorizing the user. |
| profileImageUrl | string | No | URL of user's profile image. |
| profileImageId | string | No | ID of the profile image. |
| userMfaType | integer | No | MFA type for the user (0-based). |
| mfaEnabled | boolean | No | Whether MFA is enabled for the user. |
| roles | array | No | Roles assigned to the user. |
| permissions | array | No | Permissions granted to the user. |
| projectKey | string | No | The project key associated with the user. |
| memberships | array | No | Organization memberships with roles and permissions. |
Membership Object
| Field | Type | Description |
|---|---|---|
| organizationId | string | ID of the organization. |
| roles | array | Roles assigned to the user in the org. |
| permissions | array | Permissions granted to the user. |
Response
Success Response
Returns HTTP status 200 OK on successful user update.
{
"isSuccess": true,
"data": {
"itemId": "user_123",
"salutation": "Dr.",
"firstName": "John",
"lastName": "Smith",
"phoneNumber": "+1234567890",
"mfaEnabled": true,
"userMfaType": 1,
"roles": ["admin", "manager"],
"memberships": [
{
"organizationId": "org_123",
"roles": ["admin"],
"permissions": ["read", "write"]
}
]
},
"errors": {}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| isSuccess | boolean | Indicates if update was successful. |
| data | object | Updated user details. |
| errors | object | Any errors encountered during update. |