This API allows to edit a user from the MPC.
The id validation of correct email address should happen in both client and server sides.
Request Example:
.. code-block::
editMpcUser(
id="[email protected]",
FirstName="shahar",
LastName="lamesh",
RoleId="123",
UserGroupIds=["1"],
request_extra_data={
MessageNumber=5,
SessionId="3478593863424051983840947"
}
)
----
**Response Example:**
.. code-block::
{
"FunctionData": {
StatusCode=0,
StatusCodeDescription="User edited successfully"
},
"Meta": {
"AccessToken": "58f08df6e369fa4d126e1ba5c7f66cf85c9c79df32d05fee8f3c542121c87cf5",
"Destination": "044fd7dc60304b8aceeb662ce41bf9d9cc132278c0871c0a72fb4f3cecbabb25a86e43ae28dab21a95c64e2db76abdcfffb9bfdeec67a21399cfa5f555f01d054b",
"Source": "be1f60e490b8ccabcc02a4595817b8edf45905d24944e87b8e3cae27f158df63843bfc4b09d37a5e752017b74ea2d136af272bea210f059e768e1ea8777aaf21e9",
"Time": "2025-10-19 15:04:13.129"
}
}
----
**Error Responses**
| Error Type | Http Code | GK8 error code | Reason / Description | Example Response |
|------------------|-----------|----------------|------------------------------------------------------------------------------------------|---------------------------------------------------------|
| Backend Response | 400 | 1 | Unknown user | "StatusCode": 1 |
| Backend Response | 400 | 2 | Invalid first name Details: length/illegal characters | "StatusCode": 2 |
| Backend Response | 400 | 3 | Invalid last name Details: length/illegal characters | "StatusCode": 3 |
| Backend Response | 400 | 4 | Unknown role | "StatusCode": 4 |
| Backend Response | 400 | 5 | Unknown user group ID | "StatusCode": 5 |
| Backend Response | 400 | 6 | Users in admin group must have admin role | "StatusCode": 6 |
| Backend Response | 400 | 7 | Current role settings will result in insufficient approvers for approval workflows | "StatusCode": 7 , "ApprovalWorkflowIds": ["123", "435"] |
| Backend Response | 400 | 8 | Current user group settings will result in insufficient approvers for approval workflows | "StatusCode": 8 , "ApprovalWorkflowIds": ["123", "435"] |
| Backend Response | 400 | 9 | User group Ids should have only one item | "StatusCode": 9 |
| Backend Response | 400 | 10 | Cannot edit name of user created by cold | "StatusCode": 10 |
| Backend Response | 400 | 11 | Cannot change account approver to admin | "StatusCode": 11 , "UserIds": ["[email protected]"] |
| Backend Response | 400 | 12 | Insufficient available account approvers | "StatusCode": 12 , "UserIds": ["[email protected]"] |
| Backend Response | 400 | 13 | Incorrect view permissions for transaction notification users | "StatusCode": 13 , "UserIds": ["[email protected]"] |
| Backend Response | 400 | 14 | Users are managed externally | "StatusCode": 14 |
idstring<p>the user's id (can be retrieved from the IdWithoutProduct field in the response of the getAllUsers)</p>
first_namestring<p>the user's first name (current or new)</p>
last_namestring<p>the user's last name (current or new)</p>
role_idstring<p>the user's role id (current or new)</p>
user_group_idsarray<p>the ids of the user groups the user will be assigned to (current or new)</p>
request_extra_dataobjectadditional data for the administrative request
acceptstringGenerated from available response content types
200success
curl --request POST \
--url '/editMpcUser?id=None%20yet.&first_name=John&last_name=Doe&role_id=123&user_group_ids=array&request_extra_data={%0A%20%20%22MessageNumber%22%3A%205%2C%0A%20%20%22SessionId%22%3A%20%223478593863424051983840947%22%0A}%0A' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data-raw '{
"FunctionData": {
"Id": "[email protected]",
"FirstName": "shahar",
"LastName": "lamesh",
"RoleId": "123",
"RequestExtraData": {
"MessageNumber": 5,
"SessionId": "3478593863424051983840947"
}
},
"Meta": {
"FunctionName": "editMpcUser",
"RandomData": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
"Destination": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea",
"Time": "2021-02-07T18:37:46.948Z",
"Source": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99",
"AccessToken": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
}
}'