# cartBuyerIdentityUpdate Updates the buyer identity for an existing cart. ## Authentication > **Public Access**: Accessible with the public API key ## Mutation Structure ```graphql mutation { cartBuyerIdentityUpdate(id: String!, buyerIdentity: BuyerIdentityInput) { cart { # Cart fields } userErrors { # UserError fields } } } ``` ## Input Arguments | Argument | Type | Required | Description | |----------|------|----------|-------------| | id | String! | Yes | The ID of the cart to update the buyer identity for | | buyerIdentity | [BuyerIdentityInput](/reference/storefront/v1/inputs/buyer-identity-input) | No | The new buyer identity for the cart | ## Return Type [CartBuyerIdentityUpdatePayload](/reference/storefront/v1/objects/cart-buyer-identity-update-payload) - Payload returned by the cartBuyerIdentityUpdate mutation. Contains the updated cart and any errors that occurred during the operation. ## Example ```graphql mutation { cartBuyerIdentityUpdate( id: "eyJhbGciOiJIUzI1NiJ9..." buyerIdentity: { email: "customer@example.com" firstName: "John" lastName: "Doe" countryCode: "US" } ) { cart { id buyerIdentity { email firstName lastName } } userErrors { field message } } } ``` ## Related Types - [CartBuyerIdentityUpdatePayload](/reference/storefront/v1/objects/cart-buyer-identity-update-payload) - [BuyerIdentityInput](/reference/storefront/v1/inputs/buyer-identity-input)