Skip to content

Update workflow

PUT
/api/v1/workflows/{id}
Code sample: cURL
curl -X PUT 'https://dashboard.justcrawl.io/api/v1/workflows/a47ac10b-58cc-4372-a567-0e02b2c3d479' \
-H 'Authorization: Bearer $JUSTCRAWL_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"name":"Updated name","dag":{"nodes":[{"id":"entry","type":"entry"},{"id":"svc","type":"service","providerId":"oxylabs"},{"id":"out","type":"result"}],"edges":[{"from":"entry","to":"svc"},{"from":"svc","to":"out"}]}}'

Update a workflow. Each successful update creates a new version rather than mutating in place — the previous version stays addressable via GET /api/v1/workflows/{id}/versions/{version}. Smart workflows are read-only; attempting to edit one returns 400 — clone it first via POST /api/v1/workflows/{id}/clone. The DAG is validated server-side; structural errors return 400 with a validationErrors array.

id
required
string format: uuid

The workflow ID.

Media type application/json
object
name
required
string
dag
required
object
nodes
required
Array<object>
object
id
required
string
type
required
string
Allowed values: entry service split result failed
config
object
edges
required
Array<object>
object
id
required
string
from
required
string
to
required
string
type
required
string
Allowed values: default success fail split

The updated workflow header. Returns only workflowId, name, and the new version integer rather than the full Workflow schema — fetch via GET /api/v1/workflows/{id} if you need the full DAG echoed back.

Media type application/json
object
workflowId
string format: uuid
name
string
version

The new version number created by this update.

integer
Example generated
{
"workflowId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"version": 1
}

Invalid name/dag field, DAG failed structural validation, or the workflow is a smart workflow that must be cloned before editing.

Media type application/json
object
error
string
validationErrors
Array<object>
object
Example generated
{
"error": "example",
"validationErrors": [
{}
]
}

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