API that sends emails via JSON request