Set workflow route
PUT
/api/v1/workflows/{id}/routing
const url = 'https://api.justcrawl.io/api/v1/workflows/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/routing';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"route":"example"}'};
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://api.justcrawl.io/api/v1/workflows/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/routing \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "route": "example" }'Set or clear the workflow’s route field. The route controls dispatch
resolution: '*' is the org’s default workflow, 'domain:example.com' matches
URLs on that domain, null clears routing (the workflow will only fire on
explicit workflowId dispatches). At most one published workflow per route
value is allowed at a time (DB unique constraint).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
The workflow’s stable logical id — the workflowId field of a workflow object, NOT its id field. id is the per-version row key and 404s here.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
route
* for default, domain:X for a domain match, or null to clear.
string
Examplegenerated
{ "route": "example"}Responses
Section titled “Responses”Route updated.
Media typeapplication/json
object
workflowId
string format: uuid
route
string
Examplegenerated
{ "workflowId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "route": "example"}route must be a string or null.
Missing or invalid authentication token
Media typeapplication/json
object
error
string
Example
{ "error": "Missing or invalid authentication token"}Insufficient permissions for this operation
Media typeapplication/json
object
error
string
Example
{ "error": "No organization. Complete onboarding first."}Resource not found
Media typeapplication/json
object
error
string
Example
{ "error": "Workflow not found"}Unexpected server error. Logs and PostHog $exception capture
Media typeapplication/json
object
error
string
Example
{ "error": "Something went wrong"}