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

# talkvalue path person merge

> Merge a source person into a target person, consolidating channels, events, and history. Requires --confirm.

`talkvalue path person merge` consolidates two duplicate person records into one. The source person's emails, phones, channels, events, and activity history move into the target, and TalkValue retires the source ID. Prefer this over `delete` whenever you spot a duplicate. Attribution and event history from both records remain attached to the target.

## Synopsis

```bash theme={null}
talkvalue path person merge <sourceId> <targetId> --confirm
```

## Arguments

| Argument     | Type    | Description                                                                           |
| ------------ | ------- | ------------------------------------------------------------------------------------- |
| `<sourceId>` | integer | Person ID to merge **from**. After the call this ID stops resolving via `person get`. |
| `<targetId>` | integer | Person ID to merge **into**. This record survives and absorbs the source.             |

## Options

| Flag        | Type | Description                                                       |
| ----------- | ---- | ----------------------------------------------------------------- |
| `--confirm` | flag | Required. The CLI exits with a usage error if you omit this flag. |

## Examples

### 1. Merge two duplicates

```bash theme={null}
talkvalue path person merge 199 142 --confirm
```

Merges person `199` into person `142`. The output is the target's updated record, same shape as [`person get`](/cli/commands/path/person/get), so you can verify the merged email, phone, and channel set.

### 2. Inspect both before merging

```bash theme={null}
talkvalue path person get 199 --json > source.json
talkvalue path person get 142 --json > target.json
diff <(jq '.data.primaryEmail' source.json) <(jq '.data.primaryEmail' target.json) && echo "same person?"
```

This checks the records match before the destructive call, which is useful in CI scripts that auto-merge on an email match.

### 3. Roll back a mistake

To reverse a merge, use [`person merge-undo`](/cli/commands/path/person/merge-undo) within the retention window:

```bash theme={null}
talkvalue path person merge-undo 503 --confirm
```

The merge operation ID is in the merge response (`mergeOperations[0].id` on the target's detail record) or in the dashboard's activity log.

## Response

```jsonc theme={null}
{
  "data": {
    "id": 142,
    "name": "Alice Kim",
    "primaryEmail": { "email": "alice@acme.com", "type": "WORK", "domain": "acme.com" },
    "emails": [
      { "email": "alice@acme.com", "type": "WORK", "domain": "acme.com" },
      { "email": "alice.kim@personal.com", "type": "PERSONAL", "domain": "personal.com" }
    ],
    "primaryPhone": "+1-415-555-0199",
    "company": { "id": 88, "displayName": "Acme Inc.", "domain": "acme.com", "nameUpdatable": true },
    "jobTitle": "Head of Growth",
    "channels": [/* combined */],
    "events": [/* combined */],
    "mergeOperations": [
      { "id": 503, "sourcePersonName": "Alice K.", "sourcePrimaryEmail": "alice.kim@personal.com", "mergedAt": "2026-05-21T14:32:18Z" }
    ],
    "createdAt": "2026-04-12T00:00:00Z"
  }
}
```

The returned record is the target person after the merge, with channels and events from both records combined. Calls to `person get 199` after the merge return `404`.

## See also

* [`person get`](/cli/commands/path/person/get). Verify source and target before merging.
* [`person merge-undo`](/cli/commands/path/person/merge-undo). Reverse a merge within the retention window.
* [`person activity`](/cli/commands/path/person/activity). `MERGED` entries record the source → target link.
* [`person delete`](/cli/commands/path/person/delete). Prefer merge over delete for duplicates.
* [People](/path/manage/people). The dashboard surface for the same operation.
