---
title: cartAttributesUpdate - Storefront API
description: >
  Updates the attributes on a
  [`Cart`](/docs/api/storefront/2026-04/objects/Cart). Attributes are custom
  key-value pairs that store additional information, such as gift messages,
  special instructions, or order notes.
api_version: 2026-04
api_name: storefront
type: mutation
api_type: graphql
source_url:
  html: >-
    https://shopify.dev/docs/api/storefront/latest/mutations/cartAttributesUpdate
  md: >-
    https://shopify.dev/docs/api/storefront/latest/mutations/cartAttributesUpdate.md
---

# cart​Attributes​Update

mutation

Updates the attributes on a [`Cart`](https://shopify.dev/docs/api/storefront/2026-04/objects/Cart). Attributes are custom key-value pairs that store additional information, such as gift messages, special instructions, or order notes.

## Arguments

* attributes

  [\[Attribute​Input!\]!](https://shopify.dev/docs/api/storefront/latest/input-objects/AttributeInput)

  required

  An array of key-value pairs that contains additional information about the cart.

  The input must not contain more than `250` values.

* cart​Id

  [ID!](https://shopify.dev/docs/api/storefront/latest/scalars/ID)

  required

  The ID of the cart.

***

## Cart​Attributes​Update​Payload returns

* cart

  [Cart](https://shopify.dev/docs/api/storefront/latest/objects/Cart)

  The updated cart.

* user​Errors

  [\[Cart​User​Error!\]!](https://shopify.dev/docs/api/storefront/latest/objects/CartUserError)

  non-null

  The list of errors that occurred from executing the mutation.

* warnings

  [\[Cart​Warning!\]!](https://shopify.dev/docs/api/storefront/latest/objects/CartWarning)

  non-null

  A list of warnings that occurred during the mutation.

***

## Examples

* ### cartAttributesUpdate reference
