Toggle schedule

Pause or resume a schedule.


POST/api/scripts/{script}/schedules/{schedule}/toggle

Toggle a schedule

Flips the schedule's pause state. A paused schedule remains in the database (so you keep its server list and cron expression) but Ploi's per-minute scheduler skips it until you resume.

Request

POST
/api/scripts/{script}/schedules/{schedule}/toggle
curl -X POST "https://ploi.io/api/scripts/{script}/schedules/{schedule}/toggle" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

Response

{
  "data": {
    "id": 1,
    "script_id": 42,
    "cron_expression": "*/5 * * * *",
    "servers": [12, 18],
    "is_paused": true,
    "next_run_at": null,
    "last_run_at": "2026-05-13T08:50:00+00:00",
    "created_at": "2026-05-12 10:11:22",
    "updated_at": "2026-05-13 08:56:10"
  }
}