Connect Provider
curl --request PUT \
--url https://api.lemlist.com/api/v2/enrichments/providers/{providerId}/connection \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "lsh_live_0123456789abcdef9f3a"
}
'import requests
url = "https://api.lemlist.com/api/v2/enrichments/providers/{providerId}/connection"
payload = { "apiKey": "lsh_live_0123456789abcdef9f3a" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: 'lsh_live_0123456789abcdef9f3a'})
};
fetch('https://api.lemlist.com/api/v2/enrichments/providers/{providerId}/connection', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/v2/enrichments/providers/{providerId}/connection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"lsh_live_0123456789abcdef9f3a\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/v2/enrichments/providers/{providerId}/connection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => 'lsh_live_0123456789abcdef9f3a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": "lusha",
"displayName": "Lusha",
"types": [
"email",
"phone"
],
"source": "external",
"connected": true
}
}{
"error": "This provider cannot be connected: only external providers hold your own API key",
"code": "ENRICHMENT_PROVIDER_NOT_EXTERNAL"
}{
"error": "Route unauthorized",
"code": "ROUTE_UNAUTHORIZED"
}{
"error": "Internal error",
"code": "INTERNAL_ERROR"
}Enrichment Providers
Connect Provider
Saves your own API key for an external enrichment provider, connecting it for your waterfalls.
PUT
/
v2
/
enrichments
/
providers
/
{providerId}
/
connection
Connect Provider
curl --request PUT \
--url https://api.lemlist.com/api/v2/enrichments/providers/{providerId}/connection \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "lsh_live_0123456789abcdef9f3a"
}
'import requests
url = "https://api.lemlist.com/api/v2/enrichments/providers/{providerId}/connection"
payload = { "apiKey": "lsh_live_0123456789abcdef9f3a" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: 'lsh_live_0123456789abcdef9f3a'})
};
fetch('https://api.lemlist.com/api/v2/enrichments/providers/{providerId}/connection', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/v2/enrichments/providers/{providerId}/connection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"lsh_live_0123456789abcdef9f3a\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/v2/enrichments/providers/{providerId}/connection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => 'lsh_live_0123456789abcdef9f3a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": "lusha",
"displayName": "Lusha",
"types": [
"email",
"phone"
],
"source": "external",
"connected": true
}
}{
"error": "This provider cannot be connected: only external providers hold your own API key",
"code": "ENRICHMENT_PROVIDER_NOT_EXTERNAL"
}{
"error": "Route unauthorized",
"code": "ROUTE_UNAUTHORIZED"
}{
"error": "Internal error",
"code": "INTERNAL_ERROR"
}Only external providers are connectable; find the ids with List Enrichment Providers.
A saved key is never checked against the provider — mistakes surface at enrichment time, not here.
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
Id of an external provider, as listed by GET /enrichments/providers.
Body
application/json
API key issued by the provider to your account.
Minimum string length:
1Response
Success
A data provider your team can place in a waterfall.
Show child attributes
Show child attributes
Was this page helpful?