Skip to main content

Rate Limits

The Harlyy API limits how many requests can be made in a window of time, to keep the platform fast and reliable for everyone. A request over a limit is rejected with a 429 Too Many Requests status code and an error response.

Default Limits​

Unless an endpoint states otherwise, each caller can make 1,000 requests per 60 seconds, shared across every endpoint.

Some endpoints have their own, usually stricter, limit. Requests to those endpoints are counted separately for each URL and do not count towards the default limit. For example, submitting responses to a survey is limited to 10 requests per 60 seconds.

The window starts with the first request and resets once it ends, rather than sliding.

Secret Keys​

Requests authenticated with a business's secret key are limited by the secret key, at the default limits above, or at an endpoint's own limit where it has one.

Every request made with the same secret key counts towards the same limit, even when they are sent from several servers. Each of a business's secret keys has its own limit.

Requests with a secret key that is invalid, or that does not belong to the business in the URL, are limited by the IP address they are sent from instead.

Third-Party Integrations​

Apps that act for Harlyy users through OAuth 2.0 are limited twice. Each request counts towards:

  1. The user's limit: the same limit the user has when they use Harlyy themselves, at the default limits above, or at an endpoint's own limit where it has one.
  2. The integration's limit: a limit shared across every user your integration acts for, at 5 times the user's limit for the same endpoint.
EndpointUser limitIntegration limit
Any endpoint without its own limit1,000 per 60s5,000 per 60s
An endpoint limited to 10 requests per 60s10 per 60s50 per 60s

A request rejected by the user's limit does not count towards the integration's limit. As the user's limit is shared with everything else they do on Harlyy, an integration should not expect to use all of it.

tip

If your integration needs a higher limit, contact our support team with details of your use case.

Rate Limit Headers​

Every response includes headers describing the limit the request counted towards.

HeaderDescription
X-RateLimit-LimitThe maximum number of requests allowed in the window.
X-RateLimit-RemainingThe number of requests left in the current window.
X-RateLimit-ResetWhen the current window resets, as a Unix timestamp in milliseconds.

Responses to requests from a third-party integration also include the integration's limit. The X-RateLimit-* headers then describe the user's limit.

HeaderDescription
X-Integration-RateLimit-LimitThe maximum number of requests your integration can make in the window.
X-Integration-RateLimit-RemainingThe number of requests your integration has left in the current window.
X-Integration-RateLimit-ResetWhen the current window resets, as a Unix timestamp in milliseconds.

Handling Rate Limits​

  • Check the Remaining headers and slow down before reaching zero.
  • When you receive a 429, wait until the time in the matching Reset header before trying again.
  • Retry with exponential backoff, rather than immediately, so that bursts do not keep hitting the limit.
  • Use webhooks to hear about changes instead of polling for them.