cancel
Showing results for 
Search instead for 
Did you mean: 
Due to an issue with YouTube, inserting videos in your emails is showing an error. Until they are able to resolve this issue, we recommend using a different video hosting service. We will continue to monitor this outage and update you as we have more information.

Deleting a contact from CC interface

Occasional Contributor

Deleting a contact from CC interface

Via the GUI there is an option to delete a contact that removes them from the interface comletely.  Whether they are deleted from the DB is do not know but they no longer show up on the interface.  Is there a way to do this same action via the API?  

When I perform the action discussed here: http://developer.constantcontact.com/docs/contacts-api/contacts-resource.html?method=DELETE

The contact is merely unsubscribed from all lists and still remains under all contacts.  I would like to remove them completely. In bulk fashion if capable. 

3 REPLIES 3
Moderator

Re: Deleting a contact from CC interface

Hello @JamesP864,

 

When a contact is deleted they are not actually removed from out database completely. You are correct in that the website UI can no longer view them; however our API basically pulls from the database in a more direct manner and therefore can still "see" those contacts.

 

Removing a contact using the endpoint you listed, or updating a contact with a PUT and including an empty listID array does the same thing. It effectively deletes the contact from the UI, but it is still visible when using the API.

 

This does change the status of the contact to OPTOUT if done through the API so you can do any of your API calls and make sure you do not include that status.


Regards,
Jimmy D.
Tier II API Support Engineer
Occasional Contributor

Re: Deleting a contact from CC interface

It does not seem to do the same thing.  When I remove using the endpoint I stated it removed the contact from the list and sets them opted out, but they are still visible in the all contacts list from the GUI.  I don't want them to be visible fro the GUI.  If they are visible from the API, i would be fine with that.  

 

Now if I delete a contact via the GUI it seems to (I know that they are probably still in the DB) remove them completely.  They are no longer visible via the all contacts list.  

 

How do I do that via the API?

Moderator

Re: Deleting a contact from CC interface

Hi @JamesP864,

 

You will want to do a PUT with this endpoint.

https://api.constantcontact.com/v2/contacts/contactID?action_by=ACTION_BY_OWNER&api_key=xxxxxx

The ACTION_BY_OWNER can also be ACTION_BY_VISITOR if you need. Make sure that your contact listID array is empty.

"lists": [],

 

This will give the status of REMOVED when you look for the contact through the API and they no longer show up in the GUI if you search for their email address. Also keep in mind the is the same as unsubscribing the contact so the only way to add them back in is to have the contact resubscribe through a sign-up form.


Regards,
Jimmy D.
Tier II API Support Engineer