RESTful api for messages app