I seems that when I perform a HTTP DELETE on a contact it doesn't remove that contact, but sets its status to OPTOUT.
Is this really correct? If so, is there any way to remove contacts through your API?
Solved! Go to Solution.
Constant Contact does not provide any way to permanently delete a Contact from our databases. While our UI does have a "Delete" option, it should be noted that those contacts are solft deleted and still exist. We simply hide them in the UI. This is similar to the Remove function in our older Contacts Management system.
So just to be clear: you are saying there is no way to remove a contact without opting it out?
I am trying to remove old contacts but I don't want to add their email addresses to your opt out list.
EDIT: Also, are we billed for contacts that are hidden from the UI?
If you want to have a Contact not be on any lists but not be opted out, simply update (PUT) the Contact with an empty lists array. This will move the Contact to Removed status and will no longer count for billing purposes. You can readd the contact by updating (PUT) the Contact at a later time with one or more active lists.
I'm dealing with the same issue so I'd like to add that you can no longer PUT the contact with an empty lists array. You can (hopefully) achieve the same with an undocumented call contactService->deleteContactFromLists. I found it by diggint in the PHP library.
"...you can no longer PUT the contact with an empty lists array."
Really? I just tested this manually on my account and it seems to still work like it always did.
I performed a PUT to the endpoint
with a request body of something like:
and I got a respone of 200 and the contact's status was set to "REMOVED".
In what situation is this failing for you?
Sorry, you're right. It is possible to submit an empty array for lists when updating an existing contact.
I got confused because I was getting an error when creating a new contact with empty lists.
Let me summarize then.
Documentation is misleading because it mixes information about PUT and POST.
There are separate pages for creating contacts
and updating them
and yet the updating page mentions that you must include at least 1 list. True, it says that it relates to POST but I misread it and didn't suspect that a page about updating would be talking about creating.
REQUIRED. Array of the contact lists that the contact is a member of
I hope I got it right this time :-)
That is a pretty accurate overview. Looks like we have a couple of documentation areas to improve and I would also like to bring back to the team the lists array being required. It is only required on a POST (Create) call, not a PUT (Update) call. So, here's the two areas we have to correct and one area we need to investigate. Thank you greatly for pointing all of this out by the way, hugely appreciated!
1. DELETE Contact Documentation: says you delete the Contact in question. We do not support hard deleting a Contact, the DELETE verb actually allows you to Unsubscribe a Contact. This is inaccurate and we need to correct this.
2. Lists array in documentation: ambiguously says required field but then statys it's only required for POST. Need to get this cleaned up.
2. Lists array in PUT: this may be optional in it's entirety for a PUT (meaning you can pass null or leave it out entirely). Will check this on our side and update documentation accordingly.
Thanks again for the feedback and pointing these errors out!
Thank you Dave, I'm glad that you found my input worth something.
I added some additional information for less experienced programmers and posted it on my blog. Feel free to comment there if it's lacking.