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:
Argument | Nested field | Values | Required? | Definition |
---|---|---|---|---|
dataSetId | ID | Required | The ID of your audience | |
updateContactInputs | key | String | Required | The unique identifier assigned to the contact |
to | Array | Required | See nested values |
Fields nested inside the to
field:
Field | Nested field | Required? | Values | Definition |
---|---|---|---|---|
attributes | value | Required | Depends on the type of contact attribute. | The new value of the contact attribute |
name | Required | String | The name of the contact attribute you want to update | |
consent | Array | To update consent preferences, see Update consent statuses for contacts. |
Fields
Fields returned by the updateContacts
mutation:
Field | Values | Required? | Definition |
---|---|---|---|
modifiedCount | Integer | Required | The number of contacts that have been updated |
Possible error messages
Error | Definition |
---|---|
CONTACT_NOT_FOUND_BY_KEY | A contact with the specified identifier is not available in the audience. Use the Get all contacts query to get the list of existing contacts. |