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

# Merge a company into another

> Merge source_id into the path company. Moves the source's threads, contacts, and upvotes to the survivor, fills the survivor's empty properties, then deletes the source. Merges the linked Linear customers when both exist. Requires the companies:write scope.



## OpenAPI

````yaml openapi-v2.json post /companies/{id}/merge
openapi: 3.0.3
info:
  title: Productlane API
  description: Productlane API v2.
  version: 2.0.0
servers:
  - url: https://productlane.com/api/v2
security: []
paths:
  /companies/{id}/merge:
    post:
      tags:
        - companies
      summary: Merge a company into another
      description: >-
        Merge source_id into the path company. Moves the source's threads,
        contacts, and upvotes to the survivor, fills the survivor's empty
        properties, then deletes the source. Merges the linked Linear customers
        when both exist. Requires the companies:write scope.
      operationId: companies-merge
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                source_id:
                  type: string
                  description: >-
                    Company merged into the path company and then deleted. Its
                    threads, contacts, and upvotes move to the survivor; the
                    survivor's own values win on conflicts.
              required:
                - source_id
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  company:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      logo_url:
                        type: string
                        nullable: true
                      domains:
                        type: array
                        items:
                          type: string
                      size:
                        type: number
                        nullable: true
                      revenue:
                        type: number
                        nullable: true
                      status_id:
                        type: string
                        nullable: true
                      status_name:
                        type: string
                        nullable: true
                      tier_id:
                        type: string
                        nullable: true
                      tier_name:
                        type: string
                        nullable: true
                      owner:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                            nullable: true
                          avatar_url:
                            type: string
                            nullable: true
                        required:
                          - id
                          - name
                          - avatar_url
                        additionalProperties: false
                        nullable: true
                      external_ids:
                        type: array
                        items:
                          type: string
                        description: >-
                          Caller-owned cross-system identifiers (CRM ids, etc.).
                          Replaced wholesale on create/update.
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                      - id
                      - name
                      - logo_url
                      - domains
                      - size
                      - revenue
                      - status_id
                      - status_name
                      - tier_id
                      - tier_name
                      - owner
                      - external_ids
                      - created_at
                      - updated_at
                    additionalProperties: false
                  moved_threads:
                    type: number
                  moved_contacts:
                    type: number
                  merged_linear_customer:
                    type: boolean
                    description: >-
                      True when both companies were linked to distinct Linear
                      customers and Linear merged them.
                required:
                  - company
                  - moved_threads
                  - moved_contacts
                  - merged_linear_customer
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  type: object
                  properties:
                    message:
                      type: string
                  required:
                    - message
                  additionalProperties: false
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````