---
title: "Updates a user"
method: PATCH
path: "/api/users/{id}"
tags: ["Users"]
---

# Updates a user

`PATCH /api/users/{id}`

## Path parameters

- `id` string, required

## Request body

- UpdateUserRequestDto
  - `rewardsEthAddress` string, required
  - `username` string, required

## Response `200`

Updated user

- UserWithStatsDto
  - `_id` string, required
  - `identityEthAddress` string, required
  - `rewardsEthAddress` string, required
  - `username` string, required
  - `roles` string[], required
  - `accounts` UserAccount[], required
    - `_id` string, required
    - `user` UserNoUserAccountsDto
      - `_id` string, required
      - `identityEthAddress` string, required
      - `rewardsEthAddress` string, required
      - `username` string, required
      - `roles` string[], required
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
    - `accountId` string, required
    - `name` string, required
    - `avatarId` string, required
    - `platform` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `receivedTotalScore` number
  - `receivedTotalCount` number
  - `givenTotalScore` number
  - `givenTotalCount` number

## Changes

- **2023-04-04** `aa4804c758aa` — 1 info
  - endpoint added
- **2023-04-04** `9acb2632a6fd` — 1 breaking
  - api path removed without deprecation
- **2023-04-04** `aa4804c758aa` — 1 breaking, 7 info
  - the `accounts/items/user` response's property type/format changed from `string`/`` to `object`/`` for status `200`
  - added the required property `accounts/items/user/_id` to the response with the `200` status
  - added the required property `accounts/items/user/createdAt` to the response with the `200` status
  - added the required property `accounts/items/user/identityEthAddress` to the response with the `200` status
  - …4 more
- **2023-04-04** `ae4e81183bd2` — 10 info
  - added the optional property `givenTotalCount` to the response with the `200` status
  - added the optional property `givenTotalScore` to the response with the `200` status
  - added the optional property `receivedTotalCount` to the response with the `200` status
  - added the optional property `receivedTotalScore` to the response with the `200` status
  - …6 more
- **2023-04-04** `e1a32d8c1997` — 6 breaking, 4 warning
  - removed the required property `_id` from the response with the `200` status
  - removed the required property `accounts` from the response with the `200` status
  - removed the required property `createdAt` from the response with the `200` status
  - removed the required property `identityEthAddress` from the response with the `200` status
  - …6 more

[Full history](https://skmtc.dev/givepraise/apis/praise-api/changes/api/users/:id/patch.md)

---

[API](https://skmtc.dev/givepraise/apis/praise-api.md) · [All operations](https://skmtc.dev/givepraise/apis/praise-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/givepraise/praise-api/revisions/1c866f9dfd40/schema)
