Skip to main content
POST
/
v1
/
contacts
/
{contactId}
/
merge
Merge contacts
curl --request POST \
  --url https://api.zavu.dev/v1/contacts/{contactId}/merge \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sourceContactId": "jx7xyz789"
}
'
{
  "id": "<string>",
  "availableChannels": [
    "<string>"
  ],
  "verified": true,
  "metadata": {},
  "createdAt": "2023-11-07T05:31:56Z",
  "displayName": "John Doe",
  "phoneNumber": "+56912345678",
  "primaryPhone": "+56912345678",
  "primaryEmail": "john@example.com",
  "countryCode": "CL",
  "profileName": "John Doe",
  "defaultChannel": "sms",
  "channels": [
    {
      "id": "<string>",
      "channel": "sms",
      "identifier": "+14155551234",
      "isPrimary": true,
      "verified": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "countryCode": "US",
      "label": "work",
      "metrics": {
        "successCount": 123,
        "failureCount": 123,
        "totalAttempts": 123,
        "avgDeliveryTimeMs": 123,
        "lastSuccessAt": "2023-11-07T05:31:56Z"
      },
      "lastInboundAt": "2023-11-07T05:31:56Z",
      "metadata": {},
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "suggestedMergeWith": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

contactId
string
required

Body

application/json

Request body to merge contacts.

sourceContactId
string
required

ID of the contact to merge into the target contact. The source contact will be marked as merged.

Response

Contacts merged. Returns the updated target contact.

id
string
required
availableChannels
string[]
required

List of available messaging channels for this contact.

verified
boolean
required

Whether this contact has been verified.

metadata
object
required
createdAt
string<date-time>
required
displayName
string

Display name for the contact.

Example:

"John Doe"

phoneNumber
string

DEPRECATED: Use primaryPhone instead. Primary phone number in E.164 format.

Example:

"+56912345678"

primaryPhone
string

Primary phone number in E.164 format.

Example:

"+56912345678"

primaryEmail
string<email>

Primary email address.

Example:

"john@example.com"

countryCode
string
Example:

"CL"

profileName
string | null

Contact's WhatsApp profile name. Only available for WhatsApp contacts.

Example:

"John Doe"

defaultChannel
enum<string>

Preferred channel for this contact.

Available options:
sms,
whatsapp,
telegram,
email,
instagram,
voice
channels
object[]

All communication channels for this contact.

suggestedMergeWith
string

ID of a contact suggested for merging.

updatedAt
string<date-time>