Skip to main content

View All Triggered Campaigns

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

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.
pageNumberNoDefault: 1, >=1
The page number for the requested data. The value should be greater than 1.
limitNumberNoDefault: 10, [1..500]
The number of items per page. The value should be between 1 to 500.

Response Object

The response object returned by the API endpoint contains the details about Triggered campaigns. The response also includes metadata such as total number of results, current page, last page and results per page.

Property NameTypeRequiredDescription
successBooleanYesIndicates whether the API call was successful or not.
dataTriggered Campaign[]YesAn Array of Triggered campaign object.
metaObjectYesAn object containing metadata for the response.
meta.totalNumberYesThe total number of results.
meta.pageNumberYesThe current page number.
meta.perPageNumberYesThe number of results per page.
meta.lastPageNumberYesThe last page number.

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.
optionsOptionsNoAn object that contains extra options for a triggered campaign.
utm_paramsUTM ParamsNoAn object containing UTM parameters for the Triggered campaign.

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.

Example

Request

curl --location --request GET 'https://api.pushengage.com/apiv1/triggers?analytics_start_at=2023-02-30&analytics_end_at=2023-03-30&page=1&limit=10' \
--header 'API_key: <YOUR_API_KEY>'

Response

{
"success": true,
"data": [
{
"trigger_id": 30987606,
"campaign_name": "Triggered Campaign",
"campaign_type": "generic",
"utm_params": {
"utm_source": "PushEngage",
"utm_medium": "Push Notification",
"utm_campaign": "Triggered Campaign",
"utm_term": "UTM Term",
"utm_content": "UTM Content"
},
"status": "active",
"site_id": 3288973,
"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": 300
}
]
},
"rules": {
"start_event_name": "start",
"stop_event_name": "end"
}
}
],
"meta": {
"total": 1,
"page": 1,
"lastPage": 1,
"perPage": 10
}
}