Skip to main content

View Triggered Campaign

This API endpoint returns a paginated list of all Triggered campaigns. The campaigns are listed in descending order, with the most recently created campaigns appearing first.

GET
 https://api.pushengage.com/apiv1/triggers/{trigger_id}

Path Parameters

Property NameTypeRequiredDescription
trigger_idNumberYesThe unique identifier of the Triggered campaign.

Query Parameters

Parameter NameTypeRequiredDescription
analytics_start_atStringNoThe UTC start date for the analytics data in the YYYY-MM-DD (ISO 8601) format.
analytics_end_atStringNoThe UTC end date for the analytics data in the the YYYY-MM-DD (ISO 8601) format.

Response Object

The response object returned by the API endpoint contains the details about the Triggered campaign.

Property NameTypeRequiredDescription
successBooleanYesIndicates whether the API call was successful or not.
dataTriggered CampaignYesThe Triggered campaign object.

Triggered Campaign

Property NameTypeRequiredDescription
trigger_idNumberYesThe unique identifier for the campaign.
campaign_nameStringYesThe name of the campaign.
campaign_typeStringYesValid values: generic, browse, trigger, price_drop, inventory
Type of the Triggered campaign.
statusStringYesValid values: draft, active, pause, deleted
The status of the Triggered campaign.
site_idNumberYesThe unique identifier of the site associated with the campaign.
created_at_utcStringYesThe UTC timestamp when the campaign was created in ISO 8601 format.
updated_at_utcStringYesThe UTC timestamp when the campaign was last updated in ISO 8601 format.
daily_trigger_limitNumberYesThis specifies the maximum number of notifications that can be sent to a user in a day.
weekly_trigger_limitNumberYesThis specifies the maximum number of notifications that can be sent to a subscriber in a week, which includes the last seven days.
rulesObjectYesThe object includes the settings for the start and stop event names of the Triggered campaign.
rules.start_event_nameStringYesThis is the name of the event that triggers the start of the campaign when it is fired by a user.
rules.stop_event_nameStringYesThis is the name of the event that triggers the stop of the campaign when it is fired by a user.
analyticsAnalyticsYesAn object containing analytics information for the Triggered campaign.
notificationsTriggered Notification[]YesAn array of notifications in the Triggered campaign.
optionsOptionsNoAn object that contains extra options for a triggered campaign.
utm_paramsUTM ParamsNoAn object containing UTM parameters for the Triggered campaign.

Triggered Notification

Property NameTypeDescription
idNumberThe unique id of the notification in the Triggered campaign.
orderNumberThe order of the notification.
titleStringTitle of the notification. The title can include a personalization tag {{...}}.
messageStringThe message to be displayed in the push notification. The message can include a personalization tag {{...}}.
urlStringThe URL that opens upon clicking the received push notification. It can include a personalization tag {{...}}.
image_urlStringURL of the notification icon image. It can include a personalization tag {{...}}.
big_image_urlStringURL of the notification large image. It can include a personalization tag {{...}}.
expiryNumberThe expiry time of on notification in seconds. The notification will be expired if the device does not come back online within this time. The maximum time is 28 days.
require_interactionNumberValid values: 1, 0
Indicates that on devices with sufficiently large screens, the notification should remain active until the user clicks or dismisses it.
actionsAction[]An array of action button to display in the notification. It accept maximum two action.
schedule_optionsObjectAn object containing the scheduling details of the notification.
schedule_options.typeStringValid values: after, rightaway
Specifies when to send this notification after sending the previous notification in the Drip campaign.
schedule_options.valueNumberThe value specifies the time to wait before sending the notification after sending the previous notification in the campaign. It is required when the type is set to after.
schedule_options.unitNumberValid values: minutes, days
The unit of the value is required when the type is set to after. The value will be treated based on its unit. If the unit is minutes, then the value will indicate the number of minutes. If the unit is days, then the value will indicate the number of days.
schedule_options.atStringThe sending time of the notification in the HH:mm:ss format. It is required when the unit is days.
analyticsAnalyticsAn object containing analytics information for the notification.

Analytics Object

Property NameTypeRequiredDescription
viewsNumberYesThe number of view for the notification.
clicksNumberYesThe number of clicks on the notification.
sentcountNumberYesThe number of notification sent.
unsubscribedNumberYesThe number of unsubscribes for the notification.
ctrNumberYesThe click-through rate for the the notification.
resultArrayNoAn array of analytics result/goal object associated with the notification.
result.*.nameStringNoThe name of the goal.
result.*.countNumberNoThe count of the goal.
result.*.valueNumberNoThe value of the goal.

Options Object

Property NameTypeRequiredDescription
result_nameStringNoA string that specifies the name of the goal that the campaign will track.
campaignObjectNoAn object that contains options related to the campaign settings.
campaign.expiryStringNoDefault: 2592000 (30 days)
A number that specifies the time duration in seconds until the campaign expires. Applicable only when campaign type is price_drop or inventory
campaign.price_drop_thresholdObjectNoAn object that contains options related to the price drop threshold. Required only when campaign type is set to price_drop.
campaign.price_drop_threshold.typeStringNoValid values: absolute, percentage
A string that specifies the type of threshold.
campaign.price_drop_threshold.valueObjectNoA number that specifies the value of the threshold.

UTM params Object

Property NameTypeRequiredDescription
utm_sourceStringYesThe UTM source parameter value included in the URL of the notifications for the campaign.
utm_mediumStringYesThe UTM medium parameter value included in the URL of the notifications for the campaign.
utm_campaignStringYesThe UTM campaign parameter value included in the URL of the notifications for the campaign.
utm_termStringNoThe UTM term parameter value included in the URL of the notifications for the campaign.
utm_contentStringNoThe UTM content parameter value included in the URL of the notifications for the campaign.

Action Object

Property NameTypeRequiredDescription
labelStringYesThe text to be shown to the user on action button. It can include a personalization tag {{...}}.
urlStringYesThe URL that opens upon clicking the action button. It can include a personalization tag {{...}}.
image_urlStringNooptional The URL of an icon to display with the action button.

Example

Request

curl --location -g --request GET 'https://api.pushengage.com/apiv1/triggers/{trigger_id}?analytics_start_at=2023-02-30&analytics_end_at=2023-03-30' \
--header 'Api-Key: <YOUR_API_KEY>'

Response

{
"success": true,
"data": {
"trigger_id": 30688906,
"campaign_name": "Triggered Campaign",
"campaign_type": "trigger",
"utm_params": {
"utm_source": "PushEngage",
"utm_medium": "Push Notification",
"utm_campaign": "Triggered Campaign",
"utm_term": "UTM Term",
"utm_content": "UTM medium"
},
"status": "active",
"site_id": 3289873,
"created_at_utc": "2023-02-27T06:53:27Z",
"updated_at_utc": "2023-02-27T06:53:27Z",
"daily_trigger_limit": 1,
"weekly_trigger_limit": 7,
"options": {
"result_name": "revenue"
},
"analytics": {
"ctr": 10,
"views": 100,
"clicks": 10,
"sentcount": 150,
"unsubscribed": 10,
"result": [
{
"name": "revenue",
"count": 10,
"value": 4000
}
]
},
"rules": {
"start_event_name": "add-to-card",
"stop_event_name": "checkout"
},
"notifications": [
{
"id": 239002,
"order": 0,
"title": "Item {{product_name}} is waiting in cart",
"message": "Checkout by paying {{product_price}}",
"url": "{{checkout_url}}",
"image_url": "{{product_thumbnail}}",
"big_image_url": "{{product_image}}",
"expiry": 86400,
"require_interaction": 1,
"actions": [
{
"label": "🛒 Checkout",
"url": "{{checkout_url}}"
}
],
"schedule_options": {
"type": "after",
"value": 1800,
"unit": "minutes"
},
"analytics": {
"ctr": 10,
"views": 100,
"clicks": 10,
"sentcount": 150,
"unsubscribed": 10,
"result": [
{
"name": "revenue",
"count": 10,
"value": 4000
}
]
}
}
]
}
}