Skip to content

Clone as custom

POST
/api/v1/workflows/{id}/clone
Code sample: cURL
curl -X POST 'https://api.justcrawl.io/api/v1/workflows/a47ac10b-58cc-4372-a567-0e02b2c3d479/clone' \
-H 'Authorization: Bearer $JUSTCRAWL_API_KEY'

Clone a workflow as a non-smart custom draft. The clone is independent — it has its own ID, version history, and routing. Use this when you want to start from a smart workflow’s DAG but edit it freely (smart workflows themselves are read-only and reject PUT). The clone starts in draft status with no route; POST /api/v1/workflows/{id}/publish to make it live.

id
required
string format: uuid

The workflow to clone, by its stable logical id — the workflowId field of a workflow object, NOT its id field. id is the per-version row key and 404s here.

The newly created clone.

Media typeapplication/json
object
id

Primary key of this specific VERSION row. Changes every time the workflow is edited, and is not accepted by any endpoint. Useful only for correlating a response with the exact version it came from — pass workflowId, not this, to /api/v1/workflows/{id}.

string format: uuid
workflowId

Stable logical identifier for the workflow, constant across every version. THIS is the value every /api/v1/workflows/{id} route expects (get, update, delete, clone, publish, unpublish, routing, versions) and the value jobs and schedules reference.

string format: uuid
name
string
status
string
Allowed values: draft published
version
integer
route
string
nullable
dag
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
costPerThousand
number
nullable
smart
object
strategy
string
Allowed values: success cost reliability
mode
string
Allowed values: auto suggest
domain
string
nullable
hasPendingSuggestion
boolean
createdAt
string format: date-time
Example
{
"status": "draft",
"dag": {
"nodes": [
{
"type": "entry"
}
],
"edges": [
{
"type": "default"
}
]
},
"smart": {
"strategy": "success",
"mode": "auto"
}
}

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