Create Edge
curl --request POST \
--url https://api-prod.interactly.ai/workflows/v1/edges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"logical_id": "<string>",
"name": "<string>",
"description": "<string>",
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"disabled": false,
"miscellaneous": {},
"source_node_logical_id": "<string>",
"destination_node_logical_id": "<string>",
"type": "direct"
}
'import requests
url = "https://api-prod.interactly.ai/workflows/v1/edges"
payload = {
"logical_id": "<string>",
"name": "<string>",
"description": "<string>",
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"disabled": False,
"miscellaneous": {},
"source_node_logical_id": "<string>",
"destination_node_logical_id": "<string>",
"type": "direct"
}
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({
logical_id: '<string>',
name: '<string>',
description: '<string>',
workflow_id: '5eb7cf5a86d9755df3a6c593',
version_number: 0,
disabled: false,
miscellaneous: {},
source_node_logical_id: '<string>',
destination_node_logical_id: '<string>',
type: 'direct'
})
};
fetch('https://api-prod.interactly.ai/workflows/v1/edges', 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-prod.interactly.ai/workflows/v1/edges",
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([
'logical_id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'workflow_id' => '5eb7cf5a86d9755df3a6c593',
'version_number' => 0,
'disabled' => false,
'miscellaneous' => [
],
'source_node_logical_id' => '<string>',
'destination_node_logical_id' => '<string>',
'type' => 'direct'
]),
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-prod.interactly.ai/workflows/v1/edges"
payload := strings.NewReader("{\n \"logical_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"disabled\": false,\n \"miscellaneous\": {},\n \"source_node_logical_id\": \"<string>\",\n \"destination_node_logical_id\": \"<string>\",\n \"type\": \"direct\"\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-prod.interactly.ai/workflows/v1/edges")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"logical_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"disabled\": false,\n \"miscellaneous\": {},\n \"source_node_logical_id\": \"<string>\",\n \"destination_node_logical_id\": \"<string>\",\n \"type\": \"direct\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/workflows/v1/edges")
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 \"logical_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"disabled\": false,\n \"miscellaneous\": {},\n \"source_node_logical_id\": \"<string>\",\n \"destination_node_logical_id\": \"<string>\",\n \"type\": \"direct\"\n}"
response = http.request(request)
puts response.read_body{
"edge": {
"team_id": "<string>",
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"_id": "5eb7cf5a86d9755df3a6c593",
"edge_config": {
"logical_id": "<string>",
"name": "<string>",
"description": "<string>",
"workflow_id": "<string>",
"version_number": 0,
"disabled": false,
"miscellaneous": {},
"source_node_logical_id": "<string>",
"destination_node_logical_id": "<string>",
"type": "direct"
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Edges
Create Edge
Endpoint to create a new edge.
POST
/
workflows
/
v1
/
edges
Create Edge
curl --request POST \
--url https://api-prod.interactly.ai/workflows/v1/edges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"logical_id": "<string>",
"name": "<string>",
"description": "<string>",
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"disabled": false,
"miscellaneous": {},
"source_node_logical_id": "<string>",
"destination_node_logical_id": "<string>",
"type": "direct"
}
'import requests
url = "https://api-prod.interactly.ai/workflows/v1/edges"
payload = {
"logical_id": "<string>",
"name": "<string>",
"description": "<string>",
"workflow_id": "5eb7cf5a86d9755df3a6c593",
"version_number": 0,
"disabled": False,
"miscellaneous": {},
"source_node_logical_id": "<string>",
"destination_node_logical_id": "<string>",
"type": "direct"
}
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({
logical_id: '<string>',
name: '<string>',
description: '<string>',
workflow_id: '5eb7cf5a86d9755df3a6c593',
version_number: 0,
disabled: false,
miscellaneous: {},
source_node_logical_id: '<string>',
destination_node_logical_id: '<string>',
type: 'direct'
})
};
fetch('https://api-prod.interactly.ai/workflows/v1/edges', 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-prod.interactly.ai/workflows/v1/edges",
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([
'logical_id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'workflow_id' => '5eb7cf5a86d9755df3a6c593',
'version_number' => 0,
'disabled' => false,
'miscellaneous' => [
],
'source_node_logical_id' => '<string>',
'destination_node_logical_id' => '<string>',
'type' => 'direct'
]),
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-prod.interactly.ai/workflows/v1/edges"
payload := strings.NewReader("{\n \"logical_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"disabled\": false,\n \"miscellaneous\": {},\n \"source_node_logical_id\": \"<string>\",\n \"destination_node_logical_id\": \"<string>\",\n \"type\": \"direct\"\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-prod.interactly.ai/workflows/v1/edges")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"logical_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"disabled\": false,\n \"miscellaneous\": {},\n \"source_node_logical_id\": \"<string>\",\n \"destination_node_logical_id\": \"<string>\",\n \"type\": \"direct\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/workflows/v1/edges")
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 \"logical_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"workflow_id\": \"5eb7cf5a86d9755df3a6c593\",\n \"version_number\": 0,\n \"disabled\": false,\n \"miscellaneous\": {},\n \"source_node_logical_id\": \"<string>\",\n \"destination_node_logical_id\": \"<string>\",\n \"type\": \"direct\"\n}"
response = http.request(request)
puts response.read_body{
"edge": {
"team_id": "<string>",
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"_id": "5eb7cf5a86d9755df3a6c593",
"edge_config": {
"logical_id": "<string>",
"name": "<string>",
"description": "<string>",
"workflow_id": "<string>",
"version_number": 0,
"disabled": false,
"miscellaneous": {},
"source_node_logical_id": "<string>",
"destination_node_logical_id": "<string>",
"type": "direct"
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Retrieve your API Key from Dashboard API Keys Section.
Body
application/json
- Direct Edge
- Conditional Edge
- Companion Edge