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

# Set



## OpenAPI

````yaml /openapi.json patch /v1/workspaces/{workspaceId}/contacts/companies/{companyId}/global-company
openapi: 3.1.0
info:
  title: Specurate API
  description: ''
  version: 1.0.0
  contact: {}
servers:
  - url: https://app.specurate.com/api
    description: API Server
security: []
tags: []
paths:
  /v1/workspaces/{workspaceId}/contacts/companies/{companyId}/global-company:
    patch:
      tags:
        - Company Identity
      summary: Set
      operationId: CompanyIdentityController_set_v1
      parameters:
        - name: workspaceId
          required: true
          in: path
          schema:
            type: string
            pattern: ^[1-9]\d{0,18}$
        - name: companyId
          required: true
          in: path
          schema:
            type: string
            pattern: ^[1-9]\d{0,18}$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetCompanyIdentityDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyIdentityResponseDto'
components:
  schemas:
    SetCompanyIdentityDto:
      type: object
      properties:
        globalCompanyId:
          anyOf:
            - type: string
              pattern: ^[1-9]\d{0,18}$
            - type: 'null'
        expectedVersion:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            - type: 'null'
      required:
        - globalCompanyId
        - expectedVersion
      additionalProperties: false
    CompanyIdentityResponseDto:
      type: object
      properties:
        globalCompany:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/GlobalCompanyResponseDto'
        version:
          type: number
          nullable: true
        suggestion:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/CompanyIdentitySuggestionDto'
      required:
        - globalCompany
        - version
    GlobalCompanyResponseDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        primaryType:
          enum:
            - brand
            - rep
            - dealer
            - distributor
          type: string
        legalName:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        aliases:
          type: array
          items:
            type: string
        domains:
          type: array
          items:
            type: string
        retiredAt:
          type: string
          nullable: true
      required:
        - id
        - name
        - primaryType
        - legalName
        - country
        - aliases
        - domains
        - retiredAt
    CompanyIdentitySuggestionDto:
      type: object
      properties:
        candidates:
          type: array
          items:
            $ref: '#/components/schemas/CompanyIdentityCandidateResponseDto'
        expectedVersion:
          type: number
          nullable: true
        evidenceFingerprint:
          type: string
      required:
        - candidates
        - expectedVersion
        - evidenceFingerprint
    CompanyIdentityCandidateResponseDto:
      type: object
      properties:
        company:
          $ref: '#/components/schemas/GlobalCompanyResponseDto'
        nameMatch:
          type: boolean
        matchingHosts:
          type: array
          items:
            type: string
        typeMatch:
          type: boolean
      required:
        - company
        - nameMatch
        - matchingHosts
        - typeMatch

````