Files
bookhoard/bruno/user/Update Password.bru
T

51 lines
930 B
Plaintext

meta {
name: Update Password
type: http
seq: 3
}
put {
url: {{base_url}}/api/auth/password
body: json
auth: inherit
}
body:json {
{
"current_password": "password123",
"new_password": "newpassword123",
"confirm_password": "newpassword123"
}
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## Update Password
Updates the authenticated user's password.
**Method:** PUT
**Endpoint:** /api/auth/password
**Authentication:** Required
**Request Body:**
- `current_password` (string, required): Current password for verification
- `new_password` (string, required): New password (minimum 6 characters)
- `confirm_password` (string, required): Confirmation of new password
**Response:**
- `message` (string): Success message
**Status Codes:**
- 200: Success
- 400: Password validation failed
- 401: Current password incorrect
- 401: Unauthorized
}