Skip to content

Create schedule

POST
/api/v1/schedules
curl -X POST 'https://dashboard.justcrawl.io/api/v1/schedules' \
-H 'Authorization: Bearer $JUSTCRAWL_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"name":"Hourly product sweep","workflowId":"wf_01ABC","frequency":"hourly","timezone":"UTC","tagFilters":["products"]}'

Creates a recurring schedule that fires the named workflow on the given cadence. The frequency enum picks a canonical cron expression — only custom requires you to supply cronExpr yourself. workflowId is optional: when null, the scheduler resolves a workflow per URL at trigger time via resolveWorkflowForUrl (domain-routed or default *), which is what the dashboard surfaces as “Automatic.” tagFilters narrows the URL set to URLs carrying ALL listed tags. The timezone string is IANA (e.g. America/Los_Angeles); invalid zones return 400. Requires verified email — unverified accounts get 403.

Media type application/json
object
name
required

Display name shown in dashboard + emitted on schedule runs.

string
workflowId

Workflow to run. Must be status='published'. Pass null for Automatic routing.

string
nullable
frequency
required
string
Allowed values: every_5_minutes every_10_minutes every_15_minutes every_30_minutes hourly every_2_hours every_3_hours every_4_hours every_6_hours every_8_hours every_12_hours daily weekly monthly custom
cronExpr

Required only when frequency='custom'. Standard 5-field cron syntax.

string
timezone

IANA timezone (e.g. UTC, America/Los_Angeles). Defaults to UTC.

string
tagFilters

URLs must carry ALL listed tags to be included. Max 50.

Array<string>
isEnabled

When false, the schedule is created but won’t fire until enabled. Defaults to true.

boolean

Schedule created.

Media type application/json
object
id
string format: uuid
name
string
workflowId
string format: uuid
nullable
tagFilters
Array<string>
frequency
string
Allowed values: hourly daily weekly monthly custom
cronExpr
string
timezone
string
isEnabled
boolean
nextRunAt
string format: date-time
lastRunAt
string format: date-time
nullable
createdAt
string format: date-time
Example
{
"frequency": "hourly"
}

Validation failed — request body or query is missing/invalid

Media type application/json
object
error
string
Example
{
"error": "Missing or invalid \"url\" field"
}

Missing or invalid authentication token

Media type application/json
object
error
string
Example
{
"error": "Missing or invalid authentication token"
}

Insufficient permissions for this operation

Media type application/json
object
error
string
Example
{
"error": "No organization. Complete onboarding first."
}

Referenced workflowId not found.

Unexpected server error. Logs and PostHog $exception capture

Media type application/json
object
error
string
Example
{
"error": "Something went wrong"
}