--- url: https://docs.youcan.shop/store-front/customers/update.md --- # Update the logged customer account Endpoint: `https://my-store.youcan.shop/api/customers/account` Method: `PUT` ## Parameters Send only the fields to change. | Param Name | Param Type | Description | Required | | --- | --- | --- | --- | | `email` | string | Customer email | optional | | `password` | string | New password, 6 to 72 characters | optional | | `password_confirmation` | string | The same password | with `password` | | `current_password` | string | The current password | when `email` or `password` changes | | `first_name` | string | Customer first name | optional | | `last_name` | string | Customer last name | optional | | `phone` | string | Customer phone | optional | ## Response Send the customer token from the [Login endpoint](/store-front/customers/login) in the `Authorization` header. \[200] OK ```json { "message": "Customer account updated successfully", "type": "success", "data": null } ``` \[200] OK, with a new password A new password revokes all tokens of the customer. The response holds a new token. ```json { "token": "1f3c9a…", "token_type": "bearer", "expires_in": 2592000 } ``` \[401] Unauthorized ```json { "status": 401, "detail": "Unauthenticated.", "meta": [] } ``` \[422] Unprocessable Entity ```json { "status": 422, "detail": "The given data was invalid.", "meta": { "fields": { "current_password": [ "The current password is incorrect." ] } } } ```