> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update User

> This endpoint updates an existing user.

### Body

<ParamField body="id" type="string">
  This is the id of the user. It is used to identify the user.
</ParamField>

<ParamField body="active" type="boolean">
  Indicates if the user is currently active
</ParamField>

<ParamField body="avatar" type="string">
  URL or path to the user's avatar image
</ParamField>

<ParamField body="bio" type="string">
  Biography or description of the user
</ParamField>

<ParamField body="birthday" type="date">
  Date of birth of the user
</ParamField>

<ParamField body="country" type="string">
  Country of residence of the user
</ParamField>

<ParamField body="email" type="string">
  Email address of the user
</ParamField>

<ParamField body="firstName" type="string">
  First name of the user
</ParamField>

<ParamField body="lastName" type="string">
  Last name of the user
</ParamField>

<ParamField body="last_seen" type="date">
  Date and time when the user was last seen
</ParamField>

<ParamField body="last_typed" type="date">
  Date and time when the user last typed a message
</ParamField>

<ParamField body="location" type="string">
  Location or address of the user
</ParamField>

<ParamField body="organization" type="string">
  Organization or company the user belongs to
</ParamField>

<ParamField body="phone" type="string">
  Phone number of the user
</ParamField>

<ParamField body="regions" type="string">
  Regions or areas associated with the user
</ParamField>

<ParamField body="title" type="string">
  Title or job position of the user
</ParamField>

<ParamField body="twitter" type="string">
  Twitter handle or username of the user
</ParamField>

<ParamField body="username" type="string">
  Unique username of the user
</ParamField>

### Response

<ResponseField name="id" type="string">
  This is the id of the user. It is used to identify the user.
</ResponseField>

<ResponseField name="active" type="boolean">
  Indicates if the user is currently active
</ResponseField>

<ResponseField name="avatar" type="string">
  URL or path to the user's avatar image
</ResponseField>

<ResponseField name="bio" type="string">
  Biography or description of the user
</ResponseField>

<ResponseField name="birthday" type="date">
  Date of birth of the user
</ResponseField>

<ResponseField name="country" type="string">
  Country of residence of the user
</ResponseField>

<ResponseField name="email" type="string">
  Email address of the user
</ResponseField>

<ResponseField name="firstName" type="string">
  First name of the user
</ResponseField>

<ResponseField name="lastName" type="string">
  Last name of the user
</ResponseField>

<ResponseField name="last_seen" type="date">
  Date and time when the user was last seen
</ResponseField>

<ResponseField name="last_typed" type="date">
  Date and time when the user last typed a message
</ResponseField>

<ResponseField name="location" type="string">
  Location or address of the user
</ResponseField>

<ResponseField name="organization" type="string">
  Organization or company the user belongs to
</ResponseField>

<ResponseField name="phone" type="string">
  Phone number of the user
</ResponseField>

<ResponseField name="regions" type="string">
  Regions or areas associated with the user
</ResponseField>

<ResponseField name="title" type="string">
  Title or job position of the user
</ResponseField>

<ResponseField name="twitter" type="string">
  Twitter handle or username of the user
</ResponseField>

<ResponseField name="username" type="string">
  Unique username of the user
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PUT 'https://api.stateset.com/v1/users/:id' \
  --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 theme={null}
  {
    "success": 1,
    "user_group": {
      "team_id": 113,
      "token": "<user_group_token_to_auth_dashboard>",
      "name": "ok",
      "provided_id": "6"
    }
  }
  ```
</ResponseExample>
