Skip to documentation

API · Usage

Retrieve account usage

Team usage in UTC calendar periods with self-hosted limits. The SES sending quota is shared across the installation. See docs/rest-api.md for intentional plan differences and upgrade backfills.

GET/usageFull access

Request parameters

No path, query, or body parameters. Send your bearer token in the Authorization header.

Request example

Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.

bash
curl -X GET "$OPENSEND_BASE_URL/usage" \
  -H "Authorization: Bearer $OPENSEND_API_KEY"

Response

200 · application/json. Example IDs stand for IDs returned by your installation.

json
{
  "object": "usage",
  "emails": {
    "daily": {
      "used": 0,
      "limit": 0,
      "sent": 0,
      "received": 0,
      "resets_at": "example"
    },
    "monthly": {
      "used": 0,
      "limit": 0,
      "sent": 0,
      "received": 0,
      "resets_at": "example"
    }
  },
  "contacts": {
    "used": 0,
    "limit": 0
  },
  "segments": {
    "used": 0,
    "limit": 0
  },
  "broadcasts": {
    "used": 0,
    "limit": null
  },
  "ai_credits": {
    "used": 0,
    "limit": 0,
    "next_increase_at": "example"
  },
  "automation_runs": {
    "used": 0,
    "limit": 0,
    "resets_at": "example"
  },
  "domains": {
    "used": 0,
    "limit": 0
  },
  "rate_limit": {
    "limit": 0,
    "duration": "example"
  }
}

Behavior and errors

The response has the same fields as Resend’s usage object, with self-hosted meanings. The dashboard shows the same numbers under Settings → Usage.

  • emails.daily and emails.monthly count the current UTC calendar day and month; used is sent + received. A send counts once, when SES accepts it, by its send time; received mail counts by receipt time. Queued, scheduled, and failed-before-send emails and account emails are not counted. resets_at is the next UTC midnight or the first of next month.
  • emails.daily.limit is the installation’s stored SES Max24HourSend for its default region. It is shared by every team on the installation and SES enforces it as a rolling 24-hour sending window, so it is not remaining capacity and does not reset at midnight. It is null when no quota has been stored yet; the installation administrator refreshes it under Amazon SES settings.
  • There is no billing plan: emails.monthly.limit, contacts.limit, broadcasts.limit, domains.limit, and automation_runs.limit are null. segments.limit is also null. contacts.used includes unsubscribed contacts, broadcasts.used counts sent broadcasts, domains.used counts active domains, and automation_runs.used counts runs started this UTC month.
  • ai_credits is always { "used": 0, "limit": 0, "next_increase_at": null }. rate_limit is { "limit": 10, "duration": "1000ms" }, the shared per-team request limit.

Counters survive the 30-day retention of email content. On an installation upgraded from a version without usage counters, numbers are incomplete until the operator’s backfill finishes.

Use a full-access credential; a sending-only key returns 401 restricted_api_key. See authentication, errors, rate limits, and pagination.