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.

JSON payload cannot be empty

Highlighted
Occasional Participant

JSON payload cannot be empty

Hi,

 

Trying to issue a delete request with PUT like this:

https://api.constantcontact.com/v2/contacts/ACCOUNTID?api_key=MYAPIKEY

 

and get the following response:

error_message = JSON payload cannot be empty.

error_key = json.payload.empty

 

The function works from the IO docs but not over the api

The IO docs do not show any request body.  When I add anything to the request body I get missing.X info.

 

I am successfully able to add and update contacts, but can not delete a contact.

 

This page does not appear to be accurate:

https://community.constantcontact.com/t5/Developer-Support-ask-questions/How-to-delete-the-contact-e...

 

this one doesn't exist.

http://developer.constantcontact.com/doc/manageSubscriptions/#remove_contact

 

Thanks for any help.

2 REPLIES 2
Highlighted
Occasional Participant

Re: JSON payload cannot be empty

Solved the problem.

 

A delete request used DELETE not PUT

 

made that change and can now unsubscribe a user.

Highlighted
Moderator

Re: JSON payload cannot be empty

In case anyone else runs into this problem, you can find additional information about how to unsubscribe a Contact here in our documentation: http://developer.constantcontact.com/docs/contacts-api/contacts-resource.html?method=DELETE

Dave Berard
Senior Product Manager, Constant Contact
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
Featured