Spam detection api using Bayesian filtering