> ## 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: List Campaigns

> List your Lemlist campaigns with their IDs, names and status. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

List your Lemlist campaigns with their IDs, names and status.

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

## 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_list_campaigns',
  {
    "status": "running",
    "created_by": "example",
    "sort_by": "createdAt"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run lemlist_list_campaigns --input '{
  "status": "running",
  "created_by": "example",
  "sort_by": "createdAt"
}'
```

## 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": [
    {
      "id": "id_123",
      "name": "Example",
      "status": "example"
    }
  ]
}
```

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

## Input reference

Lemlist list campaigns input.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.status` | `"running" \| "draft" \| "archived" \| "ended" \| "paused" \| "errors"` | No | — | Only campaigns with this status. Allowed: `running`, `draft`, `archived`, `ended`, `paused`, `errors`. |
| `payload.created_by` | `string` | No | — | Only campaigns created by this user ID (usr\_xxx). Minimum length: 1. |
| `payload.sort_by` | `"createdAt"` | No | — | Sort campaigns by this field. Lemlist supports only createdAt. |
| `payload.sort_order` | `"asc" \| "desc"` | No | — | Sort direction. Default: asc. Allowed: `asc`, `desc`. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Lemlist list campaigns input.",
    "properties": {
      "status": {
        "type": "string",
        "description": "Only campaigns with this status.",
        "enum": [
          "running",
          "draft",
          "archived",
          "ended",
          "paused",
          "errors"
        ]
      },
      "created_by": {
        "type": "string",
        "description": "Only campaigns created by this user ID (usr_xxx).",
        "minLength": 1,
        "aliases": [
          "createdBy"
        ]
      },
      "sort_by": {
        "type": "string",
        "description": "Sort campaigns by this field. Lemlist supports only createdAt.",
        "const": "createdAt",
        "aliases": [
          "sortBy"
        ]
      },
      "sort_order": {
        "type": "string",
        "description": "Sort direction. Default: asc.",
        "enum": [
          "asc",
          "desc"
        ],
        "aliases": [
          "sortOrder"
        ]
      }
    },
    "required": [],
    "additionalProperties": false,
    "unpaged": true,
    "hiddenUpstreamInputs": {}
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `array` | Yes | — | Array of campaign objects |
| `result.data[].id` | `string` | Yes | — | Campaign ID |
| `result.data[]._id` | `string` | No | — | Legacy Lemlist campaign ID field |
| `result.data[].name` | `string` | Yes | — | Campaign name |
| `result.data[].status` | `string` | Yes | — | Campaign status |
| `result.data[].labels` | `array` | No | — | Campaign labels/tags |
| `result.data[].createdAt` | `string` | No | — | ISO 8601 creation timestamp |
| `result.data[].updatedAt` | `string` | No | — | ISO 8601 last update timestamp |
| `result.data[].archived` | `boolean` | No | — | Whether campaign is archived |
| `result.data[].emoji` | `string` | No | — | Campaign emoji |
| `result.data[].timezone` | `string` | No | — | Campaign timezone, e.g. Europe/Paris |
| `result.data[].createdBy` | `string` | No | — | User ID of the creator (usr\_xxx) |
| `result.data[].hasError` | `boolean` | No | — | Whether the campaign has errors |
| `result.data[].errors` | `array` | No | — | Campaign error messages |
| `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": "array",
        "description": "Array of campaign objects",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Campaign ID"
            },
            "_id": {
              "type": "string",
              "description": "Legacy Lemlist campaign ID field"
            },
            "name": {
              "type": "string",
              "description": "Campaign name"
            },
            "status": {
              "type": "string",
              "description": "Campaign status"
            },
            "labels": {
              "type": "array",
              "description": "Campaign labels/tags",
              "items": {
                "type": "string"
              }
            },
            "createdAt": {
              "type": "string",
              "description": "ISO 8601 creation timestamp"
            },
            "updatedAt": {
              "type": "string",
              "description": "ISO 8601 last update timestamp"
            },
            "archived": {
              "type": "boolean",
              "description": "Whether campaign is archived"
            },
            "emoji": {
              "type": "string",
              "description": "Campaign emoji"
            },
            "timezone": {
              "type": "string",
              "description": "Campaign timezone, e.g. Europe/Paris"
            },
            "createdBy": {
              "type": "string",
              "description": "User ID of the creator (usr_xxx)"
            },
            "hasError": {
              "type": "boolean",
              "description": "Whether the campaign has errors"
            },
            "errors": {
              "type": "array",
              "description": "Campaign error messages",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "id",
            "name",
            "status"
          ],
          "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

* [Connect integrations](https://deepline.com/docs/integrations.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.