Skip to main content
The Scheduler API runs work automatically at set times. It has two resource groups: To run an agent when an external system sends it an event, rather than on a timer, use the Webhooks API.

Base URL

Collection endpoints end in a trailing slash, for example /schedules/ and /schedules/pause-bulk/. Include it exactly as shown. Requests without it are redirected, and most HTTP clients drop the body and headers when they follow the redirect.

Authentication

Every endpoint requires your Lyzr API key in the x-api-key header. Schedules are scoped to the key that created them, so list endpoints only return your own schedules.
A missing or invalid key returns 403:

Cron expressions

Schedules and HTTP schedules use standard five-field cron expressions, evaluated in the schedule’s timezone (default UTC).
Set timezone to an IANA name such as Asia/Kolkata or America/New_York so runs follow local time.

Retries

Failed runs are retried automatically. max_retries sets the number of retries (0-5, default 3) and retry_delay sets the wait between them in seconds (10-3600, default 60). Every attempt is recorded in the execution logs with its attempt number.

Typical flow

To run an agent every morning:
  1. Create the schedule with Create Schedule.
  2. Confirm it works without waiting for the cron by calling Trigger Schedule Now.
  3. Check the result with Get Execution Logs. Each run includes a session_id you can use with the Sessions API.

Errors