Create contacts in bulk
curl --request POST \
--url https://api.yo-lead.com/v1/contacts/bulk \
--header 'Content-Type: application/json' \
--header 'X-YoLead-Key: <api-key>' \
--header 'X-YoLead-Signature: <api-key>' \
--header 'X-YoLead-Timestamp: <api-key>' \
--data '
{
"contacts": [
{
"firstName": "<string>",
"identities": {
"phone": [
"<string>"
],
"whatsapp_phone": [
"<string>"
],
"whatsapp_user_id": [
"<string>"
],
"whatsapp_parent_user_id": [
"<string>"
],
"email": [
"<string>"
],
"telegram_user_id": [
"<string>"
],
"telegram_username": [
"<string>"
],
"telegram_phone": [
"<string>"
],
"max_user_id": [
"<string>"
],
"max_username": [
"<string>"
],
"max_phone": [
"<string>"
],
"vk_user_id": [
"<string>"
],
"facebook_user_id": [
"<string>"
],
"instagram_user_id": [
"<string>"
],
"instagram_username": [
"<string>"
]
},
"lastName": "<string>"
}
]
}
'import requests
url = "https://api.yo-lead.com/v1/contacts/bulk"
payload = { "contacts": [
{
"firstName": "<string>",
"identities": {
"phone": ["<string>"],
"whatsapp_phone": ["<string>"],
"whatsapp_user_id": ["<string>"],
"whatsapp_parent_user_id": ["<string>"],
"email": ["<string>"],
"telegram_user_id": ["<string>"],
"telegram_username": ["<string>"],
"telegram_phone": ["<string>"],
"max_user_id": ["<string>"],
"max_username": ["<string>"],
"max_phone": ["<string>"],
"vk_user_id": ["<string>"],
"facebook_user_id": ["<string>"],
"instagram_user_id": ["<string>"],
"instagram_username": ["<string>"]
},
"lastName": "<string>"
}
] }
headers = {
"X-YoLead-Key": "<api-key>",
"X-YoLead-Timestamp": "<api-key>",
"X-YoLead-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-YoLead-Key': '<api-key>',
'X-YoLead-Timestamp': '<api-key>',
'X-YoLead-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
contacts: [
{
firstName: '<string>',
identities: {
phone: ['<string>'],
whatsapp_phone: ['<string>'],
whatsapp_user_id: ['<string>'],
whatsapp_parent_user_id: ['<string>'],
email: ['<string>'],
telegram_user_id: ['<string>'],
telegram_username: ['<string>'],
telegram_phone: ['<string>'],
max_user_id: ['<string>'],
max_username: ['<string>'],
max_phone: ['<string>'],
vk_user_id: ['<string>'],
facebook_user_id: ['<string>'],
instagram_user_id: ['<string>'],
instagram_username: ['<string>']
},
lastName: '<string>'
}
]
})
};
fetch('https://api.yo-lead.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.yo-lead.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' => [
[
'firstName' => '<string>',
'identities' => [
'phone' => [
'<string>'
],
'whatsapp_phone' => [
'<string>'
],
'whatsapp_user_id' => [
'<string>'
],
'whatsapp_parent_user_id' => [
'<string>'
],
'email' => [
'<string>'
],
'telegram_user_id' => [
'<string>'
],
'telegram_username' => [
'<string>'
],
'telegram_phone' => [
'<string>'
],
'max_user_id' => [
'<string>'
],
'max_username' => [
'<string>'
],
'max_phone' => [
'<string>'
],
'vk_user_id' => [
'<string>'
],
'facebook_user_id' => [
'<string>'
],
'instagram_user_id' => [
'<string>'
],
'instagram_username' => [
'<string>'
]
],
'lastName' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-YoLead-Key: <api-key>",
"X-YoLead-Signature: <api-key>",
"X-YoLead-Timestamp: <api-key>"
],
]);
$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.yo-lead.com/v1/contacts/bulk"
payload := strings.NewReader("{\n \"contacts\": [\n {\n \"firstName\": \"<string>\",\n \"identities\": {\n \"phone\": [\n \"<string>\"\n ],\n \"whatsapp_phone\": [\n \"<string>\"\n ],\n \"whatsapp_user_id\": [\n \"<string>\"\n ],\n \"whatsapp_parent_user_id\": [\n \"<string>\"\n ],\n \"email\": [\n \"<string>\"\n ],\n \"telegram_user_id\": [\n \"<string>\"\n ],\n \"telegram_username\": [\n \"<string>\"\n ],\n \"telegram_phone\": [\n \"<string>\"\n ],\n \"max_user_id\": [\n \"<string>\"\n ],\n \"max_username\": [\n \"<string>\"\n ],\n \"max_phone\": [\n \"<string>\"\n ],\n \"vk_user_id\": [\n \"<string>\"\n ],\n \"facebook_user_id\": [\n \"<string>\"\n ],\n \"instagram_user_id\": [\n \"<string>\"\n ],\n \"instagram_username\": [\n \"<string>\"\n ]\n },\n \"lastName\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-YoLead-Key", "<api-key>")
req.Header.Add("X-YoLead-Timestamp", "<api-key>")
req.Header.Add("X-YoLead-Signature", "<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.yo-lead.com/v1/contacts/bulk")
.header("X-YoLead-Key", "<api-key>")
.header("X-YoLead-Timestamp", "<api-key>")
.header("X-YoLead-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": [\n {\n \"firstName\": \"<string>\",\n \"identities\": {\n \"phone\": [\n \"<string>\"\n ],\n \"whatsapp_phone\": [\n \"<string>\"\n ],\n \"whatsapp_user_id\": [\n \"<string>\"\n ],\n \"whatsapp_parent_user_id\": [\n \"<string>\"\n ],\n \"email\": [\n \"<string>\"\n ],\n \"telegram_user_id\": [\n \"<string>\"\n ],\n \"telegram_username\": [\n \"<string>\"\n ],\n \"telegram_phone\": [\n \"<string>\"\n ],\n \"max_user_id\": [\n \"<string>\"\n ],\n \"max_username\": [\n \"<string>\"\n ],\n \"max_phone\": [\n \"<string>\"\n ],\n \"vk_user_id\": [\n \"<string>\"\n ],\n \"facebook_user_id\": [\n \"<string>\"\n ],\n \"instagram_user_id\": [\n \"<string>\"\n ],\n \"instagram_username\": [\n \"<string>\"\n ]\n },\n \"lastName\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yo-lead.com/v1/contacts/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-YoLead-Key"] = '<api-key>'
request["X-YoLead-Timestamp"] = '<api-key>'
request["X-YoLead-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contacts\": [\n {\n \"firstName\": \"<string>\",\n \"identities\": {\n \"phone\": [\n \"<string>\"\n ],\n \"whatsapp_phone\": [\n \"<string>\"\n ],\n \"whatsapp_user_id\": [\n \"<string>\"\n ],\n \"whatsapp_parent_user_id\": [\n \"<string>\"\n ],\n \"email\": [\n \"<string>\"\n ],\n \"telegram_user_id\": [\n \"<string>\"\n ],\n \"telegram_username\": [\n \"<string>\"\n ],\n \"telegram_phone\": [\n \"<string>\"\n ],\n \"max_user_id\": [\n \"<string>\"\n ],\n \"max_username\": [\n \"<string>\"\n ],\n \"max_phone\": [\n \"<string>\"\n ],\n \"vk_user_id\": [\n \"<string>\"\n ],\n \"facebook_user_id\": [\n \"<string>\"\n ],\n \"instagram_user_id\": [\n \"<string>\"\n ],\n \"instagram_username\": [\n \"<string>\"\n ]\n },\n \"lastName\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"total": 1,
"created": 1,
"skipped": 1,
"failed": 1,
"results": [
{
"index": 1,
"status": "created",
"contactId": "64f000000000000000000001"
}
]
}
}Contacts
Create contacts in bulk
Attempts to create up to 100 contacts. Each item receives its own result, so duplicate or invalid items do not prevent other items from being created. Required API key scope: read-write.
POST
/
v1
/
contacts
/
bulk
Create contacts in bulk
curl --request POST \
--url https://api.yo-lead.com/v1/contacts/bulk \
--header 'Content-Type: application/json' \
--header 'X-YoLead-Key: <api-key>' \
--header 'X-YoLead-Signature: <api-key>' \
--header 'X-YoLead-Timestamp: <api-key>' \
--data '
{
"contacts": [
{
"firstName": "<string>",
"identities": {
"phone": [
"<string>"
],
"whatsapp_phone": [
"<string>"
],
"whatsapp_user_id": [
"<string>"
],
"whatsapp_parent_user_id": [
"<string>"
],
"email": [
"<string>"
],
"telegram_user_id": [
"<string>"
],
"telegram_username": [
"<string>"
],
"telegram_phone": [
"<string>"
],
"max_user_id": [
"<string>"
],
"max_username": [
"<string>"
],
"max_phone": [
"<string>"
],
"vk_user_id": [
"<string>"
],
"facebook_user_id": [
"<string>"
],
"instagram_user_id": [
"<string>"
],
"instagram_username": [
"<string>"
]
},
"lastName": "<string>"
}
]
}
'import requests
url = "https://api.yo-lead.com/v1/contacts/bulk"
payload = { "contacts": [
{
"firstName": "<string>",
"identities": {
"phone": ["<string>"],
"whatsapp_phone": ["<string>"],
"whatsapp_user_id": ["<string>"],
"whatsapp_parent_user_id": ["<string>"],
"email": ["<string>"],
"telegram_user_id": ["<string>"],
"telegram_username": ["<string>"],
"telegram_phone": ["<string>"],
"max_user_id": ["<string>"],
"max_username": ["<string>"],
"max_phone": ["<string>"],
"vk_user_id": ["<string>"],
"facebook_user_id": ["<string>"],
"instagram_user_id": ["<string>"],
"instagram_username": ["<string>"]
},
"lastName": "<string>"
}
] }
headers = {
"X-YoLead-Key": "<api-key>",
"X-YoLead-Timestamp": "<api-key>",
"X-YoLead-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-YoLead-Key': '<api-key>',
'X-YoLead-Timestamp': '<api-key>',
'X-YoLead-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
contacts: [
{
firstName: '<string>',
identities: {
phone: ['<string>'],
whatsapp_phone: ['<string>'],
whatsapp_user_id: ['<string>'],
whatsapp_parent_user_id: ['<string>'],
email: ['<string>'],
telegram_user_id: ['<string>'],
telegram_username: ['<string>'],
telegram_phone: ['<string>'],
max_user_id: ['<string>'],
max_username: ['<string>'],
max_phone: ['<string>'],
vk_user_id: ['<string>'],
facebook_user_id: ['<string>'],
instagram_user_id: ['<string>'],
instagram_username: ['<string>']
},
lastName: '<string>'
}
]
})
};
fetch('https://api.yo-lead.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.yo-lead.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' => [
[
'firstName' => '<string>',
'identities' => [
'phone' => [
'<string>'
],
'whatsapp_phone' => [
'<string>'
],
'whatsapp_user_id' => [
'<string>'
],
'whatsapp_parent_user_id' => [
'<string>'
],
'email' => [
'<string>'
],
'telegram_user_id' => [
'<string>'
],
'telegram_username' => [
'<string>'
],
'telegram_phone' => [
'<string>'
],
'max_user_id' => [
'<string>'
],
'max_username' => [
'<string>'
],
'max_phone' => [
'<string>'
],
'vk_user_id' => [
'<string>'
],
'facebook_user_id' => [
'<string>'
],
'instagram_user_id' => [
'<string>'
],
'instagram_username' => [
'<string>'
]
],
'lastName' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-YoLead-Key: <api-key>",
"X-YoLead-Signature: <api-key>",
"X-YoLead-Timestamp: <api-key>"
],
]);
$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.yo-lead.com/v1/contacts/bulk"
payload := strings.NewReader("{\n \"contacts\": [\n {\n \"firstName\": \"<string>\",\n \"identities\": {\n \"phone\": [\n \"<string>\"\n ],\n \"whatsapp_phone\": [\n \"<string>\"\n ],\n \"whatsapp_user_id\": [\n \"<string>\"\n ],\n \"whatsapp_parent_user_id\": [\n \"<string>\"\n ],\n \"email\": [\n \"<string>\"\n ],\n \"telegram_user_id\": [\n \"<string>\"\n ],\n \"telegram_username\": [\n \"<string>\"\n ],\n \"telegram_phone\": [\n \"<string>\"\n ],\n \"max_user_id\": [\n \"<string>\"\n ],\n \"max_username\": [\n \"<string>\"\n ],\n \"max_phone\": [\n \"<string>\"\n ],\n \"vk_user_id\": [\n \"<string>\"\n ],\n \"facebook_user_id\": [\n \"<string>\"\n ],\n \"instagram_user_id\": [\n \"<string>\"\n ],\n \"instagram_username\": [\n \"<string>\"\n ]\n },\n \"lastName\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-YoLead-Key", "<api-key>")
req.Header.Add("X-YoLead-Timestamp", "<api-key>")
req.Header.Add("X-YoLead-Signature", "<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.yo-lead.com/v1/contacts/bulk")
.header("X-YoLead-Key", "<api-key>")
.header("X-YoLead-Timestamp", "<api-key>")
.header("X-YoLead-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": [\n {\n \"firstName\": \"<string>\",\n \"identities\": {\n \"phone\": [\n \"<string>\"\n ],\n \"whatsapp_phone\": [\n \"<string>\"\n ],\n \"whatsapp_user_id\": [\n \"<string>\"\n ],\n \"whatsapp_parent_user_id\": [\n \"<string>\"\n ],\n \"email\": [\n \"<string>\"\n ],\n \"telegram_user_id\": [\n \"<string>\"\n ],\n \"telegram_username\": [\n \"<string>\"\n ],\n \"telegram_phone\": [\n \"<string>\"\n ],\n \"max_user_id\": [\n \"<string>\"\n ],\n \"max_username\": [\n \"<string>\"\n ],\n \"max_phone\": [\n \"<string>\"\n ],\n \"vk_user_id\": [\n \"<string>\"\n ],\n \"facebook_user_id\": [\n \"<string>\"\n ],\n \"instagram_user_id\": [\n \"<string>\"\n ],\n \"instagram_username\": [\n \"<string>\"\n ]\n },\n \"lastName\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yo-lead.com/v1/contacts/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-YoLead-Key"] = '<api-key>'
request["X-YoLead-Timestamp"] = '<api-key>'
request["X-YoLead-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contacts\": [\n {\n \"firstName\": \"<string>\",\n \"identities\": {\n \"phone\": [\n \"<string>\"\n ],\n \"whatsapp_phone\": [\n \"<string>\"\n ],\n \"whatsapp_user_id\": [\n \"<string>\"\n ],\n \"whatsapp_parent_user_id\": [\n \"<string>\"\n ],\n \"email\": [\n \"<string>\"\n ],\n \"telegram_user_id\": [\n \"<string>\"\n ],\n \"telegram_username\": [\n \"<string>\"\n ],\n \"telegram_phone\": [\n \"<string>\"\n ],\n \"max_user_id\": [\n \"<string>\"\n ],\n \"max_username\": [\n \"<string>\"\n ],\n \"max_phone\": [\n \"<string>\"\n ],\n \"vk_user_id\": [\n \"<string>\"\n ],\n \"facebook_user_id\": [\n \"<string>\"\n ],\n \"instagram_user_id\": [\n \"<string>\"\n ],\n \"instagram_username\": [\n \"<string>\"\n ]\n },\n \"lastName\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"total": 1,
"created": 1,
"skipped": 1,
"failed": 1,
"results": [
{
"index": 1,
"status": "created",
"contactId": "64f000000000000000000001"
}
]
}
}Authorizations
Public API key generated in the YoLead UI.
Unix timestamp in milliseconds. Requests must be signed within a 5-minute window.
Hex HMAC-SHA256 signature over <timestamp>.<raw_body> using the API secret.
Body
application/json
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Response
Bulk creation result.
Show child attributes
Show child attributes