Get template Ad Insight

This API returns the details around the marketing template insights.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Request Parameters

KeyDescriptionValueData typeRequired/OptionalConstraints
AuthorizationAccess Token for the application{{PARTNER_APP_TOKEN}}StringRequiredShould be a valid Partner App Access Token
appIdApp ID for which the ad details are required{{App_ID}}StringRequired
  • The Id should be a valid app Id of Gupshup.
  • The App must be associated with the account that owns the PARTNER_APP_TOKEN being used.
TemplateIdMarketing template ID for which the ad details are required{{templateId}}StringRequiredValid Marketing Template Id
date_presetRepresents a relative time range. This field is ignored if time_range or time_ranges is specified.enum'today', 'yesterday', 'this_month', 'last_month', 'this_quarter', 'maximum', 'data_maximum', 'last_3d', 'last_7d', 'last_14d', 'last_28d', 'last_30d', 'last_90d', 'last_week_mon_sun', 'last_week_sun_sat', 'last_quarter', 'last_year', 'this_week_mon_today', 'this_week_sun_today', 'this_year'Default - last_30d
fieldsComma separated list of metrics

Sample Request

curl --location 'https://partner.gupshup.io/partner/app/:appId/template/:templateId/insights' \
--header 'Accept: application/json' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}'

Sample Response

{
{
    "status": "success",
    "template_insights": [
        {
            "date_start": "2024-11-15",
            "date_stop": "2025-02-12",
            "marketing_messages_cost_per_delivered": "0.153",
            "marketing_messages_cost_per_link_btn_click": "9.18",
            "marketing_messages_delivered": "60",
            "marketing_messages_delivery_rate": "100",
            "marketing_messages_link_btn_click": "1",
            "marketing_messages_link_btn_click_rate": "1.666667",
            "marketing_messages_read": "22",
            "marketing_messages_read_rate": "36.666667",
            "marketing_messages_sent": "60",
            "marketing_messages_spend": "9.18"
        }
    ]
}

Status Codes

Status CodeResponseComments
Success
200

{

{"status": "success",
"template_insights": [
{
"date_start": "2024-11-15",
"date_stop": "2025-02-12",
"marketing_messages_cost_per_delivered": "0.153",
"marketing_messages_cost_per_link_btn_click": "9.18",
"marketing_messages_delivered": "60",
"marketing_messages_delivery_rate": "100",
"marketing_messages_link_btn_click": "1",
"marketing_messages_link_btn_click_rate": "1.666667",
"marketing_messages_read": "22",
"marketing_messages_read_rate": "36.666667",
"marketing_messages_sent": "60",
"marketing_messages_spend": "9.18"
}
]
}

Based on the query parameters fields, insights will be shown.
Error
400

{

"status": "error","message": "MM lite is not enabled for this app"
}

400

{

"status":"error","message":"Invalid template id provided."
}

401

{

"status":"error","message":"Unauthorised access to the resource. Please review request parameters and headers and retry"
}

Insights Fields:

All available insights fields are listed below:

  • Sent, Read, Delivered, Click
    • marketing_messages_sent
    • marketing_messages_read
    • marketing_messages_delivered
    • marketing_messages_link_btn_click
  • Rates
    • marketing_messages_delivery_rate
    • marketing_messages_read_rate
    • marketing_messages_link_btn_click_rate
  • Spend metrics
    • marketing_messages_spend
    • marketing_messages_cost_per_delivered
    • marketing_messages_cost_per_link_btn_click
  • Conversion events
    • marketing_messages_website_add_to_cart
    • marketing_messages_website_initiate_checkout
    • marketing_messages_website_purchase
    • marketing_messages_website_purchase_values
    • marketing_messages_app_add_to_cart
    • marketing_messages_app_initiate_checkout
    • marketing_messages_app_purchase
    • marketing_messages_app_purchase_values
Path Params
string
required

The ID of the app

string
required

The ID of the template

Query Params
requestParams
object

Additional request parameters

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json