Skip to content
Esc
  • OverviewGuidesWhat exists today, and where to start.
  • QuickstartGuidesKey, domain, first send — in that order.
  • AuthenticationGuidesBearer keys, the mandatory User-Agent, and what each refusal means.
  • ErrorsGuidesThe whole vocabulary, with the status each name carries.
  • IdempotencyGuidesRetry a send without sending it twice.
  • PaginationGuidesCursors are item IDs, not page numbers.
  • Rate limitsGuidesTen a second per team, and the headers that tell you where you are.
  • EventsGuidesEvery event a webhook can carry, with one real payload each.
  • DomainsGuidesThe records, where they go at each registrar, and what the page does while you wait.
  • TrackingGuidesOpens and clicks: one record, two toggles, and what an open really means.
  • ReceivingGuidesInbound mail, and the Inbox: a webhook fires, you read it, you answer it.
  • InboxGuidesChannels, personal mailboxes and seats: who sees what, and where a reply goes.
  • Node SDKGuidesThe rasket package: typed from the API's own document, retries only what is safe.
  • Python SDKGuidesThe rasket package on PyPI: the Node client's methods, in snake_case, over httpx.
  • MCP serverGuidesConnect Claude, ChatGPT or any MCP client: your scopes, no key.
  • AI assistGuidesSubject lines, drafts and diagnosis — in the dashboard and over the API, off until you allow it.
  • AgentsGuidesLet an AI agent set Rasket up: the skill, the rules file, MCP, and the recipe they share.
  • OAuthGuidesLet another app act for a team: register, authorize with PKCE, exchange, refresh.
  • Single sign-onGuidesOIDC login for your team, a domain proved by DNS, enforcement and break-glass.
  • IntegrationsGuidesVercel, Netlify and Cloudflare, plus Zapier and n8n for workflows without code.
  • SMTPGuidesSend from anything that speaks SMTP: settings, setup guides, limits and replies.
  • ZapierGuidesSend email, add contacts and react to email events from a Zap, with no code.
  • n8nGuidesThe Rasket node and trigger for n8n workflows: install, connect, every operation.
  • EmailsAPI referenceSend, batch, retrieve, list, reschedule, cancel, attachments.
  • DomainsAPI referenceAdd a domain, publish its records, verify it.
  • API keysAPI referenceCreate, list, rename and revoke credentials.
  • WebhooksAPI referencePayloads, signature verification, retries and replay.
  • SuppressionsAPI referenceAddresses we will not send to, and why.
  • LogsAPI referenceEvery request made with this team's credentials.
  • MetricsAPI referenceDelivery, bounce, complaint and engagement counts.
  • TemplatesAPI referenceVersioned email content with typed variables, addressed by ID or alias.
  • ContactsAPI referenceYour audience: contacts, their typed properties, segments and topic choices.
  • SegmentsAPI referenceAudiences defined by a filter, by hand, or both.
  • TopicsAPI referenceWhat contacts subscribe to, and the preference page's list.
  • CampaignsAPI referenceCampaigns, at /broadcasts: one message to a segment, from draft to results.
  • ImportsAPI referenceCSV uploads: column mapping, conflicts and counts.
  • AutomationsAPI referenceWorkflows that run per contact: the graph, its versions, and every run.
  • Custom eventsAPI referenceThe names your product fires, and what starts a workflow.
  • ReceivingAPI referenceMail sent to you: the message, its attachments, its raw source.
  • OAuthAPI referenceClient registration, the token endpoint, and the grants a team has given.
  • TeamAPI referenceThe team a credential belongs to: its plan, sender identity, AI flag and members.
  • BillingAPI referencePlan, usage, invoices and add-ons, and the hosted pages where a customer pays.
  • AI helpersAPI referenceSubject lines, a first draft, and why an email did what it did.

API referenceMetrics

Metrics

Delivery, bounce, complaint and engagement counts for the account, over a date range you choose and broken down however you ask.

Freshness

Data is updated every minute.

Counts are rolled up into one-minute buckets. The response carries data_as_of, the end of the last completed bucket, and end_date is clamped down to it — so a range never reports a partly-filled window as though it were final, and a message sent seconds ago is not yet in these numbers.

Rates are fractions between 0 and 1, not percentages. A bounce_rate of 0.03 is 3%.

The metrics

Every metric this endpoint reports
MetricMeans
receivedInbound messages your receiving addresses kept.
deliveredMessages a receiving mail server accepted.
complainedMessages a recipient reported as spam.
suppressedSends skipped because the address was on your suppression list.
bouncedMessages that bounced, of any kind.
bounced_transientBounces the receiver called temporary — a full mailbox, a rejected size.
bounced_permanentBounces the receiver called permanent. These add the address to suppressions.
bounced_undeterminedBounces the receiver did not call permanent or temporary.
openedOpens recorded, counting the same reader more than once.
clickedClicks recorded, counting the same reader more than once.
delivery_delayedMessages a receiver deferred and has not yet accepted or rejected.
failedMessages we could not submit, or that were rejected before sending.
sentMessages handed to the mail provider.
unique_openedRecipients who opened, each counted once.
unique_clickedRecipients who clicked, each counted once.
delivery_ratedelivered ÷ sent.
open_rateopened ÷ delivered.
click_rateclicked ÷ delivered.
bounce_ratebounced ÷ sent.
complaint_ratecomplained ÷ sent.
attemptedEmails that were sent, failed or suppressed. Each email counts once, even with several outcomes.

Ask for a subset with metrics, comma-separated or repeated. Every metric above is counted from your mail. A name that is not in this table is refused with 422 invalid_parameter.

Breaking the totals down

The dimensions totals can be broken down by
DimensionMeans
periodOne row per time bucket, at the requested granularity.
domainOne row per sending domain.
emailOne row per email. Cannot be combined with `broadcast`.
broadcastOne row per broadcast. Marketing sends only. Cannot be combined with `email`.
  • totals is always present. data is omitted entirely when you ask for no dimensions — it is absent, not an empty array.
  • With period, granularity chooses the bucket width: hourly, daily, weekly or monthly. It defaults to daily.

Endpoints

Retrieve metrics

GET /emails/metrics

Delivery, bounce, complaint and engagement counts for the account.

Query parameters

  • start_datestring

    ISO 8601 date or datetime. Defaults to six days before end_date.

  • end_datestring

    ISO 8601 date or datetime. A value in the future is clamped to now, and then down to the last completed one-minute bucket.

  • metricsstring

    Comma-separated, repeated, or both. Defaults to every metric. Rate metrics are fractions between 0 and 1.

  • dimensionsstring

    period, domain, email or broadcast. data is omitted entirely when this is empty. email cannot be combined with broadcast.

5 more fields (granularity, domain_id, email_id, broadcast_id, timezone)
  • granularitystring

    hourly, daily, weekly or monthly. Defaults to daily.

  • domain_idstring

    Restrict to one or more domains, comma-separated. Up to 100 ids.

  • email_idstring

    Restrict to one or more emails, comma-separated. Up to 100 ids.

  • broadcast_idstring

    Restrict to one or more broadcasts (campaigns), comma-separated. Up to 100 ids.

  • timezonestring

    IANA timezone name. Defaults to UTC.

Request

curl -X GET "https://api.rasket.com/emails/metrics?metrics=sent%2Cdelivered%2Cbounce_rate&dimensions=period" \
  -H "Authorization: Bearer $RASKET_API_KEY" \
  -H "User-Agent: acme-billing/1.0"

Response 200

{
  "object": "metrics",
  "start_date": "2026-09-02T00:00:00.000Z",
  "end_date": "2026-09-09T14:30:00.000Z",
  "metrics": ["sent", "delivered", "bounce_rate"],
  "dimensions": ["period"],
  "granularity": "daily",
  "totals": {
    "sent": 1000,
    "delivered": 960,
    "bounce_rate": 0.03
  },
  "data_as_of": "2026-09-09T14:30:00.000Z",
  "data": [
    {
      "period": "2026-09-09",
      "sent": 140,
      "delivered": 135,
      "bounce_rate": 0.028
    }
  ]
}
  • Rate metrics are fractions, not percentages: a bounce_rate of 0.03 is 3%.
  • Totals are aggregated in one-minute buckets. data_as_of is the end of the last completed bucket, and end_date is clamped down to it, so a range never reports a partly-filled window as a final one.
  • data is omitted rather than empty when dimensions is empty.
  • A metric this release does not aggregate yet answers 0 rather than being absent, so a caller can index the object it expects.