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

# Enrich a company profile

> Look up a single company by domain or LinkedIn URL.

<Note>
  **This endpoint is synchronous and does not consume credits.**

  Unlike the enrichment and Lead Finder APIs, there is no `request_id` and nothing to poll: the
  company profile comes back in the same response.
</Note>

Send `company_domain`, `company_linkedin_url`, or both. At least one is required, otherwise the call
is rejected with `422`.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://app.bettercontact.rocks/api/v2/enrich_profile/company \
    -H "X-API-Key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "company_domain": "microsoft.com" }'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch(
    "https://app.bettercontact.rocks/api/v2/enrich_profile/company",
    {
      method: "POST",
      headers: {
        "X-API-Key": process.env.BETTERCONTACT_API_KEY,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ company_domain: "microsoft.com" }),
    }
  );

  const { success, data } = await res.json();
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.post(
      "https://app.bettercontact.rocks/api/v2/enrich_profile/company",
      headers={"X-API-Key": os.environ["BETTERCONTACT_API_KEY"]},
      json={"company_domain": "microsoft.com"},
  )

  company = res.json()["data"]
  ```
</CodeGroup>

## Authentication

This endpoint accepts the key **either** in the `X-API-Key` header, like every other endpoint, **or**
as an `api_key` attribute in the body. The header is the recommended form: it keeps the key out of
your request payloads and out of your logs.

<Note>
  This is also the endpoint to use when a Lead Finder search turns out to be a single company
  lookup: that case is rejected with a `422`. See [Errors](/api-reference/errors).
</Note>

## What you get back

The response mirrors the `company_*` block of the [Lead Finder](/api-reference/endpoint/lead_finder_get)
payload, so the same parsing code works on both.

A few fields deserve a note:

| Field                                                           | Note                                                                                                                                         |
| --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `company_domain` / `company_website`                            | Always the same value.                                                                                                                       |
| `company_type`                                                  | Normalised: lowercased, spaces replaced by underscores. `Privately Held` comes back as `privately_held`.                                     |
| `company_employees_range_start` / `_end`                        | Parsed from the size range. `11-50` gives `11` and `50`. An open ended range such as `10000+` sets the start only and leaves the end `null`. |
| `company_head_quarters_city` and the `company_address_*` fields | May be an **empty string** rather than `null` when the source has no value. Test for emptiness, not just for `null`.                         |
| `company_keywords`                                              | An array of strings, not a comma separated string.                                                                                           |

<Warning>
  Every other `company_*` key from the Lead Finder payload is present in the response and always
  `null`. They are kept for payload compatibility, so do not read anything into them.

  Landbase specific attributes such as `revenue`, `is_b2b` and `technologies_used` are **not**
  returned by this endpoint. You can still filter on them through
  [Lead Finder](/api-reference/endpoint/lead_finder_post).
</Warning>


## OpenAPI

````yaml POST /enrich_profile/company
openapi: 3.0.1
info:
  title: BetterContact API
  description: >-
    The official BetterContact API to find new leads and enrich them with
    verified work emails and mobile phone numbers.
  version: 2.0.0
  contact:
    name: BetterContact Support
    email: contact@bettercontact.rocks
    url: https://doc.bettercontact.rocks
servers:
  - url: https://app.bettercontact.rocks/api/v2
security:
  - apiKey: []
paths:
  /enrich_profile/company:
    post:
      summary: Enrich a company profile
      description: >-
        Look up a single company by domain, LinkedIn URL, or both. Unlike the
        other endpoints this one is **synchronous**: the profile comes back in
        the same response, there is no `request_id` to poll.


        **This endpoint does not consume credits.**


        Authentication accepts either the `X-API-Key` header like every other
        endpoint, or an `api_key` attribute in the request body.
      operationId: enrichCompany
      requestBody:
        description: Company to look up
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrichCompanyRequest'
            examples:
              byDomain:
                summary: By domain
                value:
                  company_domain: microsoft.com
              byLinkedin:
                summary: By LinkedIn URL
                value:
                  company_linkedin_url: https://www.linkedin.com/company/microsoft
              keyInBody:
                summary: With the key in the body
                value:
                  api_key: YOUR_API_KEY
                  company_domain: microsoft.com
      responses:
        '200':
          description: Company found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/CompanyProfile'
        '401':
          description: Unauthorized. The API key is missing, invalid or deactivated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: No company matched the identifier you sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error: Company was not found.
        '422':
          description: Neither `company_domain` nor `company_linkedin_url` was provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error: company_domain or company_linkedin_url is required.
        '500':
          description: Unexpected error on our side, or an upstream failure. Safe to retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error: Something bad happened
      security:
        - apiKey: []
components:
  schemas:
    EnrichCompanyRequest:
      type: object
      description: >-
        At least one of `company_domain` or `company_linkedin_url` is required.
        You can send both.
      properties:
        company_domain:
          type: string
          description: Company website or domain.
          example: microsoft.com
        company_linkedin_url:
          type: string
          description: Company LinkedIn page URL.
          example: https://www.linkedin.com/company/microsoft
        api_key:
          type: string
          description: Your API key. Only needed if you do not send the `X-API-Key` header.
    CompanyProfile:
      type: object
      description: >-
        The company profile. Fields below carry data; every other `company_*`
        key from the Lead Finder payload is still present and always `null`,
        kept for payload compatibility. Landbase-only attributes such as
        `revenue`, `is_b2b` and `technologies_used` are not returned here.
      properties:
        company_id:
          type: integer
          description: BetterContact internal company identifier.
          example: 107993854
        company_name:
          type: string
          description: Company name.
          example: Bodegas Aragonesas S.A.
        company_domain:
          type: string
          description: Company domain.
          example: bodegasaragonesas.com
        company_website:
          type: string
          description: Company website. Same value as `company_domain`.
          example: bodegasaragonesas.com
        company_description:
          type: string
          description: Company description.
          example: Bodegas Aragonesas S.A. is a winery...
        company_linkedin_url:
          type: string
          description: Company LinkedIn page URL.
          example: https://www.linkedin.com/company/bodegas-aragonesas-s-a-
        company_industry:
          type: string
          description: Company industry.
          example: Beverage Manufacturing
        company_type:
          type: string
          description: >-
            Company type, lowercased with spaces replaced by underscores.
            `Privately Held` becomes `privately_held`.
          example: privately_held
        company_founded_year:
          type: integer
          description: Year the company was founded.
          example: 1984
        company_employees_number:
          type: integer
          description: Employee count.
          example: 20
        company_employees_range_start:
          type: integer
          description: >-
            Lower bound of the headcount range, parsed from the size range.
            `11-50` gives `11`.
          example: 11
        company_employees_range_end:
          type: integer
          description: >-
            Upper bound of the headcount range. `null` on open ended ranges:
            `10000+` sets the start only.
          example: 50
          nullable: true
        company_headquarters:
          type: string
          description: Full headquarters address.
          example: >-
            Carr. de Magallón a la Almunia, S/N; Fuendejalón, Aragón / España
            50529, ES
        company_head_quarters_city:
          type: string
          description: >-
            Headquarters city. May be an empty string when the source has no
            city.
          example: ''
        company_head_quarters_country:
          type: string
          description: Headquarters country.
          example: Spain
        company_address_city:
          type: string
          description: City part of the headquarters address.
          example: ''
        company_address_state:
          type: string
          description: State or region part of the headquarters address.
          example: ''
        company_address_country:
          type: string
          description: Country part of the headquarters address.
          example: Spain
        company_address_zipcode:
          type: string
          description: Postal code part of the headquarters address.
          example: ''
        company_keywords:
          type: array
          items:
            type: string
          description: Keywords associated with the company.
          example:
            - wine industry
            - wine
    UnauthorizedError:
      type: object
      properties:
        success:
          type: boolean
          example: false
          description: Not returned by the enrichment endpoints.
        error:
          type: string
          example: Your are not authorized. Please check your api_key.
    ApiError:
      type: object
      description: >-
        Generic error envelope. Depending on the endpoint the human readable
        text is carried by `error` or by `message`, so always read both.
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: Human readable error message.
        message:
          type: string
          description: Human readable error message.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key

````