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

# Get a company by ID

> Retrieve data about a company in HubSpot, specified by its ID. This endpoint can be helpful for syncing changes made to a particular company in HubSpot to the corresponding record in an Account-Based Marketing (ABM) system, or to look up specific attributes of a company.

export const ScopesList = ({scopes = [], description = "この API には、次のいずれかのスコープが必要です。"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['crm.objects.companies.read', 'crm.objects.companies.write']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v2/crm-companies-v2.json GET /companies/v2/companies/{companyId}
openapi: 3.0.0
info:
  title: CRM Companies API v2
  version: 2.0.0
  description: Legacy CRM Companies API v2 - Auto-generated from MDX documentation
servers:
  - url: https://api.hubapi.com
    description: HubSpot API Server
security: []
paths:
  /companies/v2/companies/{companyId}:
    get:
      summary: Get a company by ID
      description: >-
        Retrieve data about a company in HubSpot, specified by its ID. This
        endpoint can be helpful for syncing changes made to a particular company
        in HubSpot to the corresponding record in an Account-Based Marketing
        (ABM) system, or to look up specific attributes of a company.
      operationId: getcompaniesv2companiescompanyId
      parameters:
        - name: companyId
          in: path
          required: true
          description: Unique identifier for a particular company.
          schema:
            type: string
        - name: includeMergeAudits
          in: query
          required: false
          description: >-
            Returns any merge history if the company has been previously merged
            with another company record. Defaults to false.
          schema:
            type: string
        - name: includePropertyVersions
          in: query
          required: false
          description: >-
            Returns the previous versions for all properties of the requested
            company. Defaults to false.
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              examples:
                example1:
                  summary: Get a company by ID - Example 1
                  value:
                    portalId: 62515
                    companyId: 10444744
                    isDeleted: false
                    properties:
                      description:
                        value: A far better description than before
                        timestamp: 1403218621658
                        source: API
                        sourceId: null
                        versions:
                          - name: description
                            value: A far better description than before
                            timestamp: 1403218621658
                            source: API
                            sourceVid: []
                      name:
                        value: A company name
                        timestamp: 1403217668394
                        source: API
                        sourceId: null
                        versions:
                          - name: name
                            value: A company name
                            timestamp: 1403217668394
                            source: API
                            sourceVid: []
                      createdate:
                        value: '1403217668394'
                        timestamp: 1403217668394
                        source: API
                        sourceId: null
                        versions:
                          - name: createdate
                            value: '1403217668394'
                            timestamp: 1403217668394
                            source: API
                            sourceVid: []

````