API ReferenceSchedules
Update Schedule
Update a schedule's cron expression, timezone, or enabled state.
Changes to cron_expr or timezone recompute next_fire_at from now, so an
updated schedule never immediately back-fires for a missed time in the past.
Re-enabling a paused schedule (enabled=true) also recomputes next_fire_at
from now.
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Path Parameters
schedule_id*Schedule Id
Format
uuidHeader Parameters
X-API-Key?string|null
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://api.levainlabs.com/api/v1/schedules/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"agent_id": "string",
"agent_version_id": "string",
"cron_expr": "string",
"timezone": "string",
"prompt": "string",
"initial_state": {},
"enabled": true,
"next_fire_at": "string",
"last_fired_at": "string",
"last_run_id": "string",
"created_at": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}