Create default smart workflow (no benchmark)
curl -X POST 'https://api.justcrawl.io/api/v1/workflows/create-default-smart' \ -H 'Authorization: Bearer $JUSTCRAWL_API_KEY' \ -H 'Content-Type: application/json' \ -d '{"strategy":"success"}'Create a 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), and by the guided MCP scrape to stand up a per-domain workflow on first use.
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.
route selects which workflow this call owns, and changes three behaviours:
*(the default) — the org-wide default workflow. Chain is capped at 3 providers, and an org with no active provider accounts gets a 400.domain:<host>— a workflow routed to one domain, resolved ahead of the*default for URLs on that host. The chain includes every supported vendor (a vendor the org cannot authenticate simply fails over at runtime), and an org with no active provider accounts is not an error — a platform-managed org scrapes on platform credentials and legitimately has none. The host segment is normalized server-side (lowercased,www.stripped) so it matches the URL’s generateddomain:tag.
Idempotent per route: if a workflow already exists on this route for the org, it is updated in place; otherwise a new one is created and published.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
* for the org-wide default (the behaviour when omitted), or
domain:<host> for a domain-routed workflow. The host segment is
normalized server-side, so domain:www.example.com and
domain:example.com address the same workflow.
Example
domain:example.comobject
Responses
Section titled “Responses”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.
object
object
The canonical route this workflow was created on — ‘*’, or the normalized ‘domain:
Always null on this endpoint — cost estimation needs benchmark data.
True when an existing default workflow was overwritten; false when a fresh one was created.
Examplegenerated
{ "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), a malformed route (must be * or domain:<host>), or no active providers configured for the org on the * route.
Missing or invalid authentication token
object
Example
{ "error": "Missing or invalid authentication token"}Insufficient permissions for this operation
object
Example
{ "error": "No organization. Complete onboarding first."}Unexpected server error. Logs and PostHog $exception capture
object
Example
{ "error": "Something went wrong"}