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

# PATCH /api/users/{id}/addRole

`PATCH /api/users/{id}/addRole`

## Path parameters

- `id` string, required

## Request body

- UpdateUserRoleInputDto
  - `role` 'USER' | 'QUANTIFIER' | 'FORWARDER' | 'ADMIN' | 'ROOT' | 'API_KEY_READWRITE' | 'API_KEY_READ' | 'API_KEY_DISCORD_BOT' | 'API_KEY_SETUP_WEB', required

## Response `200`

The 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` string
    - `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** `ae4e81183bd2` — 1 breaking, 8 info
  - the `accounts/items/` response's property type/format changed from `array`/`` to `object`/`` for status `200`
  - added the optional property `accounts/items/user` to the response with the `200` status
  - added the required property `accounts/items/_id` to the response with the `200` status
  - added the required property `accounts/items/accountId` to the response with the `200` status
  - …5 more
- **2023-04-04** `e1a32d8c1997` — 8 breaking, 1 warning
  - the `accounts/items/` response's property type/format changed from `object`/`` to `array`/`` for status `200`
  - removed the required property `accounts/items/_id` from the response with the `200` status
  - removed the required property `accounts/items/accountId` from the response with the `200` status
  - removed the required property `accounts/items/avatarId` from the response with the `200` status
  - …5 more
- **2023-04-03** `66b3a74354cf` — 1 breaking, 8 info
  - the `accounts/items/` response's property type/format changed from `array`/`` to `object`/`` for status `200`
  - added the optional property `accounts/items/user` to the response with the `200` status
  - added the required property `accounts/items/_id` to the response with the `200` status
  - added the required property `accounts/items/accountId` to the response with the `200` status
  - …5 more
- **2023-04-03** `e1a32d8c1997` — 1 info
  - endpoint added
- …earlier changes not shown

[Full history](https://skmtc.dev/givepraise/apis/praise-api/changes/api/users/:id/addRole/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/ae4e81183bd2/schema)
