---
updatedAt: 2026-09-04T14:27:57.000Z
---

# Assign a contact attribute to another category

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

```graphql 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
    dataJobId
  }
}
```
```json Response
{
  "data": {
    "updateDataSet": {
      "dataSetId": "4fe4136f-c007-44a3-b38f-92220xxxxxxxx",
      "dataJobId": null
    }
  }
}
```

A non-null `dataJobId` means the change hasn't been applied yet. Poll the data job to confirm completion.

# Arguments

Arguments required by the `updateDataSet` object

| Argument | Nested field | Values            | Definition                   |
| :------- | :----------- | :---------------- | :--------------------------- |
| `where`  | `dataSetId`  | ID                | The ID of your audience      |
| `to`     | `attributes` | See nested fields | The changes you want to make |

Fields nested inside `attributes`. Only name is required.

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Nested field
      </th>

      <th>
        Values
      </th>

      <th>
        Definition
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `update`
      </td>

      <td>
        `name`
      </td>

      <td>
        String (case-sensitive)
      </td>

      <td>
        The name of the contact attribute to update
      </td>
    </tr>

    <tr>
      <td>

      </td>

      <td>
        `category`
      </td>

      <td>
        String

        To reset the current category, submit the `null` value.
      </td>

      <td>
        The name of a new category for the contact attribute.

        Use the [Get all categories of contact attributes](https://developer.goacoustic.com/acoustic-connect/reference/get-all-categories) query to get the list of supported values.
      </td>
    </tr>

    <tr>
      <td>

      </td>

      <td>
        `mapAs`
      </td>

      <td>
        Enumeration. Valid values: `FIRST_NAME`, `LAST_NAME`.
      </td>

      <td>
        Maps the attribute to a standard personalization field.
      </td>
    </tr>
  </tbody>
</Table>

# Fields

Fields returned by the `updateDataSet` mutation

| Field       | Values | Required? | Definition                                                                                              |
| :---------- | :----- | :-------- | :------------------------------------------------------------------------------------------------------ |
| `dataSetId` | ID     | Required  | The ID of the audience                                                                                  |
| `dataJobId` | ID     | Optional  | A non-null dataJobId means the change hasn't been applied yet. Poll the data job to confirm completion. |

# Possible error messages

This operation can return several error codes. For the full list, with definitions and the operations each code applies to, see <Anchor target="_blank" href="https://developer.goacoustic.com/acoustic-connect/reference/error-codes">Error codes</Anchor>.