Merging Contacts

Endpoint

PATCH /contacts/merge

Description

Merges a list of contacts into a single contact. All contacts must be connected to the current account. All contact info (i.e. id, wallet(s), tags, discord, email, phone number, etc...) will be merged.

Conflicting information (ex: id, conflicting email addresses, etc...) will be solved by overwriting the contact of lower priority with the contact info of higher priority. Priority is assigned by the order in which the contacts are provided in the contactIds parameter, with contacts of higher priority coming first.

Parameters

  • Note: The priority of a contact is determined by the order of the contact ids, with higher priority contacts coming first.

Returns

Examples

Given the following contacts currently exist:

{
	id: "0"
	email:  "bob@example.com"
},
{
	id: "1"
	phoneNumber:  "+123445678"
	discordUsername:  "example#0000"
},
{
	id: "2"
	email:  "bill@example.com"
	phoneNumber:  "+18901234"
	discordUsername:  "example2#0001"
}

Example 1:

{
	"contactIds": ["0", "1"]
}

Results in the contact:

{
	id: "0"
	email:  "bob@example.com"
	phoneNumber  "+12345678"
	discordUsername:  "example#0000"
}

Example 2:

{
	"contactIds": ["0", "1", "2"]
}

Results in the contact:

{
	id: "0"
	email:  "bob@example.com"
	phoneNumber  "+12345678"
	discordUsername:  "example#0000"
}

Example 3:

{
	"contactIds": ["2", "1", "0"]
}

Results in the contact:

{
	id: "2"
	email:  "bill@example.com"
	phoneNumber:  "+18901234"
	discordUsername:  "example2#0001"
}

Example 4:

{
	"contactIds": ["1", "0", "2"]
}

Results in the contact:

{
	id: "1"
	email:  "bob@example.com"
	phoneNumber:  "+12345678"
	discordUsername:  "example#0000"
}

Last updated