---
title: "Modify a user by id"
method: PUT
path: "/users/:id"
tags: ["user"]
---

# Modify a user by id

`PUT /users/:id`

This can only be done by a logged in user who has the required privileges.

## Path parameters

- `id` string, required

## Request body

- UserObject
  - `id` string — User Id
  - `username` string, required — Username as an email address
  - `firstname` string, required — firstname
  - `lastname` string, required — lastname
  - `status` 'active' | 'pending' | 'disabled'
  - `role` Role, required
    - `name` string
    - `permissions` string[]
    - `tenant` string
    - `scope` string
  - `confirmed` boolean — true, if the confirmation link/email has been triggered
  - `img` string — url to user image

## Response `200`

successful operation

## Changes

- **2019-05-07** `8a89a8f58853` — 3 breaking, 1 warning, 5 info
  - removed the enum value `ADMIN` of the request property `role`
  - removed the enum value `USER` of the request property `role`
  - the `role` request property type/format changed from `string`/`` to `object`/``
  - removed the request property `password`
  - …5 more
- **2018-12-03** `a85cff4a1faa` — 1 breaking, 1 warning, 2 info
  - removed the enum value `INSTANCE_ADMIN` of the request property `role`
  - removed the request property `id`
  - added the new optional request property `password`
  - added the new `USER` enum value to the request property `role`
- **2018-07-12** `1cc80c847b7e` — 1 breaking, 1 warning, 1 info
  - added the new required request property `role`
  - removed the request property `password`
  - added the new optional request property `id`

[Change history](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih/changes/users/:id/put.md)

---

[API](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih.md) · [All operations](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openintegrationhub/iam-api-for-oih/revisions/8a89a8f58853/schema)
