Rate Limiting
The API enforces rate limits to ensure fair usage and protect service stability.
Default limits
Rate limits are applied per API key:
| Plan | Requests per minute | Daily quota |
|---|---|---|
| Free | 60 | 1,000 |
| Starter | 120 | 10,000 |
| Professional | 300 | 50,000 |
| Business | 600 | 100,000 |
Custom rate limits can be configured per API key when creating or updating keys. See API Keys.
Rate limit headers
Every API response includes rate limit information:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
Handling 429 responses
When you exceed the rate limit, the API returns HTTP 429 with a Retry-After header indicating how many seconds to wait.
{
"meta": {
"statusCode": 429,
"success": false,
"errors": [{ "RATE001": "Rate limit exceeded" }],
"message": "Too many requests. Retry after 30 seconds.",
"timestamp": "2026-04-30T12:00:00.000Z"
},
"data": null
}SDK handling
The JavaScript SDK provides EInvoiceRateLimitError with a retryAfter property:
import { EInvoiceRateLimitError } from '@useyona/einvoice-js';
try {
await client.invoices.list();
} catch (err) {
if (err instanceof EInvoiceRateLimitError) {
console.log(`Rate limited. Retry after ${err.retryAfter}s`);
await new Promise(r => setTimeout(r, err.retryAfter * 1000));
// retry the request
}
}The SDK’s built-in retry mechanism automatically handles 429 responses by respecting the Retry-After header.
Best practices
- Cache responses where possible —
getHsnCodes()and plan listing responses change rarely - Use pagination to reduce the number of requests when listing resources
- Batch operations — use
batchSubmit()instead of submitting invoices one at a time - Monitor usage — check remaining quota via response headers to avoid hitting limits
Last updated on