In a nutshell what i need is something like this
AddContactToList (list id, contact id)
RemoveContactFromList (list id, contact id)
Seems to me that to remove a contact from a specific list is very cumbersome and requires multiple API calls. Also if you are not extremely careful then you may remove somene from a list that you didn't intend.
Correct me if I am wrong, but to remove someone from a specific list you have to
1) retrieve the contact by email address
2) remove that specific list from the list array, which involves a loop through the list and building a new updated list
3) update that contact passing the new list
You are correct about this being the "correct" method to remove a contact from a list. There was a separate method that was not officially documented which could provide a shorter set of steps. However, I need to verify that this method is valid and supported, because I would not want to share and endpoint that might not work in the future. Hopefully I should have an update on that front early next week!
It took me a bit longer to get some answers on this, but I verified that we do have an endpoint on the API that is currently undocumented, but I was able to confirm that it does work. You can remove a contact from a specific list with the following API call:
On success, this will return a 204 status code with no contents.
Hopefully this helps you out! If you have any questions, please let me know!