Difference between revisions of "Merge Contact"
Ashley DeBon (talk | contribs) (Created page with "== Merge Contacts == === Base URL === https://apimobile.callproof.com === Endpoint === /api/merge-contact === Purpose === Merges one contact into another. Related records f...") |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | == Merge Contacts == | + | == [[Mobile_API]] »Merge Contacts == |
=== Base URL === | === Base URL === | ||
| Line 39: | Line 39: | ||
| merge_contact_id || integer || Yes || Unique identifier of the contact to merge into the existing contact (this contact is removed after merge). Must exist. | | merge_contact_id || integer || Yes || Unique identifier of the contact to merge into the existing contact (this contact is removed after merge). Must exist. | ||
|} | |} | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/merge-contact' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "existing_contact_id": YOUR_EXISTING_CONTACT_ID, "merge_contact_id": YOUR_MERGE_CONTACT_ID }' </pre> | ||
| + | |||
| + | === cURL Example for iOS === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/merge-contact' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "existing_contact_id": YOUR_EXISTING_CONTACT_ID, "merge_contact_id": YOUR_MERGE_CONTACT_ID }' </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 13:56, 21 July 2026
Contents
Mobile_API »Merge Contacts
Base URL
https://apimobile.callproof.com
Endpoint
/api/merge-contact
Purpose
Merges one contact into another. Related records from the contact being merged (notes, emails, phones, reps, personnel, appointments, event forms, follow-ups, opportunities, messages, images, and related call/SMS data) are moved or reconciled onto the existing contact. Duplicate emails/phones/notes are handled to avoid conflicts. The merged contact is then deleted, along with its labels and duplicate-contact links.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| existing_contact_id | integer | Yes | Unique identifier of the contact that will remain (the target of the merge). Must exist. |
| merge_contact_id | integer | Yes | Unique identifier of the contact to merge into the existing contact (this contact is removed after merge). Must exist. |
cURL Example for Android
curl --location 'https://apimobile.callproof.com/api/merge-contact' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "existing_contact_id": YOUR_EXISTING_CONTACT_ID, "merge_contact_id": YOUR_MERGE_CONTACT_ID }'
cURL Example for iOS
curl --location 'https://apimobile.callproof.com/api/merge-contact' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "existing_contact_id": YOUR_EXISTING_CONTACT_ID, "merge_contact_id": YOUR_MERGE_CONTACT_ID }'
Successful Response (200)
Indicates that the contacts were merged successfully.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| message | string | Confirmation message (for example, "Processed successfully.") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation failed – response body uses clientStatusCode 401 with the first validation error message
|
| 400 | Bad Request – the merge could not be completed |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 401) – Missing
existing_contact_id/merge_contact_id, or either ID does not exist. - 400 – An error occurred while processing the merge (for example, "Error while processing").
- 401 – Authentication failed or the access token is missing/expired.