To assign a contact attribute to another category or to reset the current category selection, use the updateDataSet mutation.

mutation {
  updateDataSet(
    where: { dataSetId: "4fe4136f-c007-44a3-b38f-92220xxxxxxxx" }
    to: {
      attributes: {
        update: [
          { name: "iPhone user", category: "Demographic" }
          { name: "First Name", category: "Contact information" }
        ]
      }
    }
  ) {
    dataSetId
  }
}
{
  "data": {
    "updateDataSet": {
      "dataSetId": "4fe4136f-c007-44a3-b38f-92220xxxxxxxx"
    }
  }
}

Arguments

Arguments required by the updateDataSet object

Argument nameNested fieldValuesDefinition
wheredataSetIdIDThe ID of your audience
toattributesSee nested fieldsThe changes you want to make

Fields nested inside attributes (all of them are required)

FieldNested fieldValuesDefinition
updatenameString (case-sensitive)The name of the contact attribute to update
categoryString

To reset the current category, submit the null value.
The name of a new category for the contact attribute.

Use the Get all categories of contact attributes query to get the list of supported values.

Fields

Fields returned by the updateDataSet mutation

FieldValuesRequired?Definition
dataSetIdIDRequiredThe ID of the audience

Possible error messages

Error codeDefinition
ATTRIBUTE_NOT_DEFINEDThere is no contact attribute with this name in the current audience.