REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.
What does this error mean?
Salesforce allocates a 24-hour rolling API request quota to each org based on edition and user licenses (typically 1,000 calls per Salesforce license per day, up to a cap). When all available calls have been consumed, every subsequent API request — including SOQL queries via the REST API — is rejected with this error until the quota resets at the next rolling window.
This error only affects API requests, not Apex executed within Salesforce itself. Triggers, flows, and Apex classes running in the Salesforce platform don't consume API call quota.
Common Causes
1. High-frequency polling integrations
An external system that polls Salesforce for changes every few seconds via REST API queries — even if each query is small, thousands per hour accumulate quickly.
2. Inefficient ETL or data sync processes
Batch ETL jobs that query Salesforce record-by-record rather than in bulk, multiplying the API call count by the number of records processed.
3. Multiple integrations competing for the same quota
Orgs with many integrations (CRM, ERP, marketing tools) each consuming a portion of the quota, with no single integration appearing excessive.
How to Fix It
Solution 1: Replace polling with Streaming API or Platform Events
Instead of polling for changes, subscribe to Salesforce's Streaming API (PushTopic queries) or Change Data Capture. These push changes to your integration the moment they occur — zero polling, zero wasted API calls.
Solution 2: Use Bulk API for large data operations
The Bulk API is designed for large-volume operations and consumes far fewer API calls than standard REST. A single Bulk API job can process millions of records while counting as one API request for quota purposes.
Solution 3: Monitor API usage proactively
// Check current API usage in Apex (OrgLimits class)
Map<String, System.OrgLimit> limits = OrgLimits.getMap();
System.OrgLimit apiLimit = limits.get('DailyApiRequests');
System.debug('Used: ' + apiLimit.getValue());
System.debug('Limit: ' + apiLimit.getLimit());
System.debug('Remaining: ' + (apiLimit.getLimit() - apiLimit.getValue()));
Pro Tip: Set up API Usage alerts in Setup → Company Information → API Usage Notifications. You can be notified when usage reaches 80% of the daily limit — giving you time to investigate before hitting the ceiling.