> ## 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 V2 Campaigns Stats Batch

> Get Batch Campaign Stats. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Get Batch Campaign Stats.

<Info>
  Tool ID: `lemlist_post_v2_campaigns_stats_batch`
</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_v2_campaigns_stats_batch',
  {
    "campaignIds": [
      "campaign_123"
    ],
    "startDate": "2026-01-15T12:00:00Z",
    "endDate": "2026-01-15T12:00:00Z"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute lemlist_post_v2_campaigns_stats_batch --input '{
  "campaignIds": [
    "campaign_123"
  ],
  "startDate": "2026-01-15T12:00:00Z",
  "endDate": "2026-01-15T12:00:00Z"
}' --json
```

## Example response

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

```json theme={null}
{
  "data": {
    "results": [
      {
        "campaignId": "campaign_123",
        "nbLeads": 123,
        "nbLeadsLaunched": 123
      }
    ],
    "errors": [
      {
        "campaignId": "campaign_123",
        "error": "example"
      }
    ]
  }
}
```

Use `deepline tools get lemlist_post_v2_campaigns_stats_batch --json` for the latest machine-readable contract.

## Input reference

Retrieve detailed statistics for multiple campaigns in a single request, with filtering options by date, user, A/B testing, and communication channels. Processes up to 100 campaigns per request.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.campaignIds` | `array` | Yes | — | Array of campaign IDs to retrieve stats for Minimum items: 1. Maximum items: 100. |
| `payload.startDate` | `string` | Yes | — | Start date in ISO 8601 format |
| `payload.endDate` | `string` | Yes | — | End date in ISO 8601 format |
| `payload.sendUser` | `string` | No | — | Filter stats by send user. Format: `sendUserId\|sendUserEmail`. The sendUserId should begin with 'usr\_' and the sendUserEmail should be a valid sender email. If the param is specified, both sendUserId and sendUserEmail are mandatory. |
| `payload.ABSelected` | `"A" \| "B"` | No | — | A/B version filter Allowed: `A`, `B`. |
| `payload.channels` | `array` | No | — | Filter by communication channels |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Retrieve detailed statistics for multiple campaigns in a single request, with filtering options by date, user, A/B testing, and communication channels. Processes up to 100 campaigns per request.",
    "properties": {
      "campaignIds": {
        "type": "array",
        "description": "Array of campaign IDs to retrieve stats for",
        "minItems": 1,
        "maxItems": 100,
        "items": {
          "type": "string"
        }
      },
      "startDate": {
        "type": "string",
        "description": "Start date in ISO 8601 format"
      },
      "endDate": {
        "type": "string",
        "description": "End date in ISO 8601 format"
      },
      "sendUser": {
        "type": "string",
        "description": "Filter stats by send user. Format: `sendUserId|sendUserEmail`. The sendUserId should begin with 'usr_' and the sendUserEmail should be a valid sender email. If the param is specified, both sendUserId and sendUserEmail are mandatory."
      },
      "ABSelected": {
        "type": "string",
        "description": "A/B version filter",
        "enum": [
          "A",
          "B"
        ]
      },
      "channels": {
        "type": "array",
        "description": "Filter by communication channels",
        "items": {
          "type": "string",
          "enum": [
            "email",
            "linkedin",
            "others"
          ]
        }
      }
    },
    "required": [
      "campaignIds",
      "startDate",
      "endDate"
    ],
    "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 | — | Array of campaign stats results |
| `result.data.results[].campaignId` | `string` | No | — | The campaign ID |
| `result.data.results[].nbLeads` | `integer` | No | — | Total number of leads in the campaign |
| `result.data.results[].nbLeadsLaunched` | `integer` | No | — | Number of leads launched in the campaign |
| `result.data.results[].nbLeadsReached` | `integer` | No | — | Number of leads that were successfully reached |
| `result.data.results[].nbLeadsOpened` | `integer` | No | — | Number of leads that opened messages |
| `result.data.results[].nbLeadsInteracted` | `integer` | No | — | Number of leads that interacted with messages (clicked, replied) |
| `result.data.results[].nbLeadsAnswered` | `integer` | No | — | Number of leads that answered |
| `result.data.results[].nbLeadsInterested` | `integer` | No | — | Number of leads marked as interested |
| `result.data.results[].nbLeadsNotInterested` | `integer` | No | — | Number of leads marked as not interested |
| `result.data.results[].nbLeadsUnsubscribed` | `integer` | No | — | Number of leads that unsubscribed |
| `result.data.results[].nbLeadsInterrupted` | `integer` | No | — | Number of leads with interrupted sequences |
| `result.data.results[].messagesSent` | `integer` | No | — | Total number of messages sent |
| `result.data.results[].messagesNotSent` | `integer` | No | — | Number of messages that failed to send |
| `result.data.results[].messagesBounced` | `integer` | No | — | Number of messages that bounced |
| `result.data.results[].delivered` | `integer` | No | — | Number of messages successfully delivered |
| `result.data.results[].opened` | `integer` | No | — | Number of messages opened |
| `result.data.results[].clicked` | `integer` | No | — | Number of messages with clicks |
| `result.data.results[].replied` | `integer` | No | — | Number of messages that received replies |
| `result.data.results[].invitationAccepted` | `integer` | No | — | Number of LinkedIn invitations accepted |
| `result.data.results[].meetingBooked` | `integer` | No | — | Number of meetings booked |
| `result.data.results[].perChannel` | `object` | No | — | Campaign counters split by channel. Only the channels requested through the `channels` parameter are returned; when `channels` is omitted, all five are present. |
| `result.data.results[].perChannel.email` | `object` | No | — | Email counters. |
| `result.data.results[].perChannel.email.sent` | `integer` | No | — | Emails sent. |
| `result.data.results[].perChannel.email.delivered` | `integer` | No | — | Emails sent that did not bounce. |
| `result.data.results[].perChannel.email.notDelivered` | `integer` | No | — | Emails that failed to send. |
| `result.data.results[].perChannel.email.opened` | `integer` | No | — | Emails opened. |
| `result.data.results[].perChannel.email.clicked` | `integer` | No | — | Emails with a link clicked. |
| `result.data.results[].perChannel.email.replied` | `integer` | No | — | Emails replied to. |
| `result.data.results[].perChannel.email.bounced` | `integer` | No | — | Emails that bounced. |
| `result.data.results[].perChannel.email.unsubscribed` | `integer` | No | — | Unsubscribes from emails. |
| `result.data.results[].perChannel.linkedin` | `object` | No | — | LinkedIn counters. `sent` covers message sends only — regular messages, InMails and voice notes. It excludes invitations and non-message actions such as profile visits, follows, likes, comments and endorsements. |
| `result.data.results[].perChannel.linkedin.sent` | `integer` | No | — | LinkedIn messages successfully sent, across the three sub-types. |
| `result.data.results[].perChannel.linkedin.delivered` | `integer` | No | — | Always equal to `sent`. LinkedIn has no delivery confirmation distinct from the send itself, so a LinkedIn delivery rate is always 100% and carries no information. |
| `result.data.results[].perChannel.linkedin.notDelivered` | `integer` | No | — | Send attempts that failed. Disjoint from `sent` — a failed attempt is never also counted as sent — so the share of attempts that failed is `notDelivered / (sent + notDelivered)`. |
| `result.data.results[].perChannel.linkedin.opened` | `integer` | No | — | LinkedIn messages opened. |
| `result.data.results[].perChannel.linkedin.replied` | `integer` | No | — | LinkedIn messages replied to. |
| `result.data.results[].perChannel.linkedin.invitationAccepted` | `integer` | No | — | LinkedIn invitations accepted. |
| `result.data.results[].perChannel.linkedin.breakdown` | `object` | No | — | `sent` and `notDelivered` split by message sub-type. Each trio sums to the counter of the same name above. |
| `result.data.results[].perChannel.linkedin.breakdown.sent` | `object` | No | — | A LinkedIn counter split by message sub-type. The three values sum to the aggregated counter of the same name on `perChannel.linkedin`. All three keys are always present, `0` when there is no matching activity. |
| `result.data.results[].perChannel.linkedin.breakdown.sent.messages` | `integer` | No | — | Regular LinkedIn messages. |
| `result.data.results[].perChannel.linkedin.breakdown.sent.inMails` | `integer` | No | — | InMails. |
| `result.data.results[].perChannel.linkedin.breakdown.sent.voiceNotes` | `integer` | No | — | LinkedIn voice notes. |
| `result.data.results[].perChannel.linkedin.breakdown.notDelivered` | `object` | No | — | A LinkedIn counter split by message sub-type. The three values sum to the aggregated counter of the same name on `perChannel.linkedin`. All three keys are always present, `0` when there is no matching activity. |
| `result.data.results[].perChannel.linkedin.breakdown.notDelivered.messages` | `integer` | No | — | Regular LinkedIn messages. |
| `result.data.results[].perChannel.linkedin.breakdown.notDelivered.inMails` | `integer` | No | — | InMails. |
| `result.data.results[].perChannel.linkedin.breakdown.notDelivered.voiceNotes` | `integer` | No | — | LinkedIn voice notes. |
| `result.data.results[].perChannel.sms` | `object` | No | — | SMS counters. |
| `result.data.results[].perChannel.sms.sent` | `integer` | No | — | SMS sent. |

The table shows the first 50 fields. Expand the raw schema below for every field.

<Info>
  This output schema is too large to embed without slowing the page. Get the complete live contract with `deepline tools get lemlist_post_v2_campaigns_stats_batch --json`.
</Info>

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