Skip to main content
PATCH
/
me
/
password
Update user password
curl --request PATCH \
  --url https://console.gmicloud.ai/api/v1/me/password \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "newPassword": "MyNewSecurePassword123!",
  "currentPassword": "OldPassword123!",
  "passwordResetToken": "eyJhbGciOiJIUzI1NiIsInR...",
  "otpCode": 321673
}
'
{
  "group": "request",
  "code": 0,
  "validationDetail": [
    {
      "field": "newPassword",
      "expression": "required",
      "originalValue": "",
      "reason": "This field is required."
    }
  ]
}

Authorizations

Authorization
string
header
required

An access token used to authenticate a user and grant access to restricted APIs. It is issued by session APIs. For status codes related to this header, refer to the Common Headers Documentation.

Body

application/json

The request body for updating user password

newPassword
string
required

The new password.

Example:

"MyNewSecurePassword123!"

currentPassword
string

The user's current password for update password.

  • This field is only required for authenticated users.
Example:

"OldPassword123!"

passwordResetToken
string

A temporary Bearer token used for password reset authentication which is issued when a user requests a password reset.

  • This field is only required for password reset users.
Example:

"eyJhbGciOiJIUzI1NiIsInR..."

otpCode
string

A one-time passcode (OTP) for reset user password.

  • Must be a numeric code.
  • This field is only required for password reset users.
Example:

321673

Response

Successfully updated user password.