Update user password

Authenticated user updates their own password

Path Parameters
  • id
    Type: stringFormat: uuid
    required

    User ID (must match authenticated user)

Body
required
application/json
  • oldPassword
    Type: stringFormat: password
    required

    a hint to UIs to mask the input

  • password
    Type: string
    min length:  
    12
    max length:  
    50
    Pattern: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>/?~])(?!.*\s).{12,50}$Format: password
    required

    Password must meet complexity requirements:

    • Between 12 and 50 characters
    • No spaces allowed
    • At least one uppercase letter (A-Z)
    • At least one lowercase letter (a-z)
    • At least one number (0-9)
    • At least one special character (no space)
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/users/{id}/password
curl https://api.gpcn.com/v1/users/123e4567-e89b-12d3-a456-426614174000/password \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "oldPassword": "",
  "password": ""
}'
{
  "success": true,
  "message": "Password updated successfully",
  "data": null,
  "meta": null
}