# Registering new account

### REGISTERING NEW ACCOUNT

## Registers a new user account

<mark style="color:green;">`POST`</mark> `/accounts/register`

#### Request Body

| Name                               | Type   | Description                                                                         |
| ---------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| <mark style="color:red;">\*</mark> | String | Object that contain username, password, confirm password and role (optional) fields |

{% tabs %}
{% tab title="201: Created Successful Operation" %}

```javascript
{
    content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
}
```

{% endtab %}

{% tab title="500: Internal Server Error Internal Server Error" %}

```javascript
{
    content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
}
```

{% endtab %}
{% endtabs %}
