Complex email addresses are being rejected by the API


Complex email addresses are being rejected by the API

I'd like to use your service for tracking emails from a facebook application.  Facebook uses a complex email proxy system, one that protects the privacy of its users.  The resulting email is odd, but real and valid.  Using these emails in the API produces a 400 error, "Invalid email"

Here's the XML I sent via ATOM:

<entry xmlns="">
<title type="text"> </title>
<summary type="text">Contact</summary>
<content type="application/vnd.ctct+xml">
<Contact xmlns="">
<ContactList id="" />

The servers then said

Error 400: The provided email address
was not valid

Can you help? Is there a way to go around your filters?


Regular Participant

You need to html encode the + sign in the email address I think.

James Benson, PHP Developer.

Constant Contact Services:

Occasional Participant

I had a + email address fail as well. Why would I have to URL encode this in the PHP SDK? It should handle that fine through the JSON serialization. Trying to port my system over to Constant Contact, but your email validation rules are overly strict.

I did some testing against the API directly and was able to add both a .us email address and an email address with a + sign in it (not encoded in any way).  If you're recieving errors, it is highly likely it could be a bug in the PHP SDK.  Is there any way you can capture the JSON that is being created and share that with us either in a PM or via email? 


We do not have any restrictions on those characters in our contact validation though so it definitely sounds like a formatting or transport error.

Dave Berard
Senior Product Manager, Constant Contact

It should be noted we do not support email addresses over 80 characters in length, that is total including both the domain, local address and @ sign.  The address you are specifying is 83 characters in total so it will not be supported.

Dave Berard
Senior Product Manager, Constant Contact
Occasional Participant

The API also rejects short emails like: a@b.c. This is understandable. However, I have 2 questions:


  1. Is there a way to check if an email is valid or not before calling the API to create a contact.
  2. Is it possible for CC to provide all the rules that an email has to comply in order to be valid. This will help client program to validate email before trying to talk to CC API.


Question you asked is a really good one.  While we don't have documentation anywhere on the validation, I did go into our validation code to pull out all of our rules to get you your answer.  I'm going to update our API documentation to reflect this information as well to help future developers.  Let me know if you have any qusetions.


Minimum Length = 6 characters total, including @ and . characters

Maximum Length = 80 characters total, including @ and . characters


Local Name Limitations:

Quoted local names can have all ASCII characters, including backspace escaped quotes (\"), from the ASCII character table with values lower than 126 except for all control characters

Unquoted local names can have all ASCII characters from the ASCII character table with values lower than 126 except for: all control characters, space, angle brackets, parentheses, square brackets, comma, colon, semicolon, backslash, double quote and ampersand


Domain Name Limitations:

The only valid characters for domain name are: a-z, A-Z, 0-9 and -

Domain Name can have sub-domains (, consecutive . are considered invalid as a domain names must consist of at least 1 character

IP addresses are not a valid domain name for email addresses in our system


If an email address passes all of these validation rules, we consider it a valid email address.  Hope this helps.


Dave Berard
Senior Product Manager, Constant Contact
Occasional Participant

I get a validation error on this email address. Why?


Looks valid to me. Do you not support .us domains?

Developer Portal

View API documentation, code samples, get your API key.

Visit Page