Skip to content
CubeVote

Vote API

Reward your players when they vote for your server. The API tells you who voted, and lets you mark votes as rewarded so you never hand out the same reward twice.

You probably don't need this API. If your server has Votifier, as most servers already listed elsewhere do, pasting a token is enough for your reward plugins to work, without writing a line of code. See the Votifier setup.

The API is still useful if you can't open a port, or if you want to drive rewards from your own code.

Authentication

Each server has a unique API key, shown on the server's management page. Send it in the Authorization header or in the key parameter.

Authorization: Bearer YOUR_API_KEY

Never publish this key client-side: it gives access to your server's votes.

GET/api/v1/vote

Checks whether a player has a vote waiting for a reward. This is the call to use in an in-game /vote command.

curl "https://cubevote.net/api/v1/vote?username=Steve" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response:

{
  "server": "nordcraft",
  "username": "Steve",
  "hasPendingVote": true,
  "pending": 1,
  "voteIds": ["clx8f2k1p0001"],
  "lastVoteAt": "2026-09-20T14:31:02.000Z"
}

Without the username parameter, the call returns up to 200 pending votes, all players combined.

POST/api/v1/vote/claim

Marks votes as rewarded. Call it right after giving the reward in game.

curl -X POST "https://cubevote.net/api/v1/vote/claim" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username":"Steve"}'

Response:

{ "claimed": 1 }

You can also target specific votes with {"voteIds": ["…"]}.

GET/api/v1/servers

Public ranking, no authentication. Handy to show the top servers on your own website.

curl "https://cubevote.net/api/v1/servers?mode=skyblock&version=1.21&tri=votes"

Parameters: mode (survie, faction, skyblock…), version (1.21, 1.20…), bedrock=1, crack=1, q, tri (votes, players, rating, recent, name), page, limite (100 maximum).

Integration example

A check loop every thirty seconds, to adapt to your platform (Bukkit/Paper plugin, Node script, Velocity extension…).

const KEY = process.env.CUBEVOTE_KEY;
const BASE = "https://cubevote.net/api/v1";

async function handOutRewards() {
  const res = await fetch(`${BASE}/vote`, {
    headers: { Authorization: `Bearer ${KEY}` },
  });
  const { votes } = await res.json();

  for (const vote of votes) {
    await giveInGameReward(vote.username); // your logic
  }

  if (votes.length > 0) {
    await fetch(`${BASE}/vote/claim`, {
      method: "POST",
      headers: {
        Authorization: `Bearer ${KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ voteIds: votes.map((v) => v.id) }),
    });
  }
}

setInterval(handOutRewards, 30_000);

Limits and error codes

  • 401: API key missing or invalid.
  • 403, the server hasn't been approved by moderators yet.
  • 429, more than 120 requests per minute per server.

Every vote carries a Minecraft username, required to vote: the same username votes only once per cooldown, whatever its connection.

Rather not write code? Set a Discord webhook on your server's page: every vote will be announced there automatically.