Calling this request is used to register a new user in the MPC Driven system.
The validation of correct email address should happen in both client and server sides.
Request Example:
.. code-block::
createMpcUser(
Email="[email protected]",
FirstName="shahar",
LastName="lamesh",
RoleId="123",
UserGroupIds=["1"],
PublicKey="0x123",
SignatureType=0,
request_extra_data={
MessageNumber=5,
SessionId="3478593863424051983840947"
}
)
----
**Response Example:**
.. code-block::
{
"FunctionData": {
"Id": "[email protected]",
"StatusCode": 0,
"StatusCodeDescription": "User created 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 | User already exists | "StatusCode": 1 |
| Backend Response | 400 | 2 | Invalid email address. | "StatusCode": 2 |
| Backend Response | 400 | 3 | Invalid first name - Details: length/illegal characters | "StatusCode": 3 |
| Backend Response | 400 | 4 | Invalid last name - Details: length/illegal characters. | "StatusCode": 4 |
| Backend Response | 400 | 5 | Unknown role | "StatusCode": 5 |
| Backend Response | 400 | 6 | Unknown user group ID. | "StatusCode": 6 |
| Backend Response | 400 | 7 | User group Ids should have only one item. | "StatusCode": 7 |
| Backend Response | 400 | 8 | Unknown signature type. | "StatusCode": 8 |
| Backend Response | 400 | 9 | Public key already in use | "StatusCode": 9 |
| Backend Response | 400 | 10 | Invalid public key. | "StatusCode": 10 |
| Backend Response | 400 | 11 | Users in admin group must have admin role | "StatusCode": 11 |
| Backend Response | 400 | 12 | Users are managed externally. | "StatusCode": 12 |
| Backend Response | 400 | 13 | Missing public key or signature type | "StatusCode": 13 |
| Backend Response | 400 | 14 | LDAP cannot set public key and signature type. | "StatusCode": 14 |
emailstringthe user's email address
first_namestringthe user's first name
last_namestringthe user's last name
role_idstringthe user's role id
user_group_idsarraythe ids of the user groups the user will be assigned to
public_keystringthe user's DiffieHellman public key
signature_typestring<p>the signature type of the user's public key (SECP256K1 or SECP256R1)</p>
request_extra_dataobjectadditional data for the administrative request
acceptstringGenerated from available response content types
200success
curl --request POST \
--url '/createMpcUser?email=John%40gk8.io&first_name=John&last_name=Doe&role_id=1&user_group_ids=array&public_key=HLJ1CQ5OVS307YOP6IOUE4VA8VC79QUVOW2249TKHDERWZBNHD9F&signature_type=SECP256K1&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": {
"Email": "[email protected]",
"FirstName": "shahar",
"LastName": "lamesh",
"RoleId": "123",
"PublicKey": "0x123",
"RequestExtraData": {
"MessageNumber": 5,
"SessionId": "3478593863424051983840947"
}
},
"Meta": {
"FunctionName": "createMpcUser",
"RandomData": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
"Destination": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea",
"Time": "2021-02-07T18:37:46.948Z",
"Source": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99",
"AccessToken": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
}
}'