Best Practices for Salesforce API Limits
Salesforce APIs are powerful tools that enable seamless integration between Salesforce and other platforms, systems, and applications. However, like any shared cloud resource, Salesforce enforces API limits to maintain performance and ensure fair usage across customers. Exceeding these limits can lead to failed integrations, disrupted workflows, or delayed automation processes.
This guide explores Salesforce API limits, how they work, how to monitor them, and the best practices to optimize usage efficiently — ensuring your integrations remain smooth, reliable, and scalable throughout 2025.
Understanding Salesforce API Limits
What Are API Limits?
Salesforce API limits are restrictions on the number of API calls your organization can make within a 24-hour period. Every time an application communicates with Salesforce — whether it retrieves, inserts, updates, or deletes data — it consumes an API call.
Why Salesforce Imposes API Limits
Salesforce operates in a shared, multi-tenant environment, meaning multiple organizations share the same infrastructure. API limits ensure system stability, fair resource allocation, and consistent performance for all users.
Types of APIs Affected by Limits
The following Salesforce APIs count toward daily limits:
-
REST API – Used for lightweight web and mobile integrations.
-
SOAP API – Common for legacy and enterprise applications.
-
Bulk API and Bulk API 2.0 – Designed for large data imports and exports.
-
Streaming API – Used for real-time event monitoring.
-
Composite API – Bundles multiple API calls into one request.
How Salesforce Calculates API Limits
The exact number of daily API calls depends on your Salesforce edition and user licenses. For example:
-
Enterprise Edition: 1,000 calls per user license per day.
-
Developer Edition: 15,000 calls per 24 hours.
-
Unlimited Edition: 5,000 calls per license per day.
Additionally, Salesforce considers:
-
Batch calls (in Bulk API) as a single request, even if processing thousands of records.
-
Composite API requests as one call, though they may include multiple sub-requests.
-
Internal Salesforce features like Data Loader and Integration Tools also consume API calls.
Monitoring API Usage
Monitoring your organization’s API consumption helps prevent unexpected service interruptions.
1. System Overview
Navigate to Setup → System Overview in Salesforce to see current API usage statistics and limits.
2. REST API Endpoint
You can also check API limits programmatically using the endpoint:
This returns a JSON response showing current usage and remaining limits.
3. Event Monitoring
Event Monitoring provides detailed analytics of API usage patterns, allowing admins to identify which integrations consume the most calls.
4. Salesforce Reports and Dashboards
Create custom dashboards using data from the EventLogFile object to visualize API consumption trends over time.
Best Practices to Manage Salesforce API Limits
1. Use Bulk APIs for Large Data Operations
Instead of making thousands of individual API calls, use Bulk API or Bulk API 2.0 for importing or updating large volumes of data. These APIs process data in batches and count as fewer requests, saving your daily quota.
2. Implement Caching Mechanisms
Avoid redundant API calls by caching frequently accessed data locally or in an external cache (like Redis or Memcached). For example, if your integration repeatedly requests the same Account details, store them temporarily and refresh only when necessary.
3. Leverage Composite and Batch Requests
Use the Composite API to bundle multiple operations into one call. For example, updating several records or creating multiple contacts can be done in one composite request instead of many smaller ones.
4. Optimize SOQL and Query Logic
Inefficient queries can waste API calls and cause timeouts. Use selective SOQL filters and indexed fields to minimize data retrieval. Always fetch only the fields you need instead of querying entire records.
5. Schedule Integrations Wisely
Plan heavy API usage during off-peak hours or schedule them in smaller intervals to distribute the load evenly throughout the day.
6. Minimize Polling with Streaming API
If your integrations rely on constant data updates, use Streaming API or Platform Events instead of repetitive polling. This event-driven approach sends updates only when data changes, significantly reducing API consumption.
7. Reuse Session Tokens
Creating a new session for every request increases API calls unnecessarily. Reuse existing session tokens or OAuth access tokens until they expire to optimize efficiency.
8. Use Data Loader and Third-Party Tools Strategically
When performing large data migrations, ensure that tools like Data Loader, MuleSoft, or Informatica are configured to process data in bulk rather than line-by-line operations.
9. Clean Up and Deactivate Unused Integrations
Regularly audit connected apps and integrations. Deactivate or remove any outdated systems that continue to make unnecessary API requests.
10. Monitor and Alert for High Usage
Set up automated alerts using Salesforce Flow, MuleSoft Anypoint Monitoring, or external monitoring tools to notify admins when API usage approaches a critical threshold.
Advanced Optimization Strategies
Use Named Credentials and External Services
Instead of hardcoding credentials, configure Named Credentials in Salesforce. This not only improves security but also provides better visibility and control over API access.
Asynchronous Processing
Use asynchronous Apex (like Queueable, Batchable, or Future methods) to handle large jobs efficiently without overloading APIs.
Use Change Data Capture (CDC)
For integrations that require data synchronization, Change Data Capture events automatically publish changes to subscribed systems, removing the need for continuous polling.
Enable Integration User Accounts
Assign a dedicated Integration User for API-based systems. This makes tracking and managing API consumption much easier and avoids shared account conflicts.
Optimize Integration Architecture
If multiple external applications connect to Salesforce, consider implementing an API Gateway such as MuleSoft or AWS API Gateway. This helps centralize and optimize requests, reducing redundant calls and improving response efficiency.
Common Mistakes to Avoid
-
Ignoring API Usage Reports: Failing to monitor usage may lead to sudden service interruptions.
-
Unoptimized Queries: Fetching unnecessary fields increases response time and API count.
-
Overuse of Polling: Constantly checking for updates consumes more API calls.
-
Lack of Error Handling: Poor retry logic can cause loops that flood Salesforce with requests.
-
Using Default Integrations Blindly: Some pre-built connectors are inefficient and should be fine-tuned.
Handling API Limit Exceed Errors
When you exceed your daily API limit, Salesforce returns the error “REQUEST_LIMIT_EXCEEDED.” To recover:
-
Pause API operations until the limit resets (usually after 24 hours).
-
Contact Salesforce Support if the issue persists and you need a temporary limit increase.
-
Review logs to identify which applications caused the spike.
-
Implement the optimization techniques discussed above to prevent recurrence.
Tools to Help Manage API Limits
-
Salesforce Event Monitoring – Detailed insights into API calls and user activity.
-
MuleSoft Anypoint Platform – Centralized monitoring for all integrations.
-
Salesforce CLI (sfdx) – Useful for scripting and managing deployments without excessive API calls.
-
Postman Collections – For testing APIs and monitoring responses.
Preparing for 2025 and Beyond
Salesforce continues to improve its API ecosystem, introducing smarter ways to handle data and automation. In 2025, features like GraphQL API, Data Cloud Integration, and Einstein AI Insights will further optimize API performance and allow developers to access data more efficiently.
As Salesforce expands its AI capabilities, API usage will become even more intelligent — focusing on predictive data management, event-driven triggers, and real-time decision-making. Organizations that follow API best practices today will be well-prepared for these next-generation enhancements.
Conclusion
Efficiently managing Salesforce API limits is crucial for keeping integrations stable, reliable, and cost-effective. By understanding how limits work, monitoring them proactively, and implementing best practices such as caching, composite requests, and bulk processing, you can make the most of your Salesforce environment.
In 2025, Salesforce’s evolving API ecosystem offers even greater potential for automation and innovation — but only for those who use it wisely. Optimize your API strategy today to ensure long-term scalability, performance, and success in every Salesforce-driven workflow.