Enrich Contact
curl --request POST \
--url https://api.example.com/v1/enrich/contact \
--header 'Content-Type: application/json' \
--data '
{
"contact_id": "<string>",
"fields": [
{}
],
"overwrite": true
}
'import requests
url = "https://api.example.com/v1/enrich/contact"
payload = {
"contact_id": "<string>",
"fields": [{}],
"overwrite": True
}
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({contact_id: '<string>', fields: [{}], overwrite: true})
};
fetch('https://api.example.com/v1/enrich/contact', 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/enrich/contact",
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([
'contact_id' => '<string>',
'fields' => [
[
]
],
'overwrite' => true
]),
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/enrich/contact"
payload := strings.NewReader("{\n \"contact_id\": \"<string>\",\n \"fields\": [\n {}\n ],\n \"overwrite\": true\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/enrich/contact")
.header("Content-Type", "application/json")
.body("{\n \"contact_id\": \"<string>\",\n \"fields\": [\n {}\n ],\n \"overwrite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/enrich/contact")
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 \"contact_id\": \"<string>\",\n \"fields\": [\n {}\n ],\n \"overwrite\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"contact": {},
"fields_updated": [
{}
],
"source": "<string>",
"confidence": 123,
"credits_remaining": 123
}
}Enrichment
Enrich Contact
Fill in missing fields on an existing contact using third-party data providers
POST
/
v1
/
enrich
/
contact
Enrich Contact
curl --request POST \
--url https://api.example.com/v1/enrich/contact \
--header 'Content-Type: application/json' \
--data '
{
"contact_id": "<string>",
"fields": [
{}
],
"overwrite": true
}
'import requests
url = "https://api.example.com/v1/enrich/contact"
payload = {
"contact_id": "<string>",
"fields": [{}],
"overwrite": True
}
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({contact_id: '<string>', fields: [{}], overwrite: true})
};
fetch('https://api.example.com/v1/enrich/contact', 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/enrich/contact",
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([
'contact_id' => '<string>',
'fields' => [
[
]
],
'overwrite' => true
]),
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/enrich/contact"
payload := strings.NewReader("{\n \"contact_id\": \"<string>\",\n \"fields\": [\n {}\n ],\n \"overwrite\": true\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/enrich/contact")
.header("Content-Type", "application/json")
.body("{\n \"contact_id\": \"<string>\",\n \"fields\": [\n {}\n ],\n \"overwrite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/enrich/contact")
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 \"contact_id\": \"<string>\",\n \"fields\": [\n {}\n ],\n \"overwrite\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"contact": {},
"fields_updated": [
{}
],
"source": "<string>",
"confidence": 123,
"credits_remaining": 123
}
}This endpoint consumes enrichment credits. Each successful enrichment costs 1 credit. If the workspace’s balance is zero, the API returns
402 insufficient_credits and the contact is not modified.Request
Headers
Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
string
Optional UUID to deduplicate retried enrichment requests within 24 hours. The credit is charged only on the first successful call.
Body Parameters
string
required
UUID of the contact to enrich.
array
Optional whitelist of fields to update. Defaults to every safe-to-fill field (
job_title, company_name, linkedin_url, phone, location, seniority).boolean
default:"false"
When
true, the enrichment can overwrite non-empty fields. By default only empty fields are populated.Response
object
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID.
curl -X POST \
https://data.leadlex.com/functions/v1/api-gateway/v1/enrich/contact \
-H "Authorization: Bearer wbk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"contact_id": "123e4567-e89b-12d3-a456-426614174000"
}'
import requests
API_KEY = "wbk_your_api_key_here"
BASE_URL = "https://data.leadlex.com/functions/v1/api-gateway"
r = requests.post(
f"{BASE_URL}/v1/enrich/contact",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
},
json={"contact_id": "123e4567-e89b-12d3-a456-426614174000"},
)
print(r.json()["data"]["fields_updated"])
const res = await fetch(
'https://data.leadlex.com/functions/v1/api-gateway/v1/enrich/contact',
{
method: 'POST',
headers: {
'Authorization': 'Bearer wbk_your_api_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({ contact_id: '123e4567-e89b-12d3-a456-426614174000' }),
}
);
const { data } = await res.json();
console.log(data.fields_updated);
Example Response
{
"data": {
"contact": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"full_name": "Jane Doe",
"email": "jane@acme.com",
"job_title": "General Counsel",
"company_name": "Acme Corp",
"linkedin_url": "https://linkedin.com/in/janedoe",
"phone": "+1-555-0100",
"location": "New York, NY, US"
},
"fields_updated": ["job_title", "company_name", "linkedin_url", "location"],
"source": "vendor_a",
"confidence": 0.91,
"credits_remaining": 4871
}
}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | contact_id missing or malformed |
| 401 | invalid_key | Invalid or expired API key |
| 402 | insufficient_credits | Workspace credit balance is exhausted |
| 403 | insufficient_permissions | Missing write:enrich permission |
| 404 | not_found | Contact not found in this workspace |
| 409 | no_match | Upstream providers returned no data for the contact |
| 429 | rate_limited | Rate limit exceeded |