Skip to main content
An enrichment is one request to find data about one person: find their email (find_email), find their phone number (find_phone), verify an email (verify) or enrich their LinkedIn profile (linkedin_enrichment). Start one with Enrich Data, Enrich Lead or many at once with Bulk Enrich Data. Each call answers with an enrichment id (enr_…) right away and the work runs in the background. There are two ways to get the result:
  1. Webhooks (recommended): lemlist calls your endpoint once the enrichment is over. See Webhooks below.
  2. Polling: call Get Enrichment Result with the id until enrichmentStatus is no longer in-progress.

Result keys

Polling and webhooks carry the same per-workflow results, under different key names: A key is present only for a requested workflow that produced a result. A find_email or find_phone that found nothing still produced a result: its key is present with notFound: true. failedWorkflows lists the requested workflows that ended without any result; they have no key in data. A workflow lemlist runs on its own as a dependency of a requested one is never listed. failedWorkflows is only present when it is not empty. When the person opted out of enrichment, the value is never returned: notFound is true, as when nothing was found.

Request errors

When an enrichment cannot be started, the start call answers with a code naming why and a message explaining it. Bulk rows carry them as error and message. message is a human-readable text that may be translated to the language of the API user: branch on code (error on bulk rows), never on message. On Enrich Data and Enrich Lead, the HTTP status depends on the code: 403 for CREDITS_USAGE_FORBIDDEN, 503 for TEAM_IN_ERROR and SYSTEM_DISABLED (retry later), 400 for the others.

Failure codes

An enrichment that started but failed as a whole answers failed on Get Enrichment Result and sends an enrichmentError webhook, with a code and a reason. reason is a human-readable text that may be translated to the language of the API user: branch on code, never on reason.

Webhooks

Enrichments send two webhook events: They are delivered to every webhook your team registered for the event with Add Webhook, and to the webhookUrl passed when the enrichment was started. A POST is sent with a JSON body holding the event type and a data array. The array can hold several enrichments of the same event: lemlist may group them in one call. Each enrichmentDone item: Each enrichmentError item:

An enrichment: one request to find an email or a phone number, verify an email or enrich a LinkedIn profile for one person. This is the shape GET /enrich/{enrichId} answers with; webhooks carry the same results under other key names (see the Webhooks section).

enrichmentId
string

Identifier of the enrichment

enrichmentStatus
enum<string>

Lifecycle state of the enrichment, not to be confused with data.email.status. Each state comes with its own HTTP status: done 200, in-progress 202, failed 400, not-found 404. A cancelled enrichment answers done.

Available options:
done,
in-progress,
failed,
not-found
input
object

The inputs the enrichment was started with, echoed back. Absent on not-found.

data
object

What the enrichment found, keyed by result. Empty unless enrichmentStatus is done. A key is present only for a requested workflow that produced a result. A find_email or find_phone that found nothing still has its key, with notFound: true. A requested workflow that ended without any result has no key and is listed in failedWorkflows.

failedWorkflows
enum<string>[]

On done, the requested workflows that ended without any result; they have no key in data. A find_email or find_phone that found nothing is not listed: it answers notFound: true in data. A workflow lemlist runs on its own as a dependency of a requested one is never listed. Only present when not empty.

Available options:
find_email,
find_phone,
verify,
linkedin_enrichment
code
enum<string>

On failed, why the enrichment failed. An unknown or missing cause reads as FAILED_TO_PROCESS.

Available options:
FAILED_TO_PROCESS,
INVALID_INPUT,
PROVIDER_TIMEOUT,
PROVIDER_REJECTED
reason
string

On failed, a human-readable explanation of code, possibly translated to the language of the API user. Branch on code, never on reason.

error
string

On failed, the raw cause stored on the enrichment, absent when none was stored; prefer code. On not-found, Enrichment not found.