The legacy API is HungerBridge’s original, minimal interface. Both endpoints accept a plain-text request body — not JSON — and return a small JSON object on success. They were designed for simple shell-script integrations and intentionally offer no output capture or log-level control. Both are disabled by default and controlled through theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/iFamishedX/HungerBridge/llms.txt
Use this file to discover all available pages before exploring further.
legacy-endpoints section of config.yaml.
These endpoints are preserved for backward compatibility only. For all new integrations, use the v2 endpoints, which accept JSON, capture command output, support log levels, and are enabled by default.
Authentication
Both legacy endpoints require theX-Auth-Key header to match the auth.key value configured in config.yaml. A missing or incorrect key returns 401 Unauthorized.
POST /run
Dispatches a server command as a fire-and-forget operation. The request body is read as raw plain text — no JSON wrapping. The server executes the command and immediately responds with{"ok":true} without capturing or returning any output.
Config toggle: legacy-endpoints.run
Auth required: Yes — X-Auth-Key header
Request body
The raw command string to execute on the Minecraft server. Send the command directly as the request body with no JSON encoding. An empty or whitespace-only body returns a
400 error.Response fields
Always
true on success. No output is captured or returned — this endpoint is strictly fire-and-forget.Example
Example — run a command from a shell variable
Error responses
| HTTP Status | error field | Cause |
|---|---|---|
400 | bad_request | Request body is empty or contains only whitespace |
401 | unauthorized | X-Auth-Key header missing or incorrect |
403 | forbidden | Endpoint disabled (legacy-endpoints.run: false) |
405 | method_not_allowed | Request method is not POST |
POST /log
Writes a message to the Minecraft server log. The request body is read as raw plain text. The message is always logged at theINFO level — there is no way to select a different severity with this endpoint.
Config toggle: legacy-endpoints.log
Auth required: Yes — X-Auth-Key header
Request body
The raw message string to write to the server log. Send the text directly as the request body with no JSON encoding. The message is always emitted at
INFO level. An empty or whitespace-only body returns a 400 error.Response fields
Always
true on success.Example
Example — log from a script
POST /log always logs at INFO. To log at WARN or ERROR, use POST /v2/log with the "level" field in a JSON body.Error responses
| HTTP Status | error field | Cause |
|---|---|---|
400 | bad_request | Request body is empty or contains only whitespace |
401 | unauthorized | X-Auth-Key header missing or incorrect |
403 | forbidden | Endpoint disabled (legacy-endpoints.log: false) |
405 | method_not_allowed | Request method is not POST |