Contacts
Merge two contacts
Merges the contact given by merge_id into this one. Its numbers, emails and history move here and the other contact is removed. If both have an open ticket, keep_ticket_id says which to keep.
Requires: desk.write scope, Contacts licence.
Authorization
bearerAuth AuthorizationBearer <token>
A SautiDesk API key. An owner or admin makes it under Settings in SautiDesk for a named person and picks the scopes. The key is shown once. Send it as Authorization: Bearer <key>. It acts as that person and as nobody else.
In: header
Path Parameters
id*string
The contact's id (a UUID).
Request Body
application/json
Response
OK
Example
{ "id": "3f2b8c1e-5a4d-4e7b-9c10-2d6a8e4f1b37", "name": "Amina Wanjiru", "company": "Example Ltd", "address": "help@support.example.com", "notes": "Hi Amina, your order has shipped.", "blocked": false, "account_no": "example", "consent_bulk_sms": false, "consent_bulk_whatsapp": false, "consent_newsletters": false, "consent_marketing_calls": false, "numbers": [ { "id": "3f2b8c1e-5a4d-4e7b-9c10-2d6a8e4f1b37", "e164": "+254712345678", "label": "Amina Wanjiru", "primary": false } ], "emails": [ { "id": "3f2b8c1e-5a4d-4e7b-9c10-2d6a8e4f1b37", "address": "help@support.example.com", "label": "Amina Wanjiru", "primary": false } ], "match": { "kind": "billing", "basis": "example", "confidence": "example", "label": "Amina Wanjiru", "reason": "Outside business hours", "tickets": 1, "open_tickets": 1, "numbers": [ "+254712345678" ], "unusable_numbers": [ "+254712345678" ] }, "merge": { "merged_name": "Amina Wanjiru", "into_name": "Amina Wanjiru", "kept_ticket_id": "49bc16f3-4f4a-40b9-9a2f-9109cf6d7d1e", "kept_ticket_ref": "TCK-4471", "closed_ticket_id": "ae37382d-fc62-4e21-98cc-d5677fa0562a", "closed_ticket_ref": "TCK-4470", "dropped_numbers": [ "+254712345678" ], "rule": "example" }}FieldTypeDescription
idrequiredstring (uuid)namerequiredstringA name for it.companyrequiredstringThe company the contact works for.addressrequiredstringAn email address.notesrequiredstringNotes about the call or the ticket.blockedrequiredbooleanTrue to block this contact so nobody on the team contacts them by mistake, false to unblock.account_norequiredstringYour own account or customer number for this contact, so you can match it to your billing system.consent_bulk_smsrequiredbooleanTrue if this contact has agreed to receive bulk SMS.consent_bulk_whatsapprequiredbooleanTrue if this contact has agreed to receive bulk WhatsApp messages.consent_newslettersrequiredbooleanTrue if this contact has agreed to receive newsletters.consent_marketing_callsrequiredbooleanTrue if this contact has agreed to receive marketing calls.numbersrequiredobject[]idrequiredstring (uuid)e164requiredstringlabelstringA short name to recognise it by.primaryrequiredbooleanTrue to make this the contact's main one.emailsrequiredobject[]idrequiredstring (uuid)addressrequiredstringAn email address.labelstringA short name to recognise it by.primaryrequiredbooleanTrue to make this the contact's main one.matchrequiredanykindrequiredstringWhat kind it is.basisrequiredstringconfidencerequiredstringlabelrequiredstringA short name to recognise it by.reasonrequiredstringWhy, in a few words, for example Lunch.ticketsrequiredintegeropen_ticketsrequiredintegernumbersrequiredstring[]unusable_numbersrequiredstring[]mergerequiredobjectmerged_namerequiredstringinto_namerequiredstringkept_ticket_idstring (uuid) | nullkept_ticket_refstringclosed_ticket_idstring (uuid) | nullclosed_ticket_refstringdropped_numbersstring[]rulestringcurl -X POST "https://api.sautidesk.com/v1/desk/contacts/string/merge" \ -H "Content-Type: application/json" \ -d '{ "merge_id": "b269e6a4-f165-4b10-9992-8216abc6dab5", "keep_ticket_id": "72bb7c57-f519-41dd-9d95-d1ae8422412b" }'