Guide Fixing errors

Salesforce API request limits and AI agents

Updated 3 min read By the BAFO team

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 mentions TotalRequests) and nothing that uses the API works until the window moves on. Check what is left with the limits resource, 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

  1. Stop calling. The allowance is a rolling 24-hour window, so repeating the call only spends more of it.
  2. Tell the person plainly what happened and that waiting (or raising the limit) is the cure, not a permissions change.
  3. Check what is consuming it. Setup > System Overview, or the API usage reports, show which integrations are heavy.
  4. 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.

Keep reading