Rate Limiting

Hevo limits the number of API requests that your team can send in a 60-second window. The endpoints are divided into three groups, and each group has its own limit. When your team reaches the limit of one group, requests to the other groups succeed.

Refer to the following sections to understand and work with rate limits:

  • Rate Limit Groups: The endpoint groupings Hevo uses and the limit for each.
  • Rate Limit Headers: The headers Hevo includes in every authenticated response so you can track your remaining quota.
  • Handling a 429 Response: Recovery steps for when your team exceeds a group's limit, and practices to stay within the limits.

Rate Limit Groups

Every request belongs to one of the following three groups. Each group has its own limit, applied per team in each 60-second window:

GroupEndpoints CoveredLimit
Pipelines
  • All Destination endpoints
  • All Metadata endpoints
  • All Pipeline endpoints, except the Pipeline Object and Pipeline Job endpoints
50 requests per 60-second window
ObjectsAll Pipeline Object endpoints100 requests per 60-second window
JobsAll Pipeline Job endpoints50 requests per 60-second window

All the API keys of your team count toward the same limit for each group. The count starts with the first request in a group and resets 60 seconds later.

For example, suppose your CI/CD system sends 30 requests to the Pipeline endpoints with one API key, and a teammate sends 20 more with another key in the same 60-second window. Your team has then used all 50 requests of the Pipelines group. Until the window resets, the next request to any Destination, Metadata, or Pipeline endpoint returns a 429 response. Requests to the Pipeline Object and Pipeline Job endpoints succeed, because those groups have their own limits.

You can contact Hevo Support to change these limits for your team.

Rate Limit Headers

Every authenticated API response, including a 404 or a 429 response, includes the following headers for the group the request belongs to:

HeaderDescription
X-RateLimit-LimitThe maximum number of requests your team can send in a 60-second window for this group.
X-RateLimit-RemainingThe number of requests your team can send in the current window for this group.
X-RateLimit-ResetThe number of seconds until the current window ends and the count resets.

A request that fails authentication does not count toward the limit, and its 401 response does not include these headers.

For example, a response to a request in the Pipelines group might return:

X-RateLimit-Limit: 50
X-RateLimit-Remaining: 37
X-RateLimit-Reset: 42

This tells you that your team can send 50 requests per 60-second window for the Pipelines group, 37 remain in the current window, and the window resets in 42 seconds.

If X-RateLimit-Remaining reaches 0, wait for the number of seconds in X-RateLimit-Reset before sending another request in the same group.

Handling a 429 Response

When your team exceeds the limit for a group, Hevo returns a 429 Too Many Requests response along with a Retry-After header. The Retry-After value is the number of seconds to wait before sending another request in the same group. This is the same value as the X-RateLimit-Reset header.

The structure of the response body depends on the API version in the base path of the endpoint, /api/v1 or /api/v2:

v2 Response Body

{
  "code": "RATE_LIMITED",
  "message": "Too many requests of this kind for this team. Retry after the number of seconds in the Retry-After header."
}

v1 Response Body

{
  "message": "Too many requests of this kind for this team. Retry after the number of seconds in the Retry-After header.",
  "error_reference_id": null,
  "api_doc_url": null
}

To recover from a 429 response, wait for the number of seconds in the Retry-After header, and then send the same request again.

Follow these practices to stay within the limits:

  • Check X-RateLimit-Remaining before you send a burst of requests.
  • Spread automated requests, such as those from CI/CD jobs, across the window.
  • Do not retry a request before the number of seconds in Retry-After has passed. Hevo rejects these retries with a 429 response.