Skip to content
Hosting · Server setup

Server API for bots

The Millida Hosting client API: issuing a key, permissions, server management and console streaming from your own bot or script.

Updated October 13, 2026

Everything the control panel does can be done from your own code: start a server on a schedule, show status in Discord, send commands from a bot.

Key

The API is available on any paid plan — the same place where files, SFTP, and team access are. On the free plan, a key is not issued: a key is the same shared access, only for a bot.

Section “Players and access” → “API keys” → “Issue”. Check what the key is allowed to do — the permissions are the same as for shared access.

The key is shown once: we store only its fingerprint. If you lose it, issue a new one and revoke the old one.

The key is passed in the Authorization: Bearer mhk_live_... header.

Methods

Base URL — https://millida.net/v2/hosting/api.

MethodWhat it doesRequired permission
GET /serverServer cardconsole
GET /statusStatus and onlineconsole
POST /startStartstart
POST /stopStopstart
POST /restartRestartstart
POST /commandCommand to consoleconsole
GET /consoleLive log (SSE)console
GET /files?path=List filesfiles
GET /files/configsWhich configs are read by the formfiles
GET /files/config?path=File settings with typesfiles
POST /files/configChange file settingsfiles
GET /backupsList backupsbackups
POST /backupsCreate a backupbackups
GET /antibotAnti-bot settings, backends, and firewall rulesprotection
PUT /antibotChange protection settingsprotection
GET /antibot/overview?range=Connections and denials for hour, day, or weekprotection
POST /antibot/backendsAdd a backend {"address":"host:port","label":"..."}protection
DELETE /antibot/backends/{id}Remove a backendprotection
POST /antibot/rulesFirewall rule {"kind":"allow"|"deny","cidr":"1.2.3.0/24"}protection
DELETE /antibot/rules/{id}Remove a ruleprotection
POST /antibot/verify-domain/checkCheck DNS for your verification page domainprotection

Example: start a server and wait for it to come online

KEY="mhk_live_xxx"
API="https://millida.net/v2/hosting/api"

curl -sX POST "$API/start" -H "Authorization: Bearer $KEY"

until curl -s "$API/status" -H "Authorization: Bearer $KEY" | grep -q RUNNING; do
  sleep 5
done
echo "server online"

Backups are created in the background

POST /backups returns {"id":"..."} immediately, while the archive itself is assembled on the node: a world of several gigabytes takes minutes. Check readiness in GET /backups using the status field: pending — still being assembled, ready — stored in storage (that's when the real sizeMb appears), failed — failed to assemble.

ID=$(curl -sX POST "$API/backups" -H "Authorization: Bearer $KEY" | jq -r .id)

until curl -s "$API/backups" -H "Authorization: Bearer $KEY" \
  | jq -e --arg id "$ID" '.[] | select(.id==$id) | select(.status=="ready")' >/dev/null; do
  sleep 15
done
echo "backup ready"

While a backup is in progress, you can't create a second one on the same server — the node does them one at a time.

Live console

GET /console returns a Server-Sent Events stream: each line arrives with the data: prefix. No WebSocket is needed — SSE passes through any proxy.

What you should know

  • Every key action is logged in the server log with the author “API key N”. This is exactly what you need when both people and bots are running servers.
  • Rate limiting is calculated per key, not per address: changing IP doesn't bypass the limit, and a neighbor on the office network doesn't consume it. It's generous for normal automation, but polling status once per second will hit it — once every 10–15 seconds is enough. The console stream can be opened up to ten times per minute: keep one connection instead of opening a new one for every message.
  • The key stops working immediately if the server is suspended or the plan is no longer paid. You don't need to revoke it manually for that.
  • Up to five keys per server. Revoke the ones you don't need.

Anti-bot protection

GET /antibot returns settings in two fields. config — the server's own settings; until they exist, it's null, and the server is protected by default (the default field). effective is always present: these are the settings that are currently in effect or that the server will start working with after the first edit — read values from it.

PUT /antibot accepts only the fields you want to change:

curl -sX PUT "$API/antibot" -H "Authorization: Bearer $KEY"   -H 'Content-Type: application/json'   -d '{"preset":"balanced"}'

Levels (preset): off, under_attack, balanced, aggressive, custom. The level expands into check values on its own, so for manual configuration choose custom and send the checks: checkCaptcha, checkPhysics, checkKeepAlive, checkTeleport, checkBrand, checkPing, checkTransfer, checkClientSettings — each one off, under_attack, or always. Address lists (vpnMode, datacenterMode, torMode) — off, log, or block. Geo filter — geoMode (off, allow, deny) and geoCountries (country codes, e.g. ["RU","BY"]).

The forwarding secret is not issued or changed via the API: it is shown only to the owner in the panel.

Config settings

GET /files/config?path=server.properties returns the parsed file — each entry with its type, current value, and a “restart required” flag:

{
  "path": "server.properties",
  "format": "properties",
  "options": [
    { "key": "pvp", "type": "boolean", "value": "true", "owner": "sync", "requiresRestart": false },
    { "key": "difficulty", "type": "select", "value": "normal", "values": ["peaceful", "easy", "normal", "hard"], "owner": "sync", "requiresRestart": false },
    { "key": "server-port", "type": "integer", "value": "25565", "owner": "platform", "requiresRestart": true }
  ]
}

owner tells you what can be done with the entry: platform — the value is set by the hosting, edits are rejected; sync — the entry exists both in the panel and in the file; file — only the file knows about it.

A write changes only the keys you send; everything else in the file remains untouched:

curl -sX POST "$API/files/config" -H "Authorization: Bearer $KEY"   -H 'Content-Type: application/json'   -d '{"path":"server.properties","values":{"pvp":"false","difficulty":"hard"}}'

The form reads .properties, .yml/.yaml, and .toml — including plugin configs the panel knows nothing about: the field type is inferred from the value. Nested keys are addressed with a dot: settings.bungeecord, advanced.compression-threshold.

The entire file is still available via GET/PUT /files/content?path= — both paths write to the same place.

Ready-made client in Node.js and Python

Below is a minimal client: it checks the status, starts the server and writes to the chat. The key comes from the MILLIDA_KEY environment variable — do not paste it into code that ends up in git. An error response is JSON with a message field; that is what your bot should log.

Node.js 18+ (built-in fetch):

const API = 'https://millida.net/v2/hosting/api';
const KEY = process.env.MILLIDA_KEY;

async function call(method, path, body) {
  const res = await fetch(`${API}${path}`, {
    method,
    headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' },
    body: body ? JSON.stringify(body) : undefined,
  });
  if (!res.ok) throw new Error(`${method} ${path}: ${res.status} ${await res.text()}`);
  return res.status === 204 ? null : res.json();
}

const status = await call('GET', '/status');
if (status.status !== 'RUNNING') await call('POST', '/start');
await call('POST', '/command', { command: 'say Hello from the bot' });

Python 3 with the requests library, plus reading the live console:

import os
import requests

API = "https://millida.net/v2/hosting/api"
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['MILLIDA_KEY']}"

def call(method, path, body=None):
    res = session.request(method, API + path, json=body, timeout=15)
    res.raise_for_status()
    return res.json() if res.content else None

status = call("GET", "/status")
if status["status"] != "RUNNING":
    call("POST", "/start")
call("POST", "/command", {"command": "say Hello from the bot"})

with session.get(API + "/console", stream=True, timeout=None) as stream:
    for line in stream.iter_lines(decode_unicode=True):
        if line and line.startswith("data:"):
            print(line[5:].strip())
Minecraft hostingYour server runs while you are offlineCreate server