This endpoint allows you to create or update an existing follow up
Headers
Name
Value
Content-Type
application/json
Api-Key
The API key of a valid AcyMailing license used in the AcyMailing configuration page, tab "License".
Body
Name
Type
Description
name
string
Name of the user
display_name
string
The name displayed in the front end when a user is on the unsubscribe page
trigger
string
When a follow up will be triggered, it should be one of these value:
- user_subscribe: When a user subscribe
- birthday: On user birthday
- user_creation: On user creation
- woocommerce_purchase: When a user purchase a product on WooCommerce
- hikashop_purchase: When a user purchase a product on WooCommerce
condition
array
This option is not required, if you want to add condition on the trigger:
loop
integer
1 or 0 if you want to loop the follow-up, this means that when sending the last follow-up email to a subscriber, the follow-up can be re-trigger and all emails are sent again to this subscriber
loop_delay
integer
You need to specify the amount of seconds.
If you want to loop you can add a delay before the follow-up is re-triggered, for example you send your first email 1 day after the trigger, if you add a delay of 2 days, the first email will be sent 3 days after the last email of the follow-up
loop_mail_skip
array
Array of mail ID to skip when the follow-up is looping
Example of Body
{"followUpId":3,"name":"Test follow-up","display_name":"Test follow-up display name","trigger":"user_subscribe","condition":{// optionnal"lists_status":"is",// or "is_not""lists":[1],// list ids"segments_status":"is_not","segments":[1]// segment ids},"loop":1,// 1 or 0, by default 0"loop_delay":3600// in seconds, so 1 hour here"loop_mail_skip":[1,2]// mail ID to skip when follow-up is looping}
Response
The follow up that you are trying to update doesn't exist
{
//"id": 40, // If you want to update an email add its id
"name": "Mail followup 1",
"subject": "Subject follow-up 1",
"body": "This is the body of the first follow-up",
"bcc": "", // optional, email separated by comma
"from_name": "", // optional, by default it takes the value in the configuration
"from_email": "", // optional, by default it takes the value in the configuration
"reply_to_name": "", // optional, by default it takes the value in the configuration
"reply_to_email": "", // optional, by default it takes the value in the configuration
"bounce_email": "", // optional, by default it takes the value in the configuration
"preheader": "" // optional, short text displayed in the receiver's inbox, next to the subject
}
{
"followUpId": 3,
"mail": {
"name": "Mail followup 2",
"subject": "Subject follow-up 2",
"body": "This is the body of the second follow-up",
"bcc": "", // optional, email separated by comma
"from_name": "", // optional, by default it takes the value in the configuration
"from_email": "", // optional, by default it takes the value in the configuration
"reply_to_name": "", // optional, by default it takes the value in the configuration
"reply_to_email": "", // optional, by default it takes the value in the configuration
"bounce_email": "", // optional, by default it takes the value in the configuration
"preheader": "" // optional, short text displayed in the receiver's inbox, next to the subject
},
"delay": 12,
"delay_unit": "minutes"
}
{
"message": "Email attached to follow-up.",
"mailId": 43
}
{
"message": "Email deleted from follow-up."
}
{
"message": "Follow-up deleted."
}
[
"id": 3,
"name": "part of the name",
"display_name": "Test",
"active": 1,
"send_once": 0,
"trigger": "user_subscribe"
]