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 thex-api-key header. Schedules are scoped to the key that created them, so list endpoints only return your own schedules.
403:
Cron expressions
Schedules and HTTP schedules use standard five-field cron expressions, evaluated in the schedule’stimezone (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:- Create the schedule with Create Schedule.
- Confirm it works without waiting for the cron by calling Trigger Schedule Now.
- Check the result with Get Execution Logs. Each run includes a
session_idyou can use with the Sessions API.