> ## 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: Post Contact Sourcing

> Find the buying committee (decision makers, users, influencers) at one or more Lemlist companies. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Find the buying committee (decision makers, users, influencers) at one or more Lemlist companies.

> [!NOTE]
>
> Tool ID: `lemlist_post_contact_sourcing`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'lemlist_post_contact_sourcing',
  {
    "companyIds": [
      "company_123"
    ]
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute lemlist_post_contact_sourcing --input '{
  "companyIds": [
    "company_123"
  ]
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "results": [
      {
        "companyId": "company_123",
        "runId": "run_123",
        "status": "started"
      }
    ],
    "errors": [
      {
        "companyId": "company_123",
        "code": "example",
        "message": "Example message"
      }
    ]
  }
}
```

Use `deepline describe lemlist_post_contact_sourcing --json` for the latest machine-readable contract.

## Input reference

Starts an AI contact-sourcing run for one or more accounts: sources each company's employees from the People Database and classifies them into a buying committee (decision maker / user / influencer) with an ICP fit score. One account or two hundred, same call — pass a list of one. Runs are asynchronous: the response carries a `runId` per account. Poll `GET /contact-sourcing` or subscribe to the `contactSourcingDone` webhook for the result. The call answers `200` even when some accounts could not be started — one unrunnable account among 200 is not a reason to fail the rest. Read both `results` and `errors`. By default an account that already has a committee is not re-run: its previous run comes back with `status: "reused"` and nothing is charged. `overwrite: true` forces a fresh run, but never stacks a second one on a run still going — that one is returned as `reused` instead, so See the live schema below for the complete notes.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.companyIds` | `array` | Yes | — | Accounts to source contacts for (`cpn_xxx` format). Maximum items: 200. |
| `payload.overwrite` | `boolean` | No | `false` | — |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Starts an AI contact-sourcing run for one or more accounts: sources each company's employees from the People Database and classifies them into a buying committee (decision maker / user / influencer) with an ICP fit score. One account or two hundred, same call — pass a list of one. Runs are asynchronous: the response carries a `runId` per account. Poll `GET /contact-sourcing` or subscribe to the `contactSourcingDone` webhook for the result. The call answers `200` even when some accounts could not be started — one unrunnable account among 200 is not a reason to fail the rest. Read both `results` and `errors`. By default an account that already has a committee is not re-run: its previous run comes back with `status: \"reused\"` and nothing is charged. `overwrite: true` forces a fresh run, but never stacks a second one on a run still going — that one is returned as `reused` instead, so retrying a timed-out request cannot charge you twice. Takes lemlist company ids only. To start from a domain or LinkedIn URL, resolve it first with `GET /companies?idsOrDomains=`.",
    "properties": {
      "companyIds": {
        "type": "array",
        "description": "Accounts to source contacts for (`cpn_xxx` format).",
        "maxItems": 200,
        "items": {
          "type": "string"
        }
      },
      "overwrite": {
        "type": "boolean",
        "default": false
      }
    },
    "required": [
      "companyIds"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.results` | `array` | No | — | — |
| `result.data.results[].companyId` | `string` | No | — | — |
| `result.data.results[].runId` | `string` | No | — | — |
| `result.data.results[].status` | `"started" \| "reused"` | No | — | Allowed: `started`, `reused`. |
| `result.data.errors` | `array` | No | — | — |
| `result.data.errors[].companyId` | `string` | No | — | — |
| `result.data.errors[].code` | `string` | No | — | — |
| `result.data.errors[].message` | `string` | No | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "companyId": {
                  "type": "string"
                },
                "runId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "started",
                    "reused"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "companyId": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

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

## Related documentation

* [Lemlist provider guide](https://deepline.com/docs/providers/lemlist/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.