Campaign Report API

Campaign Report REST API enables you to download the campaign report for a particular date. The API provides campaign data for only one date at a time.

On the report builder page, select the REST API option for the system to generate the report for the selected schedule. Ensure some buffer time from the scheduled time as the reports are generated using the API. Generated report expires within seven days of generation.

To use the Campaign Report API, do the following:

  1. Configure the report.
  2. Use the API to generate the report.

Configure Report

  1. Login to the dashboard, and create the report using the report builder. For more information, refer to Advanced Reports.
  2. In step 3 of the Campaign Report Builder, select the time at which the report should be generated.
  3. Select the Send report as REST API to download the report using the API. Use the REST API method to generate campaign reports using API instead of receiving an email.


API Endpoint


MoEngage hosts each customer in a different data center; you can find your data center number (value of X) by checking the data center and API endpoint mapping here. Replace the value of 'X' in the endpoint URL based on your DataCenter.

Parameter Description
APP ID The APP ID is displayed as APP Settings on the dashboard.

File name is a combination of:

  1. The report name is the same as the report name created in the Campaign Report Builder with space replaced by underscores. For example, the file name on the dashboard is *Report test*, then the file name for the API is *Report_test*.
  2. Report generation date in YYYYMMDD format. For example, 20210217 in the name contains the report generated on 17/02/2021.
  3. Compression format such as *.zip*Final report name, for example, is

Request Headers

Generate a unique signature, passed as a GET parameter, to verify the authenticity of the caller and the validity of the request. The signature is a combination of APP ID, FILENAME, and SECRET-KEY.
To get the SECRET-KEY

  1. Navigate to MoEngage dashboard > Settings > APIs.
  2. In the General tab, under Transaction Push/Report Settings, click Click here to show APP secret! in API Secret.


Successful API requests automatically download the report file.
Failure of API request results in JSON Response explaining the reason for failure.

Response Code Content Type Response Description
200 application/gzip   Successful API request automatically downloads the report file.
400 application/json {
"error": {
"attribute": "",
"message": "error message",
"type": "BAD REQUEST",
"request_id": ""
Any of the following reasons:
1. Invalid Report file name/ file name format
2. Requested report if older than 7 days.
3. Incorrect App Id
401 application/json empty body Invalid Signature/Signature Missing



The following is the sample API :

Text<APP ID>/ Headers: Signature: 80300f554f9dc88cdc7d64c6c06f4de580b27a2afcc396816d1ec3a8d1c09579

Sample Signature Python

from hashlib import sha256
Signature_Key = Api_ID + "|" + FILENAME + "|" + SECRET_KEY
# Now Signature is hexdigest of sha256 of Signature_Key
Signature = sha256(Signature_Key).hexdigest()

Import APIs for Postman

We have made it easy for you to test the APIs.
Click here to export our Campaign Report APIs into your Postman collections.

Was this article helpful?
0 out of 0 found this helpful