Skip to main content
POST
/
my-account
Update customer account
curl --request POST \
  --url {protocol}://{host}/wp-json/cocart/preview/my-account \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "account_first_name": "<string>",
  "account_last_name": "<string>",
  "account_display_name": "<string>",
  "account_email": "[email protected]",
  "password_current": "<string>",
  "password_1": "<string>",
  "password_2": "<string>"
}
'
{
  "success": true,
  "message": "Account details updated successfully"
}
This endpoint is currently shown as a preview of what’s currently in development and is subject to change.

Authorizations

Authorization
string
header
required

WordPress username and password

Body

application/json

Account data to update

account_first_name
string
required

First name

account_last_name
string
required

Last name

account_display_name
string
required

Display name

account_email
string<email>
required

Email address

password_current
string

Current password (required if changing password)

password_1
string

New password

password_2
string

Confirm new password (must match password_1)

Response

Account updated successfully

success
boolean
Example:

true

message
string

Success message