« Back to Documentation Overviewadd_autoresponder
Section: Messages
Version: 1.5.0
Add a time based autoresponder to the campaign at the specific day of cycle.
- campaign (mandatory) – CAMPAIGN_ID obtained from get_campaigns. Follow-up will be saved in this campaign.
- from_field (optional) – FROM_FIELD_ID obtained from get_account_from_fields. It represents From header (name and email) in message and will be taken from campaign if not given.
- reply_to_field (optional) – FROM_FIELD_ID obtained from get_account_from_fields. It represents Reply-To header (email) in message and will not be present if not given.
- subject (mandatory) – Subject value. All merge-words should be written as GetResponse Dynamic Content syntax. Maximum length is 512 characters.
- name (optional) – Name value to help distinguish messages. Contacts won't see it.
- contents (mandatory) – Allowed keys are plain and html, at least one is mandatory. All merge-words should be written as GetResponse Dynamic Content syntax. Maximum length is 524288 characters each.
- attachments (optional) - Files that will be attached to message. Field data must be encoded using Base64 algorithm. Filed name represents name of file. Field mime represents media type of file.
- flags (optional) – Enables extra functionality for a message, see message_flags for available values.
- day_of_cycle – Number of days between the day when a contact subscribed to a campaign and the day when the autoresponder is sent. Must be in the range of 0..10000.
Parameters
|
---|
string | API_KEY |
object | string | campaign | CAMPAIGN_ID | string | from_field | FROM_FIELD_ID | string | reply_to_field | FROM_FIELD_ID | string | subject | My autoresponder | string | name | Say hi | object | contents | string | plain | Hello there | string | html | <h1>Hello</h1>there |
| array | attachments | object | string | data | WmHFvMOzxYLEhyBnxJnFm2zEhSBqYcW6xYQu== | string | name | order.txt | string | mime | application/txt |
| object | string | data | QWxhLGtvdA== | string | name | people.csv | string | mime | application/csv |
|
| array | flags | string | clicktrack | string | openrate |
| integer | day_of_cycle | 32 |
|
Return Value
|
---|
string | MESSAGE_ID | abc123 |
integer | added | 1 |
Example Request JSON
[
"API_KEY",
{
"campaign": "CAMPAIGN_ID",
"from_field": "FROM_FIELD_ID",
"reply_to_field": "FROM_FIELD_ID",
"subject": "My autoresponder",
"name": "Say hi",
"contents": {
"plain": "Hello there",
"html": "<h1>Hello<\/h1>there"
},
"attachments": [
{
"data": "WmHFvMOzxYLEhyBnxJnFm2zEhSBqYcW6xYQu==",
"name": "order.txt",
"mime": "application\/txt"
},
{
"data": "QWxhLGtvdA==",
"name": "people.csv",
"mime": "application\/csv"
}
],
"flags": [
"clicktrack",
"openrate"
],
"day_of_cycle": 32
}
]
Example Response JSON
{
"MESSAGE_ID": "abc123",
"added": 1
}
Example Error Response JSON
{
"code": -1,
"message": "Dynamic content syntax error"
}
Method-specific Errors
|
---|
Missing campaign |
Missing from field |
Missing contents |
Dynamic content syntax error |
API-wide Errors
|
---|
API key verification failed
| API key verification failed |
API client IP not allowed
| API client IP not allowed |
Invalid params
| Attribute params must be reference to hash |