Server
Send command
Sends a command to the server
The server must be online to send a command to it. You will get HTTP 502 is the server if not online.
POST
/api/client/servers/{server}/commandAuthorization
ClientToken AuthorizationBearer <token>
Client API key (generated at /account/api)
In: header
Path Parameters
server*string
Server identifier (short 8-character ID)
Request Body
application/json
command*string
Command to send
Response Body
curl -X POST "https://pterodactyl.file.properties/api/client/servers/1a7ce997/command" \ -H "Authorization: Bearer ptlc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "command": "say CodeCo says Hi!"}'Empty