Get an async operation
curl --request GET \
--url https://api.lemlist.com/api/async-operations/{asyncOperationId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/async-operations/{asyncOperationId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/async-operations/{asyncOperationId}', 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/async-operations/{asyncOperationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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/async-operations/{asyncOperationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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": {
"id": "aop_ExAmPlE7k2M9q4R1x",
"type": "peopleDatabase.pushContacts",
"status": "running",
"startedAt": "2026-01-15T10:00:00.000Z"
}
}
Async operations
Get an async operation
Reads the state of work an endpoint started in the background, from the asyncOperationId it answered.
GET
/
async-operations
/
{asyncOperationId}
Get an async operation
curl --request GET \
--url https://api.lemlist.com/api/async-operations/{asyncOperationId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/async-operations/{asyncOperationId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/async-operations/{asyncOperationId}', 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/async-operations/{asyncOperationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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/async-operations/{asyncOperationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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": {
"id": "aop_ExAmPlE7k2M9q4R1x",
"type": "peopleDatabase.pushContacts",
"status": "running",
"startedAt": "2026-01-15T10:00:00.000Z"
}
}
An endpoint that runs long work in the background answers
202 with an asyncOperationId instead of its result, for example Push People database to contacts with filters. Read the operation here until its status is done (read result), failed (read error) or interrupted (the server restarted: send the same request again to finish the work).Pass
waitSeconds=60: the call holds until the operation ends or the minute runs out, so you follow most operations in one or two calls instead of polling.Any member of your team can read your team’s operations; another team’s id answers
404. Operations are kept 7 days.Authorizations
Path Parameters
Query Parameters
Was this page helpful?