Create a lead management configuration
curl --request POST \
--url https://your-instance.example.com/api/lead-management \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configurationName": "Facebook Lead Ad Funnel",
"source": "Facebook Lead Ad",
"inboundEmail": "leads+fb@inbound.example.com",
"initialStage": "New Lead",
"defaultProcess": "64eea1110000000000000001",
"isAutopilot": true,
"starterMessage": "Hi {{firstName}}, thanks for your interest!",
"costPerLead": 12.5,
"status": "active",
"forwardToOutreach": true
}
'import requests
url = "https://your-instance.example.com/api/lead-management"
payload = {
"configurationName": "Facebook Lead Ad Funnel",
"source": "Facebook Lead Ad",
"inboundEmail": "leads+fb@inbound.example.com",
"initialStage": "New Lead",
"defaultProcess": "64eea1110000000000000001",
"isAutopilot": True,
"starterMessage": "Hi {{firstName}}, thanks for your interest!",
"costPerLead": 12.5,
"status": "active",
"forwardToOutreach": True
}
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({
configurationName: 'Facebook Lead Ad Funnel',
source: 'Facebook Lead Ad',
inboundEmail: 'leads+fb@inbound.example.com',
initialStage: 'New Lead',
defaultProcess: '64eea1110000000000000001',
isAutopilot: true,
starterMessage: 'Hi {{firstName}}, thanks for your interest!',
costPerLead: 12.5,
status: 'active',
forwardToOutreach: true
})
};
fetch('https://your-instance.example.com/api/lead-management', 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://your-instance.example.com/api/lead-management",
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([
'configurationName' => 'Facebook Lead Ad Funnel',
'source' => 'Facebook Lead Ad',
'inboundEmail' => 'leads+fb@inbound.example.com',
'initialStage' => 'New Lead',
'defaultProcess' => '64eea1110000000000000001',
'isAutopilot' => true,
'starterMessage' => 'Hi {{firstName}}, thanks for your interest!',
'costPerLead' => 12.5,
'status' => 'active',
'forwardToOutreach' => true
]),
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://your-instance.example.com/api/lead-management"
payload := strings.NewReader("{\n \"configurationName\": \"Facebook Lead Ad Funnel\",\n \"source\": \"Facebook Lead Ad\",\n \"inboundEmail\": \"leads+fb@inbound.example.com\",\n \"initialStage\": \"New Lead\",\n \"defaultProcess\": \"64eea1110000000000000001\",\n \"isAutopilot\": true,\n \"starterMessage\": \"Hi {{firstName}}, thanks for your interest!\",\n \"costPerLead\": 12.5,\n \"status\": \"active\",\n \"forwardToOutreach\": true\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://your-instance.example.com/api/lead-management")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configurationName\": \"Facebook Lead Ad Funnel\",\n \"source\": \"Facebook Lead Ad\",\n \"inboundEmail\": \"leads+fb@inbound.example.com\",\n \"initialStage\": \"New Lead\",\n \"defaultProcess\": \"64eea1110000000000000001\",\n \"isAutopilot\": true,\n \"starterMessage\": \"Hi {{firstName}}, thanks for your interest!\",\n \"costPerLead\": 12.5,\n \"status\": \"active\",\n \"forwardToOutreach\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/lead-management")
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 \"configurationName\": \"Facebook Lead Ad Funnel\",\n \"source\": \"Facebook Lead Ad\",\n \"inboundEmail\": \"leads+fb@inbound.example.com\",\n \"initialStage\": \"New Lead\",\n \"defaultProcess\": \"64eea1110000000000000001\",\n \"isAutopilot\": true,\n \"starterMessage\": \"Hi {{firstName}}, thanks for your interest!\",\n \"costPerLead\": 12.5,\n \"status\": \"active\",\n \"forwardToOutreach\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Lead management configuration created",
"data": {
"_id": "665f1a0c0e0a4b001a2c9f40",
"configurationName": "Facebook Lead Ad Funnel",
"status": "active"
}
}{
"error": "Lead management configuration not found"
}{
"error": "Lead management configuration not found"
}Lead Management
Create a lead management configuration
Creates a new LeadManagement configuration for the authenticated user. The configurationName must be unique per user (case-insensitive) and defaultProcess must resolve to an existing Prompt ID.
POST
/
api
/
lead-management
Create a lead management configuration
curl --request POST \
--url https://your-instance.example.com/api/lead-management \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configurationName": "Facebook Lead Ad Funnel",
"source": "Facebook Lead Ad",
"inboundEmail": "leads+fb@inbound.example.com",
"initialStage": "New Lead",
"defaultProcess": "64eea1110000000000000001",
"isAutopilot": true,
"starterMessage": "Hi {{firstName}}, thanks for your interest!",
"costPerLead": 12.5,
"status": "active",
"forwardToOutreach": true
}
'import requests
url = "https://your-instance.example.com/api/lead-management"
payload = {
"configurationName": "Facebook Lead Ad Funnel",
"source": "Facebook Lead Ad",
"inboundEmail": "leads+fb@inbound.example.com",
"initialStage": "New Lead",
"defaultProcess": "64eea1110000000000000001",
"isAutopilot": True,
"starterMessage": "Hi {{firstName}}, thanks for your interest!",
"costPerLead": 12.5,
"status": "active",
"forwardToOutreach": True
}
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({
configurationName: 'Facebook Lead Ad Funnel',
source: 'Facebook Lead Ad',
inboundEmail: 'leads+fb@inbound.example.com',
initialStage: 'New Lead',
defaultProcess: '64eea1110000000000000001',
isAutopilot: true,
starterMessage: 'Hi {{firstName}}, thanks for your interest!',
costPerLead: 12.5,
status: 'active',
forwardToOutreach: true
})
};
fetch('https://your-instance.example.com/api/lead-management', 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://your-instance.example.com/api/lead-management",
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([
'configurationName' => 'Facebook Lead Ad Funnel',
'source' => 'Facebook Lead Ad',
'inboundEmail' => 'leads+fb@inbound.example.com',
'initialStage' => 'New Lead',
'defaultProcess' => '64eea1110000000000000001',
'isAutopilot' => true,
'starterMessage' => 'Hi {{firstName}}, thanks for your interest!',
'costPerLead' => 12.5,
'status' => 'active',
'forwardToOutreach' => true
]),
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://your-instance.example.com/api/lead-management"
payload := strings.NewReader("{\n \"configurationName\": \"Facebook Lead Ad Funnel\",\n \"source\": \"Facebook Lead Ad\",\n \"inboundEmail\": \"leads+fb@inbound.example.com\",\n \"initialStage\": \"New Lead\",\n \"defaultProcess\": \"64eea1110000000000000001\",\n \"isAutopilot\": true,\n \"starterMessage\": \"Hi {{firstName}}, thanks for your interest!\",\n \"costPerLead\": 12.5,\n \"status\": \"active\",\n \"forwardToOutreach\": true\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://your-instance.example.com/api/lead-management")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configurationName\": \"Facebook Lead Ad Funnel\",\n \"source\": \"Facebook Lead Ad\",\n \"inboundEmail\": \"leads+fb@inbound.example.com\",\n \"initialStage\": \"New Lead\",\n \"defaultProcess\": \"64eea1110000000000000001\",\n \"isAutopilot\": true,\n \"starterMessage\": \"Hi {{firstName}}, thanks for your interest!\",\n \"costPerLead\": 12.5,\n \"status\": \"active\",\n \"forwardToOutreach\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/lead-management")
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 \"configurationName\": \"Facebook Lead Ad Funnel\",\n \"source\": \"Facebook Lead Ad\",\n \"inboundEmail\": \"leads+fb@inbound.example.com\",\n \"initialStage\": \"New Lead\",\n \"defaultProcess\": \"64eea1110000000000000001\",\n \"isAutopilot\": true,\n \"starterMessage\": \"Hi {{firstName}}, thanks for your interest!\",\n \"costPerLead\": 12.5,\n \"status\": \"active\",\n \"forwardToOutreach\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Lead management configuration created",
"data": {
"_id": "665f1a0c0e0a4b001a2c9f40",
"configurationName": "Facebook Lead Ad Funnel",
"status": "active"
}
}{
"error": "Lead management configuration not found"
}{
"error": "Lead management configuration not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Prompt ID (must exist).
Required range:
x >= 0Available options:
active, inactive Response
Configuration created
Show child attributes
Show child attributes
Example:
{
"_id": "665f1a0c0e0a4b001a2c9f40",
"organizationId": "64ee9a8b1e7f2a0011223344",
"userId": "64ee9a8b1e7f2a0011223399",
"configurationName": "Facebook Lead Ad Funnel",
"name": "FB Lead Ad",
"description": "Routes Facebook Lead Ad submissions through the warm-up sequence.",
"source": "Facebook Lead Ad",
"inboundEmail": "leads+fb@inbound.example.com",
"initialStage": "New Lead",
"defaultProcess": "64eea1110000000000000001",
"isAutopilot": true,
"allowRecontact": false,
"starterMessage": "Hi {{firstName}}, thanks for your interest!",
"costPerLead": 12.5,
"status": "active",
"pipelineId": "64eea1110000000000000010",
"pipelineStage": "New Lead",
"createApplication": false,
"forwardToOutreach": true,
"useWorkflowOnly": false,
"createdAt": "2026-05-01T09:00:00.000Z",
"updatedAt": "2026-05-10T15:23:00.000Z"
}
⌘I