Update Password
Change the authenticated dashboard user's password.
Endpoint
INFO
PUT /api/v1/dashboard/profile/password
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
current_password | string | Yes | Current password |
password | string | Yes | New password (min: 8 chars) |
password_confirmation | string | Yes | New password confirmation |
Example Request
bash
curl -X PUT https://api.daakey.com/api/v1/dashboard/profile/password \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
"current_password": "oldPassword123",
"password": "newSecurePassword456",
"password_confirmation": "newSecurePassword456"
}'Response
Success (200)
json
{
"success": true,
"message": "Password updated successfully",
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Error (422)
json
{
"success": false,
"message": "Validation failed",
"errors": {
"current_password": ["The current password is incorrect."]
},
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Current password must be correct
- New password must be at least 8 characters
- Current session remains active after password change