---
title: Create a new local user
canonical: https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/user/create-a-new-local-user/
product: CloudConnexa Docs
---

# Create a new local user

`POST /api/v1/users`

This endpoint creates a new local user with specified attributes, group associations, and roles. It also allows devices to be associated with the user.

**General Attributes:**

- **firstName** (string): The first name of the user being created.
- **lastName** (string): The user’s last name.
- **username** (string): The user account username.
- **email** (string): The user’s email address.
- **groupId** (string): The unique identifier of the group to which the user belongs.
- **secondaryGroupIds** (array): The unique identifiers of user secondary groups.
- **role** (string): The role assigned to the user. Supported values:
  - OWNER
  - MEMBER
  - ADMIN

**Device Attributes**

- **devices** (array): An array of devices associated with the user. Each device is defined by the following attributes:
  - **name** (string): The device name.
  - **description** (string): A brief description of the device.
  - **clientUUID** (string): The unique identifier for the device client.

## Body parameter

```json
{
  "firstName": "string",
  "lastName": "string",
  "username": "string",
  "email": "string",
  "groupId": "00000000-0000-0000-0000-000000000000",
  "secondaryGroupIds": [
    "string"
  ],
  "role": "OWNER",
  "devices": [
    {
      "name": "string",
      "description": "string",
      "clientUUID": "string"
    }
  ]
}
```

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| body | body | [UserCreateRequest](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/usercreaterequest.md) | true | none |
| » firstName | body | string | false | none |
| » lastName | body | string | false | none |
| » username | body | string | false | none |
| » email | body | string | false | none |
| » groupId | body | string | false | none |
| » secondaryGroupIds | body | \[string\] | false | none |
| » role | body | string | false | none |
| » devices | body | \[[DeviceRequest](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/devicerequest.md)\] | false | none |
| »» name | body | string | false | none |
| »» description | body | string | false | none |
| »» clientUUID | body | string | false | none |

### Enumerated Values

| Parameter | Value |
| --- | --- |
| » role | OWNER |
| » role | MEMBER |
| » role | ADMIN |

## Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [UserResponse](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/schemas/userresponse.md) |

To perform this operation, you must be authenticated by means of one of the following methods: oauth

---

Prev: [Get page of existing users](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/user/get-page-of-existing-users.md)
Next: [Reset MFA for an existing user](https://openvpn.net/cloud-docs/developer/cloudconnexa-api-v1-2-3/user/reset-mfa-for-an-existing-user.md)
Index: https://openvpn.net/cloud-docs/llms.txt
