> ## 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.

# Merge Contacts

> Merges the contact `source_contact_id` into the contact in the path. This is irreversible, like deleting a contact: the source contact is deleted, the kept contact's empty fields are filled from it, its notes are appended, its sequences, tasks, tags, audience memberships, opportunity links, custom field values move to the kept contact, and its live sequences are stopped.

When live sequences would be stopped the request is rejected with 409 `sequence_stop_confirmation_required` unless `confirm_sequence_stop` is true. The merge runs in one transaction: on 422 `merge_failed` nothing was changed. Retrying a merge that already completed returns 404, because the source contact no longer exists.



## OpenAPI

````yaml https://api.monaco.com/openapi.json post /v1/contacts/{contact_id}/merge
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:
    post:
      tags:
        - Contacts
      summary: Merge Contacts
      description: >-
        Merges the contact `source_contact_id` into the contact in the path.
        This is irreversible, like deleting a contact: the source contact is
        deleted, the kept contact's empty fields are filled from it, its notes
        are appended, its sequences, tasks, tags, audience memberships,
        opportunity links, custom field values move to the kept contact, and its
        live sequences are stopped.


        When live sequences would be stopped the request is rejected with 409
        `sequence_stop_confirmation_required` unless `confirm_sequence_stop` is
        true. The merge runs in one transaction: on 422 `merge_failed` nothing
        was changed. Retrying a merge that already completed returns 404,
        because the source contact no longer exists.
      operationId: merge_contacts
      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/ContactMergeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicItemResponse_ContactMergeResponse_'
        '409':
          description: Confirmation required to stop live sequences
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactMergeErrorResponse'
        '422':
          description: The merge request is invalid, or the merge failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactMergeErrorResponse'
        4XX:
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
components:
  schemas:
    ContactMergeRequest:
      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.
        confirm_sequence_stop:
          type: boolean
          title: Confirm Sequence Stop
          description: >-
            Confirms that the live sequences listed under `blocking_sequences`
            in the preview may be stopped. Without it, a merge that would stop
            live sequences is rejected with
            `sequence_stop_confirmation_required`.
          default: false
      additionalProperties: false
      type: object
      required:
        - source_contact_id
      title: ContactMergeRequest
    PublicItemResponse_ContactMergeResponse_:
      properties:
        data:
          $ref: '#/components/schemas/ContactMergeResponse'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
      type: object
      required:
        - data
      title: PublicItemResponse[ContactMergeResponse]
    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
    ContactMergeResponse:
      properties:
        target_contact_id:
          type: string
          title: Target Contact Id
        source_contact_id:
          type: string
          title: Source Contact Id
        plays_moved:
          type: integer
          title: Plays Moved
        user_tasks_moved:
          type: integer
          title: User Tasks Moved
        tags_merged:
          type: integer
          title: Tags Merged
        fields_filled_from_source:
          items:
            type: string
          type: array
          title: Fields Filled From Source
        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
        sequences_stopped:
          items:
            type: string
          type: array
          title: Sequences Stopped
          description: IDs of the source's sequences stopped
        sequences_dismissed:
          items:
            type: string
          type: array
          title: Sequences Dismissed
          description: IDs of the source's unstarted sequences dismissed
        deleted_at:
          type: string
          format: date-time
          title: Deleted At
          description: When the source contact was deleted
      type: object
      required:
        - target_contact_id
        - source_contact_id
        - plays_moved
        - user_tasks_moved
        - tags_merged
        - fields_filled_from_source
        - audience_memberships_moved
        - opportunity_links_moved
        - custom_fields_filled
        - sequences_stopped
        - sequences_dismissed
        - deleted_at
      title: ContactMergeResponse
    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

````

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