Authentication
Reset My Password
Reset the current user's own password.
POST /api/auth/reset-my-password
Reset the authenticated user's password by providing the current password and a new one.
Auth: Required -- any authenticated user
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
currentPassword | string | Yes | Current password for verification |
newPassword | string | Yes | New password (minimum 8 characters) |
Example
curl -X POST https://api.reten.ai/api/auth/reset-my-password \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"currentPassword": "OldPass123!",
"newPassword": "NewSecurePass456!"
}'import axios from 'axios';
const response = await axios.post(
'https://api.reten.ai/api/auth/reset-my-password',
{
currentPassword: 'OldPass123!',
newPassword: 'NewSecurePass456!',
},
{
headers: {
Authorization: 'Bearer <token>',
},
}
);Response 200 OK
{
"message": "Password reset successfully"
}Error Responses
| Status | Description |
|---|---|
400 | Current password is incorrect or new password doesn't meet requirements |
401 | Missing or invalid authentication token |