Create workflow
curl --request POST \
--url https://api.conduit.ai/v1/workflows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "<string>",
"name": "<string>",
"steps": [
{
"id": "<string>",
"type": "<string>",
"config": {},
"description": "<string>",
"next_step_id": "<string>",
"position": {
"x": 123,
"y": 123
}
}
],
"description": "<string>",
"color": "<string>",
"trigger": {
"type": "<string>",
"config": {}
},
"first_step_id": "<string>",
"activate": true
}
'import requests
url = "https://api.conduit.ai/v1/workflows"
payload = {
"workspace_id": "<string>",
"name": "<string>",
"steps": [
{
"id": "<string>",
"type": "<string>",
"config": {},
"description": "<string>",
"next_step_id": "<string>",
"position": {
"x": 123,
"y": 123
}
}
],
"description": "<string>",
"color": "<string>",
"trigger": {
"type": "<string>",
"config": {}
},
"first_step_id": "<string>",
"activate": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspace_id: '<string>',
name: '<string>',
steps: [
{
id: '<string>',
type: '<string>',
config: {},
description: '<string>',
next_step_id: '<string>',
position: {x: 123, y: 123}
}
],
description: '<string>',
color: '<string>',
trigger: {type: '<string>', config: {}},
first_step_id: '<string>',
activate: true
})
};
fetch('https://api.conduit.ai/v1/workflows', 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",
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([
'workspace_id' => '<string>',
'name' => '<string>',
'steps' => [
[
'id' => '<string>',
'type' => '<string>',
'config' => [
],
'description' => '<string>',
'next_step_id' => '<string>',
'position' => [
'x' => 123,
'y' => 123
]
]
],
'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"
payload := strings.NewReader("{\n \"workspace_id\": \"<string>\",\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 \"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("POST", 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.post("https://api.conduit.ai/v1/workflows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"<string>\",\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 \"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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace_id\": \"<string>\",\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 \"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"
}Workflows
Create workflow
Creates a new workflow (master + version 1) from a full definition. Created as DRAFT unless activate is true.
POST
/
v1
/
workflows
Create workflow
curl --request POST \
--url https://api.conduit.ai/v1/workflows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "<string>",
"name": "<string>",
"steps": [
{
"id": "<string>",
"type": "<string>",
"config": {},
"description": "<string>",
"next_step_id": "<string>",
"position": {
"x": 123,
"y": 123
}
}
],
"description": "<string>",
"color": "<string>",
"trigger": {
"type": "<string>",
"config": {}
},
"first_step_id": "<string>",
"activate": true
}
'import requests
url = "https://api.conduit.ai/v1/workflows"
payload = {
"workspace_id": "<string>",
"name": "<string>",
"steps": [
{
"id": "<string>",
"type": "<string>",
"config": {},
"description": "<string>",
"next_step_id": "<string>",
"position": {
"x": 123,
"y": 123
}
}
],
"description": "<string>",
"color": "<string>",
"trigger": {
"type": "<string>",
"config": {}
},
"first_step_id": "<string>",
"activate": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspace_id: '<string>',
name: '<string>',
steps: [
{
id: '<string>',
type: '<string>',
config: {},
description: '<string>',
next_step_id: '<string>',
position: {x: 123, y: 123}
}
],
description: '<string>',
color: '<string>',
trigger: {type: '<string>', config: {}},
first_step_id: '<string>',
activate: true
})
};
fetch('https://api.conduit.ai/v1/workflows', 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",
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([
'workspace_id' => '<string>',
'name' => '<string>',
'steps' => [
[
'id' => '<string>',
'type' => '<string>',
'config' => [
],
'description' => '<string>',
'next_step_id' => '<string>',
'position' => [
'x' => 123,
'y' => 123
]
]
],
'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"
payload := strings.NewReader("{\n \"workspace_id\": \"<string>\",\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 \"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("POST", 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.post("https://api.conduit.ai/v1/workflows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"<string>\",\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 \"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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace_id\": \"<string>\",\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 \"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"
}Authorizations
Body
application/json
Create a new workflow (master + version 1) from a full definition. Created as DRAFT unless activate is true.
Was this page helpful?