# Update user information

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

Update a specified user's name, description, and tags in the workspace. This operation fully updates the user profile with the submitted content; descriptions or tags that are not retained are cleared.

```text
POST https://moi.matrixorigin.cn/newmoi/user/update_info
```

## Preparation before calling

First [select the user](list-users.md#select-a-user). To retain or adjust tags, [select user tags](../user-tags/list-user-tags.md#select-a-user-tag). Confirm that the submitted content includes the user description and tags you want to retain.

Prepare a [personal access token](../../../../../guides/genesis/api-keys.md#manage-api-keys) and [target workspace ID](../../../../../guides/ai-studio/resource-center/workspace.md#copy-a-workspace-id) with the required permissions for the target workspace.

## Request parameters

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Input example

```bash
curl -X POST "https://moi.matrixorigin.cn/newmoi/user/update_info" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "user-001"
  }'
```

:::::
:::::{tab-item} Parameter description

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | User ID. |
| `name` | string | Yes | User name. |
| `description` | string | No | Updated user description; treated as an empty string when omitted. |
| `tag_list` | object (array) | No | Complete updated tag list; treated as an empty list when omitted. |
| `tag_list[].id` | integer | Yes | Tag ID. |
| `tag_list[].value` | string | Yes | Tag value. |

:::::
::::::
:::::::
## Successful response

On success, the user name, description, and tags have been updated using the request content and `data` is `null`.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "OK",
  "msg": "OK",
  "data": null
}
```

:::::
:::::{tab-item} Field details

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | `OK` on success. |
| `msg` | string | `OK` on success. |
| `data` | null | Always `null` on success. |

:::::
::::::
:::::::

## Error response

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "INVALID_ARGUMENT",
  "msg": "请求参数无效",
  "data": null
}
```

:::::
:::::{tab-item} Field details

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Error code. |
| `msg` | string | Error message. |
| `data` | null | — |

:::::
::::::
:::::::
