---
title: "Update User"
api: "PUT https://api.mintlify.com/api/user"
description: "This endpoint updates an existing user."
---

### Body

<ParamField body="name" type="string">
  This is the name of the user group.
</ParamField>

<ParamField body="user_group_id" type="string">
  This is the ID you use to identify this user group in your database.
</ParamField>

<ParamField body="mapping" type="object">
  This is a JSON mapping of schema id to either the data source that this user
  group should be associated with or id of the datasource you provided when
  creating it.
</ParamField>

<ParamField body="properties" type="object">
  This is a JSON object for properties assigned to this user group. These will
  be accessible through variables in the dashboards and SQL editor
</ParamField>

### Response

<ResponseField name="success" type="number">
  Indicates whether the call was successful. 1 if successful, 0 if not.
</ResponseField>

<ResponseField name="user_group" type="object">

The contents of the user group

<Expandable title="Toggle object">

<ResponseField name="team_id" type="number">
  Indicates whether a new user group was created.
</ResponseField>

<ResponseField name="token" type="string">
  This is the user group token (userGroupToken or USER_GROUP_TOKEN) that will be
  used to identify which user group is viewing the dashboard. You should save
  this on your end to use when rendering an embedded dashboard.
</ResponseField>

<ResponseField name="name" type="string">
  This is the name of the user group provided in the request body.
</ResponseField>

<ResponseField name="provided_id" type="string">
  This is the user_group_id provided in the request body.
</ResponseField>

<ResponseField name="properties" type="JSON | Null">
  This is the properties object if it was provided in the request body
</ResponseField>

<ResponseField name="api_environment_tag" type="JSON or null">
  This is the environment tag of the user group. Possible values are 'Customer'
  and 'Testing'
</ResponseField>

</Expandable>

</ResponseField>

<RequestExample>

```bash Example Request
curl --location --request PUT 'https://api.mintlify.com/api/user' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
    "user_group_id": "example_1",
    "name": "Example 1",
    "mapping": {"40": "213", "134": "386"},
    "properties": {"filterValue": "value"}
}'
```

</RequestExample>

<ResponseExample>

```json Response
{
  "success": 1,
  "user_group": {
    "team_id": 113,
    "token": "<user_group_token_to_auth_dashboard>",
    "name": "ok",
    "provided_id": "6"
  }
}
```

</ResponseExample>
