---
title: "PATCH /api/v1/organizations/{organizationId}/users/{userId}"
method: PATCH
path: "/api/v1/organizations/{organizationId}/users/{userId}"
tags: ["SunriseStudioService"]
---

# PATCH /api/v1/organizations/{organizationId}/users/{userId}

`PATCH /api/v1/organizations/{organizationId}/users/{userId}`

## Request

- Base URL: `https://app.chargerobotics.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.chargerobotics.com/api/v1/organizations/{organizationId}/users/{userId}`
- Auth: API key in header `Authorization`

## Path parameters

- `organizationId` string, required
- `userId` string, required

## Query parameters

- `updateMask.paths` string[]

## Request body

- EntityUser
  - `id` string
  - `username` string: For human users, this is their email address. For machine users such as the factory PC, this is their hostname.
  - `firstName` string
  - `lastName` string
  - `password` string: When creating a user, the raw password is inputted using this field. When the user is created, the password is hashed this field is replaced with the hashed password before being stored in the database. When a user tries to login, the input password is hashed and compared with this field.
  - `role` 'ROLE_UNSPECIFIED' | 'ROLE_SUPER_ADMIN' | 'ROLE_SUPER_USER' | 'ROLE_ORG_ADMIN' | 'ROLE_ORG_USER' | 'ROLE_FACTORY' | 'ROLE_DELIVERY_VEHICLE': - ROLE_SUPER_ADMIN: Global admin role. - ROLE_SUPER_USER: Global non-admin role. - ROLE_ORG_ADMIN: Admin role for an organization. - ROLE_ORG_USER: Non-admin role for an organization. - ROLE_FACTORY: Factory role. - ROLE_DELIVERY_VEHICLE: Delivery vehicle role.
  - `sessionId` string: Identifies the current session id. Changing this value will invalidate all associated refresh tokens.
  - `isDisabled` boolean
  - `email` string
  - `apiKey` string

## Response `200`

A successful response.

- EntityUser
  - `id` string
  - `username` string: For human users, this is their email address. For machine users such as the factory PC, this is their hostname.
  - `firstName` string
  - `lastName` string
  - `password` string: When creating a user, the raw password is inputted using this field. When the user is created, the password is hashed this field is replaced with the hashed password before being stored in the database. When a user tries to login, the input password is hashed and compared with this field.
  - `role` 'ROLE_UNSPECIFIED' | 'ROLE_SUPER_ADMIN' | 'ROLE_SUPER_USER' | 'ROLE_ORG_ADMIN' | 'ROLE_ORG_USER' | 'ROLE_FACTORY' | 'ROLE_DELIVERY_VEHICLE': - ROLE_SUPER_ADMIN: Global admin role. - ROLE_SUPER_USER: Global non-admin role. - ROLE_ORG_ADMIN: Admin role for an organization. - ROLE_ORG_USER: Non-admin role for an organization. - ROLE_FACTORY: Factory role. - ROLE_DELIVERY_VEHICLE: Delivery vehicle role.
  - `sessionId` string: Identifies the current session id. Changing this value will invalidate all associated refresh tokens.
  - `isDisabled` boolean
  - `email` string
  - `apiKey` string

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/chargerobotics/apis/sunrise-studio.md) - [All operations](https://skmtc.dev/chargerobotics/apis/sunrise-studio/llms.txt) - [OpenAPI document](https://skmtc.dev/chargerobotics/apis/sunrise-studio/revisions/802f6962f132?raw)
