combined messagesGet and messagesPost