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

# Create company user

`POST /api/v4/companies/{company_id}/users`

## Request

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

Create a company user. When the user is created in the context of a company, then the user is belongs to that company. Otherwise, the user does not belong to a company.
 Email, First Name, and Last Name are mandatory fields in the user. Any unneeded fields passed in the request parameter will be skipped and not stored.
 Pass body param in 'application/x-www-form-urlencoded' format, in this endpoint, key will be 'user' and value will be a JSON dictionary of user fields.

## Path parameters

- `company_id` integer, required

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

- object
  - `email` string, required: The email address of the user. Must be unique within Enlighten. Required
  - `enlighten_emails` boolean: Whether the user receives automated emails from Enlighten. Default false.
  - `first_name` string, required: The user's first name. Required
  - `last_name` string, required: The user's last name. Required
  - `phone` string: The telephone number of the user. Optional. Max length 50.

## Response `201`

Created

- 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)
