Schedule a workflow

posthttps://api.expiryedge.com/v1/createWorkflowSchedule
editor or admin60/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/createWorkflowSchedule' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "workflow_id": "wf_3Kd9Tx",
  "schedule_type": "monthly",
  "start_date": "2026-10-15T09:00:00.000Z",
  "day_of_month": 15,
  "hour": 9,
  "minute": 0,
  "title_template": "License renewal {date}",
  "notify_owner": true
}'
Antwort
{
  "schedule": {
    "id": "sch_6Yx4",
    "workflow_id": "wf_3Kd9Tx",
    "workflow_title": "Annual license renewal",
    "owner_id": "u_71bXq",
    "organization_id": "org_northwind",
    "title_template": "License renewal {date}",
    "schedule_type": "monthly",
    "interval_days": null,
    "weekdays": [],
    "day_of_month": 15,
    "month_of_year": null,
    "hour": 9,
    "minute": 0,
    "timezone": "UTC",
    "start_date": "2026-10-15T09:00:00.000Z",
    "end_date": null,
    "next_run_at": "2026-10-15T09:00:00.000Z",
    "last_run_at": null,
    "run_count": 0,
    "notify_owner": true,
    "assignees": [
      "u_71bXq"
    ],
    "status": "active",
    "created_at": "2026-09-27T14:05:00.000Z",
    "updated_at": "2026-09-27T14:05:00.000Z"
  }
}

Creates a schedule that starts runs of the workflow automatically (checked every few minutes). next_run_at is computed on save; if there is no future fire time the schedule is created as completed. Scheduled runs count against the plan workflow_runs limit when they fire.

Body-Parameter

application/json
  • schedule_typestringerforderlich
    Erlaubtoncedailyintervalweeklymonthlyyearly
  • start_datestringerforderlich
    First possible fire time; for once this is the fire time.
    format: date-time
  • workflow_idstringerforderlich
  • title_templatestring | null
    Run title; {date} is replaced with the run date. Null uses <workflow title> - <date>.
  • interval_daysinteger | null
    For interval.
  • weekdaysarray of integer
    For weekly (0 = Sunday).
    min: 0 · max: 6
  • day_of_monthinteger | null
    For monthly / yearly.
    min: 1 · max: 31
  • month_of_yearinteger | null
    For yearly.
    min: 1 · max: 12
  • hourinteger
    Standard 9min: 0 · max: 23
  • minuteinteger
    Standard 0min: 0 · max: 59
  • timezonestring
    IANA timezone (stored; fire times are computed in server time from hour / minute).
    Standard UTC
  • end_datestring | null
    format: date-time
  • assigneesarray of string
    Users of your organization assigned to created runs (default: you).
  • notify_ownerboolean
    Standard true

Rückgabe

201
Created.
  • scheduleobjecterforderlich

Fehler

400
The request is missing required fields or contains invalid values.
401
Missing, expired or invalid bearer token.
403
Authenticated, but your role or organization does not allow this action.
404
The record does not exist or is not in your organization.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.
500
Unexpected server error. Retry later; quote requestId to support.