For the complete documentation index, see llms.txt. This page is also available as Markdown.

Merging Records

Duplicate records can be merged through the API. Merging keeps one record (the primary) and folds the other records into it: all related data — deals, emails, calendar events, tasks, notes, comments, files, invoices, and more — is repointed to the primary record, and the merged records are archived.

Merge endpoints are available for contacts, companies, and deals.

Merge Contacts

POST /api/contacts/merge

Merges one or more contacts into a single primary contact.

Request Body

Field
Type
Required
Description

contactId

string

Yes

ID of the contact to keep (the primary record).

mergeIds

string[]

Yes

IDs of the contacts to merge into the primary, then archive.

workspaceId

string

No

Workspace ID. The workspace is also derived from the primary.

Example

curl -X POST "https://api.zero.inc/api/contacts/merge" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "contactId": "PRIMARY_CONTACT_UUID",
    "mergeIds": ["DUPLICATE_CONTACT_UUID_1", "DUPLICATE_CONTACT_UUID_2"]
  }'

Behavior

  • Field values (title, company, location, social handles, phone, type, etc.) are taken from the primary contact when set, otherwise the first non-empty value from the merged contacts is used.

  • List memberships, owners, and custom properties are combined across all contacts.

  • All related records (deals, email threads, calendar events, LinkedIn threads and connections, custom activities, tasks, notes, comments, files, invoices, issues, and analytics events) are repointed from the merged contacts to the primary contact.

  • Each merged contact is archived and stamped with mergedToId (the primary contact's ID) and mergedAt.

Response

The data object is the primary contact that the others were merged into.

Merge Companies

Identical behavior to contact merging. The primary record is identified with companyId instead of contactId.

Example

Merge Deals

Identical behavior to contact merging. The primary record is identified with dealId instead of contactId.

Example

Notes

  • All three endpoints require a Bearer token and operate only on records within your workspace.

  • Merging is not reversible through the API. The merged records are archived rather than deleted, but their relations have already been repointed to the primary record.

Last updated