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>",
"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": {}
},
"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>"
}
]
}
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}Update Workflow
Replaces a workflow definition by creating a new version under the same workflow. The new version is DRAFT unless activate is true.
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>",
"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": {}
},
"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>"
}
]
}
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}{
"error": "Invalid workspace id"
}Authorizations
Conduit API token. Use Authorization: Bearer <token>. Read/write endpoints require a token with write access.
Path Parameters
Workflow (version) identifier.
"k17demo8f8x7c9v0n2q4r6t8y1u3i5o"
Body
Replace a workflow definition by creating a new version under the same workflow. New version is DRAFT unless activate is true.
Workflow name
1The step graph.
Show child attributes
Show child attributes
Optional workspace override. Omit to resolve the workflow's workspace automatically.
Hex color for the workflow, e.g. #2563eb
The workflow trigger, or null for a trigger-less workflow.
Show child attributes
Show child attributes
Id of the entry step, or null.
When true, the version goes live (status ACTIVE). Defaults to false (DRAFT).
Response
Updated workflow definition (new version)
Full workflow definition: metadata, trigger, and the step graph (steps + derived edges) as the Workflows editor stores it. Embedded secrets are redacted.
Show child attributes
Show child attributes
Was this page helpful?