Queue Maketo Lead API calls
Hi,
We have built a script in PHP to remove duplicates from our Marketo instance and calling that script through webhook (via smart campaign). In that script we are first pulling the lead information and sometimes when that script is doing around 100 API calls in 1 minute to Marketo API, Marketo API stops responding and give the below error (attaching screenshots of the code and error)


Wait step in campaign doesn't seem to work.
Could you please tell how can we queue these Marketo API calls or any other workaround for this?
Thanks,
Jyotsna