Update Edge
curl --request PATCH \
--url https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "<string>",
"target": "<string>",
"condition": "<string>"
}
'import requests
url = "https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}"
payload = {
"source": "<string>",
"target": "<string>",
"condition": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({source: '<string>', target: '<string>', condition: '<string>'})
};
fetch('https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}', 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.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'source' => '<string>',
'target' => '<string>',
'condition' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}"
payload := strings.NewReader("{\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"condition\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"condition\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"condition\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyUpdate Edge
Update an edge’s condition, source, or target
PATCH
/
v1
/
projects
/
{projectId}
/
pathway
/
edges
/
{edgeId}
Update Edge
curl --request PATCH \
--url https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "<string>",
"target": "<string>",
"condition": "<string>"
}
'import requests
url = "https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}"
payload = {
"source": "<string>",
"target": "<string>",
"condition": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({source: '<string>', target: '<string>', condition: '<string>'})
};
fetch('https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}', 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.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'source' => '<string>',
'target' => '<string>',
'condition' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}"
payload := strings.NewReader("{\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"condition\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"condition\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"condition\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyRequest
PATCH https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}
Path Parameters
string
required
The project ID
string
required
The edge ID
Headers
string
required
Bearer token using your developer key
Body
All fields are optional. Only include the fields you want to update.string
New source node ID
string
New target node ID
string
Updated transition condition
Response
Returns the full updated edge. Returns400 if the new source or target node does not exist.
Example
curl -X PATCH https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId} \
-H "Authorization: Bearer dk_your_key" \
-H "Content-Type: application/json" \
-d '{
"condition": "User confirms booking and provides payment"
}'
⌘I
