Skip to content

Update auto/suggest mode

PUT
/api/v1/workflows/{workflowId}/smart/mode
curl --request PUT \
--url https://dashboard.justcrawl.io/api/v1/workflows/example/smart/mode \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "mode": "auto" }'

Switches the smart workflow between auto (the optimization worker re-ranks providers and updates the DAG without asking) and suggest (the worker writes a optimization_suggestions row and the user clicks Apply). The flip takes effect on the next optimization tick — in-flight jobs already routed under the old DAG are not re-routed. Requires workflows:write.

workflowId
required
string
Media type application/json
object
mode
required
string
Allowed values: auto suggest

Mode updated.

Media type application/json
object
mode
string
Allowed values: auto suggest
Example
{
"mode": "auto"
}

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

Resource not found

Media type application/json
object
error
string
Example
{
"error": "Workflow not found"
}

Unexpected server error. Logs and PostHog $exception capture

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