Guide Fixing errors
Salesforce API request limits and AI agents
Short answer: Every Salesforce org has an allowance of API requests over a rolling 24 hours. Integrations, tools and AI agents that work through the API all draw on that one allowance. When it is used up, Salesforce answers
403 REQUEST_LIMIT_EXCEEDED(the daily flavour mentionsTotalRequests) and nothing that uses the API works until the window moves on. Check what is left with thelimitsresource, and budget for what an agent will use.
The two kinds of limit error
Both arrive as REQUEST_LIMIT_EXCEEDED, and they call for opposite reactions:
- The daily allowance is used up (the message names
TotalRequests, or the daily API requests limit). It is not a permission problem and not "try again in a moment": the rolling 24-hour window has to move on, or the org's allowance has to be raised. Retrying in a loop only makes it worse. - Too many long requests at once (a concurrency limit). That one does clear in a moment: wait briefly and try again.
A tool that treats both the same will either hammer an exhausted org or give up on a busy one.
How to see what is left
Ask Salesforce:
GET /services/data/vXX.0/limits
The answer lists DailyApiRequests with Max and Remaining, next to the other limits of the org. In Setup, System Overview shows API usage as well. Look at it before a large run, not after the error.
What uses the allowance
Every call counts: a query, a describe, a create. An AI agent that works in steps makes several calls for one task, so a batch of records is a batch of calls, many times over. A busy integration plus an agent plus a nightly sync can add up faster than anyone expects, and every other integration spends from the same pool at the same time.
Ways to keep usage low:
- Cache what rarely changes (the schema of an object, a short list of reference values), instead of asking again for every record.
- Use bulk operations where the API offers them, instead of one request per record.
- Ask for what you need with a precise query and
LIMIT, not whole objects. - Spread large jobs out, and keep batch sizes sensible.
- Try a big first batch in a Sandbox, which has its own allowance: test an AI agent in a Salesforce Sandbox.
When an org runs out
- Stop calling. The allowance is a rolling 24-hour window, so repeating the call only spends more of it.
- Tell the person plainly what happened and that waiting (or raising the limit) is the cure, not a permissions change.
- Check what is consuming it. Setup > System Overview, or the API usage reports, show which integrations are heavy.
- Ask Salesforce about the allowance. More API requests can be bought, and the right size depends on the edition and the number of licences.
Frequently asked questions
Is the API limit per user?
No. The daily allowance is per org, so every integration and tool in the org shares it.
Does a Sandbox have the same limit?
A Sandbox has its own allowance, which is usually generous enough for testing. Check the limits resource there too.
Will waiting fix it?
For the daily allowance, yes: the window is rolling, so room opens up as the oldest requests drop out of the 24 hours. For a concurrency error, a short pause is enough.
Can I avoid it altogether?
You can keep usage down (caching, bulk operations, precise queries) and watch the remaining allowance before large runs. If an org genuinely needs more, the allowance can be increased.
Sources and further reading
Where this page leans on someone else's documentation or standard, it is listed here. Check the release or edition your org runs: official pages change.
- API Request Limits and Allocations (Salesforce Developers) - developer.salesforce.com
Keep reading
How to test an AI agent in a Salesforce Sandbox first
A practical way to trial an AI agent against a Salesforce or Certinia Sandbox: what to prepare, what to run, what to look for and when to move to production.
AI agents for finance teams on Salesforce
Where AI agents help finance teams that run on Salesforce and Certinia, what to automate first, and the controls that make it safe.
What is an AI agent in Salesforce?
An AI agent in Salesforce uses a language model to carry out multi-step tasks on your data, within limits you set, instead of only answering questions.
Certinia API: how to read and write Certinia data
Three ways to reach Certinia data - the Salesforce REST API and SOQL for records, Certinia's Apex API for operations such as posting, and Certinia's REST services.
Salesforce invalid_grant: the causes, how to tell them apart and how to fix each
What the Salesforce invalid_grant error means, the causes Salesforce lists, how the error_description separates a finished token from an org rule, and the fix for each.