Get all Marketing Campaigns

We are modifying the get all marketing campaigns service to be more efficient. It currently fetches multiple statistical information which adds latency to the endpoint response.

**To provide a more accurate payload we are adding a new querying parameter calledstatistics , for which you will specify what data you are aiming to fetch.
**
If you need more than one of the following collections please make multiple calls to the endpoint in order to retrieve them:

  • globalStats
  • linksStats
  • statsByDomain

📘 Note

  • campaignStats will always be returned by default.
  • This is a non breaking change. The nodes excluded from the statistics parameter will still be returned as empty nodes.

New request format

1curl --request GET \
2 --url 'https://api.brevo.com/v3/emailCampaigns?statistics=globalStats&limit=50&offset=0&sort=desc' \
3 --header 'accept: application/json'

Response sample

1{
2 "count": 2,
3 "campaigns": [
4 {
5 "id": 12,
6 "name": "EN - Sales Summer 2017",
7 "subject": "20% OFF for 2017 Summer Sales",
8 "previewText": "Don't miss the sale",
9 "type": "classic",
10 "status": "sent",
11 "scheduledAt": "2017-06-01T12:30:00Z",
12 "testSent": true,
13 "header": "[DEFAULT_HEADER]",
14 "footer": "[DEFAULT_FOOTER]",
15 "sender": {
16 "email": "marketing@mycompany.com",
17 "name": "Marketing",
18 "id": 26
19 },
20 "replyTo": "replyto@domain.com",
21 "toField": "{FNAME} {LNAME}",
22 "htmlContent": "This is my HTML Content",
23 "shareLink": "http://example.com/fhsgccc.html?t=9865448900",
24 "tag": "Newsletter",
25 "createdAt": "2017-05-01T12:30:00Z",
26 "modifiedAt": "2017-05-01T12:30:00Z",
27 "inlineImageActivation": true,
28 "mirrorActive": true,
29 "recurring": false,
30 "recipients": {
31 "lists": [
32 5
33 ],
34 "exclusionLists": [
35 13
36 ]
37 },
38 "statistics": {
39 "globalStats": {
40 "uniqueClicks": 2300,
41 "clickers": 2665,
42 "complaints": 1,
43 "delivered": 19765,
44 "sent": 19887,
45 "softBounces": 100,
46 "hardBounces": 87,
47 "uniqueViews": 7779,
48 "trackableViews": 5661,
49 "trackableViewsRate": 23.45,
50 "estimatedViews": 560,
51 "unsubscriptions": 2,
52 "viewed": 8999
53 },
54 "campaignStats": [
55 {
56 "listId": 5,
57 "uniqueClicks": 2300,
58 "clickers": 2665,
59 "complaints": 1,
60 "delivered": 19765,
61 "sent": 19887,
62 "softBounces": 100,
63 "hardBounces": 87,
64 "uniqueViews": 7779,
65 "trackableViews": 5661,
66 "unsubscriptions": 2,
67 "viewed": 8999,
68 "deferred": 30
69 }
70 ],
71 "mirrorClick": 120,
72 "remaining": 1000,
73 "linksStats": {
74 "http://myUrl1.domain.com": 80
75 },
76 "statsByDomain": {
77 "yahoo.com": {
78 "uniqueClicks": 298,
79 "clickers": 533,
80 "complaints": 0,
81 "sent": 25601,
82 "softBounces": 5,
83 "hardBounces": 0,
84 "uniqueViews": 3527,
85 "unsubscriptions": 17,
86 "viewed": 5255,
87 "delivered": 25596
88 },
89 "hotmail.co.uk": {
90 "uniqueClicks": 1970,
91 "clickers": 2720,
92 "complaints": 5,
93 "sent": 117055,
94 "softBounces": 111,
95 "hardBounces": 0,
96 "uniqueViews": 21111,
97 "unsubscriptions": 105,
98 "viewed": 35251,
99 "delivered": 117056
100 }
101 }
102 }
103 },
104 {
105 "id": 22,
106 "name": "Weekly - 1",
107 "subject": "Week 1 - Newsletter",
108 "previewText": "your weekly newsletter",
109 "type": "Classic",
110 "status": "draft",
111 "scheduledAt": "",
112 "testSent": false,
113 "header": "[DEFAULT_HEADER]",
114 "footer": "[DEFAULT_FOOTER]",
115 "sender": {
116 "email": "newsletter@mycompany.com",
117 "name": "Newsletter",
118 "id": 26
119 },
120 "replyTo": "replyto@domain.com",
121 "toField": "{FNAME} {LNAME}",
122 "htmlContent": "This is my HTML Content",
123 "shareLink": "http://example.com/fhsgccc.html?t=9865448900",
124 "tag": "Newsletter",
125 "createdAt": "2017-05-01T12:30:00Z",
126 "modifiedAt": "2017-05-01T12:30:00Z",
127 "inlineImageActivation": true,
128 "mirrorActive": true,
129 "recurring": false,
130 "recipients": {
131 "lists": [
132 10
133 ],
134 "exclusionLists": [
135 45
136 ]
137 },
138 "statistics": {
139 "globalStats": {
140 "uniqueClicks": 2300,
141 "clickers": 2665,
142 "complaints": 1,
143 "delivered": 19765,
144 "sent": 19887,
145 "softBounces": 100,
146 "hardBounces": 87,
147 "uniqueViews": 7779,
148 "trackableViews": 5661,
149 "trackableViewsRate": 23.45,
150 "estimatedViews": 560,
151 "unsubscriptions": 2,
152 "viewed": 8999
153 },
154 "campaignStats": [
155 {
156 "listId": 10,
157 "uniqueClicks": 2300,
158 "clickers": 2665,
159 "complaints": 1,
160 "delivered": 19765,
161 "sent": 19887,
162 "softBounces": 100,
163 "hardBounces": 87,
164 "uniqueViews": 7779,
165 "trackableViews": 5661,
166 "unsubscriptions": 2,
167 "viewed": 8999,
168 "deferred": 30
169 }
170 ],
171 "mirrorClick": 120,
172 "remaining": 1000,
173 "linksStats": {
174 "http://myUrl1.domain.com": {
175 "nbClick": 80
176 },
177 "http://myUrl2.domain.com": {
178 "nbClick": 80
179 },
180 "http://myUrl3.domain.com": {
181 "nbClick": 80
182 }
183 },
184 "statsByDomain": {
185 "gmail": {
186 "uniqueClicks": 2300,
187 "clickers": 2665,
188 "complaints": 1,
189 "delivered": 19765,
190 "sent": 19887,
191 "softBounces": 100,
192 "hardBounces": 87,
193 "uniqueViews": 7779,
194 "unsubscriptions": 2,
195 "viewed": 8999,
196 "deferred": 30
197 },
198 "aol": {
199 "uniqueClicks": 2300,
200 "clickers": 2665,
201 "complaints": 1,
202 "delivered": 19765,
203 "sent": 19887,
204 "softBounces": 100,
205 "hardBounces": 87,
206 "uniqueViews": 7779,
207 "unsubscriptions": 2,
208 "viewed": 8999,
209 "deferred": 30
210 }
211 }
212 }
213 }
214 ]
215}