Spaces method and path for this operation:
post /s/{space_id}/api/workflows/workflow/{id}/clone
Refer to Spaces for more information.
Create a copy of an existing workflow.
[Required authorization] Route required privileges: workflowsManagement:create AND workflowsManagement:read.
POST
/api/workflows/workflow/{id}/clone
curl
curl \
-X POST "${KIBANA_URL}/api/workflows/workflow/{id}/clone" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "kbn-xsrf: true"
POST kbn://api/workflows/workflow/{id}/clone
Response examples (200)
Example response returning the cloned workflow with a new ID
{
"id": "workflow-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Example definition (copy)",
"yaml": "name: Example definition (copy)\nenabled: false\ndescription: This is a workflow example\ntriggers:\n - type: manual\ninputs:\n - name: message\n type: string\n default: \"hello world\"\nsteps:\n - name: hello_world_step\n type: console\n with:\n message: \"{{ inputs.message }}\"\n",
"valid": true,
"enabled": false,
"createdAt": "2025-11-22T11:00:00.000Z",
"createdBy": "elastic",
"definition": {
"name": "Example definition (copy)",
"steps": [
{
"name": "hello_world_step",
"type": "console",
"with": {
"message": "{{ inputs.message }}"
}
}
],
"inputs": [
{
"name": "message",
"type": "string",
"default": "hello world"
}
],
"enabled": false,
"triggers": [
{
"type": "manual"
}
],
"description": "This is a workflow example"
},
"description": "This is a workflow example",
"lastUpdatedAt": "2025-11-22T11:00:00.000Z",
"lastUpdatedBy": "elastic"
}