BulkCreateLeads
curl --request POST \
--url https://api.trysela.com/api/leads/bulk-create/ \
--header 'Authorization: Token <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"leads": [
{
"email": "first_name@trysela.com",
"phone_number": "+18042221111",
"metadata": {
"first_name": "First",
"last_name": "Name",
"timezone": "America/Los_Angeles",
"property_address": "123 Main St",
"property_city": "San Francisco",
"property_state": "California",
"property_zip": "94101",
"address": "456 2nd St",
"city": "Los Angeles",
"state": "California",
"zip": "90001"
},
"external_id": "id_in_your_crm_123",
"lead_source": "USDALoans.com",
"lead_type": 123,
"representative": 456,
"us_state": "CA"
},
{
"email": "first_name@trysela.com",
"phone_number": "+18042221111",
"metadata": {
"first_name": "First",
"last_name": "Name",
"timezone": "America/Los_Angeles",
"property_address": "123 Main St",
"property_city": "San Francisco",
"property_state": "California",
"property_zip": "94101",
"address": "456 2nd St",
"city": "Los Angeles",
"state": "California",
"zip": "90001",
"property_value": 725000,
"property_type": "single_family",
"occupancy_type": "primary_residence",
"funded_date": "2021-06-15",
"loan_type": "conventional",
"loan_program": "30-year fixed",
"loan_rate": 7.1,
"ltv": 62,
"va_indicator": false,
"fha_indicator": false,
"loan_amount": 450000,
"loan_purpose": "refinance",
"loan_close_timeframe": "30-45 days",
"preferred_loan_product": "30-year fixed"
},
"external_id": "id_in_your_crm_123",
"lead_source": "USDALoans.com",
"lead_type": 123,
"representative": 456,
"us_state": "CA"
}
]
}'import requests
url = "https://api.trysela.com/api/leads/bulk-create/"
payload = { "leads": [
{
"phone_number": "<string>",
"email": "jsmith@example.com",
"metadata": {},
"lead_type": 123,
"representative": 123,
"external_id": "<string>",
"lead_source": "<string>",
"call_schedule_start_time": "2023-11-07T05:31:56Z",
"min_reengagement_days": 1
}
] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
leads: [
{
phone_number: '<string>',
email: 'jsmith@example.com',
metadata: {},
lead_type: 123,
representative: 123,
external_id: '<string>',
lead_source: '<string>',
call_schedule_start_time: '2023-11-07T05:31:56Z',
min_reengagement_days: 1
}
]
})
};
fetch('https://api.trysela.com/api/leads/bulk-create/', 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.trysela.com/api/leads/bulk-create/",
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([
'leads' => [
[
'phone_number' => '<string>',
'email' => 'jsmith@example.com',
'metadata' => [
],
'lead_type' => 123,
'representative' => 123,
'external_id' => '<string>',
'lead_source' => '<string>',
'call_schedule_start_time' => '2023-11-07T05:31:56Z',
'min_reengagement_days' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.trysela.com/api/leads/bulk-create/"
payload := strings.NewReader("{\n \"leads\": [\n {\n \"phone_number\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"lead_type\": 123,\n \"representative\": 123,\n \"external_id\": \"<string>\",\n \"lead_source\": \"<string>\",\n \"call_schedule_start_time\": \"2023-11-07T05:31:56Z\",\n \"min_reengagement_days\": 1\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.trysela.com/api/leads/bulk-create/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"leads\": [\n {\n \"phone_number\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"lead_type\": 123,\n \"representative\": 123,\n \"external_id\": \"<string>\",\n \"lead_source\": \"<string>\",\n \"call_schedule_start_time\": \"2023-11-07T05:31:56Z\",\n \"min_reengagement_days\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trysela.com/api/leads/bulk-create/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"leads\": [\n {\n \"phone_number\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"lead_type\": 123,\n \"representative\": 123,\n \"external_id\": \"<string>\",\n \"lead_source\": \"<string>\",\n \"call_schedule_start_time\": \"2023-11-07T05:31:56Z\",\n \"min_reengagement_days\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": 123,
"action": "created",
"phone_number": "+18042221111",
"external_id": "id_in_your_crm_123"
},
{
"id": 456,
"action": "reengaged"
},
{
"id": null,
"action": "error",
"error": "Each lead must be a JSON object."
},
{
"id": 789,
"action": "created",
"phone_number": "+18043334444",
"external_id": null,
"enqueue_error": true
}
]
}{
"leads": [
"Request body must contain a 'leads' list."
]
}Leads
Bulk Create Leads
Creates or reengages multiple leads in one request. Each item accepts the same fields as POST /api/leads/. Results preserve request order and report whether each item was created, reengaged, or failed validation.
POST
/
api
/
leads
/
bulk-create
/
BulkCreateLeads
curl --request POST \
--url https://api.trysela.com/api/leads/bulk-create/ \
--header 'Authorization: Token <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"leads": [
{
"email": "first_name@trysela.com",
"phone_number": "+18042221111",
"metadata": {
"first_name": "First",
"last_name": "Name",
"timezone": "America/Los_Angeles",
"property_address": "123 Main St",
"property_city": "San Francisco",
"property_state": "California",
"property_zip": "94101",
"address": "456 2nd St",
"city": "Los Angeles",
"state": "California",
"zip": "90001"
},
"external_id": "id_in_your_crm_123",
"lead_source": "USDALoans.com",
"lead_type": 123,
"representative": 456,
"us_state": "CA"
},
{
"email": "first_name@trysela.com",
"phone_number": "+18042221111",
"metadata": {
"first_name": "First",
"last_name": "Name",
"timezone": "America/Los_Angeles",
"property_address": "123 Main St",
"property_city": "San Francisco",
"property_state": "California",
"property_zip": "94101",
"address": "456 2nd St",
"city": "Los Angeles",
"state": "California",
"zip": "90001",
"property_value": 725000,
"property_type": "single_family",
"occupancy_type": "primary_residence",
"funded_date": "2021-06-15",
"loan_type": "conventional",
"loan_program": "30-year fixed",
"loan_rate": 7.1,
"ltv": 62,
"va_indicator": false,
"fha_indicator": false,
"loan_amount": 450000,
"loan_purpose": "refinance",
"loan_close_timeframe": "30-45 days",
"preferred_loan_product": "30-year fixed"
},
"external_id": "id_in_your_crm_123",
"lead_source": "USDALoans.com",
"lead_type": 123,
"representative": 456,
"us_state": "CA"
}
]
}'import requests
url = "https://api.trysela.com/api/leads/bulk-create/"
payload = { "leads": [
{
"phone_number": "<string>",
"email": "jsmith@example.com",
"metadata": {},
"lead_type": 123,
"representative": 123,
"external_id": "<string>",
"lead_source": "<string>",
"call_schedule_start_time": "2023-11-07T05:31:56Z",
"min_reengagement_days": 1
}
] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
leads: [
{
phone_number: '<string>',
email: 'jsmith@example.com',
metadata: {},
lead_type: 123,
representative: 123,
external_id: '<string>',
lead_source: '<string>',
call_schedule_start_time: '2023-11-07T05:31:56Z',
min_reengagement_days: 1
}
]
})
};
fetch('https://api.trysela.com/api/leads/bulk-create/', 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.trysela.com/api/leads/bulk-create/",
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([
'leads' => [
[
'phone_number' => '<string>',
'email' => 'jsmith@example.com',
'metadata' => [
],
'lead_type' => 123,
'representative' => 123,
'external_id' => '<string>',
'lead_source' => '<string>',
'call_schedule_start_time' => '2023-11-07T05:31:56Z',
'min_reengagement_days' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.trysela.com/api/leads/bulk-create/"
payload := strings.NewReader("{\n \"leads\": [\n {\n \"phone_number\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"lead_type\": 123,\n \"representative\": 123,\n \"external_id\": \"<string>\",\n \"lead_source\": \"<string>\",\n \"call_schedule_start_time\": \"2023-11-07T05:31:56Z\",\n \"min_reengagement_days\": 1\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.trysela.com/api/leads/bulk-create/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"leads\": [\n {\n \"phone_number\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"lead_type\": 123,\n \"representative\": 123,\n \"external_id\": \"<string>\",\n \"lead_source\": \"<string>\",\n \"call_schedule_start_time\": \"2023-11-07T05:31:56Z\",\n \"min_reengagement_days\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trysela.com/api/leads/bulk-create/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"leads\": [\n {\n \"phone_number\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"lead_type\": 123,\n \"representative\": 123,\n \"external_id\": \"<string>\",\n \"lead_source\": \"<string>\",\n \"call_schedule_start_time\": \"2023-11-07T05:31:56Z\",\n \"min_reengagement_days\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": 123,
"action": "created",
"phone_number": "+18042221111",
"external_id": "id_in_your_crm_123"
},
{
"id": 456,
"action": "reengaged"
},
{
"id": null,
"action": "error",
"error": "Each lead must be a JSON object."
},
{
"id": 789,
"action": "created",
"phone_number": "+18043334444",
"external_id": null,
"enqueue_error": true
}
]
}{
"leads": [
"Request body must contain a 'leads' list."
]
}Authorizations
Token-based authentication with required prefix "Token"
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Show child attributes
Show child attributes
Response
Per-lead bulk create results.
Show child attributes
Show child attributes
⌘I