# Management

#### Create User

Admins have the ability to create multiple users and assign their roles within the system.

The available user roles include:

* Manager
* Viewer
* Operator
* Api User
* Admin

By assigning the appropriate role to each user, the admin can ensure that the operations within the system are performed efficiently and securely.

```bash
curl --location --request POST 'https://api.enterprise.relysia.com/api/v1/createUser' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email":"test@change.com",
    "password":"password",
    "role":"manager",
    "firstName":"John",
    "lastName":"Doe",
    "title":"Frontend Manager"
}'
```

Upon successful creation of a user, the following information will be included in the response:

* Status: The status of the user creation process.
* UID (User ID): This unique identifier will be used as part of the authentication process.
* Email: The email address associated with the user account.
* Role: The assigned role for the user.

#### Update User

This API allows Admins to change the role of an existing user, identified by their User ID.

As an Admin, you can modify the role of a user and ensure that their access rights align with your organization's needs.

```bash
curl --location --request POST 'https://api.enterprise.relysia.com/api/v1/updateUser' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
--data-raw '{
    "userId":"userId",
    "role":"manager",
    "firstName":"John",
    "lastName":"Doe",
    "title":"Frontend Manager"
}'
```

If the update is successful, the API will return a success status response along with the updated user details.

#### Delete User

This API endpoint allows Admins to delete an existing user from the system, identified by their User ID.

To delete a user, you must provide the userId in the request body:

```bash
curl --location --request POST 'https://api.enterprise.relysia.com/api/v1/deleteUser' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
--data-raw '{
    "userId":"userId"
}'
```

Upon successful execution, the specified user will be removed from the system and will no longer have access to the API or the wallet.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.relysia.com/enterprise-wallet/management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
