Skip to main content
POST
Create a schedule

Authorizations

Authorization
string
header
required

A workspace API key (oc_…) or organization API key (oc_org_…). Workspace-scoped endpoints called with an organization key also need X-Workspace-Id.

Path Parameters

agentId
string
required

Body

application/json
name
string
required
Maximum string length: 100
prompt
string
required

What the agent is asked to do each time the schedule fires.

Maximum string length: 10000
schedule
string
required
Maximum string length: 100
Example:

"0 9 * * 1-5"

timezone
string
required
Maximum string length: 100
Example:

"Europe/London"

Response

Created

id
string
agentId
string
name
string
prompt
string
schedule
string

A cron expression (five fields, croner syntax).

timezone
string

IANA time zone the schedule is evaluated in.

enabled
boolean
disabledReason
enum<string> | null

Why the platform paused it, when it did. completed marks a one-shot schedule that fired its last occurrence.

Available options:
authorization,
failures,
completed,
null
nextFireAt
string<date-time> | null
lastFiredAt
string<date-time> | null
lastOutcome
enum<string> | null
Available options:
ok,
failed,
skipped_busy,
null
consecutiveFailures
integer
createdAt
string<date-time>