Skip to main content
POST
Create a scheduled task for an AI employee.

Authorizations

X-API-Key
string
header
required

Company API key - scoped to a specific company. Generate from the Integrations page in your dashboard.

Body

application/json

Scheduled task to create

Request body for creating a scheduled task

employeeId
string
required

ID of the AI employee that runs the task

name
string
required

Short descriptive name

prompt
string
required

The instruction the employee executes on every run. Be specific.

companyId
string

Company ID. Optional when the API key is a company key.

scheduleType
enum<string>

one_time (default), recurring, or heartbeat

Available options:
one_time,
recurring,
heartbeat
scheduledAt
string

One-time tasks: ISO 8601 datetime to run at

recurringConfig
object

Schedule details for recurring and heartbeat tasks

timezone
string

IANA timezone the schedule is expressed in (default: UTC)

contextSettings
object

Tool and context settings for the run. Defaults to the employee's own chat settings when omitted.

templateId
string

Template this task was created from, if any

templateVersion
integer

Version of that template

Response

The created task

Scheduled task

id
string
companyId
string
userId
string

User who owns the task

employeeId
string
name
string
prompt
string
scheduleType
string

one_time, recurring, or heartbeat

scheduledAt
string

One-time tasks: ISO 8601 run time

recurringConfig
object

Recurring or heartbeat schedule details

contextSettings
object

Tool and context settings for runs

timezone
string
nextRunAt
string

ISO 8601 time of the next run, null when none

lastRunAt
string

ISO 8601 time of the last run, null when never run

status
string

active, paused, or completed

runCount
integer
templateId
string
templateVersion
integer
createdDate
string
updatedDate
string