Skip to main content
POST
Create Companies in the CRM
Pushes companies to your connected CRM — the Create in CRM action of the Companies page. Each company is searched in the CRM first: linked to the record found, created in the CRM otherwise. Target the companies with idsOrDomains (lemlist ids or domains) or with listId for a whole company list, static or dynamic: 10,000 companies at most either way, a domain counting every company that carries it.

Asynchronous: read the outcome later

The call queues the work and answers at once with what was queued, not with what the CRM returned. Each company’s outcome lands on its crmSync block shortly after:
  • GET /companies?idsOrDomains=... returns each company with its crmSync block (searching, crmRecordId, notFoundAt, errors), 100 companies per call.
  • GET /companies?listId=...&crmSyncStatus= lists the companies of a list by state: searching while the search runs, then synced (linked or created), or error (refused by the CRM, with its reason). Without listId, the filter reads every company of the team: do not poll it.

What the counts mean

  • alreadyLinked: already linked to a CRM record, synced with it again instead of searched.
  • toCreate: searched in the CRM first, then linked or created.
  • notSearchable: nothing the CRM can be searched with (no domain or LinkedIn URL), left untouched.
  • alreadyInProgress: a CRM search was already queued for them, not queued twice.
  • notFound: the references sent that match no company of your team.

Who can call it

The API key must belong to a team admin, like the action in the app. On Salesforce, the connection must grant the object created (Account).

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
idsOrDomains
string[]

lemlist company ids (cpn_xxx) or domains, 10,000 at most. A domain designates every company carrying it: 10,000 companies at most in total. Send either idsOrDomains or listId.

Required array length: 1 - 10000 elements
Example:
listId
string

A company list id (clt_xxx): acts on every company of the list, static or dynamic, 10,000 at most. Use it instead of idsOrDomains.

Example:

"clt_Ab12Cd34Ef56Gh78I"

Response

Queued — not done yet. The counts say what was queued; each record's outcome lands on its crmSync block shortly after.

success
boolean
required
data
object
required