View Drip Autoresponder
This API endpoint returns a Drip Autoresponder campaign by id. The response includes the list of notifications in the Drip Autoresponder campaign.
GET
https://api.pushengage.com/apiv1/drips/{drip_id}
Path Parameters
| Property Name | Type | Required | Description |
|---|---|---|---|
| drip_id | Number | Yes | The unique identifier of the Drip Autoresponder campaign. |
Query Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| analytics_start_at | String | No | The UTC start date for the analytics data in the YYYY-MM-DD (ISO 8601) format. |
| analytics_end_at | String | No | The 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 Drip Autoresponder campaign.
| Property Name | Type | Required | Description |
|---|---|---|---|
| success | Boolean | Yes | Indicates whether the API call was successful or not. |
| data | Drip Autoresponder | Yes | The Drip Autoresponder campaign object. |
Drip Autoresponder
| Property Name | Type | Required | Description |
|---|---|---|---|
| drip_id | Number | Yes | The unique identifier for the Drip Autoresponder campaign. |
| campaign_name | String | Yes | The name of the Drip Autoresponder campaign. |
| drip_type | String | Yes | Valid values: generic, welcomeType of the Drip campaign. |
| status | String | Yes | Valid values: draft, active, pause, deletedThe status of the Drip campaign. |
| site_id | Number | Yes | The unique identifier of the site associated with the Drip campaign. |
| created_at_utc | String | Yes | The UTC timestamp when the Drip campaign was created in ISO 8601 format. |
| updated_at_utc | String | Yes | The UTC timestamp when the Drip campaign was last updated in ISO 8601 format. |
| audience | Audience | Yes | Defines the target audience for the Drip campaign. |
| options | Object | Yes | An object containing extra options for the drip campaign. |
| options.result_name | String | Yes | The name of the goal used for Goal tracking in the Drip campaign. |
| analytics | Analytics | Yes | An object containing analytics information for the Drip campaign. |
| notifications | Drip Notification[] | Yes | An array of notifications in the Drip campaign. |
| utm_params | UTM Params | No | An object containing UTM parameters for the Drip campaign. |
Audience
| Property Name | Type | Description |
|---|---|---|
| filter | Object | Specifies the filter criteria for selecting the audience. |
| filter.value | Array | An Array of audience filter rule group. Each filter rule group contains an array of audience filter rule. An audience matching all of the filter rule in any of the filter rule group is selected for the Drip campaign. |
| filter.value.*.*.field | String | Valid values: segments, country, states, city, device, device_typeSpecifies the filter rule field to be used for filtering the audience. |
| filter.value.*.*.op | String | Valid values: all, in, ninSpecifies the filter rule operation to be performed for filtering the audience. |
| filter.value.*.*.value | Number[] | String[] | Specifies the filter rule value to be used for filtering the audience. |
Drip Notification
| Property Name | Type | Required | Description |
|---|---|---|---|
| id | Number | Yes | The unique id of the notification in the Drip campaign. |
| order | Number | Yes | The order of the notification. |
| title | String | Yes | Title of the notification. |
| message | String | Yes | The message to be displayed in the push notification. |
| url | String | Yes | The URL that opens upon clicking the received push notification. |
| image_url | String | Yes | URL of the notification icon image. |
| big_image_url | String | Yes | URL of the notification large image. |
| require_interaction | Number | Yes | Valid values: 1, 0Indicates that on devices with sufficiently large screens, the notification should remain active until the user clicks or dismisses it. |
| expiry | Number | Yes | The 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. |
| schedule_options | Object | Yes | An object containing the scheduling details of the notification. |
| schedule_options.type | String | Yes | Valid values: after, rightawaySpecifies when to send this notification after sending the previous notification in the Drip campaign. The type of first notifications can be either rightaway or after and the rest of the following notifications it should be after. |
| schedule_options.value | Number | Yes | The 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.unit | Number | Yes | Valid values: minutes, days, dowThe 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. If the unit is dow, then the value will be 0 for Sunday, 1 for Monday, 2 for Tuesday, 3 for Wednesday, 4 for Thursday, 5 for Friday, and 6 for Saturday. |
| schedule_options.at | String | Yes | The sending time of the notification in the HH:mm:ss format. It is required when the unit is days or dow. |
| analytics | Analytics | Yes | An object containing analytics information for the Drip notification. |
| actions | Action[] | No | An array of action button to display in the notification. It accept maximum two action. |
Analytics Object
| Property Name | Type | Required | Description |
|---|---|---|---|
| views | Number | Yes | The number of view for the notification. |
| clicks | Number | Yes | The number of clicks on the notification. |
| sentcount | Number | Yes | The number of notification sent. |
| unsubscribed | Number | Yes | The number of unsubscribes for the notification. |
| ctr | Number | Yes | The click-through rate for the the notification. |
| result | Array | No | An array of analytics result/goal object associated with the notification. |
| result.*.name | String | No | The name of the goal. |
| result.*.count | Number | No | The count of the goal. |
| result.*.value | Number | No | The value of the goal. |
UTM params Object
| Property Name | Type | Required | Description |
|---|---|---|---|
| utm_source | String | Yes | The UTM source parameter value included in the URL of the notifications for the campaign. |
| utm_medium | String | Yes | The UTM medium parameter value included in the URL of the notifications for the campaign. |
| utm_campaign | String | Yes | The UTM campaign parameter value included in the URL of the notifications for the campaign. |
| utm_term | String | No | The UTM term parameter value included in the URL of the notifications for the campaign. |
| utm_content | String | No | The UTM content parameter value included in the URL of the notifications for the campaign. |
Action Object
| Property Name | Type | Required | Description |
|---|---|---|---|
| label | String | Yes | The text to be shown to the user on action button. |
| url | String | Yes | The URL that opens upon clicking the action button. |
| image_url | String | No | The URL of an icon to display with the action button. |
Example
Request
- cURL
- PHP
curl -X GET \
'https://api.pushengage.com/apiv1/drips/{drip_id}?analytics_start_at=2023-02-30&analytics_end_at=2023-03-30' \
-H 'Api-Key: <YOUR_API_KEY>'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.pushengage.com/apiv1/drips/{drip_id}?analytics_start_at=2023-02-30&analytics_end_at=2023-03-30",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Api-Key: <YOUR_API_KEY>"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
Response
- 200 OK
- 401 Unauthorized
- 400 Bad Request
- 500 Internal Server Error
{
"success": true,
"data": {
"drip_id": 28909029,
"campaign_name": "Drip Autoresponder Cmpaign",
"audience": {
"filter": {
"value": [
[
{
"field": "country",
"op": "in",
"value": ["India", "Canada", "United States", "Australia"]
},
{ "field": "segment", "op": "in", "value": [746353, 98786] }
]
]
}
},
"status": "active",
"site_id": 3290873,
"created_at_utc": "2023-02-27T08:56:45Z",
"updated_at_utc": "2023-02-27T08:56:45Z",
"drip_type": "generic",
"utm_params": {
"utm_source": "PushEngage",
"utm_medium": "Push Notification",
"utm_campaign": "Drip Autoresponder",
"utm_term": "UTM Term",
"utm_content": "UTM Content"
},
"options": {
"result_name": "revenue"
},
"analytics": {
"ctr": 10,
"views": 100,
"clicks": 10,
"sentcount": 150,
"unsubscribed": 10,
"result": [
{
"name": "revenue",
"count": 10,
"value": 200
}
]
},
"notifications": [
{
"id": 5397090,
"order": 0,
"title": "Notification Title",
"message": "Notification Message",
"url": "https://example.com/landing-page/",
"image_url": "https://example.com/img/notification-icon-image.jpg",
"big_image_url": "https://example.com/img/notification-large-image.jpg",
"expiry": 1040520,
"require_interaction": 1,
"actions": [
{
"label": "Action 1",
"url": "https://example.com/action-1-landing-page/",
"image_url": "https://example.com/img/action-1-icon-16x16.jpg"
},
{
"label": "Action 2",
"url": "https://example.com/action-2-landing-page/"
}
],
"schedule_options": {
"type": "after",
"value": 2,
"unit": "days",
"at": "16:30:00"
},
"analytics": {
"ctr": 10,
"views": 100,
"clicks": 10,
"sentcount": 150,
"unsubscribed": 10,
"result": [
{
"name": "revenue",
"count": 10,
"value": 200
}
]
}
}
]
}
}
{
"success": false,
"message": "API KEY Invalid"
}
{
"success": false,
"error": {
"name": "InvalidRequestException",
"message": "Error Message"
}
}
{
"success": false,
"message": "Error message"
}