Skip to main content
GET
/
campaigns
/
{campaignId}
/
export
/
{exportId}
/
status
Get Campaign Export Status
curl --request GET \
  --url https://api.lemlist.com/api/campaigns/{campaignId}/export/{exportId}/status \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://api.lemlist.com/api/campaigns/{campaignId}/export/{exportId}/status"

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/campaigns/{campaignId}/export/{exportId}/status', 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/campaigns/{campaignId}/export/{exportId}/status")

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/campaigns/{campaignId}/export/{exportId}/status",
  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;
}
{ "ok": true, "status": { "_id": "axp_eVuZ9rVr4yYWrnPWA", "id": "axp_eVuZ9rVr4yYWrnPWA", "teamId": "tea_8QvkOiBfPdb2ZRhHi", "campaignId": "cam_lBCWmqEWI399hJZOd", "campaignName": "lemstage", "status": "done", "startedAt": "2025-10-27T07:53:16.267Z", "progressIndex": 6, "progressTime": 1761551597286, "progressLastStepDuration": 0, "progressType": "done", "progress": 0, "total": 0, "fileSize": 23654, "endedAt": "2025-10-27T07:53:17.286Z", "url": "https://api.lemlist.com/api/files/exports/fil_axp_7guBefhehehe.csv" } }
You can use the endpoint initiated with the Start Campaign Stats Export endpoint.

Status values

The status field in the response can be:
  • pending: The export is still being processed
  • done: The export is complete and ready to download
  • error: An error occurred during the export

Expiration times

  • Status availability: Export statuses are available for 2 hours only. An export still pending after 2 hours will be considered failed and return a 404 error.
  • File availability: Once you obtain the CSV file URL, you must download it within 24 hours. After that, the file will be deleted.

Polling strategy

Check the status periodically until you receive a status other than "pending". We recommend:
  • Starting with a 5-second interval
  • Increasing to 10-15 seconds for longer exports
  • Stopping immediately when status is "done" or "error"

Download URL

When the status is "done", the response will include a url field containing the download link for the CSV file.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

campaignId
string
required

The unique identifier of the campaign that was exported

exportId
string
required

The unique identifier of the export returned by the /start endpoint

Response

Export status retrieved successfully

ok
boolean
status
object