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

Remove Contacts from Lists Using API V3

CarolynG105
Campaign Collaborator
0 Votes

I'm trying to remove a Contact from a Contact List.  I was trying to use activities/remove_list_memberships to accomplish this.  When making a post call to activities/remove_list_memberships with the formatted json below, I keep getting a 400 error.  Is this the correct call to remove 1 contact from 1 contact list?

 

{ 

   "source":{ 
      "list_ids":[ 
         "f6123418-b31b-11e9-a8da-d4ae52733d3a"
],
      "all_active_contacts":true,
      "contact_ids":[ 
         "5142285a-4ae0-11ea-a945-d4ae52733d3a"  
]
},
   "list_ids":[ 
      "f6123418-b31b-11e9-a8da-d4ae52733d3a"
]

}

3 REPLIES 3
Jimmy_D
Employee
0 Votes

Hello @CarolynG105,

 

Thank you for reaching out to Constant Contact's API Support.

 

The JSON you are sending contains all of the elements and some of the are mutually exclusive with others. Please check our API Reference page and look to the right side for the Body Schema to review which items are mutually exclusive.


Regards,
Jimmy D.
Tier II API Support Engineer
KarlK0
Rookie
0 Votes

i have face same issue. i also have pass correct payload but i get following error :

{
"error_key": "contacts.api.bad_request",
"error_message": "list_ids, all_active_contacts, contact_ids are mutually exclusive"
}

 

 

@jimmy_D please suggest dome solution

Courtney_E
Moderator
0 Votes

Hello @KarlK0,

 

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


It looks like we were able to address your question on one of your other related posts:


Remove Contacts from Lists Bulk Activity api fail
https://community.constantcontact.com/t5/Developer-Support-ask-questions/Remove-Contacts-from-Lists-...

 

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


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