code: def update_messages_flag(self, ids, flag):
          
          str_ids = self._return_comma_list(ids)
          params = {'action': {
              'id': str_ids,
              'op': 'update',
              'f': flag
          }}
  
          self.request('MsgAction', params)
docs: List of flags :
          u -> unread                 f -> flagged
          a -> has attachment         s -> sent by me
          r -> replied                w -> forwarded
          d -> draft                  x -> deleted
          n -> notification sent
  
          by default a message priority is "normal" otherwise:
          ! -> priority high          ? -> priority low