RESTful mail API