> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Lemlist Enrich Operations: Inputs, Cost & CLI Example

> Bulk enriching records with Lemlist enrich API. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=lemlist_bulk_enrich_data:{"requests":"{{requests}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                  | Type     | Required | Default | Description |
| --------------------- | -------- | -------- | ------- | ----------- |
| `payload.requests`    | `array`  | Yes      |         |             |
| `payload.webhook_url` | `string` | No       |         |             |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Bulk enrich data using Lemlist enrich endpoint.",
    "properties": {
      "requests": {
        "type": "array",
        "minItems": 1,
        "maxItems": 500,
        "items": {
          "type": "object",
          "properties": {
            "enrichment_requests": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "string",
                "enum": [
                  "find_email",
                  "find_phone",
                  "verify",
                  "linkedin_enrichment"
                ]
              }
            },
            "input": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "format": "email"
                },
                "linkedin_url": {
                  "type": "string",
                  "format": "uri"
                },
                "first_name": {
                  "type": "string"
                },
                "last_name": {
                  "type": "string"
                },
                "company_domain": {
                  "type": "string"
                },
                "company_name": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "metadata": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "additionalProperties": {}
                }
              ]
            }
          },
          "required": [
            "enrichment_requests"
          ],
          "additionalProperties": false
        }
      },
      "webhook_url": {
        "type": "string",
        "format": "uri"
      }
    },
    "required": [
      "requests"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name            | Type     | Required | Default | Description |
| --------------- | -------- | -------- | ------- | ----------- |
| `result.status` | `string` | Yes      |         |             |
| `result.result` | `object` | Yes      |         |             |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "status": {
        "type": "string"
      },
      "result": {
        "type": "object",
        "properties": {
          "enrich_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "records_count": {
            "type": "integer"
          }
        },
        "required": [
          "enrich_id",
          "status",
          "records_count"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "status",
      "result"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute lemlist_bulk_enrich_data --payload '{
  "requests": "array"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Provider API Context

<details>
  <summary>Show provider reference (optional)</summary>

  ````md theme={null}
  > Performs batch enrichment for up to 500 entities to find emails, phone numbers, or LinkedIn data.

  # Bulk Enrich Data

  &lt;Warning>
    Unlike other endpoints, this one starts with `/v2/enrichments`.
  &lt;/Warning>

  ## How to use the endpoint

  The bulk enrichment API is ideal for:

  * Processing large lists of prospects efficiently
  * Enriching CRM data in batches
  * Finding and verifying multiple contacts simultaneously
  * Automating data enrichment workflows at scale

  ### Enrichment Types

  | Type                  | Required Input                                                                              | Description                       |
  | --------------------- | ------------------------------------------------------------------------------------------- | --------------------------------- |
  | `find_email`          | `linkedinUrl` OR (`firstName` + `lastName` + `companyName` + `companyDomain`)               | Find and verify email addresses   |
  | `find_phone`          | `linkedinUrl`                                                                               | Find phone numbers                |
  | `verify`              | `email`                                                                                     | Verify email deliverability       |
  | `linkedin_enrichment` | `linkedinUrl` OR `email` OR (`firstName` + `lastName` + (`companyName` OR `companyDomain`)) | Enrich with LinkedIn profile data |

  ### Metadata

  The `metadata` field can be a string or an object. This data will be returned in both the API response and webhook notifications, allowing you to track and correlate enrichment requests.

  ## Response

  The API returns an array where each element corresponds to a request in the input array. Successful requests return an enrichment ID, while failed requests return an error code.

  &lt;CodeGroup>
    ```json success theme={"theme":"dracula"}
    {
      "id": "enr_cawQhM9N3pWkqw2Yt",
      "metadata": {
        "some_id": "some_id"
      }
    }
    ```

    ```json error theme={"theme":"dracula"}
    {
      "error": "MISSING_INPUTS",
      "metadata": "some_id"
    }
    ```
  &lt;/CodeGroup>

  ## Getting Results

  &lt;Note>
    Check [Enrich Data](/api-reference/endpoints/enrich/enrich-data) for details on the enrichment result structure.
  &lt;/Note>

  Since enrichment is asynchronous, you can retrieve results in two ways:

  1. **Polling**: Use the [Get Enrichment Result](/api-reference/endpoints/enrich/get-enrichment-result) endpoint with the returned enrichment ID
  2. **Webhooks**: Provide a `webhookUrl` query parameter to receive notifications when enrichments complete

  Learn more about webhooks in the [Enrich object definition](/api-reference/objects-definitions/enrich#webhooks).

  ## Error Codes

  | Error Code                        | Description                                                         |
  | --------------------------------- | ------------------------------------------------------------------- |
  | `WRONG_INPUT_FORMAT`              | The input must be an object containing at least one valid field     |
  | `WRONG_METADATA_FORMAT`           | The metadata field must be a string or an object                    |
  | `NO_WORKFLOW_REQUESTED`           | At least one enrichment type must be specified                      |
  | `WRONG_ENRICHMENT_REQUEST_FORMAT` | The enrichmentRequests field must be an array                       |
  | `UNAUTHORIZED_WORKFLOW_REQUESTED` | Invalid enrichment type specified                                   |
  | `TOO_MANY_ENRICHMENTS_REQUESTED`  | Maximum 500 enrichments per request                                 |
  | `NO_ENRICHMENTS_REQUESTED`        | The body must contain at least one enrichment                       |
  | `WRONG_BODY_FORMAT`               | The body must be a valid JSON array                                 |
  | `MISSING_INPUTS`                  | Required input fields are missing for the requested enrichment type |
  | `MISSING_EMAIL`                   | Email is required for verify enrichment                             |
  | `MISSING_LINKEDIN_URL`            | LinkedIn URL is required for this enrichment type                   |

  ## Limits

  * **Maximum requests per call**: 500 enrichments
  * **Rate limits**: Standard API rate limits apply (20 requests per 2 seconds)
  * **Credits**: Each enrichment type consumes credits from your team's balance

  See [lemlist API credits](/api-reference/objects-definitions/credits) for more information about credit consumption.

  ## 29. Enrich Data

  Source: https://developer.lemlist.com/api-reference/endpoints/enrich/enrich-data.md
  ````
</details>

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.
* Billing mode: `no_bill`.
