To update a contact, use the updateContacts mutation.

mutation {
  updateContacts(
    dataSetId: "4fe4136f-c007-44a3-b38f-92220xxxxxxxx"
    updateContactInputs: [
      {
        key: "PISCX-098724242477"
        to: {
          attributes: [
            { name: "Country", value: "Germany" }
            { name: "Cell Phone", value: "+4960100000001" }
          ]
        }
      }
    ]
  ) {
    modifiedCount
  }
}
{
  "data": {
    "updateContacts": {
      "modifiedCount": 1
    }
  }
}

Arguments

Arguments supported by the updateContacts mutation:

ArgumentNested fieldValuesRequired?Definition
dataSetIdIDRequiredThe ID of your audience
updateContactInputskeyStringRequiredThe unique identifier assigned to the contact
toArrayRequiredSee nested values

Fields nested inside the to field:

FieldNested fieldRequired?ValuesDefinition
attributesvalueRequiredDepends on the type of contact attribute.The new value of the contact attribute
nameRequiredStringThe name of the contact attribute you want to update
consentArrayTo update consent preferences, see Update consent statuses for contacts.

Fields

Fields returned by the updateContacts mutation:

FieldValuesRequired?Definition
modifiedCountIntegerRequiredThe number of contacts that have been updated

Possible error messages

ErrorDefinition
CONTACT_NOT_FOUND_BY_KEYA contact with the specified identifier is not available in the audience. Use the Get all contacts query to get the list of existing contacts.