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

# Import client companies

> Add up to 1,000 client companies in one call

Adds many companies to your [client companies](https://docs.clustr-ai.com/client-companies.md) at once, with
source `csv`. Send up to 1,000 rows per request; split a longer file into several
requests.

**Each row is checked on its own.** Valid rows are added, invalid rows come back
in `invalid` with their row number and the reason, and one bad row never blocks
the others. Every row needs a name and a LinkedIn company URL, following the same
rules as [Add a client company](https://docs.clustr-ai.com/api-reference/add-client-company.md#linkedin-company-url).

**Re-running an import is safe.** A row whose LinkedIn company your manual or CSV
entries already list is skipped and counted in `alreadyListed`, and so is a repeat of
the same company within one request.

## Errors

| Status | Code | When |
| - | - | - |
| 400 | `BAD_REQUEST` | The body is not valid JSON, or has more than 1,000 rows |

```bash cURL theme={null}
curl -X POST https://api.clustr-ai.com/api/public/client-companies/cco_4fq7rmrrd9ayqy08xfvgpmxm1b \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rows": [
        {"row": 2, "name": "Acme Corp", "linkedinUrl": "https://www.linkedin.com/company/acme-corp"},
        {"row": 3, "name": "Globex", "linkedinUrl": "https://www.linkedin.com/company/1035", "domain": "globex.com"},
        {"row": 4, "name": "Initech", "linkedinUrl": "https://www.linkedin.com/in/bill-lumbergh"}
      ]}'
```

```json 200 theme={null}
{
  "success": true,
  "data": {
    "added": 1,
    "alreadyListed": 1,
    "invalid": [
      { "row": 4, "reason": "That's a person's profile, not a company page" }
    ]
  }
}
```

```json 400 theme={null}
{
  "success": false,
  "error": { "message": "Import at most 1000 rows per request", "code": "BAD_REQUEST" }
}
```


## OpenAPI

````yaml POST /client-companies/import
openapi: 3.1.0
info:
  title: Clustr Public API
  description: >
    Programmatic access to your Clustr network: import connectors, search warm
    intros (opportunities), and manage target accounts.


    ## Authentication

    All endpoints require a Bearer token (API key) in the `Authorization`
    header.


    ```

    Authorization: Bearer <your_api_key>

    ```


    API keys can be created and managed from the [API settings
    page](https://app.clustr-ai.com/api).
  version: '1.0'
  contact:
    name: Clustr Support
    url: https://clustr-ai.com
servers:
  - url: https://api.clustr-ai.com/api/public
    description: Production
security:
  - BearerAuth: []
paths:
  /client-companies/import:
    post:
      tags:
        - Client Companies
      summary: Import client companies
      description: >
        Add up to 1,000 client companies in one call. Each row is checked on its

        own: a valid row is added with source `csv`, an invalid one is returned
        in

        `invalid` with its row number and reason, and the rest of the request

        still goes through.
      operationId: importClientCompanies
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportClientCompaniesRequest'
      responses:
        '200':
          description: What was added, skipped and rejected
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/ImportClientCompaniesResult'
        '400':
          description: Invalid body, or more than 1,000 rows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
components:
  schemas:
    ImportClientCompaniesRequest:
      type: object
      required:
        - rows
      properties:
        rows:
          type: array
          description: The companies to import, at most 1,000.
          maxItems: 1000
          items:
            $ref: '#/components/schemas/ClientCompanyImportRow'
    ImportClientCompaniesResult:
      type: object
      properties:
        added:
          type: integer
          description: How many rows were added to your list.
          example: 97
        alreadyListed:
          type: integer
          description: >-
            How many valid rows were skipped because your manual or csv rows
            already list that LinkedIn company, including repeats within the
            same request.
          example: 2
        invalid:
          type: array
          description: >-
            The rows that were rejected. Each has `row` (your number) and
            `reason`, such as

            `That's a person's profile, not a company page` or `Company name is
            required`. When

            a row has both problems, the LinkedIn reason is the one reported.
          items:
            type: object
            properties:
              row:
                type: integer
                example: 14
              reason:
                type: string
                example: That's a person's profile, not a company page
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            message:
              type: string
              example: Invalid request body
            code:
              type: string
              example: BAD_REQUEST
    ClientCompanyImportRow:
      type: object
      required:
        - name
        - linkedinUrl
      properties:
        row:
          type: integer
          description: >-
            Your own row number, such as the spreadsheet line. Echoed back if
            the row is

            invalid so you can find it. When omitted, it is the row's position
            in `rows`,

            starting at 1.
          example: 2
        name:
          type: string
          description: Company name
          example: Acme Corp
        linkedinUrl:
          type: string
          example: https://www.linkedin.com/company/acme-corp
          description: LinkedIn company page URL
        domain:
          type: string
          example: acme.com
          description: A domain or website, stored as the registrable domain
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: The API key you created on the API settings page of the Clustr app.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.