Skip to main content
All POST routes require the X-API-Key header. Include your configured secret key with every write request.
See Authentication for details on generating and configuring the key.

Error responses

These error responses apply to every write endpoint:

POST /api/server/start

Starts the Minecraft server by issuing serv 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.
Response
boolean
required
true on success.
string
required
Confirmation that the command was issued.

POST /api/server/stop

Stops the Minecraft server by issuing serv 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.
Response
boolean
required
true on success.
string
required
Confirmation that the command was issued.

POST /api/server/restart

Restarts the Minecraft server by issuing serv 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.
Response
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").
Commands containing shell special characters — ;, &, |, `, $, (, ), {, }, [, ], <, >, \ — are rejected with a 400 error. These characters are blocked to prevent shell injection, since commands are forwarded directly to the server console over tmux.
Response
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.
Response
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.
Response
boolean
required
true on success.
string
required
Confirmation including the player name that was removed.

POST /api/backup

Triggers a background backup by running serv backup -s. The backup runs silently in the background — the endpoint returns immediately without waiting for it to finish.
Response
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.