# REST API

## How to use the Rest API

#### 1) Register new users to our daily monitoring

Call the Rest API endpoint '/v1/register\_users'  with all your users (email's) to start the catching all the public breaches on the dark web.

#### 2) Remove a user, from our daily monitoring

Call the Rest API endpoint '/v1/delete\_users'  with all your users (email's) to stop the monitoring of all the public breaches on the dark web.

## Register new users

## Register new users

<mark style="color:green;">`POST`</mark> `https://api.andia.io/v1/register_users`

Register users (emails) in our monitoring service.

#### Headers

| Name   | Type   | Description                         |
| ------ | ------ | ----------------------------------- |
| APIKEY | string | \*\*\*\*\*\*\* Your customer APIKEY |

#### Request Body

| Name | Type   | Description                                                                                                                                                                                                 |
| ---- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|      | object | <p>{ <br>    "emails": <br>               \[<br>                  {"user\_email":"<user01@gmail.com>"},       <br>                  {"user\_email":"<user02@company.com>"}<br>              ] <br>}<br></p> |

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

```
{
    "success": true,
    "error_code": 200,
    "error": null,
    "message": "Success"
}
```

{% endtab %}
{% endtabs %}

Example:

```
curl --location --request POST 'https://api.andia.io/v1/register_users' \
--header 'APIKEY: XXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
    "emails": [
        {
            "user_email": "user01@gmail.com"
        },
        {
            "user_email": "user02@company.com"
        }
    ]
}'
```

## Delete users

<mark style="color:green;">`POST`</mark> `https://api.andia.io/v1/delete_users`

Remove users from our monitoring service.

#### Headers

| Name   | Type   | Description                         |
| ------ | ------ | ----------------------------------- |
| APIKEY | string | \*\*\*\*\*\*\* Your customer APIKEY |

#### Request Body

| Name | Type   | Description                                                                                                                                                                                                 |
| ---- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|      | object | <p>{ <br>    "emails": <br>               \[<br>                  {"user\_email":"<user01@gmail.com>"},       <br>                  {"user\_email":"<user02@company.com>"}<br>              ] <br>}<br></p> |

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

```
{
    "success": true,
    "error_code": 200,
    "error": null,
    "message": "Success"
}
```

{% endtab %}
{% endtabs %}

Example:

```
curl --location --request POST 'https://api.andia.io/v1/delete_users' \
--header 'APIKEY: XXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
    "emails": [
        {
            "user_email": "user01@gmail.com"
        },
        {
            "user_email": "user02@company.com"
        }
    ]
}'
```
