Ajax subscription form and data.Status

So... the code for the Ajax form references data.Status:

                function (data) {
                if (data.Status === 400) {

                } else { // 200

400 is error, presumably 200 is success. Are there others? Like specific data.Status's that align to such things as; error duplicate email? Or error, email address is not formatted correctly? Or would these more specific responses be a product of a form validation plugin?


roshodgekiss roshodgekiss, 4 years ago

Hi jesseyuen, so far, these are the only response codes. A 400 is returned for incorrectly formatted email address. There isn't an error for duplicates as if the email address is already marked as active, the submission won't change things, anyway. Scoot over to our downloads page or Github for a more detailed explanation.

Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free