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:| Status | Meaning |
|---|---|
401 | Missing or incorrect X-API-Key header |
400 | Bad request — missing field, invalid value, or disallowed input |
500 | Internal server error |
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.true on success.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.true on success.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.true on success.Confirmation that the command was issued.
POST /api/command
Sends a command directly to the Minecraft server console via tmux.The console command to send (e.g.
"say hello", "op PlayerName", "difficulty hard").true on success.Confirmation including the command that was sent.
POST /api/whitelist/add
Adds a player to the Minecraft server whitelist.The player’s username. Must match
[a-zA-Z0-9_]{1,16} — alphanumeric characters and underscores only, between 1 and 16 characters.true on success.Confirmation including the player name that was added.
POST /api/whitelist/remove
Removes a player from the Minecraft server whitelist.The player’s username. Must match
[a-zA-Z0-9_]{1,16} — alphanumeric characters and underscores only, between 1 and 16 characters.true on success.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.
true when the backup process was launched successfully.Confirmation that the backup was triggered. Poll GET /api/backups to see when the new archive appears.