Loading...

API Documentation for Bot Developers

Securely interact with your bots using our API. All endpoints require API Token authentication.

Authentication

Include your API Token in the request headers:

  Authorization: YOUR_API_TOKEN
              
Never share your API Token with anyone.

POST /api/bots/stats

Update your bot statistics such as server count and user count.

Request Body
  {
    "serverCount": 123,
    "userCount": 4567
  }
              
Validation
  • Values must be numbers
  • No negative values
  • Max serverCount: 1,000,000
  • Max userCount: 100,000,000
Rate Limit

1 request every 15 minutes

Success Response
  {
    "error": false,
    "message": "Stats updated"
  }
              
Error Responses
  { "error": true, "message": "No token provided" }
  { "error": true, "message": "Invalid token" }
  { "error": true, "message": "Invalid stats format" }
  { "error": true, "message": "Invalid numbers" }
  { "error": true, "message": "Abuse detected" }
  { "error": true, "message": "Rate limited (15 min)" }
              

GET /api/bots/votes

Retrieve total votes and today's votes for your bot.

Rate Limit

1 request every 10 seconds per IP

Success Response
  {
    "error": false,
    "votes": 1200,
    "todayVotes": 45
  }
              
Error Responses
  { "error": true, "message": "No token provided" }
  { "error": true, "message": "Invalid token" }
  { "error": true, "message": "Slow down!" }
              

Example (Node.js)

  const { fetch } = require("undici");

  fetch("https://millobotlist.tech/api/bots/stats", {
    method: "POST",
    headers: {
      "Authorization": "YOUR_API_TOKEN",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      serverCount: 1234,
      userCount: 1234
    })
  })
  .then(res => res.json())
  .then(console.log);
              
Top