> ## 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 by hand

Adds one company to your [client companies](/client-companies) 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.

## Body

<ParamField body="name" type="string" required>
  Company name, as you want it shown.
</ParamField>

<ParamField body="linkedinUrl" type="string" required>
  LinkedIn company page URL.
</ParamField>

<ParamField body="domain" type="string">
  A domain or website. Stored as the registrable domain, so
  `https://www.eu.acme.co.uk/about` becomes `acme.co.uk`.
</ParamField>

## Errors

| Status | Code                   | When                                                                                     |
| ------ | ---------------------- | ---------------------------------------------------------------------------------------- |
| 400    | `BAD_REQUEST`          | The body is not valid JSON, or `name` is empty                                           |
| 409    | `already_listed`       | Your manual or csv rows 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.

<RequestExample>
  ```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"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "success": true,
    "data": {
      "item": {
        "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": [
          { "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" }
  }
  ```
</ResponseExample>
