> ## 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.

# Add a client company

> Add one client company manually

Adds one company to your [client companies](https://docs.clustr-ai.com/client-companies.md) with source
`manual`, and returns it as it now appears in the list. If the company is already
there from your CRM, the returned item shows both sources.

## LinkedIn company URL

`linkedinUrl` is required, and it must be a LinkedIn company page:
`linkedin.com/company/` followed by the company's numeric id or slug.

| Accepted | Rejected |
| - | - |
| `https://www.linkedin.com/company/acme-corp` | `https://www.linkedin.com/in/jane-doe` (a person) |
| `linkedin.com/company/1035` | `https://www.linkedin.com/school/hec-paris/` |
| `https://fr.linkedin.com/company/acme/about/` | `https://www.linkedin.com/showcase/acme-cloud/` |
| `http://linkedin.com/company/acme?trk=profile` | `acme-corp` (a slug on its own) |

The scheme, `www.` and a country subdomain are optional. Anything after the id or
slug is ignored, and slugs compare without regard to case.

## Errors

| Status | Code | When |
| - | - | - |
| 400 | `BAD_REQUEST` | The body is not valid JSON, or `name` is empty |
| 409 | `already_listed` | Your manual or CSV entries already list this LinkedIn company |
| 422 | `invalid_linkedin_url` | `linkedinUrl` is missing or is not a LinkedIn company page. `message` says what is wrong |

The URL is checked before the name, so a request with neither gets the 422.

```bash cURL theme={null}
curl -X POST https://api.clustr-ai.com/api/public/client-companies \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Corp", "linkedinUrl": "https://www.linkedin.com/company/acme-corp", "domain": "acme.com"}'
```

```json 201 theme={null}
{
  "success": true,
  "data": {
    "item": {
      "clustrAccountId": "acc_tpm6jrg43va39d16q86kr4wqb0",
      "clustrExclusionId": null,
      "key": "c:5b1f7c2e-8d0a-4c47-9d3e-2f6a1b9c0e11",
      "name": "Acme Corp",
      "linkedinUrl": "https://www.linkedin.com/company/acme-corp",
      "domain": "acme.com",
      "companyId": "5b1f7c2e-8d0a-4c47-9d3e-2f6a1b9c0e11",
      "inNetwork": true,
      "excluded": false,
      "exclusionId": "",
      "sources": [
        {
          "clustrClientCompanyId": "cco_e8dhedwjkbptsqpcfy5scfmm9v",
          "id": "0e7d6a52-...",
          "source": "manual",
          "crmProvider": "",
          "crmCompanyId": ""
        }
      ]
    }
  }
}
```

```json 409 theme={null}
{
  "success": false,
  "error": { "message": "That company is already on your client list", "code": "already_listed" }
}
```

```json 422 theme={null}
{
  "success": false,
  "error": { "message": "That's a person's profile, not a company page", "code": "invalid_linkedin_url" }
}
```


## OpenAPI

````yaml POST /client-companies
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:
    post:
      tags:
        - Client Companies
      summary: Add a client company
      description: |
        Add one client company manually. It is listed with source `manual`.
      operationId: addClientCompany
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateClientCompanyRequest'
      responses:
        '201':
          description: The company as it now appears in the list
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      item:
                        $ref: '#/components/schemas/ClientCompanyItem'
        '400':
          description: Invalid body, or `name` is missing (code `BAD_REQUEST`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
        '409':
          description: >-
            A manual or CSV entry already lists this LinkedIn company (code
            `already_listed`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            `linkedinUrl` is not a LinkedIn company page (code
            `invalid_linkedin_url`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateClientCompanyRequest:
      type: object
      required:
        - name
        - linkedinUrl
      properties:
        name:
          type: string
          description: Company name, as you want it shown.
          example: Acme Corp
        linkedinUrl:
          type: string
          description: >
            A LinkedIn company page: `linkedin.com/company/<numeric id or
            slug>`.

            The scheme and `www.` are optional; anything after the id or slug is

            ignored. Person profiles (`/in/`, `/pub/`), school and showcase
            pages

            are rejected.
          example: https://www.linkedin.com/company/acme-corp
        domain:
          type: string
          description: |-
            A domain or website. Stored as the registrable domain, so
            `https://www.eu.acme.co.uk/about` becomes `acme.co.uk`.
          example: acme.com
    ClientCompanyItem:
      type: object
      description: >-
        One client company. Every source row that points at the same company is
        grouped into one item, so a company added manually and also marked in
        your CRM appears once, with two entries in `sources`.
      properties:
        clustrAccountId:
          type: string
          description: >-
            The Clustr ID of the account the rows matched, for example
            `acc_b25ga5mhfqavwbwaash1hkz9bk`.

            Empty until they match one.
          example: acc_b25ga5mhfqavwbwaash1hkz9bk
        clustrExclusionId:
          type: string
          description: >-
            The Clustr ID of the exclusion to delete to undo "Not a client", for
            example

            `ccx_pjcx76ma2x5sd982m2a1neg379`. Empty when `excluded` is false.
          example: ccx_pjcx76ma2x5sd982m2a1neg379
        key:
          type: string
          description: >-
            Identifies the grouping, and stays the same across reads as long as
            its rows stay the same. `c:<companyId>` when the rows matched a
            Clustr company, else `n:<LinkedIn numeric id>`, else `v:<LinkedIn
            slug>`, else `r:<row id>`.
          example: c:5b1f7c2e-8d0a-4c47-9d3e-2f6a1b9c0e11
        name:
          type: string
          description: The name from the oldest manual or csv row, else from a CRM row.
          example: Acme Corp
        linkedinUrl:
          type: string
          description: >-
            The LinkedIn company URL as it was entered. Empty when no row has
            one.
          example: https://www.linkedin.com/company/acme-corp
        domain:
          type: string
          description: >-
            The registrable domain, such as `acme.co.uk`. Empty when no row has
            one.
          example: acme.com
        companyId:
          type: string
          description: >-
            Kept for integrations built before Clustr IDs. New integrations
            should use `clustrAccountId`.
        inNetwork:
          type: boolean
          description: At least one person in your network currently works at this company.
        excluded:
          type: boolean
          description: >-
            True when the company is marked "Not a client". Clustr then treats
            it as a non-client.
        exclusionId:
          type: string
          description: >-
            Kept for integrations built before Clustr IDs. New integrations
            should use `clustrExclusionId`.
        sources:
          type: array
          description: One entry per row behind the company.
          items:
            $ref: '#/components/schemas/ClientCompanySource'
        pathCount:
          type: integer
          description: >-
            How many warm intro paths run through a connector who currently
            works at this company, counted with the same visibility rules as the
            Warm intros page.
          example: 12
    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
    ClientCompanySource:
      type: object
      description: One source row behind a client company.
      properties:
        clustrClientCompanyId:
          type: string
          description: >-
            The row's Clustr ID, for example `cco_stmvs9zqkgfy2tjar9tddrjajt`.
            Use it to

            [remove](/api-reference/remove-client-company) a manual or csv row,
            or to [mark the company not

            a client](/api-reference/mark-not-a-client).
          example: cco_stmvs9zqkgfy2tjar9tddrjajt
        id:
          type: string
          format: uuid
          description: >-
            Kept for integrations built before Clustr IDs. New integrations
            should use `clustrClientCompanyId`.
        source:
          type: string
          description: 'Where the row came from: `manual`, `csv` or `crm`.'
          enum:
            - manual
            - csv
            - crm
        crmProvider:
          type: string
          description: >-
            The CRM this row came from, such as `hubspot`. Empty for manual and
            csv rows.
          example: hubspot
        crmCompanyId:
          type: string
          description: For a CRM row, the company's record id in that CRM. Otherwise empty.
          example: '18823401776'
  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.