Thanks for posting in the forums. How are you adding the contacts? Are you adding them one at a time, or all at once as an activity? Depending on how the contacts were removed (whether there status is REMOVED or OPTOUT), the preexisting contacts have to be added back in individually. Some more information on that is here: http://developer.constantcontact.com/docs/contacts-api/contacts-index.html#contact_status
You can add contacts individually, using the method and parameters described here.
The other option is to add new contacts as a "batch" job using one of our bulk activity endpoints, depending on how you want to construct the contact data you will be importing - using JSON formatted data, or using a CSV, TXT, XLS, XLSX formatted file.
I have found that the contacts not being added are returning the following error:
The contact can not be opted in using 'ACTION_BY_OWNER'.
There's a lot more to the error (looked like codes of some kind), but I wasn't sure if some of it was sensitive so I didn't post it all here. I can if that would be helpful.
What does this error mean? My account shouldn't have any opt-outs yet since it hasn't even been approved to send. However, I have imported (and subsequently deleted) several thousand email addresses prior to realizing we'd need an API integration.
It does sound like you are doing a single contact add as the error you receive is only through the single contact add. Basically, that error means that a contact is trying to be modified or created in a state that requires ACTION_BY_VISITOR (indicating the Contact asked to be subscribed). There are a few reasons that could occur, most commonly that the contact already exists, is opted out and you are attempting to opt them back in.
We would need to see the raw information about the Contact you're trying to create/update, the payloads and do some investigation to get you a more detailed answer than this. If you could email our API support team (firstname.lastname@example.org) with the details that would help.
Also wanted to point out, we do not permanently delete Contacts. If you use the "Delete" option in our web UI, the Contacts are marked as "deleted" but stay in the database forever. Thus, the API integration is likely trying to update one of those deleted Contacts and there is a disconnect in the states.