# updateUserInfo()

## Syntax

```javascript
updateUserInfo(data: DataUpdateUserInfo)
```

Update user information like email or username.

## Parameters

<table><thead><tr><th width="109">Name</th><th width="194">Type</th><th width="102">Required</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>DataUpdateUserInfo</td><td>Yes</td><td>Data to update.</td></tr></tbody></table>

```javascript
interface DataUpdateUserInfo {
   email: string;
   name_tag: string;
}
```

## Example

{% code lineNumbers="true" %}

```javascript
import { updateUserInfo } from "@eueno/lib-browser";

const updateUserData = async () => {
   try {
     const data = {
       email: “newEmail@gmail.com”,
       name_tag: “new_username”,
     };

     const response = await updateUserInfo(data);

     console.log(response);
   } catch (error) {
     console.log(error);
   }
 };

```

{% endcode %}

Response of example:

```json
{
    "status": 200,
    "msg": "success"
}
```
