Automatically reward players who vote for your server: your plugin checks the vote on Rank-Serv and marks it as claimed.
It works in three steps:
Every request must include your server token in the following HTTP header. Plugins that can't send headers may use the ?token= parameter instead.
X-Server-Token: VOTRE_TOKENYou can find the token on your server's edit page, from My servers.
Keep this token secret: it lets anyone claim your server's votes. If it leaks, regenerate it from the edit page. The old token stops working immediately.
Tells whether the player voted in the last 2 hours and whether the reward was already claimed. This call changes nothing.
| Parameter | Required | Description |
|---|---|---|
| token | Yes | Server token, in the X-Server-Token header or as ?token= parameter. |
| username | One of | Name entered by the player when voting (case-insensitive). |
| ip | One of | Player's IP address at vote time. Don't send username and ip together. |
curl -H "X-Server-Token: VOTRE_TOKEN" \
"https://api.rank-serv.com/v1/votes/check?username=Steve"{
"status": "CLAIMABLE",
"voted_at": "2026-11-05T14:02:11",
"next_vote_in": 4320
}Marks the player's latest vote as claimed. A vote can only be claimed once, even if two requests arrive at the same time: only give the reward when the status is CLAIMED.
Parameters are the same as for /check.
curl -X POST -H "X-Server-Token: VOTRE_TOKEN" \
"https://api.rank-serv.com/v1/votes/claim?username=Steve"{
"status": "CLAIMED",
"voted_at": "2026-11-05T14:02:11",
"next_vote_in": 4318
}Both endpoints always return HTTP 200 with this JSON format, whether the vote exists or not.
{
"status": "NOT_FOUND",
"voted_at": null,
"next_vote_in": null
}Any HTTP code other than 200 means the request is invalid:
Complete examples for claiming a vote.
curl -X POST -H "X-Server-Token: VOTRE_TOKEN" \
"https://api.rank-serv.com/v1/votes/claim?ip=203.0.113.42"