LeadSquared Developer Centre

ON THIS PAGE

Rate Limits


Plan-Based Rate Limits

There are limits on the number of API calls you can make. These limits depend on your LeadSquared subscription plan. When you reach the limit, the LeadSquared API will throw an API rate limit exception and will stop processing any more requests until a certain amount of time has passed.

Pro Plan Super Plan
API Framework
10,000 calls per day* 100,000 calls per day*
Additional 1,000 calls per user per day Additional 1,000 calls per user per day
Maximum of 250,000 calls per day Maximum of 1 million calls per day
API Rate Limits
10 calls every 5 seconds* 20 calls every 5 seconds*
Bulk API Rate Limits 5 calls every 5 seconds* 10 calls every 5 seconds*

* Please use the Manage Subscription tab on the Settings page to enhance limits or contact your account manager for help with the same.

Bulk APIs –  Create Leads in Bulk | Create or Update Leads in Bulk | Update Leads in Bulk | Post Activities on Leads in Bulk (Using Lead Id) | Post Activities on Leads in Bulk (Using Unique Lead Fields) | Update Activities in Bulk

 

Why We Impose Rate Limits

We impose rate limit to prevent overloading the servers and to maintain a high quality of service. Rate limit establishes availability for a wider range of users by ensuring that single users or regions don’t dominate the concurrent connections to a server. This ensures that more users with more diverse needs can connect to wider collection of servers, increasing the user base and potential revenue.

 

Tips to Better Handle Rate Limits

Make sure you make only the requests you need. Here are some tips to help you reduce the number of requests and avoid running in to rate limit exceptions –

  • Eliminate unnecessary API calls.

For example, are some requests getting data items that aren’t used in your application? Are retrieved data items being put back to your LeadSquared instance with no changes made to them?

  • Cache frequently used data.

You can cache data on the server or on the client using DOM storage. You can also save relatively static information in a database or serialize it in a file.

Example: If you wish to update a lead and post an activity then you should require a ProspectID for two API’s.

In this case you can call get-a-lead-by-email-id to retrieve the ProspectID of the lead and use it in multiple API’s (Update a lead and Post an Activity to Lead) by storing in DOM storage or Database.

  • Choose Bulk API end points.

Use bulk and batch endpoints such as create-leads-in-bulk/ create-activities-in-bulk, which let you update bulk leads with a single API request.

Here’s the list of bulk APIs –

API Type API end-points Number of Leads that can be updated in a single API call
Lead Management Create Leads in Bulk 50
Create/Update Leads in Bulk 50
Update Leads in Bulk 50
Activity Management Post Activities on Leads in Bulk (Using Lead Id) 25
Post Activities on Leads in Bulk (Using Unique Lead Fields) 25
Update Activities in Bulk 25
  • Retry Logic.

Implement retry logic after certain amount of time if you receive an API rate limit exception as a response.

Example: We recommend checking API responses after each API call. If you get API rate limit exception, then implement sleep for a while and re-try again.

/* Call API. */

$lead_response = $leadsquared->get_lead_by_id($ProspectID);

$array_lead_array= json_decode($lead_response, true);

/* Check API response. */

if($array_lead_array[‘Status’] == “Error” && $array_lead_array[‘Message’] == “API calls exceeded the limit of X in N second(s)”)

{

            /* Wait for a while. */

            sleep(N);

            /* Re-call API */

            $lead_response = $leadsquared->get_lead_by_id($ProspectID);

}

  • Queuing API requests.

There are many cloud applications available in market to queue your API requests for handling API rate limit. Here are a few that you can check out:

 

Availing Higher Rate Limits

If you wish to go for a higher-volume API rate limit, you can contact us sales@leadsquared.com or support@leadsquared.com, and we’ll walk you through the available choices of add-ons.

On this page

© 2024 by MarketXpander Services Pvt Ltd. All Rights Reserved.