API for Automation360

For more information about how to create and send events from your system to start automations, and how to manage created events, check out the Events section.

Get a list of automation flows

To get a list of all autoflows in your account, send a GET request to:

https://api.sendpulse.com/a360/autoresponders/list

Request parameter:

Parameter Type Description  
limit int Number of records, by default — 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

If request is successful, you will receive a response:

{
  "data": [
    {
      "id": 2091,
      "name": "asas",
      "status": 0,
      "main_data": {
        "id": 2091,
        "type": "series",
        "automation_name": "asas",
        "address_book_id": "120036",
        "sender_email_id": "120575",
        "sender_email_address": "user@example.com",
        "sender_email_name": "User",
        "sent_time_hour": "14",
        "sent_time_min": "10",
        "utm_term": "",
        "utm_content": "",
        "utm_campaign": "",
        "utm_source": "SendPulse",
        "utm_medium": "email",
        "task_lang": "en",
        "aWeekDays": [
          1,
          1,
          1,
          1,
          1,
          1,
          1
        ],
      },
      "created": "2015-12-23 12:11:51",
      "changed": "2015-12-23 12:11:51"
    }
  ]
}

Get statistics about an automation flow

To get information about the flow, send a GET request to:

https://api.sendpulse.com/a360/autoresponders/{ID}

Request parameter:

Parameter Type Description  
ID int Flow ID, you can get it from the flow’s URL when viewing it required

If request is successful, you will receive a response:

{
    "autoresponder": {
        "id": 281013, // flow identifier
        "name": "New autoresponder 2020-06-23", // flow name
        "status": 1,
        "created": "2020-06-23 11:06:25", 
        "changed": "2020-06-23 11:06:25" 
    },
    "flows": [
        {
            "id": 467510, // element identifier used to get statistics
            "main_id": 281013, // the id of the flow to which the element belongs (coincides with the value from the URL in the account when viewing)
            "af_type": "maintrigger", // element's type, see a description below
            "created": "2020-06-23 14:06:25", 
            "last_send": "2020-06-25 17:05:40", 
            "task": null
        },
        {
            "id": 467511, 
            "main_id": 281013,
            "af_type": "email",
            "created": "2020-06-23 14:06:25",
            "last_send": "2020-06-25 17:05:41",
            "task": {
                "id": 12018943, // campaign identifier 
                "address_book_id": 0, // identifier of the mailing list that triggers the flow; if a flow is triggered by an event, parameter will equal 0  
                "message_title": "Thank you for the order, 7136062", 
                "sender_mail_address": "smtp_test@example.com", 
                "sender_mail_name": "smtp_test", 
                "created": "2020-06-23 14:06:25" 
            }
        },
        {
            "id": 486649,
            "main_id": 281013,
            "af_type": "push",
            "created": "2020-07-09 15:40:12",
            "last_send": null,
            "task": {
                "id": 3016415, 
                "website_id": 14699, 
                "title": "push_title", 
                "body": "push_text", 
                "icon": "/files/push/7023639/tasks/3016415/icons/577416720c24.png", 
                "url_for_click": "https://google.com", 
                "created": "2020-07-09 15:40:12" 
            }
        },
        {
            "id": 486657,
            "main_id": 281013,
            "af_type": "sms",
            "created": "2020-07-09 15:48:22",
            "last_send": null,
            "task": {
                "id": 12110431, 
                "address_book_id": 0, // identifier of the mailing list that triggers the flow; if a flow is triggered by an event, parameter will equal 0 
                "sms_body": "sms_text", 
                "sms_sender_name": "Bakler", 
                "created": "2020-07-09 15:48:22" 
            }
        }
    ],
    "starts": 18, 
    "in_queue": 0, 
    "end_count": 18, 
    "send_messages": 16, 
    "conversions": 0
}

Element types:

Type Description
maintrigger "Start" element 
trigger "Condition" element
sms "SMS" element
push "Push" element
email "Email" element
action "Action" element
filter "Filter" element
goal "Goal" element

Flow statuses:

Code Description
0 New
1 Active
3 Pause

All parameters with dates that you receive via API are given according to the GMT +00:00 time zone

To get information about the flow for a chosen period, send a GET request to:

https://api.sendpulse.com/a360/autoresponders/{ID}/group-stat-filtered?filter=JSON&limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

Example of a filter parameter in JSON string before URL encoding:

{
   "type":"group",
   "expression":"and",
   "fields":{                         //Array with filters
      "send_date_from":{              //Filter by date, search for statistics starting from a specific date
         "name":"user_stat_date",
         "expression":"gte",
         "value":"2020-10-01"         
      },
      "send_date_to":{                //Filter by date, search for statistics ending with date
         "name":"user_stat_date",
         "expression":"lte",
         "value":"2020-10-31"         
      }
   }
}

Example of a filter parameter in JSON string after URL encoding:

%7B%22type%22%3A%22group%22%2C%22expression%22%3A%22and%22%2C%22fields%22%3A%7B%22send_date_from%22%3A%7B%22name%22%3A%22user_stat_date%22%2C%22expression%22%3A%22gte%22%2C%22value%22%3A%222020-10-01%22%7D%2C%22send_date_to%22%3A%7B%22name%22%3A%22user_stat_date%22%2C%22expression%22%3A%22lte%22%2C%22value%22%3A%222020-10-31%22%7D%7D%7D

Get statistics about each element

To get statistic about each element in the flow, send a GET request to:

https://api.sendpulse.com/a360/autoresponders/{ID}/total-stats

Request parameters:

Parameter Type Description  
ID int Flow ID, you can get it from the flow’s URL when viewing it required
flow_type string Element's type to limit the output of the results; can take maintrigger, email, push, sms, filter, action, goal, trigger values  optional
deleted string Used to get statistics on remote elements. Pass with the 1 value optional

Request for getting statistics on the “Email” element example:

https://api.sendpulse.com/a360/autoresponders/{ID}/total-stats?flow_type=type_name

Request for getting statistics on deleted elements example:

https://api.sendpulse.com/a360/autoresponders/{ID}/total-stats?deleted=1

If request is successful, you will receive a response:

{
    "autoresponder": {
        "id": 292692,
        "name": "New automation 2020-11-23",
        "status": 1,
        "created": "2020-11-23 08:42:47",
        "changed": "2020-11-23 08:42:47"
    },
    "flows": [
        {
            "type": "maintrigger",
            "flow_id": 641433,
            "executed": 3,
            "deleted": 0,
            "last_send": "2020-11-23 10:52:00"
        },
        {
            "type": "filter",
            "flow_id": 641434,
            "executed": 3,
            "positive": 1,
            "negative": 1,
            "stopped": 1,
            "last_send": "2020-11-23 10:52:00"
        },
        {
            "type": "goal",
            "flow_id": 641435,
            "executed": 1,
            "last_send": "2020-11-23 10:48:54"
        },
        {
            "type": "action",
            "flow_id": 641436,
            "executed": 1,
            "last_send": "2020-11-23 10:48:54"
        },
        {
            "type": "sms",
            "flow_id": 641437,
            "executed": 1,
            "sent": 0,
            "delivered": 0,
            "errors": 0,
            "last_send": null
        },
        {
            "type": "email",
            "flow_id": 641438,
            "sent": 3,
            "error": 0,
            "opened": 0,
            "clicked": 0,
            "marked_as_spam": 0,
            "unsubscribed": 0,
            "delivered": 3,
            "last_send": "2020-11-23 10:52:00"
        },
        {
            "type": "push",
            "flow_id": 641439,
            "sent": 0,
            "delivered": 0,
            "clicked": 0,
            "errors": 0,
            "last_send": null
        }
    ]
}

Get statistics about the Start element

To get overall statistics about the Start element of the flow (main-trigger), send a GET request to:

https://api.sendpulse.com/a360/stats/main-trigger/{ID}/group-stat

Request parameter:

Parameter Type Description  
ID int Element ID, you can get in the Get statistics about an automation flow method required

If request is successful, you will receive a response:

{
   "data":{
      "flow_id":{ID}, // identifier of the main element in the flow
      "executed":1, // how many times was executed
      "deleted":0 // how many subscribers was deleted from the flow
   }
}

To get overall statistics about the Start element of the flow (main-trigger) for a chosen period, send a GET request to:

https://api.sendpulse.com/a360/stats/main-trigger/{ID}/group-stat-filtered?filter=JSON&limit=10&offset=0

Request parameters:

Parameters Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

If request is successful, you will receive a response:

{
   "data": {
      "executed": "22", 
      "deleted": "1", 
      "last_send": "2020-10-13 07:28:28" 
   }
}

To get a list of the contacts who triggered the main-trigger, send a GET request to:

https://api.sendpulse.com/a360/stats/main-trigger/{ID}/addresses?limit=10&offset=0&sortDirection=desc&sortField=id

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional
sortDirection string Sort parameter, asc- from highest to lowest, desc - from lowest to highest optional
sortField string Sort parameter (a field to sort by) optional

If request is successful, you will receive a response:

{
  "data": [
    {
      "flow_id": {ID},
      "email": "subscriber's email",
      "phone": "subscriber's phone",
      "event_id": "{EVENT_ID}", // unique subscriber identifier
      "email_b64": "EMAIL IN BASE64 ENCODE",
      "execution_date": "time when subscriber got to the flow"
    }
  ],
  "total": 1 // how many times flow was started
}

Get statistics about the Email element

To get overall statistics about an Email element in the flow, send a GET request to::

https://api.sendpulse.com/a360/stats/email/{ID}/group-stat

Request parameters:

Parameter Type Description  
ID int Element ID, you can get in the Get statistics about an automation flow method required

If request is successful, you will receive a response:

{
    "data": {
        "flow_id": 467511, 
        "task": {
            "id": 12018943, 
            "address_book_id": 0, // identifier of the mailing list that triggers the flow; if a flow is triggered by an event, parameter will equal 0 
            "message_title": "Thank you for your order, 7136062", 
            "sender_mail_address": "smtp_test@example.com", 
            "sender_mail_name": "smtp_test", 
            "created": "2020-06-23 14:06:25" 
        },
        "sent": 16, 
        "delivered": 16, 
        "opened": 16, 
        "clicked": 0, 
        "errors": 0,  
        "unsubscribed": 0, 
        "marked_as_spam": 0, 
        "last_send": "2020-06-25 17:05:41" 
    }
}

To get overall statistics about an Email element in the flow for a chosen period of time, send a GET request to::

https://api.sendpulse.com/a360/stats/email/{ID}/group-stat-filtered?filter=JSON&limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

If request is successful, you will receive a response:

{
   "data":{
      "sent":"10",
      "errors":"0",
      "opened":"9",
      "clicked":"10",
      "marked_as_spam":"0",
      "unsubscribed":"0",
      "delivered":"0",
      "last_send":"2020-10-13 07:29:07"
   }
}

To get a list of the contacts to whom emails were sent, send a GET request to::

https://api.sendpulse.com/a360/stats/email/{ID}/addresses?&limit=10&offset=0&sortDirection=desc&sortField=id

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional
sortDirection string Sort parameter, asc- from highest to lowest, desc - from lowest to highest optional
sortField string Sort parameter (a field to sort by) optional

If request is successful, you will receive a response:

{
  "data": [
    {
      "id": 151880841, 
      "email": "EMAIL", 
      "email_b64": "BASE64 EMAIL", // email in base64_encode
      "event_id": "dcf8e501483f4582fdb76a1831a74477", // unique identifier of launching subscriber
      "delivered_status": 1, 
      "delivered_status_description": "sent", 
      "is_spam": 0, // 1 - if recipient complained that your email is spam, 0 - if not.
      "is_unsubscribe": 0, // 1 - if user unsubscribed, 0 - if not
      "phone": PHONE, 
      "sent_date": "2020-04-09 11:17:43", 
      "delivered_date": "2020-04-09 11:17:47", 
      "open_date": null, // null if user did not open email, value of date if email was opened
      "redirect_date": null, // null if user did not сlicked links in email, value of date if links were clicked
      "updated": "2020-04-09 11:17:47" 
    }
  ],
  "total": 1 
}

Email delivery statuses description:

Code Status Description
0 no_status Sent
1 delivered Sent
2 deliveryfailed Not delivered for other reasons
3 unsubscribe Unsubscribed
4 rejectedyus Rejected by service
5 brokenemail Wrong email address
6 tmpanavailable Temporarily unavailable
7 emailnotexist Email address does not exist
8 serverspam Server rejected email address because of spam
9 userspam User complained about spam
10 mboxfull Mailbox is full
11 domainnotexist Domain does not exist
12 no_status Sent
13 no_status Sent
14 badrecipient Bad recipient

Get statistics about the Push element 

To get overall statistics about a Push element, send a GET request to:

https://api.sendpulse.com/a360/stats/push/{ID}/group-stat

Request parameter:

Parameter Type Description  
ID int Element ID, you can get in the "Get Statistics about an Automation Flow" method required

If request is successful, you will receive a response:

{
  "data": {
    "flow_id": {ID}, 
    "sent": 9, 
    "delivered": 3, 
    "clicked": 6, 
    "errors": 0, 
    "last_send": "2020-02-28 12:18:23" 
  }
}

To get overall statistics about a Push element in the flow for a chosen period of time, send a GET request to:

https://api.sendpulse.com/a360/stats/push/{ID}/group-stat-filtered?filter=JSON&limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

If request is successful, you will receive a response:

{
   "data":{
      "sent":"10",
      "delivered":"0",
      "clicked":"9",
      "errors":"10",
      "last_send":"2020-10-13 07:29:07"
   }
}

To get a list of the subscribers to whom push notifications were sent, send a GET request to: 

https://api.sendpulse.com/a360/stats/push/{ID}/addresses?limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to displayed), minimum is 0 optional
sortDirection string Sort parameter, asc- from highest to lowest, desc - from lowest to highest optional
sortField string Sort parameter (a field to sort by) optional

If request is successful, you will receive a response:

{
  "data": [
    {
      "id": 424633, 
      "email": "EMAIL", 
      "email_b64": "BASE64 EMAIL", // email in base64_encode
      "event_id": "3cc000ab9cff4d41f9fc8d025be2b766", // unique identifier of launching subscriber
      "phone": null, 
      "status": 0, 
      "is_sent": 1, // 1 if was sent, 0 if not
      "is_delivered": 0, // 1 if was delivered, 0 if not
      "is_redirected": 0, // 1 if links were clicked, 0 if not
      "sent_date": "2020-02-28 12:18:23" 
    }
  ],
  "total": 1 
}

Statuses description:

Code Description
0 Sent
1 Unsubscribed

Get Statistics about the SMS Element  

To get overall statistics about an SMS element, send a GET request to:

https://api.sendpulse.com/a360/stats/sms/{ID}/group-stat

Request parameters:

Parameter Type Description  
ID int Element ID, you can get in the Get statistics about an automation flow method required

If request is successful, you will receive a response:

{
  "data": {
    "flow_id": {ID}, 
    "executed": 2, 
    "sent": 2, 
    "delivered": 2, 
    "opened": null, 
    "clicked": null, 
    "errors": 0, 
    "last_send": "2020-04-09 11:17:44" 
  }
}

To get overall statistics about SMS element in the flow for a chosen period of time, send a GET request to:

https://api.sendpulse.com/a360/stats/sms/{ID}/group-stat-filtered?filter=JSON&limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

To get a list of the subscribers to whom SMS were sent, send GET request to: 

https://api.sendpulse.com/a360/stats/sms/{ID}/addresses?limit=10&offset=0&sortDirection=desc&sortField=id

Request parameters:

Parameter Type Description  
ID int Element ID, you can get in the Get statistics about an automation flow method required
limit int Number of entries, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional
sortDirection string Sort parameter, asc- from bigger to smaller, desc - from smaller to bigger optional
sortField string Sort parameter (a field to sort by) optional

If request is successful, you will receive a response:

{
  "data": [
    {
      "id": 2214741, 
      "phone": PHONE, 
      "status": 2, 
      "event_id": "dcf8e501483f4582fdb76a1831a74477", // unique identifier of launching subscriber:
      "sender": "sendpulse", 
      "body": "BODY", 
      "price": { 
        "USD": "0.07900",
        "UAH": "1.93000",
        "EUR": "0.06400",
        "GBP": "0.05600",
        "BRL": "0.26000",
        "BYN": "0.16000",
        "KZT": "22.50000",
        "MXN": "1.49000",
        "CLP": "60.44000",
        "NGN": "30.35000"
      },
      "cur": "USD", // current user currency
      "email": "EMAIL", 
      "sent_date": "2020-04-09 11:17:44" 
    }
  ],
  "total": 1 
}

Statuses description:

Code Description
0 Sent
1 Not delivered
2 Delivered
3 Incorrect or non-existent phone number
4 Provider marked the message as spam
5 Duplicate SMS. You sent an identical message to the same phone number in less than 5 minutes after the previous message was created.
6 Message delivery timed out (up to 72 hours of waiting for delivery reports)
7 Waiting for delivery reports
8 Sending from an unregistered sender name. You can register your sender name or enable sending via an international channel in the service settings.
9 The number has been blacklisted.
10 The message has stop words. Read more: Anti-Spam Policy.
11 The message has a link. You cannot pass a link in a message via a variable value. To send a message with a link, add it directly to your text.

Get statistics about the Messenger element  

To get overall statistics about an Messenger element, send a GET request to:

https://api.sendpulse.com/a360/stats/messenger/{ID}/group-stat

Request parameter:

Parameter Type Description  
ID int Element ID, you can get in the Get statistics about an automation flow method required

If request is successful, you will receive a response:

{
   "data": {
      "flow_id": 234728,
      "executed": 7, 
      "sent": 7, 
      "last_send": "2021-02-02 14:41:51"
   }
}

To get overall statistics about Messenger element in the flow for a chosen period of time, send a GET request to:

https://api.sendpulse.com/a360/stats/messenger/{ID}/group-stat-filtered?filter=JSON&limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

If request is successful, you will receive a response:

{
   "data": {
      "sent": "8",
      "executed": "8",
      "last_send": "2021-02-02 14:41:51"
   }
}

Get statistics about the Filter element  

To get overall statistics about a Filter element, send a GET request to: 

https://api.sendpulse.com/a360/stats/filter/{ID}/group-stat

Request parameter:

Parameter Type Description  
ID int Element ID, you can get in the Get statistics about an automation flow method required

If request is successful, you will receive a response:

{
  "data": {
    "flow_id": {ID}, 
    "executed": 2, 
    "last_send": "2020-04-09 11:17:44" 
  }
}

To get overall statistics about a Filter element for a chosen period, send a GET request to:

https://api.sendpulse.com/a360/stats/filter/{ID}/group-stat-filtered?filter=JSON&limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

If request is successful, you will receive a response:

{
  "data": {
    "flow_id": {ID}, 
    "executed": 2, 
    "last_send": "2020-04-09 11:17:44" 
  }
}

Please note that the parameters "positive," "negative," and "stopped" are new parameters created on 11/30/2020. Statistics on them will be collected starting on 11/30/2020.

Statistics on the "executed" and "last_send" parameters are given for the entire time.

To get a list of the contacts for whom the Filter element was executed, send a GET request to:

https://api.sendpulse.com/a360/stats/flow-operator/{ID}/addresses?limit=10&offset=0&sortDirection=desc&sortField=execution_date

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional
sortDirection string Sort parameter, asc- from highest to lowest, desc - from lowest to highest optional
sortField string Sort parameter (a field to sort by) optional

If request is successful, you will receive a response:

{
  "data": [
    {
      "email": "EMAIL", 
      "email_b64": "BASE64 EMAIL", 
      "phone": PHONE, 
      "event_id": "dcf8e501483f4582fdb76a1831a74477", // unique identifier of launching subscriber:
      "execution_date": "2020-04-09 11:17:44" 
    }
  ],
  "total": 1 
}

Get Statistics about the Condition Element   

To get overall statistics about a Condition element, send a GET request to:

https://api.sendpulse.com/a360/stats/trigger/{ID}/group-stat

Request parameter:

Parameter Type Description  
ID int Element ID, you can get in the Get statistics about an automation flow method required

If request is successful, you will receive a response:

{
  "data": {
    "flow_id": {ID}, 
    "executed": 2, 
    "last_send": "2020-04-09 11:17:44" 
  }
}

To get overall statistics about a Сondition element for a chosen period, send a GET request to:

https://api.sendpulse.com/a360/stats/email/{ID}/group-stat-filtered?filter=JSON&limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

If request is successful, you will receive a response:

{
  "data": {
    "flow_id": {ID}, 
    "executed": 2, 
    "last_send": "2020-04-09 11:17:44" 
  }
}

Please note that the parameters "positive," "negative," and "stopped" are new parameters created on 11/30/2020. Statistics on them will be collected starting on 11/30/2020.

Statistics on the "executed" and "last_send" parameters are given for the entire time.

To get a list of the contacts, for whom Condition element was executed, send GET request to: 

https://api.sendpulse.com/a360/stats/flow-operator/{ID}/addresses?limit=10&offset=0&sortDirection=desc&sortField=execution_date

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional
sortDirection string Sort parameter, asc- from highest to lowest, desc - from lowest to highest optional
sortField string Sort parameter (a field to sort by) optional

If request is successful, you will receive a response:

{
  "data": [
    {
      "email": "EMAIL", 
      "email_b64": "BASE64 EMAIL", 
      "phone": PHONE, 
      "event_id": "dcf8e501483f4582fdb76a1831a74477", // unique identifier of launching subscriber:
      "execution_date": "2020-04-09 11:17:44" 
    }
  ],
  "total": 1 
}

Get statistics about the Goal element   

To get overall statistics about a Goal element, send a GET request to: 

https://api.sendpulse.com/a360/stats/goal/{ID}/group-stat

Request parameter:

Parameter Type Description  
ID int Element ID, you can get in the Get statistics about an automation flow method required

If request is successful, you will receive a response:

{
  "data": {
    "flow_id": {ID}, 
    "executed": 2, 
    "sent": 2, 
    "delivered": 2, 
    "opened": null, 
    "clicked": null, 
    "errors": 0, 
    "last_send": "2020-04-09 11:17:44" 
  }
}

To get overall statistics about a Goal element for a chosen period, send a GET request to:

https://api.sendpulse.com/a360/stats/goal/{ID}/group-stat-filtered?filter=JSON&limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

If request is successful, you will receive a response:

{
   "data": {
      "executed": "4", 
      "last_send": "2020-10-06 13:38:56" 
   }
}

To get a list of the contacts for whom the Goal element was executed, send a GET request to:  

https://api.sendpulse.com/a360/stats/flow-operator/{ID}/addresses?limit=10&offset=0&sortDirection=desc&sortField=execution_date

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
limit int Number of entries, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional
sortDirection string Sort parameter, asc- from highest to lowest, desc - from lowest to highest optional
sortField string Sort parameter (a field to sort by) optional

If request is successful, you will receive a response:

{
  "data": [
    {
      "email": "EMAIL", 
      "email_b64": "BASE64 EMAIL", 
      "phone": PHONE, 
      "event_id": "dcf8e501483f4582fdb76a1831a74477", // unique identifier of launching subscriber:
      "execution_date": "2020-04-09 11:17:44" 
    }
  ],
  "total": 1 
}

Get Statistics about the Action Element  

To get overall statistics about an Action element, send a GET request to: 

https://api.sendpulse.com/a360/stats/action/{ID}/group-stat

Request parameter:

Parameter Type Description  
ID int Element ID, you can get in the Get statistics about an automation flow method required

If request is successful, you will receive a response:

{
  "data": {
    "flow_id": {ID}, 
    "executed": 2, 
    "last_send": "2020-04-09 11:17:44" 
  }
}

To get overall statistics about an Action element for a chosen period, send a GET request to:

https://api.sendpulse.com/a360/stats/action/{ID}/group-stat-filtered?filter=JSON&limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

If request is successful, you will receive a response:

{
    "data": {
        "executed": "5", 
        "last_send": "2020-10-18 12:36:38" 
    }
}

To get a list of the contacts, for whom the Action element was executed, send a GET request to: 

https://api.sendpulse.com/a360/stats/flow-operator/{ID}/addresses?limit=10&offset=0&sortDirection=desc&sortField=execution_date

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional
sortDirection string Sort parameter, asc- from highest to lowest, desc - from lowest to highest optional
sortField string Sort parameter (a field to sort by) optional

If request is successful, you will receive a response:

{
  "data": [
    {
      "email": "EMAIL", 
      "email_b64": "BASE64 EMAIL", 
      "phone": PHONE, 
      "event_id": "dcf8e501483f4582fdb76a1831a74477", 
      "execution_date": "2020-04-09 11:17:44" 
    }
  ],
  "total": 1 
}

Get the flow conversions list

There are two types of conversion:

  • stopping the flow with an event and enabling this option in the Start element (main-trigger) options;
  • reaching to the Goal element

To get information about the amount of executed conversions and amount of conversions of each type in the flow, send GET request to:

https://api.sendpulse.com/a360/autoresponders/{id}/conversions

Request parameter:

Parameter Type Description  
ID int Flow ID, you can get it from the flow’s URL when viewing it required

If request is successful, you will receive a response:

{
    "data": {
        "total_conversions": 5, 
        "maintrigger_conversions": 1, 
        "goal_conversions": 4, 
        "maintrigger": { 
            "id": 233500,
            "main_id": 127820,
            "af_type": "maintrigger",
            "created": "2020-04-28 18:00:09",
            "last_send": "2020-04-28 18:13:44",
            "conversions": 1
        },
        "goals": [  
            {
                "id": 233502,
                "name": "left",
                "main_id": 127820,
                "af_type": "goal",
                "created": "2020-04-28 18:00:09",
                "conversions": 3
            },
            {
                "id": 233503,
                "name": "right",
                "main_id": 127820,
                "af_type": "goal",
                "created": "2020-04-28 18:00:09",
                "conversions": 1
            }
        ]
    }
}

Note: total_conversions must be equal to the sum of two of the following parameters:  maintrigger_conversions and goal_conversions; also, be equal to the sum of parameters maintrigger_conversions and goals.

To get information about the amount of executed conversions and amount of conversions of each type in the flow, send GET request to:

https://api.sendpulse.com/a360/autoresponders/{id}/conversions/group-stat-filtered?filter=json&limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

If request is successful, you will receive a response:

{
    "data": {
        "total_conversions": 5, 
        "maintrigger_conversions": 1, 
        "goal_conversions": 4, 
        "maintrigger": { 
            "id": 233500,
            "main_id": 127820,
            "af_type": "maintrigger",
            "created": "2020-04-28 18:00:09",
            "last_send": "2020-04-28 18:13:44",
            "conversions": 1
        },
        "goals": [  
            {
                "id": 233502,
                "name": "left",
                "main_id": 127820,
                "af_type": "goal",
                "created": "2020-04-28 18:00:09",
                "conversions": 3
            },
            {
                "id": 233503,
                "name": "right",
                "main_id": 127820,
                "af_type": "goal",
                "created": "2020-04-28 18:00:09",
                "conversions": 1
            }
        ]
    }
}

Get a list of the contacts that converted

To get a list of the subscribers who converted via either method, send a GET request to:

https://api.sendpulse.com/a360/autoresponders/{ID}/conversions/list/all

To get a list of conversions completed using the "stop flow by event" option, send a GET request to: 

https://api.sendpulse.com/a360/autoresponders/{ID}/conversions/list/maintrigger

To get a list of conversions completed using the Goal element, send a GET request to:  

https://api.sendpulse.com/a360/autoresponders/{ID}/conversions/list/goal

To get a list of conversions completed using the specific Goal element, send a GET request to:  

https://api.sendpulse.com/a360/autoresponders/{ID}/conversions/list/goal/{{goalID}}

Request parameters:

Parameter Type Description  
ID int Flow ID, you can get it from the flow’s URL when viewing it required
goalID int Element ID, you can get in the Get statistics about an automation flow method required

If request is successful, you will receive a response:

{
    "total": 5,
    "items": [
        {
            "id": 40941,
            "conversion_type": "maintrigger",
            "flow_id": 233500,
            "email": "m.jim@sendpulse.com",
            "phone": null,
            "conversion_date": "2020-04-28 18:13:53",
            "start_date": "2020-04-28 18:13:44"
        },
        {
            "id": 40940,
            "conversion_type": "goal",
            "flow_id": 233502,
            "email": "m.jim@sendpulse.com",
            "phone": null,
            "conversion_date": "2020-04-28 18:03:44",
            "start_date": "2020-04-28 18:03:42"
        },
        {
            "id": 40939,
            "conversion_type": "goal",
            "flow_id": 233502,
            "email": "m.jim@sendpulse.com",
            "phone": null,
            "conversion_date": "2020-04-28 18:02:52",
            "start_date": "2020-04-28 18:02:50"
        },
        {
            "id": 40938,
            "conversion_type": "goal",
            "flow_id": 233503,
            "email": "m.jim@sendpulse.com",
            "phone": null,
            "conversion_date": "2020-04-28 18:02:43",
            "start_date": "2020-04-28 18:02:40"
        },
        {
            "id": 40937,
            "conversion_type": "goal",
            "flow_id": 233502,
            "email": "m.jim@sendpulse.com",
            "phone": null,
            "conversion_date": "2020-04-28 18:01:59",
            "start_date": "2020-04-28 18:01:56"
        }
    ]
}

To get a list of the subscribers who converted via either method for a chosen period, send a GET request to:

https://api.sendpulse.com/a360/autoresponders/{ID}/conversions/list/all/group-stat-filtered?filter=JSON&limit=10&offset=0

To get a list of conversions completed using the"stop flow by event" option for a chosen period, send a GET request to: 

https://api.sendpulse.com/a360/autoresponders/{ID}/conversions/list/maintrigger/group-stat-filtered?filter=JSON&limit=10&offset=0 

To get a list of conversions completed using the Goal element for a chosen period, send a GET request to:  

https://api.sendpulse.com/a360/autoresponders/{ID}/conversions/list/goals/group-stat-filtered?filter=JSON&limit=10&offset=0 

To get a list of conversions completed using the specific Goal element for a chosen period, send a GET request to:  

https://api.sendpulse.com/a360/autoresponders/{ID}/conversions/list/goal/{goalId}/group-stat-filtered?filter=JSON&limit=10&offset=0

Request parameters:

Parameter Type Description  
ID int Element ID, you can get with the Get statistics about an automation flow method required
goalID int Goal ID, you can get in the Get statistics about an automation flow method required
filter string JSON encoded string (URL encode) with date parameters; you can add one of the send_date_from and send_date_to filter parameters or both required
limit int Number of records, maximum is 100 optional
offset int Offset (first record to be displayed), minimum is 0 optional

Delete event logs

To remove an entry about a received event from the event logs, send a POST request to the link:

https://api.sendpulse.com/a360/events/delete-log

Request parameter:

Parameter Type Description  
event_id string/int Event ID. To get the event ID, go to Event Manager, click on the event, and copy the value from the URL in the address bar: events/your_id. optional*
email string User email in the event optional*
phone string User phone in the event optional*

*To identify the event log that needs to be deleted, you can select one of the options or all three.

If you send an email or phone parameter in a request without specifying an event_id parameter, then all records with these parameters will be deleted from the logs.

If you send only an event_id parameter in the request, then all logs for the specified event will be deleted.

If your request is successful, you will receive a response:

{
    "result": true,
    "message": "Ok"
}

Request errors

In case of validation errors, check the formatting of your API request, if it is wrong you will get a 400 HTTP code with information about this error. 

Example of errors structure:

{
    "type": "validation_error",
    "messages": {
        "limit": [
            "The limit field is required."
        ],
        "offset": [
            "The offset field is required."
        ]
    }
}

If there is not any data returned for this method, you will get a 404 error code.