Api / Schedules

PATCH/v1/schedules/:id

Auth: tenant — Status: stable

Update a scheduled task's status. The single mutable field is status — other columns (phrase, message, agent) are immutable; recreate the schedule if you need to change them.

Request

Body

FieldTypeDescription
statusstringOne of: active, paused, canceled, completed, failed.

Resuming a recurring schedule whose next_fire_at is in the past advances it to the next valid fire time. Resuming a one-shot whose fire_at is in the past schedules it to fire on the next tick.

curl -X PATCH \
  -H "Authorization: Bearer atr_…" \
  -H "Content-Type: application/json" \
  -d '{"status":"paused"}' \
  http://arbiter.example.com/v1/schedules/17

Response

200 OK

Returns the updated scheduled_task.

{
  "scheduled_task": {
    "id": 17,
    "status": "paused",
    "...": "..."
  }
}

Failure modes

StatusWhen
400status value not in the allowed set; invalid JSON.
401Missing / invalid bearer.
404Schedule not found for this tenant.

See also