v1

latestOpenAPI 3.0.02026-07-26254134307.1 KB
Contacts

Merge contacts

Merges the contacts specified into a single contact, deleting the merged-in contacts. If a target contact ID is supplied, the other contacts will be merged into that one. Otherwise, some contact in the contact ID list will be treated as the target contact. Merge conflicts will be resolved in the following ways:

  • name will prioritize manually-updated and non-private contact names
  • descriptions will be concatenated and separated by newlines in order from oldest to newest with the (optional) target contact's description first
  • all handles, groups, links, and notes will be preserved
  • other conflicts will use the most recently updated contact's value

Required scope: contacts:write

post/contacts/merge

Request body

target_contact_idstring

Optional contact ID to merge the other contacts into.

contact_idsstring[] required

Array of all the contact IDs of the contacts to be merged. If a target contact id is provided and that contact id is not in this array, the length of this array must be between 1 and 49. If no target contact id is provided or it is contained in this array, the length must be between 2 and 50.

Response

A contact

idstring

Unique identifier of the contact

namestring

Contact name

descriptionstring

Contact description

avatar_urlstring

URL of the contact's avatar

linksstring[]

List of all the links of the contact

custom_fieldsCustomFieldParameter

An object whose key is the name property defined for the custom field in the Front UI. The value of the key must use the same type specified for the custom field, as described in https://dev.frontapp.com/reference/custom-fields

is_privateboolean

Whether or not the contact is individual

Example response

{
  "_links": {
    "self": "https://yourCompany.api.frontapp.com/contacts/crd_3cgz4ge\"",
    "related": {
      "notes": "https://yourCompany.api.frontapp.com/contacts/crd_3cgz4ge/notes",
      "conversations": "https://yourCompany.api.frontapp.com/contacts/crd_3cgz4ge/conversations"
    }
  },
  "id": "crd_3cgz4ge",
  "name": "Dwight Schrute",
  "description": "Assistant to the regional manager",
  "avatar_url": "https://yourCompany.api.frontapp.com/contacts/crd_3cgz4ge/avatar-1673436467707",
  "groups": [
    {
      "_links": {
        "self": "https://yourCompany.api.frontapp.com/contact_lists/grp_3j342",
        "related": {
          "contacts": "https://yourCompany.api.frontapp.com/contact_lists/grp_3j342/contacts",
          "owner": "https://yourCompany.api.frontapp.com/teammates/tea_e35u"
        }
      },
      "id": "grp_3j342",
      "name": "Party Planning Committee"
    }
  ],
  "lists": [
    {
      "_links": {
        "self": "https://yourCompany.api.frontapp.com/contact_lists/grp_3j342",
        "related": {
          "contacts": "https://yourCompany.api.frontapp.com/contact_lists/grp_3j342/contacts",
          "owner": "https://yourCompany.api.frontapp.com/teammates/tea_e35u"
        }
      },
      "id": "grp_3j342",
      "name": "Party Planning Committee"
    }
  ],
  "handles": [
    {
      "handle": "dwight@limitlesspaper.com",
      "source": "email"
    }
  ],
  "custom_fields": {
    "city": "London, UK",
    "isVIP": true,
    "renewal_date": 1525417200,
    "sla_time": 90,
    "owner": "leela@planet-express.com",
    "replyTo": "inb_55c8c149",
    "Job Title": "firefighter"
  },
  "is_private": true
}