Hi, and I apologize if this has been covered.
I'm using a php form with the CC API to add new subscribers.
I have 4 lists, and the user can sign up for 1,2,3, or all 4 of them.
I have been able to add new emails to the multiple lists at one time.
Problem is, if they're signed up for 1, and then try to sign up for a different one, I get the duplicate (409) return code. I also seem to be getting 409's (sometimes) for emails that are NOT on any list.
Any idea of what's going on? I am accepting a return code of 201 as the only valid one. Am I missing something?
The reason you are receiving the 409 error is due to the fact that the email address you are attempting to add is already in the system. In order to sign your contacts up for any additional lists or to change which lists they are on, you would need to update the existing contact. Please see the Contacts Collection for example XML formatting.
In regards to a contact not being on any list, if a contact had opted out of your newsletter, they would be placed on the 'do-not-mail' list, which would result in an Error 403. If you are receiving an Error 409 while attempting to create a contact that you feel is not on a list, I would recommend Searching for a Contact by Email Address to make sure.
Support Engineer, Constant Contact