With an authenticated user it is possible to load statistics of one or all campaign mails.
All Mails
GET <cambuildr-url>/api/v1/campaign_mails
The campaign mails are returned paginated. Page size and page number can be defined with the query parameters page_nr
and page_size
.
Response
{
"error": false,
"campaign_mails": [
{
"id": 333,
"name": "New Link Test",
"state": "SENT",
"started_at": "<date>",
"ended_at": "<date>",
"total_recipients": 2,
"sent": 2,
"opened": 2,
"clicked": 2,
"bounced": 0
},
...
],
"total_count": 40
}
If the query-parameter format=csv is sent with the request, the data is returned as CSV:
id,name,state,started_at,ended_at,total_recipients,sent,opened,clicked,bounced,unsubscribed
424,"Campaign Mail #1",SENT,"<datetime>","<datetime>",21,21,0,0,0,0
423,"Campaign Mail #2",SENT,"<datetime>","<datetime>",21,21,2,2,0,0
Single Mail
GET <cambuildr-url>/api/v1/campaign_mails/<campaign-mail-id>