> ## 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

> Run Contact Sourcing. Lemlist Post Contact Sourcing reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Run Contact Sourcing.

<Info>
  Tool ID: `lemlist_post_contact_sourcing`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
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={null}
deepline tools execute lemlist_post_contact_sourcing --input '{
  "companyIds": [
    "company_123"
  ]
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "results": [
      {
        "companyId": "company_123",
        "runId": "run_123",
        "status": "started"
      }
    ],
    "errors": [
      {
        "companyId": "company_123",
        "code": "example",
        "message": "Example message"
      }
    ]
  }
}
```

Use `deepline tools get 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={null}
  {
    "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={null}
  {
    "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](/docs/providers/lemlist/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


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