LeadSquared API returns synchronous responses by default. We also offer Asynchronous (Async) API for even better reliability and performance. In addition, by using asynchronous responses, your implementation can do other tasks while LeadSquared is retrieving your data.
Whether the LeadSquared core platform is up or down, Async APIs will always guarantee zero leakage for all requests*. Requests will be accepted, processed, and also retried up to 10 times.
Peak Usage Protection
Async APIs can manage any load, even when called with large volumes, the API requests will still be accepted.
* Our API Gateway is hosted on AWS (Amazon Web Service Cloud) which guarantees availability SLA of 99.95%. There may be instances where requests are not received by LeadSquared. If you face any such issues, please contact us at firstname.lastname@example.org.
How It Works
Async API requests are first queued and later picked for processing. Requests that fail for non-application reasons are retried. Note that retries are only performed for non-application errors (system errors like ‘Unable to Connect to DB). Application errors (like validation errors and other exceptions starting with ‘MX’) are not retried.
Retry is performed a maximum of 10 times at the following intervals –
- 1st Retry – 30s
- 2nd Retry – 2m
- 3rd Retry – 7m
- 4th Retry – 15m
- 5th Retry – 30m
- 6th Retry – 45m
- 7th Retry – 60m
- 8th Retry – 1.5h
- 9th Retry – 2h
- 10th Retry – 3h
When you make a call using Async API, instead of the actual response data, a
RequestId is returned in the response.
- Pass the
RequestIdin the query string of the Status API*.
- The response will return the status of the request –
- If successful, the actual response data will be returned
- If unsuccessful, the response returns details on the status, reason, and steps.
* There are different Status APIs available for different Async APIs. For example. the Capture Leads API
v2/LeadManagement.svc/Lead.Capture? has the following Status API endpoint
API Host and Key
The API host is dependent on your account region.
Note: You must use the correct API host to make successful calls. If you use an incorrect host you’ll get a
401 Unauthorized error. The correct API host will be mentioned in the error message.
To find your API host and
- Log in to your LeadSquared account and navigate to My Profile>Settings>API and Webhooks>Async API.
- Alongside Enable Async API, click Yes.
- Your API host and Key will both be visible on the page.
Authentication for Async APIs requires you to pass the following –
SecretKeymust be passed in the query string
x-api-keymust be passed in the header
- The Status API doesn’t require
- For all other requests, you must pass valid access and secret keys associated with your LeadSquared.
Async APIs are free from rate limits. The rate limits specified for other v2 APIs do not apply to Async APIs.
However, requests are internally processed as per our capabilities. In case of sudden spikes, a slight backlog can be expected.
List of APIs
- Capture Leads (Async) | Capture Leads Status API
- Update a Lead (Async) | Update a Lead Status API
- Post an Activity on a Lead (Async) | Post an Activity on a Lead Status API
- Create a Lead and Activity (Async) | Create Lead and Activity Status API
- Capture Opportunities (Async) | Capture Opportunities Status API
- Update an Opportunity (Async) | Update an Opportunity Status API
- Post a Call Log (Async) | Post a Call Log Status API