# customerUpdate - customer - MUTATION Version: 2024-10 ## Description Updates the customer's personal information. ### Access Scopes ## Arguments * [input](/docs/api/customer/2024-10/input-objects/CustomerUpdateInput): CustomerUpdateInput! - Specifies the input fields for the customer update. ## Returns * [customer](/docs/api/customer/2024-10/objects/Customer): Customer The customer's personal information that has been updated. * [userErrors](/docs/api/customer/2024-10/objects/UserErrorsCustomerUserErrors): UserErrorsCustomerUserErrors! The list of errors that occurred from executing the mutation. ## Examples ### Updates a customer's first and last name Curl example: "curl -X POST \\\nhttps://shopify.com//account/customer/api/2024-10/graphql/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'Authorization: {access_token}' \\\n-d '{\n\"query\": \"mutation customerUpdate($input: CustomerUpdateInput!) { customerUpdate(input: $input) { userErrors { field message } customer { firstName lastName } } }\",\n \"variables\": {\n \"input\": {\n \"firstName\": \"Quinn\",\n \"lastName\": \"Ishida\"\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation customerUpdate($input: CustomerUpdateInput!) {\n customerUpdate(input: $input) {\n userErrors {\n field\n message\n }\n customer {\n firstName\n lastName\n }\n }\n }`,\n \"variables\": {\n \"input\": {\n \"firstName\": \"Quinn\",\n \"lastName\": \"Ishida\"\n }\n },\n },\n});\n" Ruby example: null Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await customer.graphql(\n `#graphql\n mutation customerUpdate($input: CustomerUpdateInput!) {\n customerUpdate(input: $input) {\n userErrors {\n field\n message\n }\n customer {\n firstName\n lastName\n }\n }\n }`,\n {\n variables: {\n \"input\": {\n \"firstName\": \"Quinn\",\n \"lastName\": \"Ishida\"\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation customerUpdate($input: CustomerUpdateInput!) {\n customerUpdate(input: $input) {\n userErrors {\n field\n message\n }\n customer {\n firstName\n lastName\n }\n }\n}" #### Graphql Input { "input": { "firstName": "Quinn", "lastName": "Ishida" } } #### Graphql Response { "data": { "customerUpdate": { "userErrors": [], "customer": { "firstName": "Quinn", "lastName": "Ishida" } } } }