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


---

# 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://developers.invitelogger.me/reference/endpoints/invites.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.
