# Create

## Create User

<mark style="color:green;">`POST`</mark> `https://biometridon.polygon.pt/api/users`

This endpoint allows you to create users.

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Content-Type  | string | application/json          |
| Authorization | string | Authentication user token |

#### Request Body

| Name      | Type    | Description                        |
| --------- | ------- | ---------------------------------- |
| email     | string  | Unique email                       |
| firstName | string  | First name                         |
| lastName  | string  | Last name                          |
| photo     | string  | Base64 image                       |
| clientId  | string  | Client id                          |
| roles     | array   | List of role ids                   |
| invite    | boolean | Send email to user (default false) |

{% tabs %}
{% tab title="200 " %}

```bash
{
  "data": {
    "email": "user@polygon.pt",
    "firstName": "User",
    "lastName": "Tool",
    "clientId": "5f089930ae1e08524034ec9b",
    "roles": [
      "5f06dd360d2a954da80c0990"
    ],
    "active": true,
    "isMaster": false,
    "created_at": "2020-07-10T16:40:24.828Z",
    "updated_at": "2020-07-10T16:40:24.828Z",
    "id": "5f0899f8b9f874452cd5ff22",
    "name": "User Tool"
  },
  "meta": {
    "message": "User created with success."
  },
  "status": true
}
```

{% endtab %}
{% endtabs %}

```javascript
// Example

{
	"firstName": "User",
	"lastName": "Tool",
	"email": "user@polygon.pt",
	"photo": "base64",
	"password": "12345678",
	"clientId": "5f089930ae1e08524034ec9b",
	"roles": ["5f06dd360d2a954da80c0990"],
	"invite": true
}
```
