Aller au contenu
Esc
↑↓naviguer↵ouvrir⌘Japerçu

Get email metrics

Delivery statistics for a date range, by period, domain, email or broadcast: counts and rates for sent, delivered, bounced, complained, opened and clicked. Needs a full access key.

GET/emails/metrics
Autorisation
AuthorizationJeton Bearer · headerrequis

A BillionSend API key (bs_…).

Paramètres de requête
start_datestring
end_datestring
timezonestring
granularitystring
Valeurs autorisées :hourlydailyweeklymonthly
metricsstring[]
dimensionsstring[]
domain_idstring<uuid>[]
max 100 éléments
email_idstring<uuid>[]
max 100 éléments
broadcast_idstring<uuid>[]
max 100 éléments
Réponses
200

Email metrics for the range, as totals and, when dimensions are given, one row per combination. Counts come from statistics written within seconds of the events; received is the accepted-for-sending count and is left out of answers scoped or broken down by domain, broadcast or email. Rates are percentages. Counts cover whole UTC hours: start_date is floored to its hour, the whole hour of end_date counts, and the response shows the start used. Dates before 1970 read as 1970. timezone must be an IANA name such as Europe/Berlin or UTC, not a UTC offset. sent counts recipients, like delivered, bounced and complained, so the rates stay at or under 100%. email rows list up to 1,000 emails created in the range when no email_id is given. A key held to one domain always reads that domain only.

objectstringrequis
Valeurs autorisées :metrics
start_datestringrequis
end_datestringrequis
metricsstring[]requis
dimensionsstring[]requis
granularitystringrequis
Valeurs autorisées :hourlydailyweeklymonthly
totalsobjectrequis
dataobject[]
401

Missing, malformed, unknown or revoked API key

statusCodenumberrequis
namestringrequis
messagestringrequis
403

Restricted API key: a sending_access key, or a key held to one domain that named another domain in domain_id

statusCodenumberrequis
namestringrequis
messagestringrequis
422

Validation error

statusCodenumberrequis
namestringrequis
messagestringrequis
429

Over the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumberrequis
namestringrequis
messagestringrequis
503

The statistics store is not answering; sending is unaffected. Retry shortly.

statusCodenumberrequis
namestringrequis
messagestringrequis
Essayer
Serveur
Autorisation
Paramètres
Requête
curl -X GET 'https://api.billionsend.com/emails/metrics' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Réponse
{
  "object": "metrics",
  "start_date": "string",
  "end_date": "string",
  "metrics": [
    "string"
  ],
  "dimensions": [
    "string"
  ],
  "granularity": "hourly",
  "totals": {
    "property1": 0,
    "property2": 0
  },
  "data": [
    {
      "property1": "string",
      "property2": "string"
    }
  ]
}

Cette page vous a-t-elle été utile ?