---
title: "Update a user's role"
method: PUT
path: "/org/users/{userId}"
tags: ["Users"]
---

# Update a user's role

`PUT /org/users/{userId}`

## Request

- Base URL: `https://apiv2.senso.ai/api/v1`
- URL: `https://apiv2.senso.ai/api/v1/org/users/{userId}`
- Auth: API key in header `X-API-Key`

Changes a member's role in your organization.

## Path parameters

- `userId` string, uuid, required

## Request body

- UpdateOrgUserRoleRequest: Changes a member's role.
  - `role_id` string, uuid, required: The new role. Get valid role ids from GET /org/roles.
  - `is_current` boolean: Optionally also set whether this is the user's current org.

## Response `200`

The updated membership.

- OrgUserResponse: A user's membership in your organization.
  - `org_user_id` string, uuid, required
  - `org_id` string, uuid, required
  - `user_id` string, uuid, required
  - `role_id` string, uuid, required: The role assigned to the user in this org.
  - `is_current` boolean, required: Whether this org is the user's currently selected org.
  - `name` string: Org name — populated only by org-switcher list endpoints, absent here.
  - `slug` string: Org slug — populated only by org-switcher list endpoints, absent here.
  - `logo_url` string: Org logo URL — populated only by org-switcher list endpoints, absent here.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `deleted_at` string, date-time: When the membership was deleted; absent while it is active.

## Other responses

- `400`: The request body was invalid — either it failed field validation (`ValidationErrorResponse`) or was otherwise malformed (`ErrorResponse`).
- `401`: Missing or invalid credentials — supply a valid org API key in the `X-API-Key` header.
- `404`: The requested resource does not exist or is not visible to this key.

---

[API](https://skmtc.dev/senso/apis/senso-org-api.md) - [All operations](https://skmtc.dev/senso/apis/senso-org-api/llms.txt) - [OpenAPI document](https://skmtc.dev/senso/apis/senso-org-api/revisions/d789b4fcbe84?raw)
