title | type | order |
---|---|---|
Drip Campaigns |
api |
8 |
This will add the specified customer to the first step of the specified drip campaign. If the first step has a delay on it, then it will send the first email once that delay has elapsed.
POST /drip_campaigns/(:drip_campaign_id)/activate
- recipient
- address -- The recipient's email address
- name (optional) -- The recipient's name
- cc (optional) -- An array of CC recipients, of the format {"address":"[email protected]"}
- bcc (optional) -- An array of BCC recipients, of the format {"address":"[email protected]"}
- sender (optional)
- address -- The sender's email address
- reply_to -- The sender's reply-to address
- name -- The sender's name
- email_data (optional) -- Object containing email template data
- tags (optional) -- Array of tags (as strings)
- headers (optional) -- Object contain SMTP headers to be included with the email
- esp_account (optional) -- ID of the ESP Account to send this email through. ex: esp_1a2b3c4d5e
- locale (optional) -- Locale to send emails with
{
"recipient": {
"address": "[email protected]"
}
}
{
"recipient": {
"name": "John",
"address": "[email protected]"
},
"email_data": { "amount": "$12.00" },
"cc": [
{"address": "[email protected]"},
{"address": "[email protected]"}
],
"bcc": [
{"address": "[email protected]"},
{"address": "[email protected]"}
],
"sender": {
"name": "Company",
"address": "[email protected]",
"reply_to": "[email protected]"
},
"tags": [
"tag1",
"tag2",
"tag3"
],
"headers": {
"X-HEADER-ONE": "header-value"
},
"locale": "en-US",
"esp_account": "esp_1a2b3c4d5e"
}
{
"success": true,
"status": "OK",
"drip_campaign": {
"id": "dc_m3mfMgMiemni82nm2imGMw",
"name": "welcome_campaign"
},
"recipient_address": "[email protected]",
"message": "Recipient successfully added to drip campaign."
}
POST /drip_campaigns/(:drip_campaign_id)/deactivate
- recipient_address -- Email address of the customer you would like to remove from the specified campaign.
{
"recipient_address": "[email protected]"
}
{
"success": true,
"status": "OK",
"drip_campaign": {
"id": "dc_m3mfMgMiemni82nm2imGMw",
"name": "welcome_campaign"
},
"recipient_address": "[email protected]",
"message": "Recipient successfully removed from drip campaign."
}
If a user unsubscribes, changes email addresses, or cancels, call this endpoint to remove the specified email address from all active drip campaigns.
POST /drip_campaigns/deactivate
- recipient_address -- Email address of the customer you would like to remove from all drip campaigns.
{
"recipient_address": "[email protected]"
}
{
"success": true,
"status": "OK",
"recipient_address": "[email protected]"
}
GET /drip_campaigns
[
{
"object": "drip_campaign",
"id": "dc_m3mfMgMiemni82nm2imGMw",
"name": "welcome_campaign",
"enabled": true,
"trigger_email_id": null,
"drip_steps": [
{
"object": "drip_step",
"id": "dcs_MEitnqi2mGmwiednWN2mwi",
"email_id": "tem_asdfjkl1234qwer",
"delay_seconds": "600"
},
{
"object": "drip_step",
"id": "dcs_MEitn234mGmwiednWN2mwi",
"email_id": "tem_asdwtgs1234qwer",
"delay_seconds": "3600"
}
]
},
{
"object": "drip_campaign",
"id": "dc_m3mfMgafasdi8gadbwEgv",
"name": "sales_campaign",
"enabled": true,
"trigger_email_id": "tem_wneiam3igmiocbmw",
"drip_steps": [
{
"object": "drip_step",
"id": "dcs_MEitnf2egbDwiednWN2mwi",
"email_id": "tem_asdwGFWrb234qwer",
"delay_seconds": "7200"
}
]
}
]
GET /drip_campaigns/(:drip_campaign_id)
{
"object": "drip_campaign",
"id": "dc_m3mfMgMiemni82nm2imGMw",
"name": "welcome_campaign",
"enabled": true,
"trigger_email_id": null,
"drip_steps": [
{
"object": "drip_step",
"id": "dcs_MEitnqi2mGmwiednWN2mwi",
"email_id": "tem_asdfjkl1234qwer",
"delay_seconds": "600"
},
{
"object": "drip_step",
"id": "dcs_MEitn234mGmwiednWN2mwi",
"email_id": "tem_asdwtgs1234qwer",
"delay_seconds": "3600"
}
]
}