Update auto/suggest mode
PUT
/api/v1/workflows/{workflowId}/smart/mode
const url = 'https://dashboard.justcrawl.io/api/v1/workflows/example/smart/mode';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"mode":"auto"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” workflowId
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
mode
required
string
Responses
Section titled “ Responses ”Mode updated.
Media type application/json
object
mode
string
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"}