Change Password Endpoint
Changes the signed-in user's password after checking the current password.
- Endpoint:
/api/v1/change-password - Method:
PUT - Authentication: Partner token and user bearer token.
Payload Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
old_password | String | Yes | Current password. |
password | String | Yes | New password, minimum 6 characters. |
password_confirmation | String | Yes | Must match password. |
Sample Payload
{
"old_password": "secret123",
"password": "new-secret123",
"password_confirmation": "new-secret123"
}
Sample Response
{
"result": 1,
"message": "Your password has been updated successfully."
}
Sample Failure Response
{
"result": 0,
"message": "The password you entered is incorrect."
}
Changing the password does not revoke existing Sanctum tokens.