Skip to main content
GET
/
campaign_reports
/
rest_api
/
{APP_ID}
/
{FILENAME}
Download Campaign Report
curl --request GET \
  --url https://api-0{dc}.moengage.com/campaign_reports/rest_api/{APP_ID}/{FILENAME} \
  --header 'Signature: <api-key>'
"<string>"

Limits

  • Expiry: The generated reports will expire in 7 days from the date of creation.
  • Max Range: You can generate reports for up to 90 days.

Generating the Signature

A unique signature must be passed in the headers to verify the caller’s authenticity. The signature is SHA256(Api_ID + "|" + FILENAME + "|" + SECRET_KEY).
# SAMPLE IMPLEMENTATION IN PYTHON
from hashlib import sha256
Api_ID = "YOUR-APP-ID"
FILENAME = "Report_-_test_20210217.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.encode('utf-8')).hexdigest()

Authorizations

Signature
string
header
required

Custom SHA256 Signature. Refer here.

Headers

Signature
string
required

A custom signature generated by SHA256(Api_ID + "|" + FILENAME + "|" + SECRET_KEY).

Path Parameters

APP_ID
string
required

This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).

FILENAME
string
required

The name of the report file to download. It is a combination of report name, generation date, and file format. Example: Report_test_20210217.zip

Response

Successful API request automatically downloads the report file.

The response is of type file.