POST /{workflowId}/nodes/{nodeId}/duplicate needs workflowBuilder.{{<stepId>.path}} template.Authorization: Bearer <API_KEY> with workflowBuilder, on a workflow of the key's community. If-Match is optional. Send the revision you read to avoid overwriting a concurrent change (a stale value is refused with 409 VERSION_CONFLICT); omit it and your write wins as the last one. A deployed workflow is edited with the same call: the change applies immediately.| Failure | Meaning | Recovery |
|---|---|---|
404 NODE_NOT_FOUND | The step is not part of this workflow | Read the workflow for its step ids. |
{
"data": {
"node": {
"_id": "65f1a2b3c4d5e6f708192a44",
"name": "Read member XP (Copy)",
"type": "platform-action",
"order": 2,
"continueOnFailure": false,
"retryOnFailure": false,
"options": {
"action": "get-user-fields",
"selectUser": { "type": "email", "value": ["{{65f1a2b3c4d5e6f708192a41.email}}"] },
"fields": [{ "label": "Total XP", "field": "total_xp" }]
}
},
"revision": "68f78253046393414dec404e5442c140bb5db0393a7d1c389ff57bba71585501",
"redactedPaths": []
}
}201 with the copy in { node, revision, redactedPaths }, and the revision in the ETag header. The copy carries a (Copy) suffix on its name and a new _id.GET /{workflowId}: the copy must sit after the original, and any router copy must own copies of the branch steps, not the originals.| Status and code | When | Recovery |
|---|---|---|
400 VALIDATION_FAILED | An id is not 24 hexadecimal characters | Use the ids exactly as returned. |
401 AUTHENTICATION_REQUIRED | No key, or an unknown key | Send a valid key. |
403 API_KEY_PERMISSION_DENIED | No workflowBuilder | Grant the permission. |
404 NODE_NOT_FOUND | The step is not part of this workflow | Read the workflow for its step ids. |
409 VERSION_CONFLICT | You sent an If-Match that is not the current revision. meta.currentRevision carries the live value | Re-read and resend. |
429 RATE_LIMITED | The community's API rate limit was reached | Wait for the window to reset, then retry. |500 INTERNAL_ERROR | Unexpected failure | Re-read the workflow before retrying. |503 LOCK_UNAVAILABLE | The write lock store did not answer, so nothing was written | Retry shortly. |PATCH /{workflowId}/nodes/{nodeId} to change the copy.POST /{workflowId}/nodes/{nodeId}/move to reposition it after creation.POST /{workflowId}/validate before deploying.curl --location --request POST 'https://api.returning.ai/v1/workflow-builder/data-workflows/65f1a2b3c4d5e6f708192a3b/nodes/65f1a2b3c4d5e6f708192a3c/duplicate' \
--header 'Authorization: Bearer <API_KEY>' \
--header 'If-Match: 162af81f5de4ff2b557a4087de9a9a73a0ed4e621f737787e35a93614cb50d1c'{
"data": {
"node": {
"_id": "65f1a2b3c4d5e6f708192a44",
"name": "Read member XP (Copy)",
"type": "platform-action",
"order": 2,
"continueOnFailure": false,
"retryOnFailure": false,
"options": {
"action": "get-user-fields",
"selectUser": {
"type": "email",
"value": [
"{{65f1a2b3c4d5e6f708192a41.email}}"
]
},
"fields": [
{
"label": "Total XP",
"field": "total_xp"
}
]
}
},
"revision": "68f78253046393414dec404e5442c140bb5db0393a7d1c389ff57bba71585501",
"redactedPaths": []
}
}