Send a Pterodactyl console command
ptero_send_console_commandDispatch a command to a running Pterodactyl server console. Use with ptero_get_console_log to read the output, since the command result is not returned. Prefer ptero_set_power_state for power changes.
Instructions
Send a command to the server console via the panel's command endpoint (the panel forwards it to the running process). This confirms DISPATCH ONLY — it does NOT return the command's output. Wings does not correlate console output with the command that produced it, so there is no request/response shape to report here, faked or otherwise: the output is asynchronous. Call ptero_get_console_log immediately afterwards (a window_seconds of 3-5 is usually enough) to read what the command did.
Do not use this to stop, restart or kill the server. A command like stop will shut it down, but ptero_set_power_state is the correct, guarded way to change power state and should be preferred for that.
The panel answers with HTTP 502 when the target server is offline, since console commands require a running server — that is reported back as an actionable error telling you to start the server with ptero_set_power_state first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | No | Server short identifier (e.g. 1a2b3c4d). Omit to use PTERODACTYL_DEFAULT_SERVER. Call ptero_list_servers to discover valid identifiers. | |
| command | Yes | The exact command to send, as you would type it at the console (no leading `/`). 1-4096 characters, a single line, trimmed of surrounding whitespace. | |
| dry_run | No | When true, validate and preview the change without performing it. Nothing is modified and no confirmation token is issued. Use this to reason about an operation before committing to it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why the call was refused. | |
| server | Yes | ||
| status | Yes | success = the change was made. refused = a guardrail blocked it (see reason/variable). dry_run = nothing changed; preview shows what would. needs_confirmation = nothing changed; SHOW the preview to the human and, only if they agree, call again with confirmation_token. | |
| command | No | The exact command that was dispatched. | |
| message | No | ||
| preview | No | What would / did change. | |
| variable | No | Environment variable that caused the refusal. | |
| backup_id | No | UUID of the automatic pre-change backup, if one was taken. | |
| dispatched | No | True once the panel accepted the command for delivery to the daemon. | |
| expires_in_s | No | ||
| confirmed_via | No | ||
| confirmation_token | No |