Engage Company
curl --request POST \
--url https://api.lemlist.com/api/companies/{companyId}/engage \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/companies/{companyId}/engage"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/companies/{companyId}/engage', 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/companies/{companyId}/engage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/companies/{companyId}/engage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"campaignId": "cam_A1B2C3D4E5F6G7H8I9",
"created": true,
"shouldReviewLeads": true
}
}{
"error": "Wrong param company id",
"code": "WRONG_PARAM_COMPANY_ID"
}{
"error": "Beta is not enabled",
"code": "BETA_NOT_ENABLED"
}{
"error": "This company no longer exists",
"code": "ABS_ENGAGE_COMPANY_NOT_FOUND"
}{
"error": "This company is already being engaged, try again in a moment",
"code": "ABS_ENGAGE_COMPANY_IN_PROGRESS"
}Companies
Engage Company
Opens the account-based (ABM) campaign of a company.
POST
/
companies
/
{companyId}
/
engage
Engage Company
curl --request POST \
--url https://api.lemlist.com/api/companies/{companyId}/engage \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/companies/{companyId}/engage"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/companies/{companyId}/engage', 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/companies/{companyId}/engage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/companies/{companyId}/engage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"campaignId": "cam_A1B2C3D4E5F6G7H8I9",
"created": true,
"shouldReviewLeads": true
}
}{
"error": "Wrong param company id",
"code": "WRONG_PARAM_COMPANY_ID"
}{
"error": "Beta is not enabled",
"code": "BETA_NOT_ENABLED"
}{
"error": "This company no longer exists",
"code": "ABS_ENGAGE_COMPANY_NOT_FOUND"
}{
"error": "This company is already being engaged, try again in a moment",
"code": "ABS_ENGAGE_COMPANY_IN_PROGRESS"
}Beta: this endpoint requires the ABM beta on your team. Without it, the call
answers
403 with BETA_NOT_ENABLED.Acme ABM Q4,
with the company’s contacts already added as leads. The call takes no body.
One live ABM campaign per company
Calling again returns the same campaign, withcreated: false, until that
campaign is archived or ended. Concurrent calls on one company are safe: one of
them creates the campaign and the others return it.
A reopened campaign with no lead is filled again with the company’s contacts,
since the company may have gained some since it was engaged.
| Code | Meaning |
|---|---|
200 | Done. created tells whether this call created the campaign, shouldReviewLeads whether its leads were just added. |
400 | companyId is malformed. |
403 | The ABM beta is not enabled. Nothing is written. |
404 | The company does not exist in your team. |
409 | Another engage of this company is still running. Retry in a moment. |
Authorizations
Response
The company's ABM campaign. created is true when this call created it; shouldReviewLeads is true when its leads were just added, so they are worth reviewing before writing the sequence.
Was this page helpful?