Favicon

You are here: Home > API Reference > Users > User change password

User change password

User change password

POST /v1/users/:userId/change-password

User change password

User change password

Request

Add parameter in header authorization
Example: Authorization: Bearer <token>
userId string
required
Entity Id
Match pattern: ^[a-fA-F0-9]{24}$
Body Params application/json
oldPassword string required
Password
≤ 128 characters · ≥ 8 characters
newPassword string required
Password
≤ 128 characters · ≥ 8 characters
{
    "oldPassword": "string",
    "newPassword": "string"
}

Responses

200 Response application/json
status boolean optional
data object optional
passwordChanged string optional
OK
{
    "status": true,
    "data": {
        "passwordChanged": "OK"
    }
}
400 Response application/json
status boolean optional
false
error object optional
code number optional
5023
message string optional
Incorrect old password
{
    "status": false,
    "error": {
        "code": 5023,
        "message": "Incorrect old password"
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}