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

# Add Companies to Import Queue

Add one or more companies to an existing import queue session. You can call this endpoint multiple times to add companies in batches.

## Request

#### Path Parameters

<ParamField path="sessionId" type="string" required>
  The session ID returned from the [start import queue](/api-reference/agent/start-import-queue) endpoint
</ParamField>

#### Body

<ParamField body="companies" type="array" required>
  Array of company objects to import. Must contain at least 1 and at most 250 companies.

  <Expandable title="Company properties">
    <ParamField body="customer" type="string" required>
      The customer type for this company. Must be one of:

      * `CUSTOMER` - Existing customer
      * `LEAD` - Potential lead
      * `UNKNOWN` - Status unknown
    </ParamField>

    <ParamField body="country" type="string" optional>
      ISO 3166-1 alpha-2 country code (e.g., `BE`, `NL`, `FR`)
    </ParamField>

    <ParamField body="name" type="string" optional>
      The name of the company
    </ParamField>

    <ParamField body="website" type="string" optional>
      The company's website URL
    </ParamField>

    <ParamField body="vat" type="string" optional>
      The company's VAT number
    </ParamField>
  </Expandable>
</ParamField>

## Company Matching

To accurately match companies in Bizzy's database, provide identifying information for each company:

**Preferred identifier:**

* **`vat`** - The VAT number is the most reliable identifier as it's unique per company and allows for a perfect 1-on-1 match

**Alternative identification:**

* If no VAT number is available, provide a combination of:
  * `name` - Company name
  * `country` - Country code
  * `website` - Company website

When using the alternative method, Bizzy performs a combined search using all provided fields and selects the company that best matches the data in our database.

<Note>
  For best results, always include the VAT number when available. When VAT is not available, provide as many identifying fields as possible (name, country, website) to improve matching accuracy.
</Note>

## Response

<ResponseExample>
  ```json Request theme={null}
  {
    "companies": [
      {
        "customer": "LEAD",
        "country": "BE",
        "name": "Example Company NV",
        "website": "https://example.com",
        "vat": "BE0123456789"
      },
      {
        "customer": "CUSTOMER",
        "name": "Another Company BV",
        "country": "NL"
      }
    ]
  }
  ```

  ```json Response - 200 theme={null}
  {
    "success": true,
    "added": 2
  }
  ```

  ```json Response - 400 (Invalid Session State) theme={null}
  {
    "error": "Session is not in pending state"
  }
  ```

  ```json Response - 400 (Empty Array) theme={null}
  {
    "error": "companies must be a non-empty array"
  }
  ```

  ```json Response - 400 (Array Too Large) theme={null}
  {
    "error": "companies array cannot exceed 250 items"
  }
  ```
</ResponseExample>

<ResponseField name="success" type="boolean">
  Whether the companies were successfully added to the queue
</ResponseField>

<ResponseField name="added" type="number">
  The number of companies added in this request
</ResponseField>

## Notes

* The session must be in `PENDING` status to accept companies
* You can call this endpoint multiple times to add companies in batches
* Each request can contain a maximum of 250 companies
* Companies are not processed until you [complete the session](/api-reference/agent/complete-import-queue)
