What Are Quotas?
Quotas are monthly limits on the number of events you can send through PingPilot. Every plan has a quota that resets on the 1st of each month.Quotas ensure fair usage and help maintain system performance for all users.
Quota Limits by Plan
| Plan | Events per Month | Event Categories |
|---|---|---|
| Free | 100 | 3 |
| Pro | 1,000 | 10 |
| Enterprise | 10,000 | 100 |
How Quotas Work
Monthly Reset
Your quota resets automatically on the 1st day of each month at midnight UTC. This gives you a fresh allocation of events.Event Counting
Every successful event sent via the API counts toward your monthly quota:- You send an event via
POST /api/v1/event - The API checks your current usage
- If under the limit, the event is processed
- Your quota counter increments by 1
- Event is delivered to Discord, Telegram, and email
Quota Tracking
The quota system is stored in your database and tracked per user, per month:Quota Enforcement
When you reach your monthly limit, the API will reject new events:API Response
Implementation
The quota check happens before event processing in route.ts:84-99:Monitoring Your Quota
Dashboard View
Your dashboard displays:- Current usage: How many events you’ve sent this month
- Quota limit: Your total monthly allowance
- Remaining events: How many events you can still send
- Reset date: When your quota will reset
Programmatic Monitoring
You can track quota usage by monitoring429 responses from the API:
Quota Updates
After each successful event, the quota counter is updated atomically:- Atomic increments: No race conditions
- Automatic creation: First event of the month creates the quota record
- Accurate tracking: Count matches actual events processed
What Counts Toward Quota
Counts Toward Quota
- Successful API calls to
/api/v1/event - Events with
DELIVEREDstatus - All event notifications sent
Does NOT Count
- Failed API calls (400, 401, 403, 422, 500)
- Events that fail validation
- Dashboard page views
- API key generation
Managing Your Quota
Best Practices
- Monitor usage regularly: Check your dashboard to avoid surprises
- Implement retry logic carefully: Failed requests don’t count, but be mindful of retries
- Plan ahead: If you’re approaching your limit, upgrade before you hit it
- Use categories wisely: Organize events to make the most of your category limit
When to Upgrade
- Upgrade to Pro
- Upgrade to Enterprise
Consider upgrading from Free to Pro if:
- You’re consistently using 80%+ of your 100 events
- You need more than 3 event categories
- You’re using PingPilot for production apps
- You need priority support
Quota FAQs
What happens if I exceed my quota?
What happens if I exceed my quota?
The API will return a
429 Too Many Requests response and reject the event. You’ll need to either wait until the 1st of next month when your quota resets, or upgrade to a higher plan.Do failed events count toward my quota?
Do failed events count toward my quota?
No. Only successfully processed events count toward your quota. If the API returns an error before processing (like 400, 401, 422), it doesn’t count.
Can I purchase additional events?
Can I purchase additional events?
Currently, no. Each plan has a fixed monthly quota. If you need more events, you’ll need to upgrade to the next plan tier.
What timezone is used for quota resets?
What timezone is used for quota resets?
Quota resets happen on the 1st of each month at midnight UTC, regardless of your local timezone.
Does my quota carry over?
Does my quota carry over?
No. Unused events don’t roll over to the next month. Your quota resets to 0 on the 1st of each month.
How quickly do upgrades take effect?
How quickly do upgrades take effect?
Plan upgrades are instant. As soon as your payment is confirmed through Stripe, your new quota limits are active.
Technical Details
Database Schema
Quotas are tracked in theQuota table with a composite key on userId, month, and year. This allows efficient lookups and automatic monthly isolation.
Performance
The quota check is optimized for low latency:- Single database query to fetch current quota
- In-memory comparison against plan limits
- Fast rejection if limit exceeded
- Atomic increment after successful event processing
Accuracy
The system uses database transactions and atomic operations to ensure quota counts are always accurate, even under concurrent load.The quota enforcement logic is battle-tested and handles race conditions correctly using database-level atomic operations.