Update workflow
curl --request PUT \
--url https://api.conduit.ai/v1/workflows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"steps": [
{
"id": "<string>",
"type": "<string>",
"config": {},
"description": "<string>",
"next_step_id": "<string>",
"position": {
"x": 123,
"y": 123
}
}
],
"workspace_id": "<string>",
"description": "<string>",
"color": "<string>",
"trigger": {
"type": "<string>",
"config": {}
},
"first_step_id": "<string>",
"activate": true
}
'import requests
url = "https://api.conduit.ai/v1/workflows/{id}"
payload = {
"name": "<string>",
"steps": [
{
"id": "<string>",
"type": "<string>",
"config": {},
"description": "<string>",
"next_step_id": "<string>",
"position": {
"x": 123,
"y": 123
}
}
],
"workspace_id": "<string>",
"description": "<string>",
"color": "<string>",
"trigger": {
"type": "<string>",
"config": {}
},
"first_step_id": "<string>",
"activate": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
steps: [
{
id: '<string>',
type: '<string>',
config: {},
description: '<string>',
next_step_id: '<string>',
position: {x: 123, y: 123}
}
],
workspace_id: '<string>',
description: '<string>',
color: '<string>',
trigger: {type: '<string>', config: {}},
first_step_id: '<string>',
activate: true
})
};
fetch('https://api.conduit.ai/v1/workflows/{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.conduit.ai/v1/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'steps' => [
[
'id' => '<string>',
'type' => '<string>',
'config' => [
],
'description' => '<string>',
'next_step_id' => '<string>',
'position' => [
'x' => 123,
'y' => 123
]
]
],
'workspace_id' => '<string>',
'description' => '<string>',
'color' => '<string>',
'trigger' => [
'type' => '<string>',
'config' => [
]
],
'first_step_id' => '<string>',
'activate' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.conduit.ai/v1/workflows/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"config\": {},\n \"description\": \"<string>\",\n \"next_step_id\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n }\n }\n ],\n \"workspace_id\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"trigger\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"first_step_id\": \"<string>\",\n \"activate\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <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.put("https://api.conduit.ai/v1/workflows/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"config\": {},\n \"description\": \"<string>\",\n \"next_step_id\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n }\n }\n ],\n \"workspace_id\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"trigger\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"first_step_id\": \"<string>\",\n \"activate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conduit.ai/v1/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"config\": {},\n \"description\": \"<string>\",\n \"next_step_id\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n }\n }\n ],\n \"workspace_id\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"trigger\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"first_step_id\": \"<string>\",\n \"activate\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workflow_id": "<string>",
"master_id": "<string>",
"folder_id": "<string>",
"name": "<string>",
"enabled": true,
"status": "<string>",
"version": 123,
"is_latest": true,
"color": "<string>",
"trigger_summary": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"description": "<string>",
"trigger": {
"type": "<string>",
"config": {}
},
"webhook_url": "<string>",
"first_step_id": "<string>",
"steps": [
{
"id": "<string>",
"type": "<string>",
"description": "<string>",
"position": {
"x": 123,
"y": 123
},
"next_step_id": "<string>",
"config": {}
}
],
"edges": [
{
"from": "<string>",
"to": "<string>",
"kind": "next"
}
]
}
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}Workflows
Update workflow
Replaces a workflow definition by creating a new version under the same workflow. The new version is DRAFT unless activate is true.
PUT
/
v1
/
workflows
/
{id}
Update workflow
curl --request PUT \
--url https://api.conduit.ai/v1/workflows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"steps": [
{
"id": "<string>",
"type": "<string>",
"config": {},
"description": "<string>",
"next_step_id": "<string>",
"position": {
"x": 123,
"y": 123
}
}
],
"workspace_id": "<string>",
"description": "<string>",
"color": "<string>",
"trigger": {
"type": "<string>",
"config": {}
},
"first_step_id": "<string>",
"activate": true
}
'import requests
url = "https://api.conduit.ai/v1/workflows/{id}"
payload = {
"name": "<string>",
"steps": [
{
"id": "<string>",
"type": "<string>",
"config": {},
"description": "<string>",
"next_step_id": "<string>",
"position": {
"x": 123,
"y": 123
}
}
],
"workspace_id": "<string>",
"description": "<string>",
"color": "<string>",
"trigger": {
"type": "<string>",
"config": {}
},
"first_step_id": "<string>",
"activate": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
steps: [
{
id: '<string>',
type: '<string>',
config: {},
description: '<string>',
next_step_id: '<string>',
position: {x: 123, y: 123}
}
],
workspace_id: '<string>',
description: '<string>',
color: '<string>',
trigger: {type: '<string>', config: {}},
first_step_id: '<string>',
activate: true
})
};
fetch('https://api.conduit.ai/v1/workflows/{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.conduit.ai/v1/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'steps' => [
[
'id' => '<string>',
'type' => '<string>',
'config' => [
],
'description' => '<string>',
'next_step_id' => '<string>',
'position' => [
'x' => 123,
'y' => 123
]
]
],
'workspace_id' => '<string>',
'description' => '<string>',
'color' => '<string>',
'trigger' => [
'type' => '<string>',
'config' => [
]
],
'first_step_id' => '<string>',
'activate' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.conduit.ai/v1/workflows/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"config\": {},\n \"description\": \"<string>\",\n \"next_step_id\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n }\n }\n ],\n \"workspace_id\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"trigger\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"first_step_id\": \"<string>\",\n \"activate\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <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.put("https://api.conduit.ai/v1/workflows/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"config\": {},\n \"description\": \"<string>\",\n \"next_step_id\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n }\n }\n ],\n \"workspace_id\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"trigger\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"first_step_id\": \"<string>\",\n \"activate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conduit.ai/v1/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"config\": {},\n \"description\": \"<string>\",\n \"next_step_id\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n }\n }\n ],\n \"workspace_id\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": \"<string>\",\n \"trigger\": {\n \"type\": \"<string>\",\n \"config\": {}\n },\n \"first_step_id\": \"<string>\",\n \"activate\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workflow_id": "<string>",
"master_id": "<string>",
"folder_id": "<string>",
"name": "<string>",
"enabled": true,
"status": "<string>",
"version": 123,
"is_latest": true,
"color": "<string>",
"trigger_summary": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"description": "<string>",
"trigger": {
"type": "<string>",
"config": {}
},
"webhook_url": "<string>",
"first_step_id": "<string>",
"steps": [
{
"id": "<string>",
"type": "<string>",
"description": "<string>",
"position": {
"x": 123,
"y": 123
},
"next_step_id": "<string>",
"config": {}
}
],
"edges": [
{
"from": "<string>",
"to": "<string>",
"kind": "next"
}
]
}
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}Authorizations
Headers
Path Parameters
Body
application/json
Replace a workflow definition by creating a new version under the same workflow. New version is DRAFT unless activate is true.
Was this page helpful?