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
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
      • GETGet all the contacts
      • POSTCreate a contact
      • POSTCreate Contact via DOI (Double-Opt-In) Flow
      • GETGet a contact's details
      • DELDelete a contact
      • PUTUpdate a contact
      • GETGet email campaigns' statistics for a contact
      • GETGet all the segments
      • POSTExport contacts
      • POSTImport contacts
  • 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
Contact ManagementContacts

Get email campaigns' statistics for a contact

GET
https://api.brevo.com/v3/contacts/:identifier/campaignStats
GET
/v3/contacts/:identifier/campaignStats
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.contacts.getContactStats("string", {});
8}
9main();
1{
2 "clicked": [
3 {
4 "campaignId": 21,
5 "links": [
6 {
7 "count": 2,
8 "eventTime": "2016-05-03T21:25:01Z",
9 "ip": "66.249.93.118",
10 "url": "https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email"
11 }
12 ]
13 }
14 ],
15 "delivered": [
16 {
17 "campaignId": 21,
18 "eventTime": "2016-05-03T21:24:56Z",
19 "count": 2,
20 "ip": "66.249.93.118"
21 }
22 ],
23 "messagesSent": [
24 {
25 "campaignId": 21,
26 "eventTime": "2016-05-03T20:15:13Z"
27 },
28 {
29 "campaignId": 42,
30 "eventTime": "2016-10-17T10:30:01Z"
31 },
32 {
33 "campaignId": 45,
34 "eventTime": "2016-11-09T11:45:02Z"
35 }
36 ],
37 "opened": [
38 {
39 "campaignId": 21,
40 "count": 2,
41 "eventTime": "2016-05-03T21:24:56Z",
42 "ip": "66.249.93.118"
43 },
44 {
45 "campaignId": 45,
46 "count": 1,
47 "eventTime": "2017-01-30T13:56:40Z",
48 "ip": "66.249.93.217"
49 }
50 ]
51}

Retrieve email campaign statistics for a specific contact identified by email address or numeric ID. Statistics include messages sent, opens, clicks, hard/soft bounces, deliveries, unsubscriptions, complaints, and transactional attributes. By default, data covers the last 90 days; use startDate and endDate parameters (YYYY-MM-DD) to specify a custom range with a maximum span of 90 days.

Was this page helpful?
Previous

Get all the segments

Next
Built with

Authentication

api-keystring

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

Path parameters

identifierstring or integerRequired

Email (urlencoded) OR ID of the contact

Query parameters

startDatestringOptional

Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date.

endDatestringOptional

Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date. Maximum difference between startDate and endDate should not be greater than 90 days.

Response

Contact campaign statistics informations
clickedlist of objects
complaintslist of objects
deliveredlist of objects
hardBounceslist of objects
messagesSentlist of objects
openedlist of objects
softBounceslist of objects
transacAttributeslist of objects
unsubscriptionsobject

Errors

400
Bad Request Error
404
Not Found Error