List of operations for resource
Name | URL | Description |
| Returns a list of all mailing templates for a logged in user. Templates sorted by date of adding (ascending). | |
| Creates mailing with invitations to the survey | |
| Operation for defining mailing. To define a mailing, you have to add respondents to the patch |
Description of parameter responses
Name/path | Description | Possible values |
| Survey id |
|
| Template title |
|
| Mailing subject title |
|
| Mailing content |
|
| Date of template creation |
|
| ID of the mailing created in the system |
|
| Number of respondents who will receive an invitation |
|
| possibility to enable footer with information about the sender. The footer is disabled by default | 1 - footer turned on 0 - footer turned off |
List of mailing templates
URL
(GET) https://www.startquestion.com/api/v2/mailing/templates
Sample response
{
["total"] => string(1) "2"
["list"] => array(2) {
[0] => array(5) {
["id"] => int(7)
["name"] => string(7) "Testowa"
["subject"] => string(35) "Zaproszenie do wypełnienia ankiety"
["content"] => string(251) "<p>Witaj,<br /> <br /> Zapraszam do wypełnienia ankiety na temat ...<br /> Wypełnienie ankiety powinno zająć około ... minut<br /> <br /> Aby wypełnić ankietę kliknij na link:<br /> [LINK]<br /> <br /> <br /> <br /> Dziękuję i pozdrawiam</p>"
["date_created"] => string(19) "2015-04-24 13:36:00"
}
[1] => array(5) {
["id"] => int(8)
["name"] => string(8) "Testowa2"
["subject"] => string(35) "Zaproszenie do wypełnienia ankiety"
<p>testowa 2<br /> <br /> Zapraszam do wypełnienia ankiety na temat ...<br /> Wypełnienie ankiety powinno zająć około ... minut<br /> <br /> Aby wypełnić ankietę kliknij na link:<br /> [LINK]<br /> <br /> <br /> <br /> Dziękuję i pozdrawiam</p>"
["date_created"] => string(19) "2015-04-24 13:36:19"
}
}
}
Returned errors
None
Creating mailing
URL
(POST) https://www.startquestion.com/api/v2/mailing/create
POST parameters
Nazwa/ścieżka | Opis | Możliwe wartości |
| survey ID |
|
| message template ID |
|
| date of mailing dispatch (Y-m-d H:M:s) |
|
| mailing dispatch mode |
|
| list of respondent IDs, separated with comma; required when |
|
| possibility of disabling the footer with information about the sender. The footer is disabled by default |
|
Exemplary response
[
{
["id_mailing"] => string(3) "585",
["receivers"] => int(0)
}
]
Returned errors
• 400 Bad request – Incorrect date format/incorrect status or incorrect security level in survey
• 401 Unauthorized – Access denied to selected template ID
• 403 Forbidden – Limit of the sent messages are used for given account
• 404 Not found – Survey with given ID was not found for given account
• 500 Internal Server Error
Mailing invitations using batch_id
POST
(POST) startquestion.com/api/v2/mailing/batch
Parameters (POST)
Name | Description |
| Batch ID |
| ID of the selected template for mailing |
| bool value deciding whether a reminder is to be sent to respondents who did not fill out the survey. Optional parameter Default value: false. |
| ID of the selected template for sending reminders. This parameter is required if parametr with_reminder was set to true. How to obtain template_id? |
| number of hours from mailing after which a reminder is to be sent to respondents who did not fill out the survey. This parameter is required if parameter with_reminder was set to true. |
Returned json values:
Name | Description |
| ID of the created mailing |