Greetings. I'm having difficulties removing a specific contact from list assignments using API3. Typically I would just omit the "list_memberships": node in the JSON structure if I wanted to remove them from all lists but doing so has no effect on the list assignment in CC.
What is the proper method for removing a contact from all lists using API 3. After I'm finished I'd like the Contact status to be "Not Assigned to Any Lists"
Thank you.
Chris
Solved! Go to Solution.
Hello Chris ,
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.
To remove all list memberships from a contact using the V3 API, you would want to use PUT /contacts/{contact_id} with a blank list value.
PUT (update) a Contact
https://v3.developer.constantcontact.com/api_reference/index.html#!/Contacts/putContact
Below is an example of what that might look like. Notice that the "list_memberships" parameter is included, but left blank so that it will overwrite any existing list data:
Request URL:
PUT https://api.cc.email/v3/contacts/{contact_id}
Request Body:
{
"email_address": {
"address": "test@example.com",
"permission_to_send": "implicit"
},
"create_source": "Account",
"update_source": "Account",
"list_memberships": []
}
Please have a look and let us know if you have any other questions!
Hello Chris ,
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.
To remove all list memberships from a contact using the V3 API, you would want to use PUT /contacts/{contact_id} with a blank list value.
PUT (update) a Contact
https://v3.developer.constantcontact.com/api_reference/index.html#!/Contacts/putContact
Below is an example of what that might look like. Notice that the "list_memberships" parameter is included, but left blank so that it will overwrite any existing list data:
Request URL:
PUT https://api.cc.email/v3/contacts/{contact_id}
Request Body:
{
"email_address": {
"address": "test@example.com",
"permission_to_send": "implicit"
},
"create_source": "Account",
"update_source": "Account",
"list_memberships": []
}
Please have a look and let us know if you have any other questions!
Announcements
Join our list to be notified of new features and updates to our V3 API.
Sign Up