Skip to main content
POST
/
api
/
v1
/
runtime
/
v1
/
schedules
Create a schedule
curl --request POST \
  --url https://api.runflow.ai/api/v1/runtime/v1/schedules \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Daily Report",
  "type": "interval",
  "message": "Run the daily report task",
  "interval": 60,
  "time": "09:00",
  "cron": "0 9 * * *",
  "timezone": "America/Sao_Paulo",
  "maxExecutions": 0,
  "metadata": {
    "reportType": "daily"
  },
  "executionContext": {
    "entityType": "phone",
    "entityValue": "+5511999999999"
  }
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.runflow.ai/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json
name
string
required

Schedule name

Example:

"Daily Report"

type
enum<string>
required

Schedule type

Available options:
interval,
daily,
cron
Example:

"interval"

message
string
required

Message sent to agent on each scheduled execution

Example:

"Run the daily report task"

interval
number

Interval in minutes (required for type "interval")

Required range: 1 <= x <= 43200
Example:

60

time
string

Time in HH:mm format (required for type "daily")

Example:

"09:00"

cron
string

Cron expression (required for type "cron")

Example:

"0 9 * * *"

timezone
string
default:America/Sao_Paulo

Timezone for scheduled executions

Example:

"America/Sao_Paulo"

maxExecutions
number
default:0

Maximum number of executions (0 = unlimited)

Required range: x >= 0
Example:

0

metadata
object

Additional metadata for the schedule

Example:
{ "reportType": "daily" }
executionContext
object

Conversation context captured automatically by the SDK (entityType, entityValue, sessionId, userId)

Example:
{
"entityType": "phone",
"entityValue": "+5511999999999"
}

Response

201

Schedule created successfully.