> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enginy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync companies

> Find existing companies in your CRM and return their IDs

<Card title="Your Implementation Required" icon="triangle-exclamation" color="#f59e0b">
  This endpoint must be implemented on **your server**
</Card>

Enginy calls this endpoint to find which companies already exist in your CRM. Your CRM decides the matching logic (by domain, name, LinkedIn URL, etc.).

## Request

<ParamField body="companies" type="array" required>
  Array of company objects to find
</ParamField>

### Company Object

<ParamField body="externalId" type="string" required>
  Enginy's internal company ID
</ParamField>

<ParamField body="domain" type="string">
  Domain for matching (normalize before comparing)
</ParamField>

<ParamField body="linkedinUrl" type="string">
  LinkedIn URL for matching
</ParamField>

<ParamField body="name" type="string">
  Company name for matching
</ParamField>

<RequestExample>
  ```json theme={null}
  {
    "companies": [
      {
        "externalId": "company-123",
        "name": "Acme Corporation",
        "domain": "acme.com",
        "linkedinUrl": "https://linkedin.com/company/acme"
      },
      {
        "externalId": "company-456",
        "domain": "unknown-company.com"
      }
    ]
  }
  ```
</RequestExample>

## Response

Return **only companies that exist** in your CRM.

<ResponseField name="results" type="array" required>
  Array of matched companies
</ResponseField>

<ResponseField name="results[].externalId" type="string" required>
  The `externalId` from the request
</ResponseField>

<ResponseField name="results[].crmId" type="string" required>
  Your CRM's ID for this company
</ResponseField>

<ResponseField name="results[].properties" type="object">
  Optional properties to sync back to Enginy
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "results": [
      {
        "externalId": "company-123",
        "crmId": "account_4k8j2m",
        "properties": {
          "accountTier": "Enterprise",
          "totalDeals": 5,
          "lifetimeValue": 250000
        }
      }
    ]
  }
  ```
</ResponseExample>

<Tip>
  **Domain Normalization**: Always normalize domains before matching (remove `www.`, protocol, trailing
  slashes).
</Tip>
