> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/sdks-and-cli/membership/users/merge-contacts.md).

# Merge Contacts

A **contact** (user) is a person in your project's membership directory, with one or more linked logins (identities). Membership manages their profile, identities, roles, and lifecycle. Merges the contacts.

{% hint style="warning" %}
This action is destructive or irreversible. Make sure you target the right item and confirm before running it.
{% endhint %}

This method is on the **Hub** surface (`norbix.hub.membership`) — call it from admin tooling or IaC.

{% hint style="info" %}
These examples assume the SDK is installed and your credentials are set as environment variables — each client reads them automatically, so the constructors below take no arguments. See [Install a Norbix SDK](/sdks-and-cli/install.md).
{% endhint %}

{% tabs %}
{% tab title="JavaScript / TypeScript" %}

```ts
import { Norbix } from '@norbix.ai/ts';
const norbix = new Norbix();

const result = await norbix.hub.membership.mergeContacts({
  survivorId: 'survivor_4kX9mQvR2tYw7ZbC1dFgHj',
  mergedIds: ['item-1', 'item-2'],
});
```

{% endtab %}

{% tab title=".NET" %}

```csharp
using Norbix.Sdk;
using Norbix.Sdk.Types.Hub;

using var client = new NorbixClient();

var result = await client.Membership.MergeContactsAsync(new MergeContactsRequest
{
    SurvivorId = "survivor_4kX9mQvR2tYw7ZbC1dFgHj",
    MergedIds = new[] { "item-1", "item-2" },
});
```

{% endtab %}

{% tab title="Python" %}

```python
from norbix_python import NorbixHub

norbix = NorbixHub()

result = norbix.membership.merge_contacts(
    survivorId="survivor_4kX9mQvR2tYw7ZbC1dFgHj",
    mergedIds=["item-1", "item-2"],
)
```

{% endtab %}

{% tab title="Go" %}

```go
c, _ := norbix.New(norbix.Options{})
ctx := context.Background()

var result map[string]any
err := c.Hub.Membership.MergeContacts(ctx, map[string]any{
	"survivorId": "survivor_4kX9mQvR2tYw7ZbC1dFgHj",
	"mergedIds": []string{"item-1", "item-2"},
}, &result)
```

{% endtab %}

{% tab title="Dart / Flutter" %}

```dart
import 'package:norbix/norbix_hub.dart';

final hub = NorbixHub();

final result = await hub.membership.mergeContacts(body: {
  'survivorId': 'survivor_4kX9mQvR2tYw7ZbC1dFgHj',
  'mergedIds': ['item-1', 'item-2'],
});
```

{% endtab %}

{% tab title="Swift" %}

```swift
import NorbixSwift

let client = Norbix()

let result = try await client.hub.membership.mergeContacts([
    "survivorId": "survivor_4kX9mQvR2tYw7ZbC1dFgHj",
    "mergedIds": ["item-1", "item-2"],
])
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
import dev.norbix.sdk.hub.NorbixHub

val hub = NorbixHub()

val result = hub.membership.mergeContacts(mapOf(
    "survivorId" to "survivor_4kX9mQvR2tYw7ZbC1dFgHj",
    "mergedIds" to listOf("item-1", "item-2"),
))
```

{% endtab %}

{% tab title="CLI" %}

```sh
norbix raw '/{version}/membership/users/merge' -X POST --body '{"survivorId":"survivor_4kX9mQvR2tYw7ZbC1dFgHj","mergedIds":["item-1","item-2"]}'
```

{% endtab %}
{% endtabs %}

## In the dashboard

Manage this visually in Norbix Cloud — see [Membership → Users](/norbix-cloud/membership/users.md).

## API reference

Full request and response for this endpoint: [Merge Contacts](/api-reference/membership/users/merge-contacts.md).
