code: def put(self, accountId):
          
          self.reqparse.add_argument('accountName', type=str, required=True)
          self.reqparse.add_argument('accountType', type=str, required=True)
          self.reqparse.add_argument('contacts', type=dict, required=True, action='append')
          self.reqparse.add_argument('enabled', type=int, required=True, choices=(0, 1))
          self.reqparse.add_argument('requiredRoles', type=str, action='append', default=())
          self.reqparse.add_argument('properties', type=dict, required=True)
          args = self.reqparse.parse_args()
  
          account_class = get_plugin_by_name(PLUGIN_NAMESPACES['accounts'], args['accountType'])
          if not account_class:
              raise InquisitorError('Invalid account type: {}'.format(args['accountType']))
  
          validate_contacts(args['contacts'])
  
          if not args['accountName'].strip():
              raise Exception('You must provide an account name')
  
          if not args['contacts']:
              raise Exception('You must provide at least one contact')
  
          class_properties = {from_camelcase(key): value for key, value in args['properties'].items()}
          for prop in account_class.class_properties:
              if prop['key'] not in class_properties:
                  raise InquisitorError('Missing required property {}'.format(prop))
  
          account = account_class.get(accountId)
          if account.account_type != args['accountType']:
              raise InquisitorError('You cannot change the type of an account')
  
          account.account_name = args['accountName']
          account.contacts = args['contacts']
          account.enabled = args['enabled']
          account.required_roles = args['requiredRoles']
          account.update(**args['properties'])
          account.save()
  
          auditlog(event='account.update', actor=session['user'].username, data=args)
  
          return self.make_response({'message': 'Object updated', 'account': account.to_json(is_admin=True)})
docs: Update an account