# Recover

## User recover start (email)

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

This endpoint allows you to start the recover process.

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |

#### Request Body

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| email | string | User email  |

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

```bash
{
  "data": {},
  "meta": {
    "message": "Reset password email was sent with success. Please check your email."
  },
  "status": true
}
```

{% endtab %}

{% tab title="404 " %}

```bash
{
  "data": {},
  "meta": {
    "message": "User not found",
    "code": "4013"
  },
  "status": false
}
```

{% endtab %}
{% endtabs %}

## User recover end (password)

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

This endpoint allows you to set the new password for the user.

#### Path Parameters

| Name  | Type   | Description                 |
| ----- | ------ | --------------------------- |
| token | string | User recover relation token |

#### Request Body

| Name     | Type   | Description   |
| -------- | ------ | ------------- |
| email    | string | User email    |
| password | string | User password |

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

```bash
{
  "data": {},
  "meta": {
    "message": "Password recovery completed with success."
  },
  "status": true
}
```

{% endtab %}

{% tab title="404 " %}

```bash
{
  "data": {},
  "meta": {
    "message": "User not found",
    "code": "4013"
  },
  "status": false
}
```

{% endtab %}
{% endtabs %}
