> ## 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 a Contact Merge

> Read-only preview of merging the contact `source_contact_id` into the contact in the path. Nothing is changed. Returns how the kept contact will look, which of its empty fields the source fills, what moves over (sequences, tasks, tags, audience memberships, opportunity links, custom field values) and the live sequences that would be stopped. Requires only the `api:read` scope.

Both contacts must be on the same account, and when both have an email or both have a LinkedIn URL those must match; otherwise the request is rejected with 422 `merge_invalid` and a message naming the rule.



## OpenAPI

````yaml https://api.monaco.com/openapi.json post /v1/contacts/{contact_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/contacts/{contact_id}/merge/preview:
    post:
      tags:
        - Contacts
      summary: Preview a Contact Merge
      description: >-
        Read-only preview of merging the contact `source_contact_id` into the
        contact in the path. Nothing is changed. Returns how the kept contact
        will look, which of its empty fields the source fills, what moves over
        (sequences, tasks, tags, audience memberships, opportunity links, custom
        field values) and the live sequences that would be stopped. Requires
        only the `api:read` scope.


        Both contacts must be on the same account, and when both have an email
        or both have a LinkedIn URL those must match; otherwise the request is
        rejected with 422 `merge_invalid` and a message naming the rule.
      operationId: preview_contact_merge
      parameters:
        - name: contact_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Contact Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactMergePreviewRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PublicItemResponse_ContactMergePreviewResponse_
        '422':
          description: The merge request is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactMergeErrorResponse'
        4XX:
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
components:
  schemas:
    ContactMergePreviewRequest:
      properties:
        source_contact_id:
          type: string
          format: uuid
          title: Source Contact Id
          description: >-
            ID of the contact to merge into the contact in the path. It is
            deleted when the merge is applied. Both contacts must be on the same
            account.
      additionalProperties: false
      type: object
      required:
        - source_contact_id
      title: ContactMergePreviewRequest
    PublicItemResponse_ContactMergePreviewResponse_:
      properties:
        data:
          $ref: '#/components/schemas/ContactMergePreviewResponse'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
      type: object
      required:
        - data
      title: PublicItemResponse[ContactMergePreviewResponse]
    ContactMergeErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ContactMergeErrorDetail'
      type: object
      required:
        - error
      title: ContactMergeErrorResponse
    PublicErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - error
      title: PublicErrorResponse
    ContactMergePreviewResponse:
      properties:
        target_contact:
          $ref: '#/components/schemas/ContactMergeContactSummary'
        source_contact:
          $ref: '#/components/schemas/ContactMergeContactSummary'
        merged_contact:
          $ref: '#/components/schemas/ContactMergeContactSummary'
          description: The contact in the path as it will look after the merge
        fields_filled_from_source:
          items:
            type: string
          type: array
          title: Fields Filled From Source
          description: Empty fields on the contact in the path that take the source's value
        notes_appended:
          type: boolean
          title: Notes Appended
          description: True when the source's notes will be appended
        counts:
          $ref: '#/components/schemas/ContactMergeCounts'
        blocking_sequences:
          items:
            $ref: '#/components/schemas/MergeBlockingSequence'
          type: array
          title: Blocking Sequences
        requires_sequence_stop:
          type: boolean
          title: Requires Sequence Stop
          description: True when applying the merge would stop live sequences
      type: object
      required:
        - target_contact
        - source_contact
        - merged_contact
        - fields_filled_from_source
        - notes_appended
        - counts
        - blocking_sequences
        - requires_sequence_stop
      title: ContactMergePreviewResponse
    ResponseMeta:
      properties:
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: Server timestamp of the response
      type: object
      title: ResponseMeta
    ContactMergeErrorDetail:
      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
        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: ContactMergeErrorDetail
    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
    ContactMergeContactSummary:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        linkedin_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Linkedin Url
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        archived:
          type: boolean
          title: Archived
          default: false
      type: object
      required:
        - id
      title: ContactMergeContactSummary
    ContactMergeCounts:
      properties:
        plays_moved:
          type: integer
          title: Plays Moved
        user_tasks_moved:
          type: integer
          title: User Tasks Moved
        tags_added:
          type: integer
          title: Tags Added
        audience_memberships_moved:
          type: integer
          title: Audience Memberships Moved
        opportunity_links_moved:
          type: integer
          title: Opportunity Links Moved
        custom_fields_filled:
          type: integer
          title: Custom Fields Filled
      type: object
      required:
        - plays_moved
        - user_tasks_moved
        - tags_added
        - audience_memberships_moved
        - opportunity_links_moved
        - custom_fields_filled
      title: ContactMergeCounts
    MergeBlockingSequence:
      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: MergeBlockingSequence
    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.