Enrich leads
curl --request POST \
--url https://app.bettercontact.rocks/api/v2/async \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"data": [
{
"first_name": "Elon",
"last_name": "Musk",
"company": "Tesla",
"company_domain": "tesla.com",
"linkedin_url": "https://www.linkedin.com/in/elonmusk",
"custom_fields": {
"uuid": "crm-8821",
"list_name": "Q3 outbound"
}
}
],
"enrich_email_address": true,
"enrich_phone_number": false,
"enrich_profile": false,
"verify_catch_all": false,
"webhook": "https://example.com/bettercontact/results",
"push_contact_individually": false,
"contact_webhook": "<string>",
"process_flow": "<string>",
"timeout_seconds": 240,
"workspace_id": "f72b237d53a"
}
'import requests
url = "https://app.bettercontact.rocks/api/v2/async"
payload = {
"data": [
{
"first_name": "Elon",
"last_name": "Musk",
"company": "Tesla",
"company_domain": "tesla.com",
"linkedin_url": "https://www.linkedin.com/in/elonmusk",
"custom_fields": {
"uuid": "crm-8821",
"list_name": "Q3 outbound"
}
}
],
"enrich_email_address": True,
"enrich_phone_number": False,
"enrich_profile": False,
"verify_catch_all": False,
"webhook": "https://example.com/bettercontact/results",
"push_contact_individually": False,
"contact_webhook": "<string>",
"process_flow": "<string>",
"timeout_seconds": 240,
"workspace_id": "f72b237d53a"
}
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({
data: [
{
first_name: 'Elon',
last_name: 'Musk',
company: 'Tesla',
company_domain: 'tesla.com',
linkedin_url: 'https://www.linkedin.com/in/elonmusk',
custom_fields: {uuid: 'crm-8821', list_name: 'Q3 outbound'}
}
],
enrich_email_address: true,
enrich_phone_number: false,
enrich_profile: false,
verify_catch_all: false,
webhook: 'https://example.com/bettercontact/results',
push_contact_individually: false,
contact_webhook: '<string>',
process_flow: '<string>',
timeout_seconds: 240,
workspace_id: 'f72b237d53a'
})
};
fetch('https://app.bettercontact.rocks/api/v2/async', 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://app.bettercontact.rocks/api/v2/async",
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([
'data' => [
[
'first_name' => 'Elon',
'last_name' => 'Musk',
'company' => 'Tesla',
'company_domain' => 'tesla.com',
'linkedin_url' => 'https://www.linkedin.com/in/elonmusk',
'custom_fields' => [
'uuid' => 'crm-8821',
'list_name' => 'Q3 outbound'
]
]
],
'enrich_email_address' => true,
'enrich_phone_number' => false,
'enrich_profile' => false,
'verify_catch_all' => false,
'webhook' => 'https://example.com/bettercontact/results',
'push_contact_individually' => false,
'contact_webhook' => '<string>',
'process_flow' => '<string>',
'timeout_seconds' => 240,
'workspace_id' => 'f72b237d53a'
]),
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://app.bettercontact.rocks/api/v2/async"
payload := strings.NewReader("{\n \"data\": [\n {\n \"first_name\": \"Elon\",\n \"last_name\": \"Musk\",\n \"company\": \"Tesla\",\n \"company_domain\": \"tesla.com\",\n \"linkedin_url\": \"https://www.linkedin.com/in/elonmusk\",\n \"custom_fields\": {\n \"uuid\": \"crm-8821\",\n \"list_name\": \"Q3 outbound\"\n }\n }\n ],\n \"enrich_email_address\": true,\n \"enrich_phone_number\": false,\n \"enrich_profile\": false,\n \"verify_catch_all\": false,\n \"webhook\": \"https://example.com/bettercontact/results\",\n \"push_contact_individually\": false,\n \"contact_webhook\": \"<string>\",\n \"process_flow\": \"<string>\",\n \"timeout_seconds\": 240,\n \"workspace_id\": \"f72b237d53a\"\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://app.bettercontact.rocks/api/v2/async")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": [\n {\n \"first_name\": \"Elon\",\n \"last_name\": \"Musk\",\n \"company\": \"Tesla\",\n \"company_domain\": \"tesla.com\",\n \"linkedin_url\": \"https://www.linkedin.com/in/elonmusk\",\n \"custom_fields\": {\n \"uuid\": \"crm-8821\",\n \"list_name\": \"Q3 outbound\"\n }\n }\n ],\n \"enrich_email_address\": true,\n \"enrich_phone_number\": false,\n \"enrich_profile\": false,\n \"verify_catch_all\": false,\n \"webhook\": \"https://example.com/bettercontact/results\",\n \"push_contact_individually\": false,\n \"contact_webhook\": \"<string>\",\n \"process_flow\": \"<string>\",\n \"timeout_seconds\": 240,\n \"workspace_id\": \"f72b237d53a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.bettercontact.rocks/api/v2/async")
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 \"data\": [\n {\n \"first_name\": \"Elon\",\n \"last_name\": \"Musk\",\n \"company\": \"Tesla\",\n \"company_domain\": \"tesla.com\",\n \"linkedin_url\": \"https://www.linkedin.com/in/elonmusk\",\n \"custom_fields\": {\n \"uuid\": \"crm-8821\",\n \"list_name\": \"Q3 outbound\"\n }\n }\n ],\n \"enrich_email_address\": true,\n \"enrich_phone_number\": false,\n \"enrich_profile\": false,\n \"verify_catch_all\": false,\n \"webhook\": \"https://example.com/bettercontact/results\",\n \"push_contact_individually\": false,\n \"contact_webhook\": \"<string>\",\n \"process_flow\": \"<string>\",\n \"timeout_seconds\": 240,\n \"workspace_id\": \"f72b237d53a\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"id": "your-request-id",
"message": "Processing..."
}{
"success": false,
"error": "Bad request. Please check documentation"
}{
"success": false,
"error": "Your are not authorized. Please check your api_key."
}{
"success": false,
"message": "You ran out of credits"
}{
"success": false,
"error": "An error occured"
}Waterfall enrichment - Get phone and email
Enrich leads
Submit up to 100 leads for waterfall email and phone enrichment.
POST
/
async
Enrich leads
curl --request POST \
--url https://app.bettercontact.rocks/api/v2/async \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"data": [
{
"first_name": "Elon",
"last_name": "Musk",
"company": "Tesla",
"company_domain": "tesla.com",
"linkedin_url": "https://www.linkedin.com/in/elonmusk",
"custom_fields": {
"uuid": "crm-8821",
"list_name": "Q3 outbound"
}
}
],
"enrich_email_address": true,
"enrich_phone_number": false,
"enrich_profile": false,
"verify_catch_all": false,
"webhook": "https://example.com/bettercontact/results",
"push_contact_individually": false,
"contact_webhook": "<string>",
"process_flow": "<string>",
"timeout_seconds": 240,
"workspace_id": "f72b237d53a"
}
'import requests
url = "https://app.bettercontact.rocks/api/v2/async"
payload = {
"data": [
{
"first_name": "Elon",
"last_name": "Musk",
"company": "Tesla",
"company_domain": "tesla.com",
"linkedin_url": "https://www.linkedin.com/in/elonmusk",
"custom_fields": {
"uuid": "crm-8821",
"list_name": "Q3 outbound"
}
}
],
"enrich_email_address": True,
"enrich_phone_number": False,
"enrich_profile": False,
"verify_catch_all": False,
"webhook": "https://example.com/bettercontact/results",
"push_contact_individually": False,
"contact_webhook": "<string>",
"process_flow": "<string>",
"timeout_seconds": 240,
"workspace_id": "f72b237d53a"
}
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({
data: [
{
first_name: 'Elon',
last_name: 'Musk',
company: 'Tesla',
company_domain: 'tesla.com',
linkedin_url: 'https://www.linkedin.com/in/elonmusk',
custom_fields: {uuid: 'crm-8821', list_name: 'Q3 outbound'}
}
],
enrich_email_address: true,
enrich_phone_number: false,
enrich_profile: false,
verify_catch_all: false,
webhook: 'https://example.com/bettercontact/results',
push_contact_individually: false,
contact_webhook: '<string>',
process_flow: '<string>',
timeout_seconds: 240,
workspace_id: 'f72b237d53a'
})
};
fetch('https://app.bettercontact.rocks/api/v2/async', 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://app.bettercontact.rocks/api/v2/async",
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([
'data' => [
[
'first_name' => 'Elon',
'last_name' => 'Musk',
'company' => 'Tesla',
'company_domain' => 'tesla.com',
'linkedin_url' => 'https://www.linkedin.com/in/elonmusk',
'custom_fields' => [
'uuid' => 'crm-8821',
'list_name' => 'Q3 outbound'
]
]
],
'enrich_email_address' => true,
'enrich_phone_number' => false,
'enrich_profile' => false,
'verify_catch_all' => false,
'webhook' => 'https://example.com/bettercontact/results',
'push_contact_individually' => false,
'contact_webhook' => '<string>',
'process_flow' => '<string>',
'timeout_seconds' => 240,
'workspace_id' => 'f72b237d53a'
]),
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://app.bettercontact.rocks/api/v2/async"
payload := strings.NewReader("{\n \"data\": [\n {\n \"first_name\": \"Elon\",\n \"last_name\": \"Musk\",\n \"company\": \"Tesla\",\n \"company_domain\": \"tesla.com\",\n \"linkedin_url\": \"https://www.linkedin.com/in/elonmusk\",\n \"custom_fields\": {\n \"uuid\": \"crm-8821\",\n \"list_name\": \"Q3 outbound\"\n }\n }\n ],\n \"enrich_email_address\": true,\n \"enrich_phone_number\": false,\n \"enrich_profile\": false,\n \"verify_catch_all\": false,\n \"webhook\": \"https://example.com/bettercontact/results\",\n \"push_contact_individually\": false,\n \"contact_webhook\": \"<string>\",\n \"process_flow\": \"<string>\",\n \"timeout_seconds\": 240,\n \"workspace_id\": \"f72b237d53a\"\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://app.bettercontact.rocks/api/v2/async")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": [\n {\n \"first_name\": \"Elon\",\n \"last_name\": \"Musk\",\n \"company\": \"Tesla\",\n \"company_domain\": \"tesla.com\",\n \"linkedin_url\": \"https://www.linkedin.com/in/elonmusk\",\n \"custom_fields\": {\n \"uuid\": \"crm-8821\",\n \"list_name\": \"Q3 outbound\"\n }\n }\n ],\n \"enrich_email_address\": true,\n \"enrich_phone_number\": false,\n \"enrich_profile\": false,\n \"verify_catch_all\": false,\n \"webhook\": \"https://example.com/bettercontact/results\",\n \"push_contact_individually\": false,\n \"contact_webhook\": \"<string>\",\n \"process_flow\": \"<string>\",\n \"timeout_seconds\": 240,\n \"workspace_id\": \"f72b237d53a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.bettercontact.rocks/api/v2/async")
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 \"data\": [\n {\n \"first_name\": \"Elon\",\n \"last_name\": \"Musk\",\n \"company\": \"Tesla\",\n \"company_domain\": \"tesla.com\",\n \"linkedin_url\": \"https://www.linkedin.com/in/elonmusk\",\n \"custom_fields\": {\n \"uuid\": \"crm-8821\",\n \"list_name\": \"Q3 outbound\"\n }\n }\n ],\n \"enrich_email_address\": true,\n \"enrich_phone_number\": false,\n \"enrich_profile\": false,\n \"verify_catch_all\": false,\n \"webhook\": \"https://example.com/bettercontact/results\",\n \"push_contact_individually\": false,\n \"contact_webhook\": \"<string>\",\n \"process_flow\": \"<string>\",\n \"timeout_seconds\": 240,\n \"workspace_id\": \"f72b237d53a\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"id": "your-request-id",
"message": "Processing..."
}{
"success": false,
"error": "Bad request. Please check documentation"
}{
"success": false,
"error": "Your are not authorized. Please check your api_key."
}{
"success": false,
"message": "You ran out of credits"
}{
"success": false,
"error": "An error occured"
}Provide
first_name, last_name and either company or company_domain. company_domain gives
materially better results than a company name. Add linkedin_url whenever you have it, and always
when you request enrich_phone_number.This endpoint is asynchronous. A
201 means the batch was accepted, not that it was enriched.
Keep the returned id and read Request statuses before you build your
polling loop.Submissions are not idempotent: retrying a POST that had actually succeeded enriches the
same leads twice and consumes credits twice.custom_fields comes back untouched in the results, which is the simplest way
to reconcile enriched leads with your own records.
To keep requests apart per team or campaign, pass workspace_id: the id shown on the workspace page in
the app, next to its name. Without it, or with an id that does not belong to your organization, the
request lands in your default workspace.Body
application/json
Data to enrich
URL that receives the full result payload as soon as the whole batch is done. Recommended over polling. See Webhooks.
Example:
"https://example.com/bettercontact/results"
Workspace the request is filed in. Use the workspace id shown on the workspace page in the app (next to its name, with a copy button). When omitted, unknown, or not part of your organization, the request goes to your default workspace and is processed normally: no error is returned.
Example:
"f72b237d53a"
Was this page helpful?