To ensure stability and fair usage, the Roku Ads API enforces rate limits on requests. These limits define the maximum number of calls that can be made within a given timeframe. If you exceed these limits, Ads API returns an error code of 429.
Rate limit granularity
Rate limits are tracked independently per developer app, organization, endpoint, and request type (read vs. write). A developer with access to multiple organizations gets a separate counter for each organization, so usage in one doesn't eat into another's limit.
Enforcement windows
Each limit is enforced across two sliding windows simultaneously: a burst window (60 seconds) to prevent short spikes, and a sustained window (60 minutes) to prevent prolonged high usage. A request is blocked if either window is exceeded.
Read vs write limits
GET and HEAD requests count as reads; POST, PUT, PATCH, and DELETE count as writes. These are tracked and limited independently.
Endpoint groups
Limits apply per endpoint group, which is derived from the first path segment after /v1/developer/. For example, all /v1/developer/campaigns/... calls count toward the campaigns group.
429 response
If you exceed the rate limits, you receive a 429 Rate limit exceeded. Retry after [number] seconds. response that includes:
X-RateLimit-Limit- max requests allowedX-RateLimit-Remaining- value is always 0 when blockedX-RateLimit-Reset- Unix timestamp when the rate limit window resetsRetry-After- seconds until retry is allowed
The response body appears as follows:
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 42 seconds."
}
}