Skip to main content
A request over your organization’s rate limit is rejected before it does anything. Retry it after the number of seconds in the Retry-After header.

How limits work

Each limit has two numbers: a sustained rate and a burst.
  • Sustained rate. The steady number of requests you can send per minute. Allowance refills continuously, not at the top of each minute: a limit of N per minute gives you one more request every 60 ÷ N seconds.
  • Burst. How many requests can arrive at once when you haven’t used any allowance. After a burst, the allowance refills at the sustained rate, one request at a time.
Limits are counted per organization, separately for each kind of operation. Pricing requests have their own allowance, so a burst of pricing calls doesn’t use up the allowance for loan updates, and the other way round. All API keys in an organization share the same allowance. Limits count requests as they arrive, not how many are in progress. Ten requests that each take a second use the same allowance as ten that each take ten seconds.

Finding and raising your organization’s limits

To find out your organization’s limits, or to raise them for an integration that sends many requests, such as batch pricing, contact Pylon support. You can also read the current sustained rate for any call from the X-RateLimit-Limit header on its response.

Pricing limits

Pricing operations (scenario pricing, loan product pricing, optimal structure, marketing rates and prequalification) have a lower limit than the rest of the API. Most other calls are unlikely to reach theirs. A GraphQL request that asks for several pricing fields at once counts once for each field.

Recognizing a limited request

How a limited request looks depends on the API you call.

GraphQL

A limited GraphQL request returns HTTP 200, like every GraphQL response. The limited field comes back as null with an error whose extensions.code is RATE_LIMITED:
Check extensions.code, not the HTTP status or the message text.

REST

A limited REST request returns HTTP 429 with "code": "RATE_LIMITED" in the body. See MISMO import for an example.

Rate limit headers

Responses to authenticated requests carry these headers, for both GraphQL and REST. 401 and 403 responses don’t carry them. The headers describe the limit that applied to the request. A GraphQL request that touches pricing reports the pricing limit.

Retrying a limited request

Wait for the number of seconds in Retry-After, add a little random jitter, then send the same request again. Treat it as unfinished until it succeeds.

Sending batches

If you price or update many records at once, pace your requests to the sustained rate rather than relying on retries.
Don’t move on to the next batch as soon as a batch “finishes”. A limited request returns in a few milliseconds. If your client waits for a batch to come back and then immediately sends the next one, a batch full of rejections comes back almost at once. The next batch is sent straight away and rejected too, and the loop quickly sends hundreds of requests that all fail. Retry limited requests after Retry-After instead of counting them as finished.
To stay under the limit with batches, start each batch no sooner than the batch size multiplied by the time between requests. Take the sustained rate from X-RateLimit-Limit:
You can also slow down before you reach the limit by watching X-RateLimit-Remaining. When it gets close to zero, pause until enough allowance has refilled.