Mailing
List of operations for the resource
Name | URL | Description |
| Returns a list of all mailing templates for the logged-in user. Templates are sorted by date added in ascending order. | |
| Sending order to a selected group of respondents | |
| Operation to define a mailing. To define a mailing you must add respondents to a |
Description of response parameters
Name/path | Description | Possible values |
| Survey ID | |
| Template title | |
| Mailing subject | |
| Message content in the mailing | |
| Template creation date | |
| ID of the created mailing in the system | |
| number of respondents who will receive the invitation | |
| possibility to disable the footer with sender information. By default, the footer is disabled |
List of mailing templates
URL
(GET) https://app.customerhero.com/api/v2/mailing/templatesExample response
{
["total" বিল্ডিং] => string(1) "2"
["list"] => array(2) {
[0] => array(5) {
["id"] => int(7)
["name"] => string(7) "Test"
["subject"] => string(35) "Invitation to complete the survey"
["content"] => string(251) "<p>Hello,<br /> <br /> I invite you to complete the survey about ...<br /> Completing the survey should take about ... minutes<br /> <br /> To complete the survey, click the link:<br /> [LINK]<br /> <br /> <br /> <br /> Thank you and best regards</p>"
["date_created"] => string(19) "2015-04-24 13:36:00"
}
[1] => array(5) {
["id"] => int(8)
["name"] => string(8) "Test2"
["subject"] => string(35) "Invitation to complete the survey"
<p>test 2<br /> <br /> I invite you to complete the survey about ...<br /> Completing the survey should take about ... minutes<br /> <br /> To complete the survey, click the link:<br /> [LINK]<br /> <br /> <br /> <br /> Thank you and best regards</p>"
["date_created"] => string(19) "2015-04-24 13:36:19"
}
}
}Returned errors
None
Creating a mailing
URL
(POST) https://app.customerhero.co/api/v2/mailing/create
POST parameters
Name/path | Description | Possible values |
| Survey ID | |
| Invitation template ID | |
| mailing sending date | |
| mailing sending mode |
|
| list of respondents to whom the survey must be sent; mandatory with the | |
| possibility to disable the footer with sender information. By default, the footer is disabled | 1 - enabled 0 - disabled |
Example response
[
{
["id_mailing"] => string(3) "585",
["receivers"] => int(0)
}
]
Returned errors
• 400 Bad request – Invalid date format, invalid status or
invalid security level
• 401 Unauthorized – No access to the template with the given ID
• 403 Forbidden – Exceeded limits of sending invitations on the account
• 404 Not found – Survey with the given ID was not found on the logged-in
user's account
• 500 Internal Server Error – Internal server error
Sending invitations using batch_id
POST
(POST) customerhero.com/api/v2/mailing/batchParameters (POST)
Name | Description |
| Batch ID |
| ID of the selected invitation template for sending |
| bool value determining whether a reminder should be sent to respondents who do not complete the survey. Optional parameter. Default value: false. |
| ID of the selected invitation template for sending the reminder. Parameter required if the with_reminder parameter is set to true. How to obtain template_id? |
| number of hours after sending when a reminder should be sent to respondents who have not completed the survey. Parameter required if the with_reminder parameter is set to true. |
Returned json values:
Name | Description |
| ID of the created mailing |