> ## 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 Companies Lists Listid Entities

> Add or Remove Companies in a List. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Add or Remove Companies in a List.

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

## Run this action

This action has conditional or dynamic input fields that cannot be represented by a reliable static example.

Inspect the live contract before executing it:

```bash theme={null}
deepline tools get lemlist_post_companies_lists_listid_entities --json
```

## Example response

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

```json theme={null}
{
  "data": {
    "message": "Example message",
    "addedCount": 123,
    "alreadyInList": 123
  }
}
```

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

## Input reference

Adds existing CRM companies to a static company list, or removes them when `?action=remove` is set. - **Add** (default): send a `POST` with a `companyIds` body. Companies already in the list are silently skipped (no duplicates) and reported in `alreadyInList`. - **Remove**: send a `POST` with `?action=remove` and a `companyIds` body. Companies that are not in the list are silently skipped; `removedCount` reflects the associations actually removed. This only affects list membership, the companies are not deleted from your CRM. The list must be a **static** company list (`clt_xxx`). Dynamic lists (auto-populated by filter rules) and contact lists are rejected. **Removal uses `POST ?action=remove` on purpose:** a `DELETE` request body is dropped by our stack, so `DELETE` on this path is **not supported** and returns `405 Method Not Allowed`.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.listId` | `string` | Yes | — | The unique identifier of the company list (`clt_xxx` format). Must be a **static** company list. Pattern: `^clt_[a-zA-Z0-9]+$`. |
| `payload.action` | `"remove"` | No | — | Omit to **add** the companies to the list. Set to `remove` to **remove** them from the list. Allowed: `remove`. |
| `payload.companyIds` | `array` | Yes | — | Array of company IDs (`cpn_xxx` format) to add to or remove from the list. Required, non-empty, maximum 1,000 per request. Minimum items: 1. Maximum items: 1000. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Adds existing CRM companies to a static company list, or removes them when `?action=remove` is set. - **Add** (default): send a `POST` with a `companyIds` body. Companies already in the list are silently skipped (no duplicates) and reported in `alreadyInList`. - **Remove**: send a `POST` with `?action=remove` and a `companyIds` body. Companies that are not in the list are silently skipped; `removedCount` reflects the associations actually removed. This only affects list membership, the companies are not deleted from your CRM. The list must be a **static** company list (`clt_xxx`). Dynamic lists (auto-populated by filter rules) and contact lists are rejected. **Removal uses `POST ?action=remove` on purpose:** a `DELETE` request body is dropped by our stack, so `DELETE` on this path is **not supported** and returns `405 Method Not Allowed`.",
    "properties": {
      "listId": {
        "type": "string",
        "description": "The unique identifier of the company list (`clt_xxx` format). Must be a **static** company list.",
        "pattern": "^clt_[a-zA-Z0-9]+$"
      },
      "action": {
        "type": "string",
        "description": "Omit to **add** the companies to the list. Set to `remove` to **remove** them from the list.",
        "enum": [
          "remove"
        ]
      },
      "companyIds": {
        "type": "array",
        "description": "Array of company IDs (`cpn_xxx` format) to add to or remove from the list. Required, non-empty, maximum 1,000 per request.",
        "minItems": 1,
        "maxItems": 1000,
        "items": {
          "type": "string",
          "pattern": "^cpn_[a-zA-Z0-9]+$"
        }
      }
    },
    "required": [
      "listId",
      "companyIds"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.message` | `string` | No | — | — |
| `result.data.addedCount` | `integer` | No | — | Number of companies added to the list (add only). |
| `result.data.alreadyInList` | `integer` | No | — | Number of companies that were already in the list and therefore skipped (add only). |
| `result.data.removedCount` | `integer` | No | — | Number of list associations actually removed (remove only). Companies that were not in the list are not counted. |
| `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": {
          "message": {
            "type": "string"
          },
          "addedCount": {
            "type": "integer",
            "description": "Number of companies added to the list (add only)."
          },
          "alreadyInList": {
            "type": "integer",
            "description": "Number of companies that were already in the list and therefore skipped (add only)."
          },
          "removedCount": {
            "type": "integer",
            "description": "Number of list associations actually removed (remove only). Companies that were not in the list are not counted."
          }
        },
        "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.