Exporting email campaigns data via API
Last updated April 10, 2024
Mailmodo email campaigns data (overall as well as date-range specific) can be exported to your software stack or MIS via this API.
Following is the API request structure to do the same:
API Gateway URL:
The Mailmodo API Gateway URL is https://api.mailmodo.com/
You need to include this before each API endpoint to make API calls.
API End point:
To export overall campaign data (all campaigns data/ data within a specified date range):
https://api.mailmodo.com/api/v1/campaignReports/
To export data of a particular campaign: https://api.mailmodo.com/api/v1/campaignReports/<campaignId >
API Authorization:
Mailmodo APIs are completely RESTful. All Mailmodo APIs are authorized via an API key.
Generate API Key:
- Login to your Mailmodo account with appropriate credentials.
- Navigate to Settings → API Keys → Show API Key to view the default API key. (You may also create a new API Key by clicking on the 'Add new API Key' button)
Request:
Header:
'mmApiKey': '<api key value>
'
'Content-Type': 'application/json
'
Body:
Parameters:
Response:
fromDate | - if exporting campaign data for a specific date range- starting point of the date range
ex: "fromDate":"2021-03-17" |
toDate | - if exporting campaign data for a specific date range- ending point of the date range
ex: "toDate":"2021-04-17" |
data is received in the following JSON format:
"data": [ { "campaignId": "753a31db-29ab-483f-b8ba-xxxxxxx", "campaignType": "CONTACT_LIST", "campaignName": "Job", "status": "Processed", "senderEmail": "magic@mailmodo.com", "subjects": [ "Application" ], "createdAt": "2021-01-04T12:48:29.818Z", "scheduledAt": "2021-01-04T12:48:22.465Z", "bounced": 0, "complaints": 0, "submission": 0, "unsubscribed": 0, "blocked": 0, "scheduled": 0, "sent": 0, "delivered": 0, "clicks": 0, "ampClicks": 0, "htmlClicks": 0, "ampOpens": 0, "htmlOpens": 0, "opens": 0 },
Note:
- "campaignType" can be "CONTACT_LIST"(for scheduled campaigns) or "TRIGGERED" (for triggered campaigns)
- When date range is entered in body, data for all campaigns preceding the specified end date is displayed (for scheduled campaigns outside the date range, data will show as displayed above, with all metrics as 0)
Was this article helpful?