---
title: "Bulk Merge Duplicate Pairs"
method: POST
path: "/api/v1/report-ai/customer-profiles/duplicates/bulk-merge"
tags: ["report-ai", "customer-profiles"]
---

# Bulk Merge Duplicate Pairs

`POST /api/v1/report-ai/customer-profiles/duplicates/bulk-merge`

Merge up to ``BULK_MERGE_MAX`` pairs, each in its own transaction.

One bad pair must not roll back the other forty-nine — the operator would
have no way to tell which of their decisions survived. Every pair reports
its own outcome, and each merge is individually undoable through the
existing unmerge route.

## Request body

- DuplicateBulkMergeRequest — Pair ids to merge in one go. Capped at ``BULK_MERGE_MAX`` per call.
  - `pair_ids` string[], required

## Response `200`

Successful Response

- DuplicateBulkMergeResponse — Per-pair outcomes. Each pair merges in its own transaction, so a partial failure is normal and reported rather than rolled back over the rest.
  - `results` DuplicateBulkMergeResult[], required
    - `pair_id` string, uuid, required
    - `status` string, required
    - `survivor_profile_id` string, uuid, nullable
    - `merged_profile_id` string, uuid, nullable
    - `merge_id` string, uuid, nullable
    - `error` string, nullable
  - `merged` integer, required
  - `failed` integer, required

## Other responses

- `422` — Validation Error

## Changes

> 28 revisions in range; 1 not diffed.

- **2026-09-03** `d65b8fefae34` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Change history](https://skmtc.dev/getanana/apis/cleon-api/changes/api/v1/report-ai/customer-profiles/duplicates/bulk-merge/post.md)

---

[API](https://skmtc.dev/getanana/apis/cleon-api.md) · [All operations](https://skmtc.dev/getanana/apis/cleon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getanana/apis/cleon-api/revisions/6b978a517225?raw)
