> For the complete documentation index, see [llms.txt](https://docs.radarcord.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.radarcord.net/api/bots.md).

# Bots

## Ping Uptime

<mark style="color:green;">`POST`</mark> `/bot/:id/uptime`&#x20;

Allows you to ping the API - Displays the last time you pinged on your bot profile i.e "Last Ping: 2 minutes ago"

Headers

| Name          | Value            |
| ------------- | ---------------- |
| Content-Type  | application/json |
| Authorization | Bearer \<token>  |

Response

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

```
{
    "message": "Bot has been temporarily blocked due to sending too many requests"
}

{
    "error": "Ping blocked, cannot be within 2 minutes of last."
    
}
```

{% endtab %}

{% tab title="400" %}

```
{
    "error": "Please provide an API Key"
}

{
    "error": "Bot Not Found; Please provide ID of a registered Bot"
}

{
    "error": "Incorrect API Key"
}
```

{% endtab %}

{% tab title="200" %}

```
{
    "message": "Successfully pinged radarcord.net"
}
```

{% endtab %}
{% endtabs %}

## Post Commands

<mark style="color:green;">`POST`</mark> `/bot/:id/commands`

Allows you to list your slash or text commands on your page

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

| Name       | Type  | Description                            |
| ---------- | ----- | -------------------------------------- |
| `commands` | array | Array of your commands - slash or text |

**Response**

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

```json
{
  "message": "Success"
}
```

{% endtab %}

{% tab title="400" %}

<pre class="language-json"><code class="lang-json">{
<strong>message: "Bot Not Found; Please provide ID of a registered Bot",
</strong>    message: "No API Key Found; Please contact Radar",
    message: "Please provide an API Key",
    message: "Incorrect API Key",
    message: "Please supply an array of (slash/message) commands"
    message: "Something went wrong. Please make sure your array follows [{name: /"/", description: /"/"}] format."
}
</code></pre>

{% endtab %}
{% endtabs %}

## Post Stats

<mark style="color:green;">`POST`</mark> `/bot/:id/stats`

Allows you to post your Guild and Shard count to your bot's page\
\
Recommended: Put post request in your bot's ready event

#### Path Parameters

| Name | Type   | Description    |
| ---- | ------ | -------------- |
| id   | string | ID of your Bot |

#### Headers

| Name                         | Type   | Description  |
| ---------------------------- | ------ | ------------ |
| Authentication/Authorization | string | Your API key |

#### Request Body

| Name                                     | Type    | Description                      |
| ---------------------------------------- | ------- | -------------------------------- |
| shards                                   | integer | Amount of shards your bot has    |
| guilds<mark style="color:red;">\*</mark> | integer | Amount of servers your bot is in |

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

```javascript
{
    message: "Success"
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    message: "Bot Not Found; Please provide ID of a registered Bot",
    message: "No API Key Found; Please contact Radar",
    message: "Please provide an API Key",
    message: "Incorrect API Key",
    message: "Please supply the guild stats"
}
```

{% endtab %}
{% endtabs %}

## Find Individual Bot

<mark style="color:blue;">`GET`</mark> `/bot/:id/`

#### Path Parameters

| Name                                        | Type   | Description                      |
| ------------------------------------------- | ------ | -------------------------------- |
| id/vanity<mark style="color:red;">\*</mark> | string | The ID or Vanity of Specific Bot |

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

```
{
  "longdescription": "Setup a channel and send your ad, Global Advertising will echo your ad across many servers.\n\nUse g!link to get started!",
  "shortdescription": "Global Advertising is the perfect way to get your ad more exposure",
  "prefix": "g!",
  "category": "Ad",
  "ownerid": "381710555096023061",
  "id": "843661607346765864",
  "name": "Global Advertising",
  "votes": 0,
  "website": "",
  "guilds": "???",
  "verified": true
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    error: "Bot Not Found"
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Vote Notification

<mark style="color:green;">`POST`</mark>&#x20;

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

```javascript
 {
          "user": <ID of user that voted>,
          "type": 'vote',
          "bot": <ID of your bot>
}
```

{% endtab %}
{% endtabs %}

## Fetch Individual Bot Reviews

<mark style="color:blue;">`GET`</mark> `/:id/reviews`

#### Path Parameters

| Name | Type   | Description        |
| ---- | ------ | ------------------ |
| id   | string | ID of Specific Bot |

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

```javascript
{
  "reviews": [
    {
      "content": "Works like a charm. Best Minecraft bot you can invite",
      "stars": "5",
      "botid": "712808436588347443",
      "userid": "381710555096023061"
    },
    {
      "botid": "712808436588347443",
      "content": "Good bot",
      "stars": "4",
      "userid": "704790614755246212"
    }
  ]
}
```

{% endtab %}

{% tab title="204: No Content " %}

```javascript
{
    "reviews": []
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    "error": "Bot not found"
}
```

{% endtab %}
{% endtabs %}
