Skip to main content
The Lymo API enforces rate limits to ensure fair usage and reliable performance for all integrations. When you exceed the limit, the API returns a 429 Too Many Requests response.

Rate limit response

When you are rate limited, the response body tells you how long to wait before retrying:
{
  "error": 429,
  "message": "Too many requests. Please retry after 60 seconds."
}
Wait for the duration specified in the message before sending another request.

Best practices

Follow these practices to stay within rate limits and keep your integration reliable:
1

Cache responses when possible

Store responses locally and reuse them instead of making repeated identical calls to the API.
2

Use the limit parameter

Pass the limit query parameter on GET endpoints to fetch exactly the number of records you need, avoiding unnecessary data retrieval.
3

Implement exponential backoff

When retrying after a 429, wait progressively longer between attempts rather than retrying immediately.
4

Spread bulk operations over time

Distribute large batches of requests across multiple intervals rather than sending them all at once.

Retry example

When you receive a 429, pause and retry with increasing delays:
async function requestWithBackoff(url, options, maxRetries = 4) {
  let delay = 1000; // start with 1 second

  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const response = await fetch(url, options);

    if (response.status !== 429) {
      return response;
    }

    console.log(`Rate limited. Retrying in ${delay / 1000}s...`);
    await new Promise((resolve) => setTimeout(resolve, delay));
    delay *= 2; // double the delay each attempt
  }

  throw new Error("Max retries reached");
}
If you consistently hit rate limits, contact support to discuss higher limits for your use case.