Bulk Create Contacts
curl --request POST \
--url https://api.example.com/v1/contacts/bulk \
--header 'Content-Type: application/json' \
--data '
{
"contacts": [
{
"full_name": "<string>",
"email": "<string>",
"phone": "<string>",
"job_title": "<string>",
"company": "<string>",
"linkedin_url": "<string>",
"tags": [
{}
],
"custom_fields": {}
}
]
}
'import requests
url = "https://api.example.com/v1/contacts/bulk"
payload = { "contacts": [
{
"full_name": "<string>",
"email": "<string>",
"phone": "<string>",
"job_title": "<string>",
"company": "<string>",
"linkedin_url": "<string>",
"tags": [{}],
"custom_fields": {}
}
] }
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({
contacts: [
{
full_name: '<string>',
email: '<string>',
phone: '<string>',
job_title: '<string>',
company: '<string>',
linkedin_url: '<string>',
tags: [{}],
custom_fields: {}
}
]
})
};
fetch('https://api.example.com/v1/contacts/bulk', 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.example.com/v1/contacts/bulk",
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([
'contacts' => [
[
'full_name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'job_title' => '<string>',
'company' => '<string>',
'linkedin_url' => '<string>',
'tags' => [
[
]
],
'custom_fields' => [
]
]
]
]),
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://api.example.com/v1/contacts/bulk"
payload := strings.NewReader("{\n \"contacts\": [\n {\n \"full_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"job_title\": \"<string>\",\n \"company\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"custom_fields\": {}\n }\n ]\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://api.example.com/v1/contacts/bulk")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": [\n {\n \"full_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"job_title\": \"<string>\",\n \"company\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"custom_fields\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/contacts/bulk")
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 \"contacts\": [\n {\n \"full_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"job_title\": \"<string>\",\n \"company\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"custom_fields\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"created": 123,
"contacts": [
{}
]
}
}Contacts
Bulk Create Contacts
Create multiple contacts in a single request (max 500)
POST
/
v1
/
contacts
/
bulk
Bulk Create Contacts
curl --request POST \
--url https://api.example.com/v1/contacts/bulk \
--header 'Content-Type: application/json' \
--data '
{
"contacts": [
{
"full_name": "<string>",
"email": "<string>",
"phone": "<string>",
"job_title": "<string>",
"company": "<string>",
"linkedin_url": "<string>",
"tags": [
{}
],
"custom_fields": {}
}
]
}
'import requests
url = "https://api.example.com/v1/contacts/bulk"
payload = { "contacts": [
{
"full_name": "<string>",
"email": "<string>",
"phone": "<string>",
"job_title": "<string>",
"company": "<string>",
"linkedin_url": "<string>",
"tags": [{}],
"custom_fields": {}
}
] }
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({
contacts: [
{
full_name: '<string>',
email: '<string>',
phone: '<string>',
job_title: '<string>',
company: '<string>',
linkedin_url: '<string>',
tags: [{}],
custom_fields: {}
}
]
})
};
fetch('https://api.example.com/v1/contacts/bulk', 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.example.com/v1/contacts/bulk",
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([
'contacts' => [
[
'full_name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'job_title' => '<string>',
'company' => '<string>',
'linkedin_url' => '<string>',
'tags' => [
[
]
],
'custom_fields' => [
]
]
]
]),
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://api.example.com/v1/contacts/bulk"
payload := strings.NewReader("{\n \"contacts\": [\n {\n \"full_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"job_title\": \"<string>\",\n \"company\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"custom_fields\": {}\n }\n ]\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://api.example.com/v1/contacts/bulk")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": [\n {\n \"full_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"job_title\": \"<string>\",\n \"company\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"custom_fields\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/contacts/bulk")
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 \"contacts\": [\n {\n \"full_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"job_title\": \"<string>\",\n \"company\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"custom_fields\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"created": 123,
"contacts": [
{}
]
}
}Request
Headers
Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Body Parameters
array
required
Response
object
curl -X POST https://data.leadlex.com/functions/v1/api-gateway/v1/contacts/bulk \
-H "Authorization: Bearer wbk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contacts": [
{ "full_name": "Jane Doe", "email": "jane@example.com", "job_title": "CEO" },
{ "full_name": "John Smith", "email": "john@example.com", "company": "Acme Inc" }
]
}'
import requests
API_KEY = "wbk_your_api_key_here"
BASE_URL = "https://data.leadlex.com/functions/v1/api-gateway"
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
response = requests.post(f"{BASE_URL}/v1/contacts/bulk", headers=headers, json={
"contacts": [
{"full_name": "Jane Doe", "email": "jane@example.com"},
{"full_name": "John Smith", "email": "john@example.com"}
]
})
print(response.json())
const response = await fetch(
'https://data.leadlex.com/functions/v1/api-gateway/v1/contacts/bulk',
{
method: 'POST',
headers: {
'Authorization': 'Bearer wbk_your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
contacts: [
{ full_name: 'Jane Doe', email: 'jane@example.com' },
{ full_name: 'John Smith', email: 'john@example.com' }
]
})
}
);
const { data } = await response.json();
Example Response
{
"data": {
"created": 2,
"contacts": [
{ "id": "abc-123", "full_name": "Jane Doe", "email": "jane@example.com" },
{ "id": "def-456", "full_name": "John Smith", "email": "john@example.com" }
]
}
}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Missing or invalid contacts array |
| 400 | validation_error | More than 500 contacts |
| 403 | insufficient_permissions | Missing contacts:write permission |
| 429 | rate_limited | Rate limit exceeded |