Update Account Information

The following guide is for updating users account information via the WordPress REST API.

Make sure you have requested a valid Access Token for the user making the updates to their account.

See our guide on User Access Tokens

Update Account Information Request

Once have a users access token you can make a request to the /updateaccount endpoint.

{your-domain}/wp-json/wpvs-memberships/v1/updateaccount?wpvstoken={access-token}

You need to include a wpvstoken parameter in the Body of your POST request:

wpvstoken={access-token}

Parameters (all are optional)

The following are parameters you can include in your POST request depending on what information needs to be updated.

Notes:

  • Any parameters provided that match the existing user data will not be updated.
  • WordPress usernames cannot be changed by default.
new_user_email={a valid email address}
new_user_password={password}
confirm_user_password={confirm_password} // required if new_user_password is set
first_name={firstname}
last_name={lastname}

On a successful request, you will receive a JSON response with the following variables:

{
user_updated: true | false,
error: {error-message} // only set if user_updated is false
}