POST
/v1/users/:userId/change-password
Copy to clipboard
Change password for specific user account
Allows changing the password for a specific user account identified by user ID, requiring the current password for verification to ensure authorized password changes and maintain account security.
Request
Add parameter in header
authorization
Example:
Authorization: Bearer <token>
userId
string
required
Body Params
application/json
oldPassword
string
required
newPassword
string
required
{
"oldPassword": "CurrentSecureP@ss123",
"newPassword": "NewSecureP@ssw0rd!"
}
Responses
200 Response
application/json
status
boolean
optional
data
object
optional
passwordChanged
string
optional
{
"status": true,
"data": {
"passwordChanged": "OK"
}
}
400 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 5023,
"message": "Incorrect old password"
}
}
401 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 4002,
"message": "No auth token"
}
}
404 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 3001,
"message": "Entity not found"
}
}