Use this endpoint to resolve conflicts in a contact's details.
This endpoint works only when a contact has conflicts. Conflicts can occur when a verified contact uses another channel to communicate with you. For example, a contact's details (phone number, email address, custom fields) were saved when they accessed the Livechat widget. Next time, they use WhatsApp and they provide different details. By default, the values are overwritten. If you choose to flag conflicts, the conflicting detail will be displayed and you can decide the values to keep. You can flag conflicts in custom fields using the custom fields endpoints or the Set Custom Field method from the livechat widget API.
Permission required: update-livechat-contact
Changelog
Version | Description |
---|---|
7.7.0 | Added |
The authToken
of the authenticated user.
The userId
of the authenticated user.
{
"contactId": "68135a22e384b3ad127c7dbc",
"name": "John Doe",
"customFields": {
"field1": "field1",
"field2": "field2"
},
"contactManager": "test.agent",
"wipeConflicts": false
}
The contact's ID.
The contact's name.
You can enter custom fields if you have created any.
The contact's assigned agent or manager.
To overwrite the old data with the new details, enter true
.
OK
{
"result": {
"_id": "68341efdd387e3d7509267fb",
"createdAt": "2025-05-26T07:57:49.616Z",
"name": "Jane Doe",
"channels": [
{
"name": "widget",
"visitor": {
"visitorId": "68341ef9d387e3d7509267fa",
"source": {
"type": "widget"
}
},
"blocked": false,
"verified": true,
"details": {
"type": "widget",
"destination": "writing-demo.dev.rocket.chat"
},
"lastChat": {
"_id": "cz5uyBRyKPfoWHBat",
"ts": "2025-05-26T07:57:49.661Z"
},
"field": "email",
"value": "[email protected]",
"verifiedAt": "2025-05-26T07:58:26.895Z"
}
],
"customFields": {
"field1": "field1",
"field2": "field2"
},
"unknown": false,
"preRegistration": false,
"_updatedAt": "2025-05-26T11:35:31.241Z",
"lastChat": {
"_id": "cz5uyBRyKPfoWHBat",
"ts": "2025-05-26T07:57:49.661Z"
},
"activity": [
"2025-05"
],
"emails": [
{
"address": "[email protected]"
}
],
"phones": [],
"conflictingFields": []
},
"success": true
}
Bad Request
{
"success": false,
"error": "must have required property 'contactId' [invalid-params]",
"errorType": "invalid-params"
}
{
"success": false,
"error": "error-contact-has-no-conflicts"
}
Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}
Forbidden
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
{
"success": false,
"error": "unauthorized"
}