Skip to main content
POST
Create HTTP schedule
Use an HTTP schedule to call an external API, kick off a refresh job, or hit another Lyzr endpoint on a fixed cadence. For running an agent, use Create Schedule instead. If body is an object or array, it is sent as JSON. Any other value is sent as a raw string. cron_expression uses standard five-field cron syntax. See Cron expressions.

Authorizations

x-api-key
string
header
required

Lyzr API key. Required on every endpoint except Trigger Webhook.

Body

application/json
url
string
required

Absolute URL to call.

Example:

"https://api.example.com/reports/refresh"

cron_expression
string
required

Five-field cron expression: minute hour day month day_of_week. Day-of-week follows standard cron numbering (0 or 7 = Sunday, 1 = Monday, ..., 6 = Saturday).

Example:

"0 9 * * 1-5"

method
enum<string>
default:POST

HTTP method.

Available options:
GET,
POST,
PUT,
PATCH,
DELETE
headers
object

Extra request headers, for example an API key for the target service.

Example:
body
any

Request body. Objects and arrays are sent as JSON; any other value is sent as a raw string.

Example:
timeout_seconds
number
default:120

Per-request timeout in seconds (1-600).

Required range: 1 <= x <= 600
timezone
string
default:UTC

IANA timezone the cron expression is evaluated in.

max_retries
integer
default:3

Number of retry attempts if a request fails (0-5).

Required range: 0 <= x <= 5
retry_delay
integer
default:60

Seconds to wait between retry attempts (10-3600).

Required range: 10 <= x <= 3600
label
string | null

Optional human-readable name for the schedule.

Example:

"Nightly report refresh"

Response

HTTP schedule created.

id
string
required
Example:

"66f1c4d2e4b0a1b2c3d4e5f8"

url
string
required
Example:

"https://api.example.com/reports/refresh"

method
string
required
Example:

"POST"

timeout_seconds
number
required
Example:

120

cron_expression
string
required
Example:

"0 2 * * *"

timezone
string
required
Example:

"UTC"

created_at
string<date-time>
required
headers
object
body
any

Stored request body.

max_retries
integer
default:3
retry_delay
integer
default:60
label
string | null
Example:

"Nightly report refresh"

is_active
boolean
default:true

false when the schedule is paused.

updated_at
string<date-time> | null
next_run_time
string<date-time> | null

When the schedule will next fire. null while paused.

last_run_at
string<date-time> | null
last_run_success
boolean | null
last_run_status
integer | null

HTTP status code returned by the target on the most recent run.

last_attempt_count
integer | null

Number of attempts the most recent run took.