Importing 1000 members with API calls

I have a member list of 900.  I tried importing them all with the API, and got an error message that only 100 for each call.

Prior to that call, I spit up the 900 members into chunks of 100.  For each chunk of 100, I create a new CS_REST_Subscribers and run the $wrap->import($subscribers, true); 

My thoughts are that the import call is only running 100 at a time, but will run in a loop 9 times.  This does not seem to work.  Is there a pause that I need to put in?  I would like to have this loop work.

How can I import 900 members through the cms?  Can I have the cms create, upload, and import from a file?

Thanks for the help, my last post got great results!

jamesd jamesd, 6 years ago

If it is an initial import of your subscribers, you are better to use a csv file and import them through the Campaign Monitor application, rather than iterating through several API calls.

I am not sure what you mean by "the cms", but if by that you mean your content management system which runs your website or own application, the API doesn't support using files to import subscribers.

All subscriber-related API functionality is documented:

And, as is documented: "When importing many subscribers at once, you may only import up to 100 subscribers at once. If you need to import more than this number of subscribers, you will need to make additional requests."

So, if you need to use the API to make several calls because you have more than 100 subscribers to import at once, you are responsible for writing the code which does that correctly.

gdubs, 6 years ago

Thanks for the response.  I got the members imported by breaking my loop into chunks of 100, and it worked great!

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free