Duplicate a Workflow
curl --request POST \
--url https://api.getmalakai.com/workflows/duplicate/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-access-token: <x-access-token>' \
--data '
{
"id": "<string>",
"name": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.getmalakai.com/workflows/duplicate/{id}"
payload = {
"id": "<string>",
"name": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "<authorization>",
"x-access-token": "<x-access-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'x-access-token': '<x-access-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({id: '<string>', name: '<string>', description: '<string>'})
};
fetch('https://api.getmalakai.com/workflows/duplicate/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getmalakai.com/workflows/duplicate/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'name' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"x-access-token: <x-access-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getmalakai.com/workflows/duplicate/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("x-access-token", "<x-access-token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getmalakai.com/workflows/duplicate/{id}")
.header("Authorization", "<authorization>")
.header("x-access-token", "<x-access-token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmalakai.com/workflows/duplicate/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["x-access-token"] = '<x-access-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"responseCode": 2000,
"message": "Workflow duplicated successfully",
"data": {
"duplicateWorkflow": {
"id": "f22c43ef-be66-4859-b5b4-**",
"name": "New Workflow",
"description": null,
"user_id": "***",
"nodes":[],
"edges":[],
"ml_payload": [],
"created_at": "2025-07-29T09:11:00.661Z",
"updated_at": "2025-07-29T09:30:39.801Z"
}
}
}
Workflows
Duplicate a Workflow
Initiate the duplication of an existing workflow
POST
workflows
/
duplicate
/
{id}
Duplicate a Workflow
curl --request POST \
--url https://api.getmalakai.com/workflows/duplicate/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-access-token: <x-access-token>' \
--data '
{
"id": "<string>",
"name": "<string>",
"description": "<string>"
}
'import requests
url = "https://api.getmalakai.com/workflows/duplicate/{id}"
payload = {
"id": "<string>",
"name": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "<authorization>",
"x-access-token": "<x-access-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'x-access-token': '<x-access-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({id: '<string>', name: '<string>', description: '<string>'})
};
fetch('https://api.getmalakai.com/workflows/duplicate/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getmalakai.com/workflows/duplicate/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'name' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"x-access-token: <x-access-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getmalakai.com/workflows/duplicate/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("x-access-token", "<x-access-token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getmalakai.com/workflows/duplicate/{id}")
.header("Authorization", "<authorization>")
.header("x-access-token", "<x-access-token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmalakai.com/workflows/duplicate/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["x-access-token"] = '<x-access-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"responseCode": 2000,
"message": "Workflow duplicated successfully",
"data": {
"duplicateWorkflow": {
"id": "f22c43ef-be66-4859-b5b4-**",
"name": "New Workflow",
"description": null,
"user_id": "***",
"nodes":[],
"edges":[],
"ml_payload": [],
"created_at": "2025-07-29T09:11:00.661Z",
"updated_at": "2025-07-29T09:30:39.801Z"
}
}
}
Headers
string
required
Your API key for authentication. Prefix with
Bearer .string
required
Your access token for authentication.
Body
string
required
The id of the existing workflow to duplicate from.
string
required
The name of the duplicated workflow
string
required
The description of the duplicated workflow
Response
string
Confirms the request was successful.
string
A human-readable message about the request’s outcome.
object
An object containing the details of the updated workflow.
{
"responseCode": 2000,
"message": "Workflow duplicated successfully",
"data": {
"duplicateWorkflow": {
"id": "f22c43ef-be66-4859-b5b4-**",
"name": "New Workflow",
"description": null,
"user_id": "***",
"nodes":[],
"edges":[],
"ml_payload": [],
"created_at": "2025-07-29T09:11:00.661Z",
"updated_at": "2025-07-29T09:30:39.801Z"
}
}
}
⌘I