v51

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-01703301564.3 KB
Users

Change password (authenticated)

Changes the password for the authenticated user. Requires the current password for verification. Protected by selfOnly middleware (users can only change their own password). Rate-limited.

patch/users/chng-pass/{id}

Path parameters

idinteger required

User ID (must match authenticated user via selfOnly middleware)

Request body

idinteger required

User ID (must match path parameter)

currentPasswordstring password required

Current password for verification

newPasswordstring password required

Must be 8+ chars with uppercase, lowercase, and digit

Example request

{
  "id": 1,
  "currentPassword": "OldPassword123!",
  "newPassword": "NewPassword456!"
}

Response

Password changed successfully

messagestring

Example response

{
  "message": "Password updated successfully",
  "data": {
    "id": 1,
    "name": "John",
    "surname": "Doe",
    "email": "john@example.com",
    "role_id": 1,
    "organization_id": 1
  }
}