Pterodactyl API v1
Schedules

Create task

Creates a new task on the specified schedule

POST/api/client/servers/{server}/schedules/{schedule}/tasks

Authorization

ClientToken
AuthorizationBearer <token>

Client API key (generated at /account/api)

In: header

Path Parameters

server*string

Server identifier (short 8-character ID)

schedule*integer

Schedule ID

Request Body

application/json

action*string
Value in"command" | "power" | "backup"
payload?|

Command to send, power action, or backup ignore list. Required unless action is backup.

time_offset*integer

Seconds to wait after the previous task, 0 to 900

sequence_id?integer
continue_on_failure?boolean

Response Body

application/json

curl -X POST "https://pterodactyl.file.properties/api/client/servers/1a7ce997/schedules/1/tasks" \  -H "Authorization: Bearer ptlc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \  -H "Accept: application/json" \  -H "Content-Type: application/json" \  -d '{  "action": "command",  "payload": "say Hello World",  "time_offset": 0}'
{
  "object": "schedule_task",
  "attributes": {
    "id": 6,
    "sequence_id": 1,
    "action": "command",
    "payload": "say Hello World",
    "time_offset": 0,
    "is_queued": false,
    "continue_on_failure": false,
    "created_at": "2020-10-29T01:09:03+00:00",
    "updated_at": "2020-10-29T01:09:03+00:00"
  }
}