Update user password
Authenticated user updates their own password
Path Parameters
- Type: stringFormat: uuididrequired
User ID (must match authenticated user)
Body
required
application/json
- Type: stringFormat: passwordold
Password requireda hint to UIs to mask the input
- Type: stringpasswordmin length:12max length:50
Pattern: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>/?~])(?!.*\s).{12,50}$Format: passwordrequiredPassword 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
}.png)