For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
      • GETGet your transactional email activity aggregated per day
      • GETGet all your transactional email activity (unaggregated events)
      • GETGet your transactional email activity aggregated over a period of time
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
  • Conversations
  • Ecommerce
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
Email APIEmail statistics

Get all your transactional email activity (unaggregated events)

GET
https://api.brevo.com/v3/smtp/statistics/events
GET
/v3/smtp/statistics/events
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.transactionalEmails.getEmailEventReport({});
8}
9main();
1{
2 "events": [
3 {
4 "date": "2017-03-12T12:30:00Z",
5 "email": "john.smith@example.com",
6 "event": "deferred",
7 "messageId": "<201798300811.5787683@example.domain.com>",
8 "from": "john@example.com",
9 "reason": "Error connection timeout",
10 "tag": "OrderConfirmation",
11 "templateId": 4
12 },
13 {
14 "date": "2017-03-13T16:30:00Z",
15 "email": "john.smith@example.com",
16 "event": "delivered",
17 "messageId": "<201798300811.5787683@example.domain.com>",
18 "from": "john@example.com",
19 "tag": "OrderConfirmation",
20 "templateId": 5
21 }
22 ]
23}

This endpoint will show the aggregated stats for past 30 days by default if startDate and endDate OR days is not passed. The date range can not exceed 90 days

Was this page helpful?
Previous

Get your transactional email activity aggregated over a period of time

Next
Built with

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Query parameters

limitlongOptional0-5000Defaults to 2500
Number limitation for the result returned
offsetlongOptionalDefaults to 0
Beginning point in the list to retrieve from.
startDatestringOptional

Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate

endDatestringOptional

Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate

dayslongOptional<=90

Number of days in the past including today (positive integer, maximum 90). Not compatible with ‘startDate’ and ‘endDate’. Defaults to 30 if neither dates nor days are provided.

emailstringOptionalformat: "email"
Filter the report for a specific email addresses
eventenumOptional
Filter the report for a specific event type
tagsstringOptional

Filter the report for tags (serialized and urlencoded array)

messageIdstringOptional
Filter on a specific message id
templateIdlongOptional
Filter on a specific template id
sortenumOptionalDefaults to desc

Sort the results in the ascending/descending order of record creation. Default order is descending if sort is not passed

Allowed values:

Response

Email events report informations
eventslist of objects

Errors

400
Bad Request Error