PUT
/
api
/
user
Update User Org Role
curl --request PUT \
  --url https://api.trieve.ai/api/user \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TR-Organization: <tr-organization>' \
  --data '{
  "role": 123,
  "scopes": [
    "<string>"
  ],
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
This response does not have an example.

Authorizations

Authorization
string
header
required

Headers

TR-Organization
string<uuid>
required

The organization id to use for the request

Body

application/json

JSON request payload to update user information for the auth'ed user

role
integer | null

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[] | null

The scopes the user will have in the organization.

user_id
string<uuid> | null

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

Confirmation that the user's role was updated