# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.threatcop.ai/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
