Update a router
curl --request PUT \
--url https://app.leadconduit.com/routers/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"module_id": "leadconduit-salesforce.outbound.create_contact",
"routes": [
{
"flow_id": "5fd4371e940df5a34a3888b2",
"source_id": "5fd4371e940df5a34a3888b2"
}
]
}
'import requests
url = "https://app.leadconduit.com/routers/{id}"
payload = {
"module_id": "leadconduit-salesforce.outbound.create_contact",
"routes": [
{
"flow_id": "5fd4371e940df5a34a3888b2",
"source_id": "5fd4371e940df5a34a3888b2"
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
module_id: 'leadconduit-salesforce.outbound.create_contact',
routes: [{flow_id: '5fd4371e940df5a34a3888b2', source_id: '5fd4371e940df5a34a3888b2'}]
})
};
fetch('https://app.leadconduit.com/routers/{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://app.leadconduit.com/routers/{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([
'module_id' => 'leadconduit-salesforce.outbound.create_contact',
'routes' => [
[
'flow_id' => '5fd4371e940df5a34a3888b2',
'source_id' => '5fd4371e940df5a34a3888b2'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://app.leadconduit.com/routers/{id}"
payload := strings.NewReader("{\n \"module_id\": \"leadconduit-salesforce.outbound.create_contact\",\n \"routes\": [\n {\n \"flow_id\": \"5fd4371e940df5a34a3888b2\",\n \"source_id\": \"5fd4371e940df5a34a3888b2\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://app.leadconduit.com/routers/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"module_id\": \"leadconduit-salesforce.outbound.create_contact\",\n \"routes\": [\n {\n \"flow_id\": \"5fd4371e940df5a34a3888b2\",\n \"source_id\": \"5fd4371e940df5a34a3888b2\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leadconduit.com/routers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"module_id\": \"leadconduit-salesforce.outbound.create_contact\",\n \"routes\": [\n {\n \"flow_id\": \"5fd4371e940df5a34a3888b2\",\n \"source_id\": \"5fd4371e940df5a34a3888b2\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "5fd4371e940df5a34a3888b2",
"module_id": "leadconduit-salesforce.outbound.create_contact",
"routes": [
{
"id": "1aacd0",
"flow_id": "5fd4371e940df5a34a3888b2",
"source_id": "5fd4371e940df5a34a3888b2",
"rule_set": {
"op": "and",
"rules": [
{
"lhv": "lead.state",
"op": "is equal to",
"rhv": "TX",
"id": "1aacd0",
"rule_set": "<unknown>"
}
],
"id": "0d144a"
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]Routers
Update a router
Update an existing custom router. Standard routers cannot be updated.
PUT
/
routers
/
{id}
Update a router
curl --request PUT \
--url https://app.leadconduit.com/routers/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"module_id": "leadconduit-salesforce.outbound.create_contact",
"routes": [
{
"flow_id": "5fd4371e940df5a34a3888b2",
"source_id": "5fd4371e940df5a34a3888b2"
}
]
}
'import requests
url = "https://app.leadconduit.com/routers/{id}"
payload = {
"module_id": "leadconduit-salesforce.outbound.create_contact",
"routes": [
{
"flow_id": "5fd4371e940df5a34a3888b2",
"source_id": "5fd4371e940df5a34a3888b2"
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
module_id: 'leadconduit-salesforce.outbound.create_contact',
routes: [{flow_id: '5fd4371e940df5a34a3888b2', source_id: '5fd4371e940df5a34a3888b2'}]
})
};
fetch('https://app.leadconduit.com/routers/{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://app.leadconduit.com/routers/{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([
'module_id' => 'leadconduit-salesforce.outbound.create_contact',
'routes' => [
[
'flow_id' => '5fd4371e940df5a34a3888b2',
'source_id' => '5fd4371e940df5a34a3888b2'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://app.leadconduit.com/routers/{id}"
payload := strings.NewReader("{\n \"module_id\": \"leadconduit-salesforce.outbound.create_contact\",\n \"routes\": [\n {\n \"flow_id\": \"5fd4371e940df5a34a3888b2\",\n \"source_id\": \"5fd4371e940df5a34a3888b2\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://app.leadconduit.com/routers/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"module_id\": \"leadconduit-salesforce.outbound.create_contact\",\n \"routes\": [\n {\n \"flow_id\": \"5fd4371e940df5a34a3888b2\",\n \"source_id\": \"5fd4371e940df5a34a3888b2\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leadconduit.com/routers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"module_id\": \"leadconduit-salesforce.outbound.create_contact\",\n \"routes\": [\n {\n \"flow_id\": \"5fd4371e940df5a34a3888b2\",\n \"source_id\": \"5fd4371e940df5a34a3888b2\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "5fd4371e940df5a34a3888b2",
"module_id": "leadconduit-salesforce.outbound.create_contact",
"routes": [
{
"id": "1aacd0",
"flow_id": "5fd4371e940df5a34a3888b2",
"source_id": "5fd4371e940df5a34a3888b2",
"rule_set": {
"op": "and",
"rules": [
{
"lhv": "lead.state",
"op": "is equal to",
"rhv": "TX",
"id": "1aacd0",
"rule_set": "<unknown>"
}
],
"id": "0d144a"
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]Authorizations
LeadConduit uses HTTP Basic Authentication
with the username API and your API key as the password.
For example: API:1f1b96c9150d8050e858c043d543bb4eadae0e6f'
Path Parameters
Body
application/json
Update an existing Router
A router is a single lead-submission endpoint that's able to distribute lead submissions to any one of an account's various Flows, based on evaluation of rules.
The rules of every route are evaluated against the lead, and the last route that matches selects the Flow and Source.
Only one Router for a given integration module-id should exist in an account.
Response
200 - application/json
OK