POST routes require the X-API-Key header. Include your configured secret key with every write request.
Error responses
These error responses apply to every write endpoint:POST /api/server/start
Starts the Minecraft server by issuingserv start.
The start, stop, and restart endpoints send a command to the
serv CLI and return immediately. A successful response means the command was issued — not that the server has finished starting or stopping. Poll GET /api/status to confirm the resulting state.boolean
required
true on success.string
required
Confirmation that the command was issued.
POST /api/server/stop
Stops the Minecraft server by issuingserv stop.
The start, stop, and restart endpoints send a command to the
serv CLI and return immediately. A successful response means the command was issued — not that the server has fully stopped. Poll GET /api/status to confirm the resulting state.boolean
required
true on success.string
required
Confirmation that the command was issued.
POST /api/server/restart
Restarts the Minecraft server by issuingserv restart.
The start, stop, and restart endpoints send a command to the
serv CLI and return immediately. A successful response means the command was issued — not that the restart has completed. Poll GET /api/status to confirm the resulting state.boolean
required
true on success.string
required
Confirmation that the command was issued.
POST /api/command
Sends a command directly to the Minecraft server console via tmux.string
required
The console command to send (e.g.
"say hello", "op PlayerName", "difficulty hard").boolean
required
true on success.string
required
Confirmation including the command that was sent.
POST /api/whitelist/add
Adds a player to the Minecraft server whitelist.string
required
The player’s username. Must match
[a-zA-Z0-9_]{1,16} — alphanumeric characters and underscores only, between 1 and 16 characters.boolean
required
true on success.string
required
Confirmation including the player name that was added.
POST /api/whitelist/remove
Removes a player from the Minecraft server whitelist.string
required
The player’s username. Must match
[a-zA-Z0-9_]{1,16} — alphanumeric characters and underscores only, between 1 and 16 characters.boolean
required
true on success.string
required
Confirmation including the player name that was removed.
POST /api/backup
Triggers a background backup by runningserv backup -s. The backup runs silently in the background — the endpoint returns immediately without waiting for it to finish.
boolean
required
true when the backup process was launched successfully.string
required
Confirmation that the backup was triggered. Poll GET /api/backups to see when the new archive appears.