# Merge Two Contacts

> Solarium docs, Contacts. All requests are `POST https://api.trysolarium.com/graphql/` with `Authorization: Bearer <api key>` and a JSON body `{"query": ..., "variables": ...}`. Every query and mutation takes an `organizationId` (find it with `myOrganizations`). Index of all pages: https://trysolarium.com/llms.txt

Moves everything on merge_id onto keep_id, adds its emails, fills in what keep_id is missing, then deletes merge_id. Both must be the same type. The preview lists what would move.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `name` | `String!` | Yes | "merge_contacts" |
| `params.keep_id` | `String!` | Yes | The contact to keep |
| `params.merge_id` | `String!` | Yes | The duplicate, deleted once merged |
| `apply` | `Boolean` | No | true to merge |

### Request

```graphql
mutation {
  previewOp(
    organizationId: "a1b2c3d4-..."
    name: "merge_contacts"
    params: { keep_id: "b2c3d4e5-...", merge_id: "c3d4e5f6-..." }
  ) { success result }
}
```

### Response

```json
{
  "data": {
    "previewOp": {
      "success": true,
      "result": {
        "summary": "Merged North Group Ltd Into North Group: Moved 2 invoices, 3 entries.",
        "data": { "deleted_id": "c3d4e5f6-...", "moved": { "invoices": 2, "entries": 3 }, "filled": ["phone"] }
      }
    }
  }
}
```
