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

# Preview an Account Merge

> Read-only preview of merging the accounts in `source_account_ids` into the account in the path. Nothing is changed. Returns what the merge would do: contacts and opportunities that move or are merged, contacts that conflict, the live sequences that would be stopped, and the resulting websites. Always preview before calling `merge_accounts`. Requires only the `api:read` scope.



## OpenAPI

````yaml https://api.monaco.com/openapi.json post /v1/accounts/{account_id}/merge/preview
openapi: 3.2.1
info:
  title: Monaco Public API
  description: Public API for Monaco
  version: 1.0.0
servers:
  - url: https://api.monaco.com
security: []
paths:
  /v1/accounts/{account_id}/merge/preview:
    post:
      tags:
        - Accounts
      summary: Preview an Account Merge
      description: >-
        Read-only preview of merging the accounts in `source_account_ids` into
        the account in the path. Nothing is changed. Returns what the merge
        would do: contacts and opportunities that move or are merged, contacts
        that conflict, the live sequences that would be stopped, and the
        resulting websites. Always preview before calling `merge_accounts`.
        Requires only the `api:read` scope.
      operationId: preview_account_merge
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Account Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountMergePreviewRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PublicItemResponse_AccountMergePreviewResponse_
        '422':
          description: The merge request is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountMergeErrorResponse'
        4XX:
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
components:
  schemas:
    AccountMergePreviewRequest:
      properties:
        source_account_ids:
          items:
            type: string
            format: uuid
          type: array
          maxItems: 100
          minItems: 1
          title: Source Account Ids
          description: >-
            IDs of the accounts to merge into the account in the path. Each is
            deleted when the merge is applied. At most 100 per request.
      additionalProperties: false
      type: object
      required:
        - source_account_ids
      title: AccountMergePreviewRequest
    PublicItemResponse_AccountMergePreviewResponse_:
      properties:
        data:
          $ref: '#/components/schemas/AccountMergePreviewResponse'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
      type: object
      required:
        - data
      title: PublicItemResponse[AccountMergePreviewResponse]
    AccountMergeErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/AccountMergeErrorDetail'
      type: object
      required:
        - error
      title: AccountMergeErrorResponse
    PublicErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - error
      title: PublicErrorResponse
    AccountMergePreviewResponse:
      properties:
        target_account:
          $ref: '#/components/schemas/MergeAccountSummary'
        source_accounts:
          items:
            $ref: '#/components/schemas/MergeAccountSummary'
          type: array
          title: Source Accounts
        counts:
          $ref: '#/components/schemas/AccountMergeCounts'
        contact_conflicts:
          items:
            $ref: '#/components/schemas/AccountMergeContactConflict'
          type: array
          title: Contact Conflicts
        blocking_sequences:
          items:
            $ref: '#/components/schemas/AccountMergeBlockingSequence'
          type: array
          title: Blocking Sequences
        requires_sequence_stop:
          type: boolean
          title: Requires Sequence Stop
          description: True when applying the merge would stop live sequences
        websites:
          $ref: '#/components/schemas/AccountMergeWebsites'
          description: The websites the merged account will hold
      type: object
      required:
        - target_account
        - source_accounts
        - counts
        - contact_conflicts
        - blocking_sequences
        - requires_sequence_stop
        - websites
      title: AccountMergePreviewResponse
    ResponseMeta:
      properties:
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: Server timestamp of the response
      type: object
      title: ResponseMeta
    AccountMergeErrorDetail:
      properties:
        code:
          type: string
          title: Code
          description: Machine-readable error code
          examples:
            - not_found
        message:
          type: string
          title: Message
          description: Human-readable error message
          examples:
            - Resource not found
        completed_steps:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Completed Steps
          description: >-
            For `merge_failed`, the steps committed before the failure, without
            its cause
        source_accounts_deleted:
          anyOf:
            - type: integer
            - type: 'null'
          title: Source Accounts Deleted
          description: >-
            For `merge_failed`, how many source deletions committed before the
            failure
        blocking_sequence_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Blocking Sequence Count
          description: >-
            For `sequence_stop_confirmation_required`, how many live sequences
            would stop
      type: object
      required:
        - code
        - message
      title: AccountMergeErrorDetail
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
          description: Machine-readable error code
          examples:
            - not_found
        message:
          type: string
          title: Message
          description: Human-readable error message
          examples:
            - Resource not found
      type: object
      required:
        - code
        - message
      title: ErrorDetail
    MergeAccountSummary:
      properties:
        account_id:
          type: string
          title: Account Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
      type: object
      required:
        - account_id
      title: MergeAccountSummary
    AccountMergeCounts:
      properties:
        contacts_moving:
          type: integer
          title: Contacts Moving
        contacts_merging:
          type: integer
          title: Contacts Merging
        opportunities_moving:
          type: integer
          title: Opportunities Moving
        opportunities_deduped:
          type: integer
          title: Opportunities Deduped
        tasks_moving:
          type: integer
          title: Tasks Moving
        tags_added:
          type: integer
          title: Tags Added
      type: object
      required:
        - contacts_moving
        - contacts_merging
        - opportunities_moving
        - opportunities_deduped
        - tasks_moving
        - tags_added
      title: AccountMergeCounts
    AccountMergeContactConflict:
      properties:
        reason:
          type: string
          title: Reason
          description: >-
            The shared identity: `SAME_PERSON`, `DUPLICATE_EMAIL` or
            `DUPLICATE_LINKEDIN`. The target contact is kept and the source
            contact is merged into it.
        source_contact:
          $ref: '#/components/schemas/MergeContactSummary'
        target_contact:
          $ref: '#/components/schemas/MergeContactSummary'
      type: object
      required:
        - reason
        - source_contact
        - target_contact
      title: AccountMergeContactConflict
    AccountMergeBlockingSequence:
      properties:
        sequence_id:
          type: string
          title: Sequence Id
        status:
          type: string
          title: Status
        contact:
          $ref: '#/components/schemas/MergeContactSummary'
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        campaign_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaign Name
      type: object
      required:
        - sequence_id
        - status
        - contact
      title: AccountMergeBlockingSequence
    AccountMergeWebsites:
      properties:
        primary:
          anyOf:
            - type: string
            - type: 'null'
          title: Primary
        secondary:
          items:
            type: string
          type: array
          title: Secondary
      type: object
      required:
        - secondary
      title: AccountMergeWebsites
    MergeContactSummary:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
      type: object
      required:
        - id
      title: MergeContactSummary

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.