Reten Docs
Authentication

Reset User Password

Admin endpoint to reset another user's password.

POST /api/auth/reset-user-password

Reset another user's password. Requires RESET_USER_PASSWORD permission and the target user must be at a lower role level than the requesting user (role hierarchy enforcement).

Auth: Required -- RESET_USER_PASSWORD permission

Request Body

FieldTypeRequiredDescription
userIdUUIDYesID of the user whose password will be reset
newPasswordstringYesNew password (minimum 8 characters)

Example

curl -X POST https://api.reten.ai/api/auth/reset-user-password \
  -H "Authorization: Bearer <token>" \
  -H "x-tenant-id: <tenant-id>" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "550e8400-e29b-41d4-a716-446655440000",
    "newPassword": "NewSecurePass456!"
  }'
import axios from 'axios';

const response = await axios.post(
  'https://api.reten.ai/api/auth/reset-user-password',
  {
    userId: '550e8400-e29b-41d4-a716-446655440000',
    newPassword: 'NewSecurePass456!',
  },
  {
    headers: {
      Authorization: 'Bearer <token>',
      'x-tenant-id': '<tenant-id>',
    },
  }
);

Response 200 OK

{
  "message": "Password reset successfully"
}

Error Responses

StatusDescription
400New password doesn't meet requirements
403Cannot reset password for a user at same or higher role level
404User not found