Skip to content
Rating

Vote API

Public API: get a list of votes and check whether a player voted (by Discord or nickname). Suitable for Discord bots.

Updated October 13, 2026

The public votes API lets your integrations read a server's votes: fetch the list of votes, check whether a specific player has voted, and view statistics. It's most often used to have a Discord bot grant a rank or a reward to those who voted.

Access is read-only — you can't change votes through the API.

Getting an API key

  1. Open your server's page and complete owner verification.
  2. In the server settings, open the “API keys” section and click “Create key”.
  3. Copy the key, which looks like rsk_live_… — it's shown once. Store it like a password.

You can restrict a key to a single server or issue it for all your servers. Revoke a compromised key in the same section and create a new one.

Important: don't publish the key in open source code, a repository, or a publicly accessible bot config. If the key leaks, revoke it.

Base URL and authorization

Base URL: https://api.millida.net/v2/rating/api

The key is passed in the X-Api-Key header (or Authorization: Bearer …):

curl https://api.millida.net/v2/rating/api/stats \
  -H "X-Api-Key: rsk_live_YOUR_KEY"

If the key was issued for all the tenant's servers, add the serverId parameter to every request. For a key tied to a single server, you can omit this parameter.

Checking a player's vote

The main scenario for a Discord bot: “has this person voted”. The endpoint is GET /votes/check.

Parameters:

  • discordId or nickname — who you're checking (one of them is required);
  • since — the period: today (default, from the start of the day in UTC) or a number of hours or days — 24h, 7d, 30d;
  • serverId — required if the key was issued for all servers.
curl "https://api.millida.net/v2/rating/api/votes/check?discordId=123456789012345678&since=today" \
  -H "X-Api-Key: rsk_live_YOUR_KEY"

Response:

{
  "voted": true,
  "serverId": "srv…",
  "voteId": "clx…",
  "votedAt": "2026-06-16T10:12:00.000Z",
  "discordId": "123456789012345678",
  "nickname": "Steve",
  "since": "2026-06-16T00:00:00.000Z"
}

If voted is true, the player cast a counted vote for the selected period. Only valid votes are counted (botting and rejected votes are not counted.)

About checking by Discord: a vote is linked to a Discord account only if the player specified it in their Millida profile. If some players don't have Discord linked, check by nickname or ask players to link Discord in their profile.

List of votes

GET /votes returns the server's votes from newest to oldest.

Parameters (all optional):

  • status — VALID, HELD, REJECTED_FRAUD, REJECTED_RATE_LIMIT, REJECTED_NO_PLAY_HISTORY, or ALL (all are returned by default);
  • discordId, nickname — filter by player;
  • from, to — date range in ISO format;
  • limit — how many to return (1–200, default 50);
  • cursor — the next page cursor from the nextCursor field.
curl "https://api.millida.net/v2/rating/api/votes?status=VALID&limit=100" \
  -H "X-Api-Key: rsk_live_YOUR_KEY"

Response:

{
  "votes": [
    {
      "id": "clx…",
      "serverId": "srv…",
      "discordId": "123456789012345678",
      "nickname": "Steve",
      "status": "VALID",
      "votedAt": "2026-06-16T10:12:00.000Z"
    }
  ],
  "nextCursor": "eyJ…"
}

To get the next page, repeat the request with cursor set to nextCursor. When nextCursor is null, there's no more data. Voters' IP addresses are not passed through the API.

Statistics

GET /stats returns summary counters for the server:

{
  "serverId": "srv…",
  "validToday": 42,
  "valid24h": 50,
  "valid30d": 1280,
  "totalValid": 9001,
  "totalAll": 9500
}

Example: a Discord bot grants a role for voting

async function hasVotedToday(discordId) {
  const res = await fetch(
    `https://api.millida.net/v2/rating/api/votes/check?discordId=${discordId}&since=today`,
    { headers: { "X-Api-Key": process.env.MILLIDA_RATING_KEY } },
  );
  const data = await res.json();
  return data.voted === true;
}

Call this function with a Discord command and grant the role if the player has voted.

Limitations

  • The API is read-only.
  • The request rate is limited — that's more than enough for checking on command. Don't poll the API in a tight loop.
  • A key only sees votes from your servers.