---
title: "Update a user"
method: PUT
path: "/user/{id}"
tags: ["User"]
---

# Update a user

`PUT /user/{id}`

Updates a user in your organization.

:::info Only users of type `person` can be updated.
:::

## Path parameters

- `id` integer, required

## Request body

- UserWrite
  - `status` 'active' | 'inactive' — The status of the user you want to update. > ℹ️ **Info:** Set the status to `active` to allow the user to log in to the platform, or to `inactive` to prevent login access.
  - `email` string — The email of the user you want to update.
  - `first_name` string — The first name of the user you want to update.
  - `last_name` string — The last name of the user you want to update.
  - `organization_id` integer — The organization ID of the user you want to update.
  - `avatar` string — The avatar of the user you want to update.

## Response `204`

The operation was successful.

- UserResponse
  - `id` integer, required — The ID of the user.
  - `email` string, required — The email of the user.
  - `first_name` string, nullable, required — The first name of the user.
  - `last_name` string, nullable, required — The last name of the user.
  - `organization_id` integer, required — The organization ID of the user.
  - `status` 'active' | 'inactive' | 'pending' | 'invited' — The status of the user.
  - `avatar` string, nullable — The avatar of the user.
  - `type` 'person' | 'machine' — The type of the user.
  - `provider` 'cognito' | 'saml', nullable — The authentication provider of the user.
  - `nrn` string, required — The NRN of the user.
  - `send_invite` boolean — Whether to send an invite email to the user.
  - `metadata` object — The metadata of the user.

## Other responses

- `4XX` — Client error responses due to invalid input or missing parameters.
- `5XX` — Server error responses indicating an issue on the API side.

---

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