# IAM User

## Get User List

<mark style="color:blue;">`GET`</mark> `https://demo.threatcop.ai/api/zapier/get`

This endpoint allows you to get free cakes.

#### Headers

| Name        | Type   | Description                                                    |
| ----------- | ------ | -------------------------------------------------------------- |
| X\_API\_KEY | string | Authentication token to track down who is emptying our stocks. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "success": true,
    "employees": [{
        "firstname": "admin",
        "lastname": "admin",
        "email": "test@domain.com",
        "phone": "1234567890"    
    },{
        "firstname": "admin",
        "lastname": "admin",
        "email": "test@domain.com",
        "phone": "1234567890"    
    }]
}
```

{% endtab %}
{% endtabs %}

## Create an User

<mark style="color:green;">`POST`</mark> `https://demo.threatcop.ai/api/zapier/addUser`

#### Headers

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| X\_API\_KEY | string |             |

#### Request Body

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| phone     | string |             |
| lastname  | string |             |
| firstname | string |             |
| email     | string |             |

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

```
{
    "success": true,
    "message": "Login credentials has been sent to employee's email."
}

```

{% endtab %}
{% endtabs %}

## Update and User

<mark style="color:purple;">`PATCH`</mark> `https://demo.threatcop.ai/api/zapier/updateUser`

#### Headers

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| X\_API\_KEY | string |             |

#### Request Body

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| userId    | number |             |
| email     | string |             |
| firstname | string |             |
| lastname  | string |             |
| phone     | string |             |

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

```
{
    "success": true,
    "message": "User updated successfully"
}
```

{% endtab %}
{% endtabs %}

## Delete an User

<mark style="color:red;">`DELETE`</mark> `https://demo.threatcop.ai/api/zapier/deleteUser`

#### Headers

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| X\_API\_KEY | string |             |

#### Request Body

| Name   | Type   | Description |
| ------ | ------ | ----------- |
| userId | string |             |

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

```
{
    "success": true,
    "message": "user deleted successfully"
}
```

{% endtab %}
{% endtabs %}
