Command Palette

Search for a command to run...

API Reference

Usage

Check your email sending usage, limits, and daily statistics programmatically. Monitor your account to stay within rate limits.

Emails Sent

Track monthly volume

Delivery Rate

Monitor success rates

Daily Stats

Historical breakdown

Rate Limits

Plan-based limits

GET/v1/usage

Get Usage Statistics

Retrieve your current usage statistics including emails sent, delivery rates, and rate limits for the current billing period.

Query Parameters

ParameterTypeDescription
periodstringTime period for daily stats: 7d, 30d, 90d. Default: 30d

Request

cURL
curl https://www.unosend.co/api/v1/usage?period=30d \
  -H "Authorization: Bearer un_your_api_key"

Response

200 OK
{
  "success": true,
  "data": {
    "plan": "starter",
    "rate_limit": {
      "requests_per_second": 50,
      "burst_limit": 100
    },
    "usage": {
      "emails_sent": 2847,
      "emails_limit": 50000,
      "emails_delivered": 2801,
      "emails_bounced": 23,
      "period_start": "2024-12-01T00:00:00.000Z",
      "period_end": "2024-12-31T00:00:00.000Z"
    },
    "daily_stats": {
      "today": 156,
      "peak": 423,
      "average": 95,
      "history": [
        { "date": "2024-12-01", "count": 89 },
        { "date": "2024-12-02", "count": 156 },
        { "date": "2024-12-03", "count": 423 }
      ]
    }
  }
}

Response Fields

FieldTypeDescription
planstringCurrent plan (free, starter, pro, growth, scale, enterprise)
rate_limit.requests_per_secondnumberMaximum requests per second for your plan
rate_limit.burst_limitnumberMaximum burst requests allowed
usage.emails_sentnumberTotal emails sent this billing period
usage.emails_limitnumberMaximum emails allowed for your plan
usage.emails_deliverednumberSuccessfully delivered emails
usage.emails_bouncednumberBounced or failed emails
daily_stats.todaynumberEmails sent today
daily_stats.peaknumberHighest daily count in the period
daily_stats.averagenumberAverage daily count in the period
daily_stats.historyarrayDaily breakdown with date and count

Common Use Cases

Check if approaching limit

cURL
# Get usage and check percentage used
curl https://www.unosend.co/api/v1/usage \
  -H "Authorization: Bearer un_your_api_key" | \
  jq '.data.usage | (.emails_sent / .emails_limit * 100) | floor'

Get last 7 days stats

cURL
curl "https://www.unosend.co/api/v1/usage?period=7d" \
  -H "Authorization: Bearer un_your_api_key"

Monitor delivery rate

cURL
# Calculate delivery rate percentage
curl https://www.unosend.co/api/v1/usage \
  -H "Authorization: Bearer un_your_api_key" | \
  jq '.data.usage | (.emails_delivered / .emails_sent * 100) | floor'

Rate Limits by Plan

PlanRequests/SecondBurst Limit
Free1020
Starter50100
Pro100200
Growth200500
Scale5001,000
Enterprise1,0002,000