Use the Daily Campaign Report API to download the campaign report for a particular date. The API provides campaign data for a single date at a time.
Enable the report settings in the dashboard, the system generates the daily report according to the schedule. Previous day campaign reports are not calculated. Put a buffer time from the scheduled time, to pull the reports using API. There is no expiry for the reports generated.
For downloading data spanning across many days, refer to All Campaigns Search View and Export Campaign Statistics.
To use the Daily Campaign Report API, do the following:
- Configure the report settings.
- Use the API to generate the report.
In the settings section of Dashboard, you can find Reports Settings.
- Enable the campaign reports.
- Select the report to be sent using email or to be downloaded through REST API.
- Select the time at which the report should be generated or emailed.
Here you can select the REST API method to fetch the daily campaign report by an API instead of receiving it via Email.
MoEngage supports multiple data centers with different dashboards and API endpoints. When you sign up with MoEngage, you will be assigned a particular data center and the relevant dashboard is displayed. Use the API endpoints associated with the data center.
For more information about your data center, contact [email protected]
You can find out which data center you are assigned to when you log in to the dashboard. The following table describes the dashboard URL and API endpoint associated with the data center.
Two versions of the dashboard URL and API endpoints are provided by MoEngage.
New Data Center Name
New Dashboard URL
New API Endpoints
Old Data Center Name
Old Dashboard URL
Old API Endpoints
Data Center 1
Data Center 2
Data Center 3
GET https://api-01.moengage.com/v1 GET https://api-02.moengage.com/v1 GET https://api-03.moengage.com/v1
GET https://api.moengage.com/dailyCampaignReportDump/[YOUR-API-ID-HERE]/[FILENAME-HERE]?Signature=<GenerateSignature> GET https://api-eu.moengage.com/dailyCampaignReportDump/[API-ID]/[FILENAME]?Signature=<GenerateSignature> GET https://app-serv3.moengage.com/dailyCampaignReportDump/[YOUR-API-ID-HERE]/[FILENAME-HERE]?Signature=<GenerateSignature>
Support for Old and New Endpoints
Support for both old and new API endpoints will be available, but we recommend that you start using the new endpoints as soon as possible.
- API ID
- The API ID displayed as APP Settings on the dashboard.
- The file name is in the format YYYYMMDD.zip
To verify the authenticity of the caller and validity of the request, a unique signature is needed to be passed as a GET parameter. The signature is a combination of API-ID, FILENAME, and SECRET-KEY ( SECRET-KEY is provided in APP Settings of MoEngage dashboard with the API-ID ).
The following is the sample API downloads the report for the Campaign report of 2nd March 2016:
Successful API request automatically downloads the report file. Failure of API request results in JSON Response explaining the reason for failure.
You can test the API using a simple wget:
wget -O test.zip https://api.moengage.com/dailyCampaignReportDump/MAZW5N1IMMSH5H67C3T9KBHA/20160914.zip?Signature=838fe32cf4882860b0109ed371b1bf380ad640292b8178e9af129706ecfd24fe
# SAMPLE IMPLEMENTATION IN PYTHON from hashlib import sha256 Api_ID = "YOUR-API-ID" FILENAME = "20160302.zip" SECRET_KEY = "YOUR-SECRET-KEY" Signature_Key = Api_ID + "|" + FILENAME + "|" + SECRET_KEY # Now Signature is hexdigest of sha256 of Signature_Key Signature = sha256(Signature_Key).hexdigest() # Generated Signature is - 2aca4dcb53a2ed026a60173b67cebb1f2875a47ac5fe06ca5aa478b93606b532
We have made it easy for you to test the apis, If you are using Postman, click on the following button to export the APIs in to your Postman collections.
Updated 2 months ago