Enrich Company
curl --request POST \
--url https://api.example.com/v1/enrich/company \
--header 'Content-Type: application/json' \
--data '
{
"company_id": "<string>",
"domain": "<string>",
"fields": [
{}
],
"overwrite": true
}
'import requests
url = "https://api.example.com/v1/enrich/company"
payload = {
"company_id": "<string>",
"domain": "<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({company_id: '<string>', domain: '<string>', fields: [{}], overwrite: true})
};
fetch('https://api.example.com/v1/enrich/company', 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/company",
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([
'company_id' => '<string>',
'domain' => '<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/company"
payload := strings.NewReader("{\n \"company_id\": \"<string>\",\n \"domain\": \"<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/company")
.header("Content-Type", "application/json")
.body("{\n \"company_id\": \"<string>\",\n \"domain\": \"<string>\",\n \"fields\": [\n {}\n ],\n \"overwrite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/enrich/company")
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 \"company_id\": \"<string>\",\n \"domain\": \"<string>\",\n \"fields\": [\n {}\n ],\n \"overwrite\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"company": {},
"fields_updated": [
{}
],
"source": "<string>",
"confidence": 123,
"credits_remaining": 123
}
}Enrichment
Enrich Company
Populate firmographic data for a company record from domain, name, or existing company ID
POST
/
v1
/
enrich
/
company
Enrich Company
curl --request POST \
--url https://api.example.com/v1/enrich/company \
--header 'Content-Type: application/json' \
--data '
{
"company_id": "<string>",
"domain": "<string>",
"fields": [
{}
],
"overwrite": true
}
'import requests
url = "https://api.example.com/v1/enrich/company"
payload = {
"company_id": "<string>",
"domain": "<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({company_id: '<string>', domain: '<string>', fields: [{}], overwrite: true})
};
fetch('https://api.example.com/v1/enrich/company', 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/company",
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([
'company_id' => '<string>',
'domain' => '<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/company"
payload := strings.NewReader("{\n \"company_id\": \"<string>\",\n \"domain\": \"<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/company")
.header("Content-Type", "application/json")
.body("{\n \"company_id\": \"<string>\",\n \"domain\": \"<string>\",\n \"fields\": [\n {}\n ],\n \"overwrite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/enrich/company")
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 \"company_id\": \"<string>\",\n \"domain\": \"<string>\",\n \"fields\": [\n {}\n ],\n \"overwrite\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"company": {},
"fields_updated": [
{}
],
"source": "<string>",
"confidence": 123,
"credits_remaining": 123
}
}This endpoint consumes enrichment credits. Each successful enrichment costs 1 credit. Requests that fail to match any provider do not consume a credit and return
409 no_match. If the workspace’s balance is exhausted, the API returns 402 insufficient_credits.Request
Headers
Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
string
Optional UUID for deduplicating retries within 24 hours.
Body Parameters
string
UUID of an existing company record. Supply either
company_id or domain.string
Canonical company domain (e.g.
acme.com). Used when you do not yet have a company record. The API will create or return the matching company.array
Optional whitelist of firmographic fields:
name, industry, size, founded_year, description, hq_location, logo_url, linkedin_url, tech_stack.boolean
default:"false"
When
true, enrichment overwrites non-empty fields. Defaults to false (fill-only mode).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/company \
-H "Authorization: Bearer wbk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"domain": "acme.com"}'
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/company",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
},
json={"domain": "acme.com"},
)
print(r.json()["data"]["company"]["name"])
const res = await fetch(
'https://data.leadlex.com/functions/v1/api-gateway/v1/enrich/company',
{
method: 'POST',
headers: {
'Authorization': 'Bearer wbk_your_api_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({ domain: 'acme.com' }),
}
);
const { data } = await res.json();
console.log(data.company.name);
Example Response
{
"data": {
"company": {
"id": "c0mpany-uuid-0001",
"name": "Acme Corp",
"domain": "acme.com",
"industry": "Legal Services",
"size": "201-500",
"founded_year": 1998,
"hq_location": "New York, NY, US",
"linkedin_url": "https://linkedin.com/company/acme"
},
"fields_updated": ["industry", "size", "founded_year", "hq_location"],
"source": "vendor_a",
"confidence": 0.87,
"credits_remaining": 4870
}
}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Neither company_id nor domain provided |
| 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 | Supplied company_id does not exist in this workspace |
| 409 | no_match | Upstream providers returned no data for the input |
| 429 | rate_limited | Rate limit exceeded |