contacts

Merge duplicate contacts (v2)

Changed on

Merge one or more groups of duplicate contacts. The request body is { contactIds: Group[] } where each group is either a plain array of ≥2 contact IDs (the OLDEST record survives) or { contact_ids: string[], primary_contact_id?: string } to choose which record survives. Returns { data: { merged: Contact[], failed: [...] } }: merged holds the surviving contacts, failed lists any groups that could not be merged — each with error.code, e.g. merge_contact_not_found when a group names a contact that does not exist or is not yours (the group is reported, never silently skipped). Archived contacts can be merged; the survivor is active when any member of its group was active and stays archived only when every member was archived. Idempotency-Key is REQUIRED.

post/v2/contacts/merge

Request

  • Base URL: https://api.prod.getdex.com
  • URL: https://api.prod.getdex.com/v2/contacts/merge
  • Auth: HTTP bearer

Headers

Idempotency-Keystring required
Example:01HV8N6X7K3P9Q5R2T4Y6W8Z0A

Required. UUID per logical operation, reused on every retry. See apps/rest-api/src/shared/idempotency.ts for the full contract. Missing → 400 BadRequest; same key + different body → 409 Conflict.

Request body

Response

Successful response

Changes

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status