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

Merging Records

Merging keeps one record — the primary — and folds the others into it. Everything related to the duplicates (deals, emails, calendar events, tasks, notes, comments, files, invoices and the rest) is repointed at the primary, and the duplicates are archived rather than deleted.

There is an endpoint for each of contacts, companies and deals. They behave identically; only the field naming the primary changes.

Merge Contacts

POST /api/contacts/merge

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.

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

As above, with companyId naming the primary.

Example

Merge Deals

As above, with dealId naming the primary.

Example

Notes

  • All three require a Bearer token and only touch records in your workspace.

  • Merging cannot be undone through the API. The duplicates survive as archived records, but their relations have already moved to the primary.

Last updated