The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

415 Unsupported Media Type

Frequent Visitor

415 Unsupported Media Type

I am trying to update a users List Subscriptions from a form on our website..


I first do a Get to get the ContactID then do the PUT to this address and update Lists:


Why would I be getting this error? Does my xml look ok?





<entry xmlns="">
<title type="text" />
<name>Constant Contact</name>
<summary type="text">Contact</summary>
<content type="application/vnd.ctct+xml">
<Contact xmlns="" id="">
<Name>Chuck Tomlinson</Name>
<HomePhone />
<Addr1 />
<Addr2 />
<Addr3 />
<City />
<StateCode />
<StateName />
<CountryCode />
<CountryName />
<PostalCode />
<SubPostalCode />
<ContactList id="" />
<ContactList id="" />



Frequent Visitor

Re: 415 Unsupported Media Type


Sorry.. I found my own solution to the issue.. It was the Content-type not being set correctly..


I'm using ASP and I was checking for a POST and not a PUT to include the Content-type




If strMethod = "POST" Then
     objWinHttp.setRequestHeader "Content-type", "application/atom+xml"
End If



Changed TO:


If strMethod = "POST" OR strMethod = "PUT" Then
     objWinHttp.setRequestHeader "Content-type", "application/atom+xml"
End If

Trusted Contributor

Re: 415 Unsupported Media Type

Ah, you beat me to the punch. Your XML seemed to be right, but I recreated the issue in RESTClient by submitted the request without the Content-type set in the request header.  I was just about to suggest you verify that this header was corrected set. Since you've already discovered that, however.  Let us know if you have any other questions.



Mark Coleman
Support Engineer
Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More