Reset Password
POST/users/reset-password/:userId
Reset Password allows an authorized user to reset the password for a specific user in ANSCER ANYA. This request takes the user's unique ID as a parameter and requires the authorization password (authPassword) of the authorized user who has access to reset passwords. A new password (newPassword) for the target user is provided in the request body, and this request resets the user's password.
Request
Path Parameters
The ID of the user to reset password.
- application/json
Body
required
Possible values: >= 6 characters and <= 255 characters
Possible values: >= 6 characters and <= 255 characters
Responses
- 200
- 401
- 403
- 404
- 500
Password reset successfully.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: >= 3 characters and <= 50 characters
Possible values: >= 5 characters and <= 255 characters
Possible values: [developer, admin, user]
createdBy object
The user who created this user
updatedBy object
The user who last updated this user
The date and time this user was created
The date and time this user was last updated
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"email": "user@example.com",
"isActive": true,
"role": "developer",
"createdBy": {
"_id": "string",
"name": "string",
"email": "user@example.com"
},
"updatedBy": {
"_id": "string",
"name": "string",
"email": "user@example.com"
},
"createdAt": "2024-12-03T13:26:27.356Z",
"updatedAt": "2024-12-03T13:26:27.356Z"
}
Unauthorized.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Authentication token not provided."
}
{
"message": "Authentication token not provided."
}
Forbidden.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Access to this resource is forbidden."
}
{
"message": "Access to this resource is forbidden."
}
Resource not found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Resource not found."
}
{
"message": "Resource not found."
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Internal Server Error. Please try again later."
}
{
"message": "Internal Server Error. Please try again later."
}