App\Http\Controllers\Api\V1\Profile\ProfileController::updatePassword()api.v1.profile.passwordAuthorization: Bearer {token}PATCH/api/v1/profile/passwordapplication/json{
"current_password": "OldSecurePass123!",
"password": "NewSecurePass456!",
"password_confirmation": "NewSecurePass456!"
}| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
current_password | string | Yes | required|current_password:api | Checked against the stored hash on the api guard |
password | string | Yes | required|different:current_password|string|confirmed plus the password policy | Must differ from the current one |
password_confirmation | string | Yes | required|same:password |
App\Http\Requests\Api\V1\Profile\UpdatePasswordRequest.config('app.password_validation'): minimum length 8, mixed case, numbers and symbols required; letters and breach-list checking not enforced. The policy is configuration-driven and can change without a code release, so treat the 422 response as authoritative.200 OK{
"success": true,
"status": "success",
"message": "Password updated successfully"
}data key, and no token. This is a change from the previous authentication scheme, which returned a fresh JWT here. Keep using the token you already have: it remains valid.401 Unauthorizedmessage is one of Unauthenticated, Invalid token, Token expired.422 Unprocessable Entity — validation{
"success": false,
"status": "error",
"message": "Validation failed",
"errors": {
"current_password": ["The current password is incorrect."],
"password": ["The password field must be different from current password."]
}
}current_password is a validation failure, not a 401.429 Too Many Requests{
"success": false,
"status": "error",
"message": "Too many requests"
}Retry-After header present. The route allows 6 requests per minute per user (throttle:profile-write, shared by PATCH /api/v1/profile and PATCH /api/v1/profile/password), counting successful and failed attempts alike, to limit guesses of current_password.default_language as is, so a legacy code (cn, kr, us) gets English field names.docs/api/profile/PATCH_password.mdcurl --location --request PATCH 'https://test.diveraid.com/api/v1/profile/password' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"current_password": "pa$$word",
"password": "pa$$word",
"password_confirmation": "pa$$word"
}'{
"status": "success",
"message": "string",
"data": {
"token": "string",
"token_type": "Bearer",
"expires_in": 0
}
}