> For the complete documentation index, see [llms.txt](https://developers.invitelogger.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.invitelogger.me/reference/endpoints/invites.md).

# Invites

## User actions

## Retrieve invite count from an user

<mark style="color:blue;">`GET`</mark> `https://api.invitelogger.me/v1/invites/user`

Basically what the /invites command do

#### Request Body

| Name                                          | Type                 | Description                            |
| --------------------------------------------- | -------------------- | -------------------------------------- |
| bot\_id<mark style="color:red;">\*</mark>     | discord id as string | Retrieve invites data from what bot    |
| guild\_id<mark style="color:red;">\*</mark>   | discord id as string | Retrieve invites data from what server |
| inviter\_id<mark style="color:red;">\*</mark> | discord id as string | Retrieve invites data from whom        |

{% tabs %}
{% tab title="200: OK user invites amount" %}

```javascript
{
    "total":0, 
    "leaves":0,
    "fake":0,
    "bonus":0,
    "real":0
}
```

{% endtab %}
{% endtabs %}

## Invite code

## Retrieve joins from a specific invite code

<mark style="color:blue;">`GET`</mark> `https://api.invitelogger.me/v1/invites/code`

Get an array of invited members through a specific invite code

#### Request Body

| Name                                           | Type                                            | Description                            |
| ---------------------------------------------- | ----------------------------------------------- | -------------------------------------- |
| bot\_id<mark style="color:red;">\*</mark>      | discord id as string                            | Retrieve invites data from what bot    |
| guild\_id<mark style="color:red;">\*</mark>    | discord id as string                            | Retrieve invites data from what server |
| invite\_code<mark style="color:red;">\*</mark> | invite code as string (without the discord.gg/) | Retrive invited members from this code |

{% tabs %}
{% tab title="200: OK invited members list example:" %}

```javascript
    {
        "created_at": "2020-08-04T08:14:37.000Z", // join date
        "updated_at": "2020-11-08T08:36:25.000Z", // if cleared = clear date, if left probably leave date.
        "member_id": "417977361011572747", // id of the invited member 
        "fake": false,  // if the invite has been counted as fake
        "left": true, // if the member has left the server 
        "cleared": false // if the invite has been cleared using the /resetinvites command
    },
```

{% endtab %}
{% endtabs %}
