Skip to main content
POST
schedule.create

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string

Optional. A retry with the same key returns the stored result.

Maximum string length: 255
Pramaan-Max-Price-Micro
string

Optional. The most this request may be priced at, in micro-USD (a whole number above 0). It replaces the capability's own price ceiling for this request, lower or higher. Sources that could cost more are left out; when none is left the answer is 400 with the lowest limit that would work.

Pattern: ^[1-9]\d{0,14}$

Body

application/json
target
object
required

What each run calls.

spendCapMicro
integer
required

The most all runs combined may cost, micro-USD. When runs reach it the schedule pauses.

Required range: 1 <= x <= 1000000000000
name
string

A label for the schedule.

Required string length: 1 - 100
input
object

The input every run is called with, stored encrypted.

options
object

An outcome's options for every run.

basis
object

Optional: a lawful basis recorded on every run. Never required.

cron
string

Five-field cron expression read in timezone, like "0 9 * * 1" (09:00 every Monday). Set this or everyMinutes.

Required string length: 9 - 120
everyMinutes
integer

Run every this many minutes, counted from startAt (5 or more). Set this or cron.

Required range: 5 <= x <= 527040
timezone
string

IANA time zone the cron expression is read in, like Asia/Kolkata. Default UTC.

Required string length: 1 - 64
startAt
string

No run before this, ISO 8601; an interval counts from it. Default: now.

Maximum string length: 40
endAt
string

No run after this, ISO 8601.

Maximum string length: 40
approved
boolean

Approve every run in advance. Required when the target asks a person to approve each call.

Response

The result

scheduleId
string
required

The schedule's id.

target
object
required

What each run calls.

timezone
string
required

The time zone the cron expression is read in.

startAt
string
required

No run before this, ISO 8601.

spendCapMicro
number
required

The most all runs combined may cost, micro-USD.

spentMicro
number
required

What the runs have cost so far, micro-USD.

approved
boolean
required

Every run was approved in advance.

status
enum<string>
required

active: runs on time. paused: no runs until resumed. ended: past its last run.

Available options:
active,
paused,
ended
createdAt
string
required

When it was created, ISO 8601.

name
string

The schedule's label.

cron
string

The cron expression runs follow.

everyMinutes
number

The interval between runs, minutes.

endAt
string

No run after this, ISO 8601.

pausedReason
string

Why it paused: spend_cap_reached or paused_by_builder.

nextRunAt
string

When it runs next, ISO 8601.

lastRunAt
string

When it last ran, ISO 8601.

input
object

The stored input.

options
object

The stored options.

basis
object

Optional: a lawful basis recorded on every run. Never required.