API Change Contact Email Address?

AlexT785
Rookie
0 Votes

Short of using Delete a Contact and then "Create or Update a Contact Using a Single Method" (which triggers an undesired Welcome email), how can I change a contact's email address via API?

 

This very common use case is not covered (within constraints)?

 

There does not appear to be an update contact method using contact_id, which not only would be ideal but seems essential? 

3 REPLIES 3
AlexT785
Rookie
0 Votes

Short of using Delete a Contact and then "Create or Update a Contact Using a Single Method" (which triggers an undesired Welcome email), how can I change a contact's email address via API?

 

This very common use case is not covered (within constraints)?

 

There does not appear to be an update contact method using contact_id, which not only would be ideal but seems essential? 

AlexT785
Rookie
0 Votes

I found PUT CONTACT, and this will enable changing an email address.

 

But the undesired Welcome email is sent!  How can I change the email address without triggering a Welcome email?

Courtney_E
Employee
0 Votes

Hello AlexT785,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

The method it sounds like you are using (outlined in more detail below) should allow you to update a contact's email address using the contact ID. This process shouldn’t deploy a new Welcome Email. Even though the email address is updated, it doesn't qualify as a new contact, as the contact ID remains the same.

 

However, I was able to find an existing ticket which had been created for the issue “Welcome and/or Autoresponder email sent to contact that updates email address” that is currently under investigation and review by our engineering team. I have tracked this ticket with your account so that you can be notified via email once the ticket has been closed.

 

In the meantime, I’d suggest creating a new Welcome Email and then disabling the old one to see if that might resolve the issue. The other alternative would be to create a dedicated list and  list join automated series so that only contacts added to a specific list receive the series. 

 

Here is the flow to update the email address for an existing contact via the API:

 

Step 1: Check to see if the contact exists in the account using the email query parameter to search for a contact using a specific email address.

 

GET Contacts Collection

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

 

Step 2: If the contact comes back as non-existent, use POST to create the contact:

 

POST (create) a Contact

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

 

Step 3: If the contact comes back as already existing in the account. You need to append the returned data with the desired list memberships and send that back with PUT to update the contact:

 

**When Updating a contact, we need to append the new information to the old information and send all of it back in the request, because when you update a contact using a PUT, all properties are updated, overwriting all existing property values. Any properties left blank or not included in the PUT will be overwritten with a null value.

 

PUT (update) a Contact

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

 

*However, this method will not work if you have enabled the Confirm Opt-in Email for new contacts or send a Reconfirm Opt-in Email to your existing contacts, as with this feature you're asking them for their express permission to email them, and you can't send email to these contacts until they actively grant you permission by clicking the button in your email. Until they do, these contacts are placed in the "Awaiting Confirmation" status, which shows as “pending_confirmation” in the V3 API.

 

Once they grant permission, they're moved into the Subscribed - Express / Confirmed status.

 

Understanding implied and express permission for CASL and GDPR:

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5924-implied-and-express-permission...

 

View a group of contacts based on their contact status

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/33125-View-a-Group-of-Contacts-Base...

 

You may notice that you are also unable to change/update these contact’s email addresses within the website UI (whereas you can update for other types of contacts). When a contact is listed as Confirmed, the email address can technically only be updated by that contact themselves via the the Update Profile link at the bottom of any sent email campaign.

 

The Contacts Endpoint to Update a Contact [PUT /contacts/{contact_id}] uses the Contact ID to call the contact, and has the email address as a variable that can be updated, so even if your request body has the same value for the email address, the system still sees this as an attempt to update the address and will reject the request, because when you update a contact using a PUT, all properties are updated, overwriting all existing property values. Any properties left blank or not included in the PUT will be overwritten with a null value.

 

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

 

For further assistance you can also email our team directly at webservices@constantcontact.com and reference case #29924395.


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up