Skip to content

Create default smart workflow (no benchmark)

POST
/api/v1/workflows/create-default-smart
Code sample: cURL
curl -X POST 'https://dashboard.justcrawl.io/api/v1/workflows/create-default-smart' \
-H 'Authorization: Bearer $JUSTCRAWL_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"strategy":"success"}'

Create a default (route=’*’) smart workflow from the org’s connected providers without requiring benchmark data. Used by the smart-workflow flow when a user has no URL history to benchmark (fresh org, or after deleting all workflows including the default).

Provider order is a static alphabetical fallback by providerId — without benchmark data we have no signal to rank by. Per-strategy ranking only kicks in once the optimization cycle runs against real benchmark data.

Idempotent: if a published default workflow already exists for this org, it is updated in place; otherwise a new one is created and published.

Media type application/json
object
strategy
required
string
Allowed values: success cost reliability quality
pipeline
object
includeStorage
boolean
includeExtractor
boolean
extractorPageType
string

The created or updated default smart workflow. Body is wrapped under workflow rather than returned directly so callers can disambiguate create-vs-update via workflow.isUpdate.

Media type application/json
object
workflow
object
workflowId
string format: uuid
name
string
route

Always ’*’ for default smart workflows.

string
providerOrder
Array<string>
costPerThousand

Always null on this endpoint — cost estimation needs benchmark data.

number
nullable
isUpdate

True when an existing default workflow was overwritten; false when a fresh one was created.

boolean
Example generated
{
"workflow": {
"workflowId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"route": "example",
"providerOrder": [
"example"
],
"costPerThousand": 1,
"isUpdate": true
}
}

Invalid strategy (must be one of success, cost, reliability, quality), or no active providers configured for the org.

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."
}

Unexpected server error. Logs and PostHog $exception capture

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