A practical business guide

How to handle API rate limits in business automation

Keep queued work intact when an API limits requests. Use provider wait times, shared pacing, and a clear deadline.

Download the worksheet ↧

Pause the affected queue and keep its place

When a service tells your automation to slow down, save the unfinished jobs, pause requests that share the same limit, and resume only when the service allows it. Give each job a deadline and a maximum attempt count. If a failed request might already have changed a record, check the destination before trying the write again.

This guide is for outbound calls, such as copying approved inventory updates into a catalog API. An HTTP 429 response means too many requests in a given interval. It does not define which requests share the limit. Check whether the provider applies it to an account, credential, endpoint, or another group before you decide what to pause.

Read the limit signal before you retry

Save the response status, the provider’s rate-limit fields, and the time you received the response. A Retry-After value can be a number of seconds or an HTTP date. For seconds, add the value to the time you received the response. For a date, use the stated time. Use a synchronized clock and store the result in UTC so another worker can apply the same rule. Treat the result as the earliest time you can retry.

A provider can add its own rules. GitHub, for example, can return a 403 or 429 for a rate limit. Its documentation tells you how to read the reset time or the retry delay. A 403 that means access denied needs a different response. For a clear limit signal without a valid wait time, use the provider’s documented fallback. If there is no documented wait, set a bounded delay that increases after each failed attempt. Add a small random delay to spread requests out, without sending any request before the provider’s minimum. If the allowed retry time is after the job’s deadline, hold the job for review.

Keep unfinished work after a restart

Use a queue or a durable table that survives a restart. Keep the original job ID, the target account, the operation, the attempt count, the next eligible time, and the deadline. Record the last outcome as a safe error code or short reason. Keep request bodies, credentials, and customer data out of routine logs. Store the minimum job data needed to finish the work.

Set a shared pause time for all workers that use the affected limit. A worker should check that time when it claims a job and before it sends the request. Keep the initial pacing and concurrency conservative. If several workflows use the same credential, make them share that control. Separate queues can run independently only when the provider says their limits are independent.

Record a job as complete only after a trustworthy success response or a destination check. If a request times out after sending a write, the destination may have accepted it. Use the same operation key if the provider supports safe retries for that operation and the key is still valid. Otherwise check the destination by a stable reference. If you cannot tell what happened, hold the job for an operator. See the guide to preventing duplicate actions for that separate decision.

Worked example: three queued catalog updates

Juniper Parts is fictional. Its queue has three approved jobs, Q101 through Q103. They share one catalog account limit. The team allows up to three sends per job, including the original send, and requires completion by 16:10 UTC. The worker sends requests at least two seconds apart. For this test it adds a fixed three-second spread after the provider’s minimum so the expected times are repeatable. These times and rules are example inputs, not a provider’s actual limits.

Expected results in the fictional test
Time (UTC)Input or eventExpected result
16:00:00Q101 receives 429 with Retry-After: 90.Attempt 1 is recorded. The group cannot send before 16:01:33. Q101, Q102 and Q103 remain queued.
16:00:30A worker restarts.It reloads the group pause. No request is sent.
16:01:33Q101 is tried again and receives a confirmed success.Q101 is complete on attempt 2. The worker records the result.
16:01:35Q102 receives 429. This time the retry date is 16:12:00.The earliest retry with spread is 16:12:03, beyond the cutoff. Pause the group and hold Q102 and unsent Q103 for review.
16:10:00The cutoff arrives.One complete, two held. Q103 made zero requests. No job is marked complete just because the queue stopped.

The group pause lasts even though those two jobs are held. An operator must check any new work before releasing it. Record the held job IDs, the next allowed time, and the person who can approve a new deadline. An alert should explain whether work is delayed, held, or confirmed complete.

Run this release check

Use a test account or a stub that returns fixed responses. Record actual sends and state changes for each row. Run the restart case with two workers that share the same test limit.

RATE-LIMIT RELEASE CHECK
Provider and limit group:
Operations and retry safety:
Minimum spacing / concurrency:
Job deadline and maximum sends (including first send):
Queue owner and held-job review route:

Case | Expected result | Observed result
429 with Retry-After: 90 | No early request; unfinished jobs remain queued |
429 with a future HTTP date | Wait until at least that instant |
Clear limit, no valid retry time | Apply provider fallback or bounded delay |
Worker restarts during shared pause | Neither worker sends early |
Wait extends past deadline | Hold affected jobs; do not mark complete |
Attempt cap reached | No extra send; surface the held job and reason |
Access-denied 403 | Stop for access review; no rate-limit loop |
Timeout after a write | Verify the result before another write |
Confirmed success after a retry | One recorded completion for that job |

Release only when the send log and queue agree. Record the test
timestamp, outcome, and any unresolved provider behavior.

For a live workflow, watch queue age and the number of held jobs alongside rate-limit counts. A drop in errors might mean the queue stopped sending. Agree on when a held job needs human review before you raise any request limit. If you need help mapping which jobs share a limit and deciding how to recover held work, start with the Workflow Automation service and its fit call.

Put the plan to work

Start with one useful change.

Bring the process, the people involved, and a redacted example. A free 30-minute fit call can establish the next step.