Subject line via API greater than 40 characters?

Occasional Participant

Subject line via API greater than 40 characters?

We are working with the API to send an email to a Constant Contact list. We create the email body and subject line and submit it to the API. However, if the subject line is greater than 40 characters we get error code 415. Is the Subject Line length a known limit through the API? Is there a way a round it?


This is a critical issue for our customers because 40 characters is too short for many subject lines - and when you are in the Constant Contact interface you can easily send subject lines with more than 40 characters. Is there something we are doing wrong?





415 error returned from us is "Unsupported Media Type".   This is usually sent when there the Content-Type header isn't set correctly or you are doing an action (POST, PUT, DELETE) that is not supported on the resource in question.  It's very confusing as to why you would get that error sporadically when attempting to create a campaign.


The subject line is limited to 80 characters, not 40.  Also, when you go over the 80 character limit, we return a 400 error with the error message specifying that your subject line is too long.  It does not return any 415 errors when I test on my local machine. 


Are you sure the error is 415 Unsupport Media Type that is being returned?   What is a sample subject line you're sending that is over 40 characters long that is being rejected?  (please do not post any personal information as this is a public forum)

Dave Berard
Senior Product Manager, Constant Contact
Occasional Participant

Ok, thanks. We have determined that the problem was with the name of the Campaign we put in the XML. The campaign name is a maximum of 80 characters and when it exceeds that a 400 error is returned. Thanks for your help.

Developer Portal

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

Visit Page