Join our Ask A Trainer Sessions and Chat With our Experts!

Issues with updating a Contact's Email Address

user87148
Rookie
0 Votes

I am trying to update an existing contact's email address via the API.  

This is the process that I go through

1. I first GET the contact information

	"url": "https://api.cc.email/v3/contacts",
	"queries": [
		{
			"key": "email",
			"value": "afftest.person@afftest.com"
		},
		{
			"key": "include",
			"value": "list_memberships"
		}
	]

2. And then using the contact_id that is returned, I PUT the following 

	"body": {
		"email_address": {
			"address": "afftest.personV5@afftest.com",
			"updated_at": "2024-05-24T19:27:28Z",
			"opt_in_source": "Contact",
			"opt_in_date": "2024-05-24T19:27:28Z",
			"created_at": "2024-05-24T19:27:28Z",
			"confirm_status": "off",
			"permission_to_send": "explicit"
		},
		"updated_at": "2024-05-24T19:27:28Z",
		"list_memberships": [
			"d91b71c0-2c99-11ee-a4f7-fa163eb65cb7"
		],
		"last_name": "Person",
		"created_at": "2024-05-24T19:27:28Z",
		"contact_id": "***************************",
		"first_name": "Afftest",
		"update_source": "Contact"
	}

 

But I am getting the following error message.

		{
			"error_key": "contacts.api.validation.error",
			"error_message": "update_source is missing, update_source does not have a valid value"
		}

Any help here would be appreciated.

 

1 REPLY 1
John__B
Employee
0 Votes

Hello user87148,

 

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.

 

Upon reviewing our logs for your PUT requests to the /contacts endpoint, I found that the JSON body was missing from the requests. I did some testing with the JSON request body that you provided and found that the request was successful with this format. With further testing, I was able to replicate the "update_source is missing, update_source does not have a valid value" error response that you received when completely removing the JSON body from the request.

 

It seems likely that some part of your workflow may not be adding the JSON body to the PUT request before it is sent.  

 

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

 

Regards,


John B.
API Support Specialist
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