Permanently delete contact using V3

Highlighted
Occasional Contributor

Permanently delete contact using V3

How can I permanently delete contacts using v3. I am tried the below 

$ch = curl_init();
$base = 'https://api.cc.email/v3/';
$url = $base . '/contacts/'.$contactid;
curl_setopt($ch, CURLOPT_URL, $url);
$authorization = 'Authorization: Bearer ' . $access_token;
$ct = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, array($authorization, $ct));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
$result = curl_exec($ch);
curl_close($ch);

Then the contact get  deleted_at entry. And still showing the contact. I want to completely remove the contact.

Also when I am trying to add contact with  email id same as a deleted contact's, it not allowing to add.

I am not trying to delete a contact from any list, I am simply wants to delete the contact from constant contact account. 

Also a sub question "How can I restore a deleted contact?"

1 REPLY 1
Highlighted
Moderator

Re: Permanently delete contact using V3

Hello,


Thank you for reaching out to Constant Contact API Developer Support.


A contact is never truly deleted from within a Constant Contact account, it's simply removed from all lists and no longer visible in the account.

 

The reason we do this is to maintain data such as accurate reporting, and unsubscribe status behind the scenes. This is also why you cannot POST a new contact with the same email address as a removed/deleted contact; you would need to update the existing "deleted" contact instead. 

 

See our PUT documentation here: 

https://v3.developer.constantcontact.com/api_reference/index.html#!/Contacts/putContact


Please have a look and let me know if you have any other questions!

 

Sincerely,
David B.
Tier II API Support Engineer

Developer Portal

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

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured