API Documentation
Submit votes and server status to HyServers.gg programmatically from your game server or website.
Authentication
All API requests require a server API token. Generate one from your server dashboard under the API Access section.
Include the token in the Authorization header:
Authorization: Bearer YOUR_API_TOKENKeep your API token secret. Do not expose it in client-side code or public repositories.
Base URL
https://hyservers.gg/api/v1Submit Vote
/api/v1/servers/{server_id}/voteSubmit a vote for a server on behalf of a player.
Request Body
{
"username": "PlayerName"
}Parameters
usernameThe in-game username of the player voting.
Success Response (200)
{
"success": true,
"monthly_votes": 42,
"next_vote_at": "2025-01-16T12:00:00.000Z"
}Cooldown Response (429)
{
"error": "This username has already voted for this server in the last 24 hours",
"next_vote_at": "2025-01-16T12:00:00.000Z"
}Submit Server Status
/api/v1/servers/{server_id}/statusSubmit your server's current status and player count. This data will appear in the server stats chart.
Request Body
{
"online_players": 24,
"max_players": 100,
"latency_ms": 45,
"motd": "Welcome to my server!",
"server_version": "1.0.0"
}Parameters
online_playersCurrent number of online players.
max_playersMaximum player capacity.
latency_msServer latency in milliseconds.
motdMessage of the day (max 500 chars).
server_versionServer version string (max 100 chars).
Success Response (200)
{
"success": true
}Rate Limit Response (429)
{
"error": "Rate limited. You can submit status once every 5 minutes.",
"next_allowed_at": "2025-01-16T12:05:00.000Z"
}Query Server Info
/api/v1/servers/{server_id}/infoRetrieve your server's current status, player counts, averages, vote stats, rank, and more.
Response Fields
nameServer namestatusonline, offline, or unknownonline_playersCurrent player countmax_playersMaximum player capacityaverage_players7-day average player countpeak_players7-day peak player countlatency_msCurrent latency in msaverage_latency30-day average latencyuptime_percentage30-day uptime percentagemonthly_votesCurrent month vote countall_time_votesTotal votes since listingrank_positionCurrent ranking positionAlso includes: slug, address, connection_port, country_code, motd, server_version, votes_count, is_premium, last_checked_at, date_added
Example Response (200)
{
"name": "My Hytale Server",
"slug": "my-hytale-server",
"address": "play.example.com",
"connection_port": 25565,
"country_code": "US",
"status": "online",
"online_players": 24,
"max_players": 100,
"average_players": 18.5,
"peak_players": 87,
"latency_ms": 45,
"average_latency": 52.3,
"uptime_percentage": 98.7,
"motd": "Welcome to my server!",
"server_version": "1.0.0",
"votes_count": 150,
"monthly_votes": 42,
"all_time_votes": 1200,
"rank_position": 5,
"is_premium": false,
"last_checked_at": "2026-02-06T12:00:00.000Z",
"date_added": "2025-11-01T00:00:00.000Z"
}Fetch Reviews
/api/v1/servers/{server_id}/reviewsFetch your server's reviews with rating summary and pagination.
Query Parameters
pagePage number for pagination.
limitNumber of reviews per page.
Response Fields
review_countTotal number of reviewsaverage_ratingAverage rating out of 5Each review includes: username, rating (1-5), content, created_at
Example Response (200)
{
"review_count": 15,
"average_rating": 4.2,
"reviews": [
{
"username": "Player1",
"rating": 5,
"content": "Great server with an amazing community!",
"created_at": "2026-02-05T14:30:00.000Z"
},
{
"username": "Player2",
"rating": 4,
"content": "Good gameplay, could use more maps.",
"created_at": "2026-02-04T09:15:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 15,
"total_pages": 2
}
}Error Responses
401Missing or invalid API token.
400Invalid request body (missing required fields, invalid values).
429Rate limited. Votes: 1 per username per 24h. Status: 1 per 5 minutes.
500Internal server error. Try again later.
Code Examples
Submit a Vote (JavaScript / Node.js)
const SERVER_ID = "your-server-id";
const API_TOKEN = "hys_your_api_token";
async function submitVote(username) {
const response = await fetch(
`https://hyservers.gg/api/v1/servers/${SERVER_ID}/vote`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_TOKEN}`,
},
body: JSON.stringify({ username }),
}
);
const data = await response.json();
if (response.ok) {
console.log(`Vote recorded! Monthly votes: ${data.monthly_votes}`);
} else if (response.status === 429) {
console.log(`On cooldown until: ${data.next_vote_at}`);
} else {
console.error(`Error: ${data.error}`);
}
return data;
}Submit Server Status (JavaScript / Node.js)
const SERVER_ID = "your-server-id";
const API_TOKEN = "hys_your_api_token";
async function submitStatus(onlinePlayers, maxPlayers) {
const response = await fetch(
`https://hyservers.gg/api/v1/servers/${SERVER_ID}/status`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_TOKEN}`,
},
body: JSON.stringify({
online_players: onlinePlayers,
max_players: maxPlayers,
}),
}
);
const data = await response.json();
if (!response.ok) {
console.error(`Error: ${data.error}`);
}
return data;
}
// Example: submit every 5 minutes
setInterval(() => {
submitStatus(getOnlinePlayers(), getMaxPlayers());
}, 5 * 60 * 1000);Query Server Info (JavaScript / Node.js)
const SERVER_ID = "your-server-id";
const API_TOKEN = "hys_your_api_token";
async function getServerInfo() {
const response = await fetch(
`https://hyservers.gg/api/v1/servers/${SERVER_ID}/info`,
{
headers: {
"Authorization": `Bearer ${API_TOKEN}`,
},
}
);
const data = await response.json();
if (response.ok) {
console.log(`${data.name}: ${data.online_players}/${data.max_players} players`);
console.log(`Rank #${data.rank_position} | ${data.monthly_votes} votes this month`);
console.log(`Uptime: ${data.uptime_percentage}% | Avg players: ${data.average_players}`);
} else {
console.error(`Error: ${data.error}`);
}
return data;
}Fetch Reviews (JavaScript / Node.js)
const SERVER_ID = "your-server-id";
const API_TOKEN = "hys_your_api_token";
async function getReviews(page = 1, limit = 10) {
const response = await fetch(
`https://hyservers.gg/api/v1/servers/${SERVER_ID}/reviews?page=${page}&limit=${limit}`,
{
headers: {
"Authorization": `Bearer ${API_TOKEN}`,
},
}
);
const data = await response.json();
if (response.ok) {
console.log(`${data.review_count} reviews | Rating: ${data.average_rating}/5`);
data.reviews.forEach(r =>
console.log(` ${r.username}: ${r.rating}/5 - ${r.content || "(no comment)"}`)
);
} else {
console.error(`Error: ${data.error}`);
}
return data;
}Using cURL
# Submit a vote
curl -X POST https://hyservers.gg/api/v1/servers/YOUR_SERVER_ID/vote \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{"username": "PlayerName"}'
# Submit server status
curl -X POST https://hyservers.gg/api/v1/servers/YOUR_SERVER_ID/status \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{"online_players": 24, "max_players": 100}'
# Query server info
curl https://hyservers.gg/api/v1/servers/YOUR_SERVER_ID/info \
-H "Authorization: Bearer YOUR_API_TOKEN"
# Fetch reviews
curl "https://hyservers.gg/api/v1/servers/YOUR_SERVER_ID/reviews?page=1&limit=10" \
-H "Authorization: Bearer YOUR_API_TOKEN"Rate Limits
| Endpoint | Limit | Scope |
|---|---|---|
| /vote | 1 per 24 hours | Per username per server |
| /status | 1 per 5 minutes | Per server |
| /info | No limit | Read-only |
| /reviews | No limit | Read-only |