Delete Company
Companies
Delete Company
Deletes a lemlist company. Use force=true to detach attached contacts before deletion.
DELETE
Delete Company
Removes a lemlist company. Only the lemlist record is deleted — no CRM-side propagation is performed. By default, the request fails withDocumentation Index
Fetch the complete documentation index at: https://developer.lemlist.com/llms.txt
Use this file to discover all available pages before exploring further.
400 COMPANY_HAS_CONTACTS if any contact is still attached to the company. Pass ?force=true to detach those contacts (their companyId is unset) before deletion.
Remapping duplicates: typical workflow
This endpoint is the final step of the contact-to-company remapping flow used to resolveUNIQUE_INDEX_ERROR_COMPANY sync failures:
GET /companies?crmSyncStatus=unique_index_error_company— list lemlist companies that fail to sync because another lemlist company already occupies their CRM record. Each result exposescrmSync.errors[].metadata.alreadyExistingCompanyId— the canonical lemlist company already linked to the CRM record.GET /contacts?companyId={duplicateCompanyId}— list contacts attached to the duplicate.POST /contacts/{idOrEmail}withcompanyId: {canonicalCompanyId}— reassign each contact to the canonical lemlist company.DELETE /companies/{duplicateCompanyId}— drop the now-empty duplicate. If step 3 was completed for every contact, the call succeeds withoutforce. Otherwise use?force=trueto detach the remaining contacts as part of the deletion.
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The lemlist company ID to delete.
Pattern:
^cpn_[a-zA-Z0-9]+$Query Parameters
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.