adding messages to rest server