curl --request POST \
--url https://app.leadconduit.com/flows/{flow_id}/sources/{source_id}/submit \
--header 'Content-Type: application/json' \
--data '
{
"email": "user@example.com",
"fname": "Example User"
}
'import requests
url = "https://app.leadconduit.com/flows/{flow_id}/sources/{source_id}/submit"
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/flows/{flow_id}/sources/{source_id}/submit', 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/flows/{flow_id}/sources/{source_id}/submit",
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/flows/{flow_id}/sources/{source_id}/submit"
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/flows/{flow_id}/sources/{source_id}/submit")
.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/flows/{flow_id}/sources/{source_id}/submit")
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{
"outcome": "success",
"reason": "lead.phone must have valid format",
"lead": {
"id": "5fd4371e940df5a34a3888b2"
},
"price": 20
}{
"message": "Unpaid account"
}{
"message": "Flow is disabled"
}{
"message": "Flow does not exist"
}{
"message": "Invalid flow ID"
}Submit data to a source within a flow
Submits a lead to a source within a flow. The lead is stored, every step of the flow runs, and the response tells you whether the lead was accepted and at what price.
The body may be JSON, XML, or form encoded; set the Content-Type header accordingly.
The source’s inbound integration decides which fields are understood. The response is
JSON by default, or XML or form encoding when requested via the Accept header.
Authentication depends on the source. When the source requires it, send the source’s credentials with HTTP Basic authentication; otherwise no credentials are needed. The account API key is not used on this endpoint.
A 201 means the lead was processed, not that it was accepted: a lead rejected by the
flow’s acceptance criteria or by a cap also comes back 201, with outcome: "failure"
and the reason. Always check outcome rather than the status code.
curl --request POST \
--url https://app.leadconduit.com/flows/{flow_id}/sources/{source_id}/submit \
--header 'Content-Type: application/json' \
--data '
{
"email": "user@example.com",
"fname": "Example User"
}
'import requests
url = "https://app.leadconduit.com/flows/{flow_id}/sources/{source_id}/submit"
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/flows/{flow_id}/sources/{source_id}/submit', 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/flows/{flow_id}/sources/{source_id}/submit",
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/flows/{flow_id}/sources/{source_id}/submit"
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/flows/{flow_id}/sources/{source_id}/submit")
.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/flows/{flow_id}/sources/{source_id}/submit")
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{
"outcome": "success",
"reason": "lead.phone must have valid format",
"lead": {
"id": "5fd4371e940df5a34a3888b2"
},
"price": 20
}{
"message": "Unpaid account"
}{
"message": "Flow is disabled"
}{
"message": "Flow does not exist"
}{
"message": "Invalid flow ID"
}Path Parameters
Body
The lead data to submit, as key-value pairs.
Response
The lead was processed. Check outcome: a lead rejected by the flow's acceptance
criteria or by a cap is also reported here, with outcome: "failure" and the reason.
The result of submitting a lead to a flow source or to a router. Returned as JSON
by default, or as XML or form encoding when requested via the Accept header.
The response is produced by the source's inbound integration; this is the shape
produced by the standard integrations.