Skip to main content
POST
/
api
/
v1
/
workflow
/
public
/
scheduled
curl -X POST "https://app.refold.ai/api/v1/workflow/public/scheduled" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID" \
  -H "slug: {slug}" \
  -H "workflow_id_alias: YOUR_WORKFLOW_ID" \
  -H "config_id: YOUR_CONFIG_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "trigger_type": "cron",
    "regex": "0 9 * * 1",
    "tz": "UTC",
    "startDate": "2026-07-01",
    "payload": { "sync_type": "full" }
  }'
{
  "_id": "6a315b7ad396207fd2547678",
  "event_id": "6a315b7ad396207fd2547676",
  "workflow": "6a17f312aae660322b26883e",
  "config_id": "user_12345",
  "linked_account_id": "user_12345",
  "environment": "test",
  "org_id": "6500a1b2c3d4e5f6a7b8c9d0",
  "trigger_type": "cron",
  "cron_patten": "0 9 * * 1",
  "trigger_interval": [],
  "status": "running",
  "inactive": false,
  "registered_by_api": true,
  "options": { "startDate": "2026-07-01", "tz": "UTC", "trigger_type": "cron" },
  "payload": { "sync_type": "full" }
}
Register a scheduled trigger that runs a workflow automatically — either on a recurring cron expression or at specific interval date/times.
Schedules are part of the v1 workflow service (/api/v1/workflow/public/scheduled). They are scoped to a linked account.

Authentication

x-api-key
string
required
Your Refold API key.

Header Parameters

linked_account_id
string
required
The linked account that will run the scheduled workflow.
slug
string
required
The application slug the workflow belongs to. Example: hubspot
workflow_id_alias
string
required
The workflow ID to execute on schedule.
config_id
string
required
The config to run under. Defaults to the linked account ID.

Body Parameters

trigger_type
string
required
cron for recurring schedules, or interval for specific date/times.
regex
string
(cron) The cron expression. Stored on the schedule as cron_patten. Example: 0 9 * * 1 (every Monday 09:00).
interval_dates
array
(interval) Specific date/time objects, each { day, month, year, hour, minute }.
startDate
string
Earliest date the schedule may run (YYYY-MM-DD).
endDate
string
Latest date the schedule may run (YYYY-MM-DD).
tz
string
Timezone, e.g. UTC, America/New_York.
payload
object
Event payload passed to the workflow on each run.

Response

Returns the created schedule.
_id
string
Schedule ID (use it to pause/resume/update/delete).
event_id
string
The event the schedule fires.
workflow
string
The scheduled workflow ID.
config_id
string
The config it runs under.
linked_account_id
string
The owning linked account.
trigger_type
string
cron or interval.
cron_patten
string
The cron expression (cron schedules).
trigger_interval
array
The interval dates (interval schedules).
status
string
running or paused.
inactive
boolean
true when paused.
registered_by_api
boolean
true for API-created schedules.
options
object
Echo of startDate/endDate/tz/trigger_type.
payload
object
The payload passed to the workflow.
{
  "_id": "6a315b7ad396207fd2547678",
  "event_id": "6a315b7ad396207fd2547676",
  "workflow": "6a17f312aae660322b26883e",
  "config_id": "user_12345",
  "linked_account_id": "user_12345",
  "environment": "test",
  "org_id": "6500a1b2c3d4e5f6a7b8c9d0",
  "trigger_type": "cron",
  "cron_patten": "0 9 * * 1",
  "trigger_interval": [],
  "status": "running",
  "inactive": false,
  "registered_by_api": true,
  "options": { "startDate": "2026-07-01", "tz": "UTC", "trigger_type": "cron" },
  "payload": { "sync_type": "full" }
}
curl -X POST "https://app.refold.ai/api/v1/workflow/public/scheduled" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID" \
  -H "slug: {slug}" \
  -H "workflow_id_alias: YOUR_WORKFLOW_ID" \
  -H "config_id: YOUR_CONFIG_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "trigger_type": "cron",
    "regex": "0 9 * * 1",
    "tz": "UTC",
    "startDate": "2026-07-01",
    "payload": { "sync_type": "full" }
  }'