Merge Leads Beta
Merge one lead into another and delete the duplicate.
https://api.foxreach.io/ api/ v1/ leads/ mergeRequires an API key with the write scope.
Merges the secondary lead into the primary lead, in one transaction, then deletes the secondary (a soft delete, like Bulk Delete Leads). Both leads must be live leads of the workspace.
What moves to the primary
- Campaign memberships. A membership in a campaign only the secondary was in moves to the primary with its progress and queued sends. When both leads are in the same campaign, the further progressed membership is kept and the other is dropped with its queued sends, so the person is not emailed twice. Progress is compared in this order: replied, the later sequence step, more emails sent, the later last send, then the primary's. The campaign's lead count goes down by one for each dropped membership.
- History. Email history, replies (with their inbox notes), and Lead Finder reveals now point at the primary.
- Tags and labels. The primary ends up with the union of both leads' tags and labels.
- Fields. First name, last name, company, title, phone, LinkedIn URL, website and source are filled from the secondary only where the primary's is empty. Custom fields work the same way, key by key. The secondary's notes are appended to the primary's after a
---line. The interest status and the owner are taken from the secondary only when the primary has none. - Opt-out. If the secondary is
unsubscribed, the primary becomesunsubscribedand anaudit.lead.status_changedentry is written. Abouncedstatus does not carry over, because it describes the secondary's address.
An audit.lead.merged entry (actor, time, both lead ids and the counts, no email addresses) is written in the same transaction and is visible through GET /api/v1/events. Events recorded before the merge keep the secondary's id, and a lead webhook is not sent for a merge.
Request Body
primaryLeadId string body required secondaryLeadId string body required Response
data object Merge result
primaryLeadId string secondaryLeadId string status string merged.moved object campaignLeads, emailLogs, replies, reveals, tags (added to the primary) and labels (added to the primary).dropped object { "campaignLeads": 1 }: memberships dropped because both leads were in that campaign.statusCarried boolean true when the primary became unsubscribed because the secondary was.Errors
| Status | Description |
|---|---|
401 | Missing, invalid, revoked or expired API key |
403 | API key does not have the required scope: write |
404 | A lead was not found in the workspace, or is deleted |
409 | lead_mid_send: an email to one of the leads is being sent right now. Try again in a minute. Nothing was changed |
422 | Both ids are the same lead, or the merged custom fields would exceed 50 keys. Nothing was changed |
Rate Limit
- 120 requests per minute, shared by every
writecall in your workspace. Fixed 60-second window. - Every response includes
X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset(unix epoch seconds) andX-RateLimit-Bucket(write). - A
429response includes aRetry-Afterheader (seconds until the bucket resets).
For client-side patterns, see Rate Limiting.