curl --request POST \
--url https://public-api.lonescale.com/trigger/enrich \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"enrichment_type": [
"email",
"phone"
],
"contacts": [
{
"firstname": "John",
"lastname": "Doe",
"email": "john@acme.com",
"job_title": "ceo",
"linkedin_url": "https://www.linkedin.com/in/john-doe/",
"domain": "acme.com",
"company_name": "Acmeo",
"custom": {
"contact_id": "44479301"
}
}
],
"webhook_url": "https://api.example.com/webhooks/enrichment",
"custom": {
"provider": "lonescale",
"enrichment_type": "email and phone"
}
}
'import requests
url = "https://public-api.lonescale.com/trigger/enrich"
payload = {
"enrichment_type": ["email", "phone"],
"contacts": [
{
"firstname": "John",
"lastname": "Doe",
"email": "john@acme.com",
"job_title": "ceo",
"linkedin_url": "https://www.linkedin.com/in/john-doe/",
"domain": "acme.com",
"company_name": "Acmeo",
"custom": { "contact_id": "44479301" }
}
],
"webhook_url": "https://api.example.com/webhooks/enrichment",
"custom": {
"provider": "lonescale",
"enrichment_type": "email and phone"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enrichment_type: ['email', 'phone'],
contacts: [
{
firstname: 'John',
lastname: 'Doe',
email: 'john@acme.com',
job_title: 'ceo',
linkedin_url: 'https://www.linkedin.com/in/john-doe/',
domain: 'acme.com',
company_name: 'Acmeo',
custom: {contact_id: '44479301'}
}
],
webhook_url: 'https://api.example.com/webhooks/enrichment',
custom: {provider: 'lonescale', enrichment_type: 'email and phone'}
})
};
fetch('https://public-api.lonescale.com/trigger/enrich', 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://public-api.lonescale.com/trigger/enrich",
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([
'enrichment_type' => [
'email',
'phone'
],
'contacts' => [
[
'firstname' => 'John',
'lastname' => 'Doe',
'email' => 'john@acme.com',
'job_title' => 'ceo',
'linkedin_url' => 'https://www.linkedin.com/in/john-doe/',
'domain' => 'acme.com',
'company_name' => 'Acmeo',
'custom' => [
'contact_id' => '44479301'
]
]
],
'webhook_url' => 'https://api.example.com/webhooks/enrichment',
'custom' => [
'provider' => 'lonescale',
'enrichment_type' => 'email and phone'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://public-api.lonescale.com/trigger/enrich"
payload := strings.NewReader("{\n \"enrichment_type\": [\n \"email\",\n \"phone\"\n ],\n \"contacts\": [\n {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"email\": \"john@acme.com\",\n \"job_title\": \"ceo\",\n \"linkedin_url\": \"https://www.linkedin.com/in/john-doe/\",\n \"domain\": \"acme.com\",\n \"company_name\": \"Acmeo\",\n \"custom\": {\n \"contact_id\": \"44479301\"\n }\n }\n ],\n \"webhook_url\": \"https://api.example.com/webhooks/enrichment\",\n \"custom\": {\n \"provider\": \"lonescale\",\n \"enrichment_type\": \"email and phone\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://public-api.lonescale.com/trigger/enrich")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enrichment_type\": [\n \"email\",\n \"phone\"\n ],\n \"contacts\": [\n {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"email\": \"john@acme.com\",\n \"job_title\": \"ceo\",\n \"linkedin_url\": \"https://www.linkedin.com/in/john-doe/\",\n \"domain\": \"acme.com\",\n \"company_name\": \"Acmeo\",\n \"custom\": {\n \"contact_id\": \"44479301\"\n }\n }\n ],\n \"webhook_url\": \"https://api.example.com/webhooks/enrichment\",\n \"custom\": {\n \"provider\": \"lonescale\",\n \"enrichment_type\": \"email and phone\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.lonescale.com/trigger/enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enrichment_type\": [\n \"email\",\n \"phone\"\n ],\n \"contacts\": [\n {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"email\": \"john@acme.com\",\n \"job_title\": \"ceo\",\n \"linkedin_url\": \"https://www.linkedin.com/in/john-doe/\",\n \"domain\": \"acme.com\",\n \"company_name\": \"Acmeo\",\n \"custom\": {\n \"contact_id\": \"44479301\"\n }\n }\n ],\n \"webhook_url\": \"https://api.example.com/webhooks/enrichment\",\n \"custom\": {\n \"provider\": \"lonescale\",\n \"enrichment_type\": \"email and phone\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Bad request",
"error": "Bad request",
"statusCode": 400
}{
"message": "Invalid API Key",
"error": "Unauthorized",
"statusCode": 401
}Enrich Contacts
Start waterfall enrichment for contacts.
LoneScale will call your webhook_url with this payload once the job is completed.
See the Enrichment payload documentation for the full webhook schema.
curl --request POST \
--url https://public-api.lonescale.com/trigger/enrich \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"enrichment_type": [
"email",
"phone"
],
"contacts": [
{
"firstname": "John",
"lastname": "Doe",
"email": "john@acme.com",
"job_title": "ceo",
"linkedin_url": "https://www.linkedin.com/in/john-doe/",
"domain": "acme.com",
"company_name": "Acmeo",
"custom": {
"contact_id": "44479301"
}
}
],
"webhook_url": "https://api.example.com/webhooks/enrichment",
"custom": {
"provider": "lonescale",
"enrichment_type": "email and phone"
}
}
'import requests
url = "https://public-api.lonescale.com/trigger/enrich"
payload = {
"enrichment_type": ["email", "phone"],
"contacts": [
{
"firstname": "John",
"lastname": "Doe",
"email": "john@acme.com",
"job_title": "ceo",
"linkedin_url": "https://www.linkedin.com/in/john-doe/",
"domain": "acme.com",
"company_name": "Acmeo",
"custom": { "contact_id": "44479301" }
}
],
"webhook_url": "https://api.example.com/webhooks/enrichment",
"custom": {
"provider": "lonescale",
"enrichment_type": "email and phone"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enrichment_type: ['email', 'phone'],
contacts: [
{
firstname: 'John',
lastname: 'Doe',
email: 'john@acme.com',
job_title: 'ceo',
linkedin_url: 'https://www.linkedin.com/in/john-doe/',
domain: 'acme.com',
company_name: 'Acmeo',
custom: {contact_id: '44479301'}
}
],
webhook_url: 'https://api.example.com/webhooks/enrichment',
custom: {provider: 'lonescale', enrichment_type: 'email and phone'}
})
};
fetch('https://public-api.lonescale.com/trigger/enrich', 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://public-api.lonescale.com/trigger/enrich",
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([
'enrichment_type' => [
'email',
'phone'
],
'contacts' => [
[
'firstname' => 'John',
'lastname' => 'Doe',
'email' => 'john@acme.com',
'job_title' => 'ceo',
'linkedin_url' => 'https://www.linkedin.com/in/john-doe/',
'domain' => 'acme.com',
'company_name' => 'Acmeo',
'custom' => [
'contact_id' => '44479301'
]
]
],
'webhook_url' => 'https://api.example.com/webhooks/enrichment',
'custom' => [
'provider' => 'lonescale',
'enrichment_type' => 'email and phone'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://public-api.lonescale.com/trigger/enrich"
payload := strings.NewReader("{\n \"enrichment_type\": [\n \"email\",\n \"phone\"\n ],\n \"contacts\": [\n {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"email\": \"john@acme.com\",\n \"job_title\": \"ceo\",\n \"linkedin_url\": \"https://www.linkedin.com/in/john-doe/\",\n \"domain\": \"acme.com\",\n \"company_name\": \"Acmeo\",\n \"custom\": {\n \"contact_id\": \"44479301\"\n }\n }\n ],\n \"webhook_url\": \"https://api.example.com/webhooks/enrichment\",\n \"custom\": {\n \"provider\": \"lonescale\",\n \"enrichment_type\": \"email and phone\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://public-api.lonescale.com/trigger/enrich")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enrichment_type\": [\n \"email\",\n \"phone\"\n ],\n \"contacts\": [\n {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"email\": \"john@acme.com\",\n \"job_title\": \"ceo\",\n \"linkedin_url\": \"https://www.linkedin.com/in/john-doe/\",\n \"domain\": \"acme.com\",\n \"company_name\": \"Acmeo\",\n \"custom\": {\n \"contact_id\": \"44479301\"\n }\n }\n ],\n \"webhook_url\": \"https://api.example.com/webhooks/enrichment\",\n \"custom\": {\n \"provider\": \"lonescale\",\n \"enrichment_type\": \"email and phone\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.lonescale.com/trigger/enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enrichment_type\": [\n \"email\",\n \"phone\"\n ],\n \"contacts\": [\n {\n \"firstname\": \"John\",\n \"lastname\": \"Doe\",\n \"email\": \"john@acme.com\",\n \"job_title\": \"ceo\",\n \"linkedin_url\": \"https://www.linkedin.com/in/john-doe/\",\n \"domain\": \"acme.com\",\n \"company_name\": \"Acmeo\",\n \"custom\": {\n \"contact_id\": \"44479301\"\n }\n }\n ],\n \"webhook_url\": \"https://api.example.com/webhooks/enrichment\",\n \"custom\": {\n \"provider\": \"lonescale\",\n \"enrichment_type\": \"email and phone\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Bad request",
"error": "Bad request",
"statusCode": 400
}{
"message": "Invalid API Key",
"error": "Unauthorized",
"statusCode": 401
}Authorizations
Provide your API key in the x-api-key header.
Body
Types of enrichment to perform.
1email, phone, profile Contacts to enrich.
1Show child attributes
Show child attributes
Webhook endpoint to receive enrichment results.
Show child attributes
Show child attributes
When true, the webhook response will include a jobChangeDetected field indicating whether the contact has changed company since the input data was provided.
Only effective when enrichment_type includes "profile" and webhook_url is provided.
Opt out of the 24h enrichment cache for this call. When a contact was already enriched for your account within the last 24 hours, the cached result is returned and no credits are consumed; pass true to force a fresh enrichment instead (credits are consumed and the cache entry is refreshed).
Response
Enrichment successfully created

