curl --request POST \
--url https://api-{dc}.moengage.com/core-services/v1/campaign-stats \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: <moe-appkey>' \
--data '
{
"request_id": "abc",
"campaign_ids": [
"6643773d4fe37fe7a10b718e",
"6645fbae1101e4c6611b15c7",
"67c1cfc8c1b46a5ad5022de7"
],
"start_date": "2024-12-22",
"end_date": "2024-12-23",
"attribution_type": "VIEW_THROUGH",
"metric_type": "TOTAL"
}
'{
"response_id": "string",
"total_campaigns": 1,
"current_page": 1,
"total_pages": 1,
"data": {
"66e933029ff25f3322d8279d": [
{
"platforms": {
"android": {
"locales": {
"all_locales": {
"variations": {
"all_variations": {
"performance_stats": {
"attempted": 2,
"sent": 2,
"failed": 0,
"impression": 2,
"click": 4,
"ctr": 200,
"delivery_rate": 100,
"sent_rate": 100,
"failure_rate": 0
},
"conversion_goal_stats": {
"Goal 1": {
"conversions": 0,
"cvr": 0,
"uplift": 0
}
},
"delivery_funnel": {
"reachable_users_in_segment": 2,
"segment_after_uninstall": 2,
"after_fc": 2,
"users_after_dup": 2,
"sent": 2,
"user_devices": 2,
"impressions": 2,
"active_device_token": 2
},
"failure_breakdown": {}
},
"campaign_control_group": {
"conversion_goal_stats": {
"Goal 1": {
"conversions": 0,
"cvr": 0,
"uplift": 0
}
},
"delivery_funnel": {
"reachable_users_in_segment": 0
},
"failure_breakdown": {
"user_removed_due_to_campaing_control_group": 1
}
},
"global_control_group": {
"conversion_goal_stats": {
"Goal 1": {
"conversions": 0,
"cvr": 0,
"uplift": 0
}
},
"delivery_funnel": {
"reachable_users_in_segment": 0
},
"failure_breakdown": {
"user_removed_due_to_global_control_group": 1
}
}
}
}
}
}
}
}
]
}
}{
"title": "Invalid Field Value",
"description": "app_key - Some of the field values are invalid: app_key : None",
"code": "wUcwPRZF"
}{
"title": "Authentication required",
"description": "Invalid identity information found.",
"code": "wUcwPRZF"
}{
"title": "Forbidden Request",
"description": null,
"code": "kmqLuuHM"
}{
"title": "Server Error",
"description": "An unexpected error was encountered while processing this request. Please contact MoEngage Team",
"code": "jDTGSxjd"
}Get Campaign Stats
This API fetches data at the platform level and provides data for all types of campaigns.
POST
/
core-services
/
v1
/
campaign-stats
curl --request POST \
--url https://api-{dc}.moengage.com/core-services/v1/campaign-stats \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: <moe-appkey>' \
--data '
{
"request_id": "abc",
"campaign_ids": [
"6643773d4fe37fe7a10b718e",
"6645fbae1101e4c6611b15c7",
"67c1cfc8c1b46a5ad5022de7"
],
"start_date": "2024-12-22",
"end_date": "2024-12-23",
"attribution_type": "VIEW_THROUGH",
"metric_type": "TOTAL"
}
'{
"response_id": "string",
"total_campaigns": 1,
"current_page": 1,
"total_pages": 1,
"data": {
"66e933029ff25f3322d8279d": [
{
"platforms": {
"android": {
"locales": {
"all_locales": {
"variations": {
"all_variations": {
"performance_stats": {
"attempted": 2,
"sent": 2,
"failed": 0,
"impression": 2,
"click": 4,
"ctr": 200,
"delivery_rate": 100,
"sent_rate": 100,
"failure_rate": 0
},
"conversion_goal_stats": {
"Goal 1": {
"conversions": 0,
"cvr": 0,
"uplift": 0
}
},
"delivery_funnel": {
"reachable_users_in_segment": 2,
"segment_after_uninstall": 2,
"after_fc": 2,
"users_after_dup": 2,
"sent": 2,
"user_devices": 2,
"impressions": 2,
"active_device_token": 2
},
"failure_breakdown": {}
},
"campaign_control_group": {
"conversion_goal_stats": {
"Goal 1": {
"conversions": 0,
"cvr": 0,
"uplift": 0
}
},
"delivery_funnel": {
"reachable_users_in_segment": 0
},
"failure_breakdown": {
"user_removed_due_to_campaing_control_group": 1
}
},
"global_control_group": {
"conversion_goal_stats": {
"Goal 1": {
"conversions": 0,
"cvr": 0,
"uplift": 0
}
},
"delivery_funnel": {
"reachable_users_in_segment": 0
},
"failure_breakdown": {
"user_removed_due_to_global_control_group": 1
}
}
}
}
}
}
}
}
]
}
}{
"title": "Invalid Field Value",
"description": "app_key - Some of the field values are invalid: app_key : None",
"code": "wUcwPRZF"
}{
"title": "Authentication required",
"description": "Invalid identity information found.",
"code": "wUcwPRZF"
}{
"title": "Forbidden Request",
"description": null,
"code": "kmqLuuHM"
}{
"title": "Server Error",
"description": "An unexpected error was encountered while processing this request. Please contact MoEngage Team",
"code": "jDTGSxjd"
}Rate Limit
This API provides all version stats, and the call rate is limited to 100 API calls per minute per workspace.- Make sure to pass the relevant Campaign IDs in the request to fetch stats for flow-linked campaigns.
- Stats data is retained for the entire lifetime of a campaign, from its start date, there is no fixed retention cutoff. The 30-day limit applies only to the date range of a single API call, not to how far back you can query.
承認
Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.
- Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
- Password: Use your API Key, which you can find within the Campaign report/Business events/Custom templates/Catalog API/Inform Report tile.
For more information on authentication and getting your credentials, refer here.
ヘッダー
ボディ
application/json
Request body to fetch campaign stats.
This field shows the position of a record in a dataset. The default value for the number of campaigns to skip is 0. For example, setting the offset to 50 skips the first 50 records. The resulting page number depends on your limit. With a limit of 10, an offset of 50 returns page 6.
レスポンス
Successful response.