Skip to main content

Create Drip Autoresponder

Drip autoresponder is used to send a series of notifications to users depending on the criteria specified in the drip campaign. Drip campaign criteria are evaluated whenever a user subscribes to push notifications or when an existing user is added to a segment. A Drip campaign is initialized when a user satisfies the criteria specified in the Drip Autoresponder.

POST
 https://api.pushengage.com/apiv1/drips

Request Body

Property NameTypeRequiredDescription
campaign_nameStringYesThe name of the Drip Autoresponder campaign.
notificationsDrip Notification[]YesAn array of notifications in the Drip campaign.
send_toSend ToNoDefines the target audience for the Drip campaign.
utm_paramsUTM ParamsNoAn object containing UTM parameters for the Drip campaign.

Response Body

Property NameTypeRequiredDescription
successBooleanYesIndicates whether the API call was successful or not.
drip_idNumberYesThe unique identifier for the Drip Autoresponder campaign.
messageStringNoThis message is present in case of failure and indicates the reason for the failure.

Drip Notification

Property NameTypeRequiredDescription
titleStringYesTitle of the notification.
messageStringYesThe message to be displayed in the push notification.
urlStringYesThe URL that opens upon clicking the received push notification.
image_urlStringYesURL of the notification icon image.
big_image_urlStringYesURL of the notification large image.
require_interactionNumberYesValid values: 1, 0
Indicates that on devices with sufficiently large screens, the notification should remain active until the user clicks or dismisses it.
expiryNumberYesThe 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_optionsObjectYesAn object containing the scheduling details of the notification.
schedule_options.typeStringYesValid values: after, rightaway
Specifies 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.valueNumberYesThe 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.unitNumberYesValid values: minutes, days, dow
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. 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.atStringYesThe sending time of the notification in the HH:mm:ss format. It is required when the unit is days or dow.
actionsAction[]NoAn array of action button to display in the notification. It accept maximum two action.

Send To Object

Property NameTypeRequiredDescription
include_segmentsString[]NoNotifications will be sent only to those users who are subscribed to any of the given segments.
exclude_segmentsString[]NoNotifications will not be sent to users subscribed to any of the given segments.
include_countriesString[]NoNotifications will only be sent to users from the given countries.
exclude_countriesString[]NoNotifications will not be sent to users who are from any of the given countries.
include_statesString[]NoNotifications will only be sent to users from the given states.
exclude_statesString[]NoNotifications will not be sent to users who are from any of the given states.
include_citiesString[]NoNotifications will only be sent to users from the given cities.
exclude_citiesString[]NoNotifications will not be sent to users who are from any of the given cities.

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.
urlStringYesThe URL that opens upon clicking the action button.
image_urlStringNoThe URL of an icon to display with the action button.

Example

Request

curl --location --request POST 'https://api.pushengage.com/apiv1/drips' \
--header 'Api-Key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"campaign_name": "Drip Autoresponder Campaign",
"send_to": {
"include_segments": ["segment1", "segment2"],
"exclude_segments": ["segment2", "segment3"]
},
"utm_params": {
"enabled": true,
"source": "PushEngage",
"medium": "Push Notification",
"campaign": "Drip Autoresponder",
"term": "UTM Term",
"content": "UTM Content"
},
"notifications": [
{
"schedule_options": {
"type": "rightaway"
},
"title": "Notification Title 1",
"message": "Notification Message 1",
"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",
"require_interaction": 1,
"expiry": 86400,
"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://www.pushengage.com",
"image_url": "https://example.com/action-2-landing-page/"
}
]
},
{
"schedule_options": {
"type": "after",
"value": 2,
"unit": "days",
"at": "16:30:00"
},
"title": "Notification Title 2",
"message": "Notification Message 2",
"url": "https://example.com/landing-page-2/",
"image_url": "https://example.com/img/notification-icon-image.jpg",
"big_image_url": "https://example.com/img/notification-large-image-2.jpg",
"require_interaction": 1,
"expiry": 86400,
"actions": [
{
"label": "Action 1",
"url": "https://example.com/action-1-landing-page/"
}
]
}
]
}'

Response

{
"success": true,
"drip_id": 12345
}