Follow Up

Create a new follow up

POST https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=createOrUpdateFollowUp

This endpoint allows you to create or update an existing follow up

Headers

Body

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

{
  "followUpId": <followUpId>
}

Attach an email to a follow up

POST https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=attachEmailToFollowUp

This endpoint allows you to create and attach an email to a follow up. You can also update an existing email attached to a follow up.

Headers

Body

Example of body

{
    "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"
}

Response

{
    "message": "Email attached to follow-up.",
    "mailId": 43
}

Delete an email from a follow up

DELETE https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=deleteEmailFromFollowUp

This endpoint allows you to delete an emails from a follow up

Headers

Query

Example of query

https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=deleteEmailFromFollowUp&followUpId=3&mailId=43

Response

{
    "message": "Email deleted from follow-up."
}

Delete a follow up

DELETE https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=deleteFollowUp

This endpoint allows you to delete a follow up

Headers

Query

Example of query

https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=deleteFollowUp&followUpId=3

Response

{
    "message": "Follow-up deleted."
}

Get all follow ups

GET https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=getFollowUps

This endpoint allows you to get all the follow ups

Headers

Query

Example of Query

Query to get follow ups with test in the name

https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=getFollowUps&filter[name]=test

Query to get 3 follow ups with the trigger birthday

https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=getFollowUps&filter[trigger]=birthday&limit=3 Response

[
    {
        "id": 1,
        "name": "test 1",
        "display_name": "Test 1",
        "creation_date": "2024-04-23 13:27:41",
        "trigger": "user_subscribe",
        "condition": {
            "lists_status": "is",
            "segments_status": "is"
        },
        "active": 1,
        "send_once": 1,
        "list_id": 3,
        "last_trigger": 1718005129
    },
    {
        "id": 2,
        "name": "test 2",
        "display_name": "Test 2",
        "creation_date": "2024-05-23 08:20:05",
        "trigger": "user_subscribe",
        "condition": {
            "lists_status": "is",
            "lists": [
                "1"
            ],
            "segments_status": "is_not",
            "segments": [
                "1"
            ]
        },
        "active": 1,
        "send_once": 1,
        "list_id": 4,
        "last_trigger": 1718005129
    }
]

Get one follow up by ID

GET https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=getFollowUpById

This endpoint allows you to get a specific follow up

Headers

Query

Example of Query

https://www.example.com/index.php?page=acymailing_front&option=com_acym&ctrl=getFollowUpById&followUpId=1

Response

[
    {
        "id": 1,
        "name": "test 1",
        "display_name": "Test 1",
        "creation_date": "2024-04-23 13:27:41",
        "trigger": "user_subscribe",
        "condition": {
            "lists_status": "is",
            "segments_status": "is"
        },
        "active": 1,
        "send_once": 1,
        "list_id": 3,
        "last_trigger": 1718005129,
        "mails": [
            {
                "mail_id": 26,
                "followup_id": 1,
                "delay": 0,
                "delay_unit": 86400,
                "send_once": 1
            },
            {
                "mail_id": 43,
                "followup_id": 1,
                "delay": 12,
                "delay_unit": 60,
                "send_once": 1
            }
        ]
    }
]

Last updated