---
title: "Update company user"
method: PUT
path: "/api/v4/companies/{company_id}/users/{user_id}"
tags: ["Companies"]
---

# Update company user

`PUT /api/v4/companies/{company_id}/users/{user_id}`

## Request

- Base URL: `https://api-qa2.enphaseenergy.com`
- URL: `https://api-qa2.enphaseenergy.com/api/v4/companies/{company_id}/users/{user_id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/enphase/apis/commissioning-api/docs/api/v4/companies/:company_id/users/:user_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates a user. You may change a user's company if you have access to the user, the old company, and the new company. The user is requested in the scope of a company, then three conditions apply: 1) You must have access to the requested company; otherwise a 401 is returned. 2) The user must belong to the requested company; otherwise a 401 is returned. 3) Requested user must be created by API user (or) it must belong to your company or its branches.

## Path parameters

- `company_id` integer, required
- `user_id` integer, required

## Request body `application/x-www-form-urlencoded`

- object
  - `company_id` integer: The Enlighten-generated ID of the company to which the user belongs, if any. DEPRECATED: Use the 'company' attribute instead, and the query parameter 'expand=company' to get detailed company information.
  - `email` string: The email address of the user. Must be unique within Enlighten. Cannot be empty string.
  - `enlighten_emails` boolean: Whether the user receives automated emails from Enlighten. Default false.
  - `first_name` string: The user's first name. Cannot be empty string.
  - `last_name` string: The user's last name. Cannot be empty string.
  - `phone` string: The telephone number of the user. Optional. Max length 255.

## Response `200`

OK

- object
  - `active` boolean: Whether the user is allowed to log in to Enlighten.
  - `user_roles` string[]: What type of user this is in Enlighten. Possible values are ['self_installer']. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty.
  - `email` string: The email address of the user
  - `enlighten_emails` boolean: Whether the user receives automated emails from Enlighten
  - `enlighten_view` string: Which view of Enlighten the user has
  - `first_name` string: The user's first name
  - `last_name` string: The user's last name
  - `phone` string: The telephone number of the user.
  - `uri` string: URI to the show() method for the user. System-generated.
  - `user_id` integer: The Enlighten ID of the user. System-generated.
  - `updated_at` integer: Last updated date and time in Epoch format.

## Other responses

- `401`: Unauthorized
- `404`: Not found
- `405`: Method Not Allowed
- `422`: Unprocessable entity. The body contains error information in a hash of errorMessages and an optional errorCode
- `429`: Too Many Requests
- `501`: Not Implemented

---

[API](https://skmtc.dev/enphase/apis/commissioning-api.md) - [All operations](https://skmtc.dev/enphase/apis/commissioning-api/llms.txt) - [OpenAPI document](https://skmtc.dev/enphase/apis/commissioning-api/revisions/73a4001046e2?raw)
