def mark_as_read(self, messages, unread=False):
        """Mark message(s) as read or unread.

        :returns: The json response from the server.

        """
        ids = []
        if isinstance(messages, Inboxable):
            ids.append(messages.fullname)
        elif hasattr(messages, '__iter__'):
            for msg in messages:
                if not isinstance(msg, Inboxable):
                    msg = 'Invalid message type: {0}'.format(type(msg))
                    raise ClientException(msg)
                ids.append(msg.fullname)
        else:
            msg = 'Invalid message type: {0}'.format(type(messages))
            raise ClientException(msg)
        # pylint: disable=W0212
        retval = self.reddit_session._mark_as_read(ids, unread=unread)
        # pylint: enable=W0212
        return retval