> ## 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: Delete Companies Companyid

> Delete Company. Lemlist Delete Companies Companyid reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Delete Company.

<Info>
  Tool ID: `lemlist_delete_companies_companyid`
</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_delete_companies_companyid --json
```

## Example response

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

```json theme={null}
{
  "data": {
    "success": true,
    "deletedCompanyId": "deleted_company_123"
  }
}
```

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

## Input reference

Deletes a lemlist company. Refuses by default when contacts are still attached — pass `force=true` to detach them (the `companyId` field is unset on each contact) before deleting the company. **No CRM-side propagation:** only the lemlist record is removed. Designed for the contact-to-company remapping workflow: after reassigning the contacts of a duplicate company to the canonical one (via `POST /contacts/&#123;idOrEmail&#125;`), call this endpoint to drop the now-empty duplicate.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.companyId` | `string` | Yes | — | The lemlist company ID to delete. Pattern: `^cpn_[a-zA-Z0-9]+$`. |
| `payload.force` | `boolean` | No | `false` | When `true`, detaches contacts attached to this company (unsets their `companyId`) before deleting it. When omitted or `false`, the request fails with `400 COMPANY_HAS_CONTACTS` if any contact is still attached. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Deletes a lemlist company. Refuses by default when contacts are still attached — pass `force=true` to detach them (the `companyId` field is unset on each contact) before deleting the company. **No CRM-side propagation:** only the lemlist record is removed. Designed for the contact-to-company remapping workflow: after reassigning the contacts of a duplicate company to the canonical one (via `POST /contacts/{idOrEmail}`), call this endpoint to drop the now-empty duplicate.",
    "properties": {
      "companyId": {
        "type": "string",
        "description": "The lemlist company ID to delete.",
        "pattern": "^cpn_[a-zA-Z0-9]+$"
      },
      "force": {
        "type": "boolean",
        "description": "When `true`, detaches contacts attached to this company (unsets their `companyId`) before deleting it. When omitted or `false`, the request fails with `400 COMPANY_HAS_CONTACTS` if any contact is still attached.",
        "default": false
      }
    },
    "required": [
      "companyId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.success` | `boolean` | Yes | — | — |
| `result.data.deletedCompanyId` | `string` | Yes | — | ID of the deleted lemlist company. |
| `result.data.unlinkedContacts` | `integer` | No | — | Number of contacts whose `companyId` was unset before deletion. Only present when `force=true`. |
| `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": {
          "success": {
            "type": "boolean"
          },
          "deletedCompanyId": {
            "type": "string",
            "description": "ID of the deleted lemlist company."
          },
          "unlinkedContacts": {
            "type": "integer",
            "description": "Number of contacts whose `companyId` was unset before deletion. Only present when `force=true`."
          }
        },
        "required": [
          "success",
          "deletedCompanyId"
        ],
        "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.