curl --request POST \
--url https://app.leadconduit.com/routers/{router_id}/route \
--header 'Content-Type: application/json' \
--data '
{
"email": "user@example.com",
"fname": "Example User"
}
'import requests
url = "https://app.leadconduit.com/routers/{router_id}/route"
payload = {
"email": "user@example.com",
"fname": "Example User"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: 'user@example.com', fname: 'Example User'})
};
fetch('https://app.leadconduit.com/routers/{router_id}/route', 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/{router_id}/route",
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([
'email' => 'user@example.com',
'fname' => 'Example User'
]),
CURLOPT_HTTPHEADER => [
"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/{router_id}/route"
payload := strings.NewReader("{\n \"email\": \"user@example.com\",\n \"fname\": \"Example User\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://app.leadconduit.com/routers/{router_id}/route")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"user@example.com\",\n \"fname\": \"Example User\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leadconduit.com/routers/{router_id}/route")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"user@example.com\",\n \"fname\": \"Example User\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Route matched",
"module_id": "leadconduit-default.inbound",
"flow_id": "5fd4371e940df5a34a3888b2",
"source_id": "5fd4371e940df5a34a3888b2"
}{
"outcome": "success",
"reason": "lead.phone must have valid format",
"lead": {
"id": "5fd4371e940df5a34a3888b2"
},
"price": 20
}{
"message": "Router does not exist"
}{
"message": "Invalid router ID",
"module_id": "leadconduit-default.inbound"
}Submit a lead to a router
Submits a lead to a router instead of to a specific flow and source. The router’s
inbound integration parses the request, the rules of each route are evaluated against
the lead, and the last matching route decides which flow and source receive it. From
there the lead is processed exactly as a submission to
/flows/{flow_id}/sources/{source_id}/submit, and the response is the same.
The body may be JSON, XML, or form encoded; set the Content-Type header accordingly.
No credentials are needed.
Add dry_run=true to find out which route would match without submitting the lead.
curl --request POST \
--url https://app.leadconduit.com/routers/{router_id}/route \
--header 'Content-Type: application/json' \
--data '
{
"email": "user@example.com",
"fname": "Example User"
}
'import requests
url = "https://app.leadconduit.com/routers/{router_id}/route"
payload = {
"email": "user@example.com",
"fname": "Example User"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: 'user@example.com', fname: 'Example User'})
};
fetch('https://app.leadconduit.com/routers/{router_id}/route', 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/{router_id}/route",
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([
'email' => 'user@example.com',
'fname' => 'Example User'
]),
CURLOPT_HTTPHEADER => [
"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/{router_id}/route"
payload := strings.NewReader("{\n \"email\": \"user@example.com\",\n \"fname\": \"Example User\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://app.leadconduit.com/routers/{router_id}/route")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"user@example.com\",\n \"fname\": \"Example User\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leadconduit.com/routers/{router_id}/route")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"user@example.com\",\n \"fname\": \"Example User\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Route matched",
"module_id": "leadconduit-default.inbound",
"flow_id": "5fd4371e940df5a34a3888b2",
"source_id": "5fd4371e940df5a34a3888b2"
}{
"outcome": "success",
"reason": "lead.phone must have valid format",
"lead": {
"id": "5fd4371e940df5a34a3888b2"
},
"price": 20
}{
"message": "Router does not exist"
}{
"message": "Invalid router ID",
"module_id": "leadconduit-default.inbound"
}Path Parameters
The ID of the router 24 character alpha-numeric BSON identifier
^[0-9a-fA-F]{24}$"5fd4371e940df5a34a3888b2"
Query Parameters
When true, report the matching route and stop without submitting the lead.
Body
The lead data to route, as key-value pairs.
Response
Returned only with dry_run=true. Reports the route that would handle the lead, or that none matched.
Route matched, No routes matched The router's inbound integration module.
"leadconduit-default.inbound"
24 character alpha-numeric BSON identifier
^[0-9a-fA-F]{24}$"5fd4371e940df5a34a3888b2"
24 character alpha-numeric BSON identifier
^[0-9a-fA-F]{24}$"5fd4371e940df5a34a3888b2"