---
title: "Update User Org Role"
method: PUT
path: "/api/user"
tags: ["User"]
---

# Update User Org Role

`PUT /api/user`

Update a user's information for the org specified via header. If the user_id is not provided, the auth'ed user will be updated. If the user_id is provided, the role of the auth'ed user or api key must be an admin (1) or owner (2) of the organization.

## Headers

- `TR-Organization` string, uuid, required

## Request body

- UpdateUserReqPayload
  - `role` integer, nullable — Either 0 (user), 1 (admin), or 2 (owner). If not provided, the current role will be used. The auth'ed user must have a role greater than or equal to the role being assigned.
  - `scopes` string[], nullable — The scopes the user will have in the organization.
  - `user_id` string, uuid, nullable — The id of the user to update, if not provided, the auth'ed user will be updated. If provided, the role of the auth'ed user or api key must be an admin (1) or owner (2) of the organization.

## Response `204`

Confirmation that the user's role was updated

## Other responses

- `400` — Service error relating to updating the user

---

[API](https://skmtc.net/devflowinc/apis/trieve-api.md) · [All operations](https://skmtc.net/devflowinc/apis/trieve-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/devflowinc/trieve-api/revisions/84583e7c9fc1/schema)
