Skip to content

Usage Tracking

Track your MoMail usage to optimize costs, predict needs, and ensure you stay within plan limits.

Access your usage dashboard at app.momail.io/settings/usage

  • Current Period: Emails, searches, and storage for this billing cycle
  • Usage Trends: Graphs showing usage over time
  • Projections: Estimated usage by end of period
  • Breakdown: Usage by domain, mailbox, and endpoint
GET /billing/usage
{
"success": true,
"data": {
"emailsUsed": 4500,
"emailsLimit": 10000,
"searchesUsed": 890,
"searchesLimit": 5000,
"storageUsed": 256000000,
"storageLimit": 50000000000,
"periodStart": "2024-01-01T00:00:00.000Z",
"periodEnd": "2024-02-01T00:00:00.000Z"
}
}

See which domains receive the most emails:

Terminal window
curl https://api.momail.io/v1/billing/usage/domains \
-H "X-API-Key: your_key"
{
"success": true,
"data": [
{
"domain": "company.com",
"emailsReceived": 3200,
"storageUsed": 180000000
},
{
"domain": "personal.com",
"emailsReceived": 1300,
"storageUsed": 76000000
}
]
}

Track API usage by endpoint:

{
"success": true,
"data": {
"endpoints": {
"/search": 890,
"/domains": 45,
"/api-keys": 12,
"/webhooks": 200
}
}
}

Get hourly or daily usage:

Terminal window
# Daily usage for the past 30 days
curl "https://api.momail.io/v1/billing/usage/daily?days=30" \
-H "X-API-Key: your_key"
{
"success": true,
"data": [
{
"date": "2024-01-15",
"emails": 150,
"searches": 30,
"storageDelta": 5242880
},
{
"date": "2024-01-14",
"emails": 142,
"searches": 28,
"storageDelta": 4194304
}
]
}

Configure alerts to notify you when approaching limits.

In your dashboard:

  1. Go to Settings > Notifications
  2. Click Add Alert
  3. Configure conditions:
    • Resource type (emails, searches, storage)
    • Threshold percentage (e.g., 80%)
    • Notification method (email, webhook)
AlertTriggerNotification
Warning80% of limitEmail + Dashboard
Critical95% of limitEmail + SMS + Webhook
Exceeded100% of limitImmediate email + API error
{
"event": "usage.warning",
"timestamp": "2024-01-15T10:30:00.000Z",
"data": {
"accountId": "acc_abc123",
"type": "email_quota",
"used": 8000,
"limit": 10000,
"percentage": 80,
"projectedExhaustion": "2024-01-25T00:00:00.000Z"
}
}

Automatically receive monthly usage reports via email:

  • Total emails processed
  • Peak usage days
  • Most active mailboxes
  • API endpoint breakdown
  • Cost analysis (for paid plans)

Export your usage data for external analysis:

Terminal window
# Export as CSV
curl "https://api.momail.io/v1/billing/usage/export?format=csv&start=2024-01-01&end=2024-01-31" \
-H "X-API-Key: your_key" \
--output usage_report.csv
async function checkUsage() {
const response = await fetch('https://api.momail.io/v1/billing/usage', {
headers: { 'X-API-Key': process.env.MOMAIL_API_KEY }
});
const { data } = await response.json();
const emailPercentage = (data.emailsUsed / data.emailsLimit) * 100;
const searchPercentage = (data.searchesUsed / data.searchesLimit) * 100;
return {
emails: {
used: data.emailsUsed,
limit: data.emailsLimit,
percentage: emailPercentage,
status: emailPercentage > 90 ? 'critical' : emailPercentage > 75 ? 'warning' : 'ok'
},
searches: {
used: data.searchesUsed,
limit: data.searchesLimit,
percentage: searchPercentage,
status: searchPercentage > 90 ? 'critical' : searchPercentage > 75 ? 'warning' : 'ok'
}
};
}
// Check usage daily
setInterval(checkUsage, 24 * 60 * 60 * 1000);
import requests
from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/api/usage')
def get_usage_widget():
response = requests.get(
'https://api.momail.io/v1/billing/usage',
headers={'X-API-Key': os.environ['MOMAIL_API_KEY']}
)
data = response.json()['data']
return jsonify({
'emails': {
'used': data['emailsUsed'],
'limit': data['emailsLimit'],
'percentage': round((data['emailsUsed'] / data['emailsLimit']) * 100, 1)
},
'storage': {
'used_gb': round(data['storageUsed'] / (1024**3), 2),
'limit_gb': round(data['storageLimit'] / (1024**3), 2)
}
})

MoMail calculates projected usage based on your current rate:

projected_emails = current_emails + (daily_average * days_remaining)
Terminal window
# Get 30-day projection
curl "https://api.momail.io/v1/billing/usage/forecast?days=30" \
-H "X-API-Key: your_key"
{
"success": true,
"data": {
"projectedEmails": 8500,
"projectedSearches": 4200,
"projectedStorage": 350000000,
"willExceedLimit": false,
"recommendation": "Current usage is within expected limits"
}
}
  1. Monitor weekly: Check usage trends regularly
  2. Set alerts at 75%: Get early warning before limits
  3. Review monthly: Analyze patterns to optimize costs
  4. Export data: Keep historical records for analysis
  5. Use webhooks: Automate responses to usage events

For questions about usage tracking: