Skip to main content
GET
Get Many Companies

Finding a company from your CRM

Use crmIds (up to 100, comma-separated) with the record ids of your connected CRM, for example GET /companies?crmIds=123456789 with a HubSpot company id; for Salesforce, pass the 18-character Account id. The answer is the same as with idsOrDomains: the companies found in data, each with the matched id under crmSync.crmRecordId; ids that match nothing are skipped. idsOrDomains takes precedence over crmIds; a lookup ignores the list filters and the pagination.

Authorizations

Authorization
string
header
required

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

Query Parameters

idsOrDomains
string

Comma-separated list of company IDs or domains to fetch. When provided, returns only matching companies (no pagination). Each value is classified as a company ID (e.g. cpn_xxx) or a domain (e.g. example.com). URLs are normalized automatically (e.g. https://example.com/path → example.com). Invalid values are silently skipped. Maximum 100 values.

crmIds
string

Comma-separated record ids of companies in the CRM connected to the team (HubSpot, Salesforce, or Pipedrive); for Salesforce, the 18-character Account id. Returns the companies found in data, with total and no pagination, each with the matched id under crmSync.crmRecordId; ids that match nothing are skipped, and data is empty when no CRM is connected. Duplicates are removed; an empty value is ignored. Maximum 100 values (TOO_MANY_CRM_IDS); a value over 25 characters answers INVALID_CRM_ID. Ignored when idsOrDomains is provided.

offset
integer
default:0

Number of companies to skip for pagination. Defaults to 0. Ignored when idsOrDomains is provided.

Required range: x >= 0
sortBy
enum<string>

The field by which to sort. Currently, only 'createdAt' is supported.

Available options:
createdAt
sortOrder
enum<string>

The sort direction. Use 'desc' for descending order; any other value (or omission) will sort in ascending order.

Available options:
asc,
desc

Search by company name (case insensitive)

fields
string

Returns selected fields. Returns all fields if empty. Each field is separated by a comma (e.g., '_id,fields.name,domain')

limit
integer
default:100

Number of companies to retrieve. Default: 100. Maximum: 500

Required range: 1 <= x <= 500
listId
string

Filter companies to the members of a static CRM company list (clt_xxx format). Combines with every other filter. Ignored when idsOrDomains is provided.

Pattern: ^clt_[a-zA-Z0-9]+$
crmSyncStatus
enum<string>

Filter companies by their CRM sync state against the team's active CRM provider. Requires a CRM (Hubspot, Salesforce, or Pipedrive) to be connected — otherwise the request returns 400 NO_CRM_CONNECTED. Common values:

  • synced — the company has a CRM record and no sync errors.
  • not_synced — the company has no CRM record yet.
  • error — at least one sync error is currently raised.
  • A specific error reason (lowercase form), to filter by root cause: unique_index_error_company, property_doesnt_exist, required_field_missing, company_already_exists_with_name, company_already_exists_with_linkedin_url.

For each returned company, see crmSync.errors[].metadata.alreadyExistingCompanyId to identify the lemlist company that already occupies the conflicting CRM record (useful to remap contacts before deleting the duplicate).

Available options:
synced,
not_synced,
error,
unique_index_error_company,
property_doesnt_exist,
required_field_missing,
company_already_exists_with_name,
company_already_exists_with_linkedin_url
fieldRejectionReason
enum<string>

Filter companies to those carrying a field rejection with this reason — a value lemlist refused to write, raised during CRM sync (crm_sync_*). Returns an empty list (total: 0) when no company matches. Each returned company exposes the full detail under fieldRejections[] (which field, why, and conflictingRecordId for duplicates). Independent of crmSyncStatus (which keys off the live provider errors); this filter reads the stored field rejections. Only applies to the paginated list — ignored when idsOrDomains is provided (that path returns the exact companies requested, unfiltered).

Available options:
crm_sync_duplicate_company,
crm_sync_duplicate_company_domain,
crm_sync_duplicate_company_name,
crm_sync_invalid_domain,
crm_sync_duplicate_linkedin_url,
crm_sync_duplicate_linkedin_url_sales_nav,
crm_sync_invalid_linkedin_url,
crm_sync_linkedin_url_not_company,
crm_sync_invalid_url,
crm_sync_value_oscillating,
enrichment_company_duplicate_core_signal_id,
enrichment_company_duplicate_domain,
enrichment_company_duplicate_linkedin_url,
enrichment_company_duplicate_linkedin_url_sales_nav,
enrichment_company_duplicate_name,
crm_sync_owner_sync_loop,
crm_sync_unmapped_user,
crm_sync_value_incompatible,
crm_sync_unknown_error

Response

Success. Returns an object with data and total; limit and offset are only present on the paginated list, not with idsOrDomains or crmIds.

data
object[]
required
total
integer
required
limit
integer

Only on the paginated list.

offset
integer

Only on the paginated list.