---
title: "Updates a specific user's roles"
method: PUT
path: "/users/{id}"
tags: ["User"]
---

# Updates a specific user's roles

`PUT /users/{id}`

## Request

- Base URL: `http://localhost:3001/api`
- URL: `http://localhost:3001/api/users/{id}`
- Auth: none declared

## Request body

- RoleArray
  - `roles` Role[]

## Response `200`

OK

- User: A user of the system (researcher, policy maker, etc)
  - `allOf` RoleArray
    - `roles` Role[]
  - `name` string, nullable: Full name of the user if provided by the OAuth provider
  - `email` string, email, required
  - `googleID` string: Unique identifier for the google account of the user

## Other responses

- `400`: Malformed request
- `403`: Forbidden
- `404`: Not found
- `422`: Unprocessable entity
- `500`: Internal server error

## Changes

- **2022-05-26** `6edfe4a1f6b0`: 1 breaking
  - the response property `name` became nullable for the status `200`
- **2022-04-19** `7b73390be316`: 2 info
  - added the media type `application/json` for the response with the status `403`
  - added the media type `application/json` for the response with the status `404`

[Operation history](https://skmtc.dev/globaldothealth/apis/global-health-curator-service-api/changes/users/:id/put.md)

---

[API](https://skmtc.dev/globaldothealth/apis/global-health-curator-service-api.md) - [All operations](https://skmtc.dev/globaldothealth/apis/global-health-curator-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/globaldothealth/apis/global-health-curator-service-api/revisions/5b1151265235?raw)
