Skip to content

Set workflow route

PUT
/api/v1/workflows/{id}/routing
curl --request PUT \
--url https://dashboard.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).

id
required
string format: uuid

The workflow ID.

Media type application/json
object
route

* for default, domain:X for a domain match, or null to clear.

string
nullable
Example generated
{
"route": "example"
}

Route updated.

Media type application/json
object
workflowId
string format: uuid
route
string
nullable
Example generated
{
"workflowId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"route": "example"
}

route must be a string or null.

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