API reference
Rate limits
What limits apply to the events and payments endpoints: body sizes, batch sizes, the monthly event quota, and how to back off when the API asks.
ProductLense does not publish a fixed number of requests per second per key. The limits that apply are body and batch sizes, the account's monthly event allowance, and back pressure when the ingest queue is full. Traffic that looks abusive can also be answered 429 by Cloudflare, which sits in front of the API.
Size limits
| Endpoint | Limit |
|---|---|
POST /api/v1/events | Body at most 8 KB; at most 50 events per batch; properties at most 2 KB per event |
POST /api/v1/payments | Body at most 64 KB; one payment per request |
Monthly event quota
Every accepted event except $identify counts toward the account's monthly events, across all its sites. Free includes 10,000, Starter 100,000, Growth 1,000,000 and Scale 10,000,000 a month. Paid plans keep accepting events up to twice the allowance and Free up to 10% above it; past that, the events API answers:
HTTP/1.1 429 Too Many Requests
Retry-After: 1728000
Content-Type: application/json
{"ok":false,"error":{"code":"quota_exceeded","message":"monthly event quota exceeded"}}Retry-After is the number of seconds until the next month starts in UTC, when the count resets. Payments do not count toward the event quota. See Plans and limits.
Back pressure
When the ingest queue is full, the events API answers 503 with code rate_limited and Retry-After: 2. This is short-lived; wait and retry.
Sending a lot of events
- Batch: one request with 50 events costs far less than 50 requests. Keep the body under 8 KB.
- Send from a queue in your backend rather than inside a user's request, so a slow or failed call never delays your page.
- Back off exponentially on
503and500, starting fromRetry-After. - Stop sending on
429 quota_exceededuntil the time inRetry-After; retrying sooner is refused.