Companies

Update company user

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.

put/api/v4/companies/{company_id}/users/{user_id}

Request

Path parameters

company_idinteger required

Company ID

user_idinteger required

User ID

Request body application/x-www-form-urlencoded

company_idinteger

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.

emailstring

The email address of the user. Must be unique within Enlighten. Cannot be empty string.

enlighten_emailsboolean

Whether the user receives automated emails from Enlighten. Default false.

first_namestring

The user's first name. Cannot be empty string.

last_namestring

The user's last name. Cannot be empty string.

phonestring

The telephone number of the user. Optional. Max length 255.

Response

OK

activeboolean

Whether the user is allowed to log in to Enlighten.

user_rolesstring[]

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.

emailstring

The email address of the user

enlighten_emailsboolean

Whether the user receives automated emails from Enlighten

enlighten_viewstring

Which view of Enlighten the user has

first_namestring

The user's first name

last_namestring

The user's last name

phonestring

The telephone number of the user.

uristring

URI to the show() method for the user. System-generated.

user_idinteger

The Enlighten ID of the user. System-generated.

updated_atinteger

Last updated date and time in Epoch format.

Changes

No recorded changes to this operation across all 1 revision of this API.