Allows you to fetch statistics of newsletters based on list of campaign ID's or newsletter ID's (you can pass them in query parameter - see description below). You should also remember that all statistics periods are returned in standard UTC period type objects. (See ISO 8601 standard)
Returns status code
200
Request url
/newsletters/statistics?query[newsletterId]=1,2&page=1&perPage=100
Request params
Field name | Field type | Field description |
---|
query (required) | hash | Used to search only resources that meet criteria. You can specify multiple parameters, then it uses AND logic. Note: createdOn refers to statistics chunk creation date, not the newsletter's one. You can use createdOn query parameter to filter activity in given period of time.Key | Possible values if fixed |
---|
groupBy | total,hour,day,month | newsletterId | List of newsletter resource ids. (string separated with ",") | campaignId | List of campaign resource ids. (string separated with ",") | createdOn[from] | Date YYYY-mm-dd | createdOn[to] | Date YYYY-mm-dd |
|
fields | string | List of fields that should be returned. Id is always returned. Fields should be separated by comma |
page | integer | Specify which page of results return. |
perPage | integer | Specify how many results per page should be returned |
Example Response
[
{
"timeInterval": "2014-09-20T00:00:00+0000/P2M18DT10H0M0S",
"sent": "2",
"totalOpened": "4",
"uniqueOpened": "6",
"totalClicked": "2",
"uniqueClicked": "0",
"goals": "0",
"uniqueGoals": "0",
"forwarded": "0",
"unsubsribed": "0",
"bounced": "0",
"complaints": "0"
}
]
This method creates and queues sending a new newsletter.
NOTE: This method has limit of 256 calls per day.
Returns status code
201
Example Request Body
{
"name": "name wiadomosci 1",
"type": "broadcast",
"subject": "test1",
"flags": [
"openrate"
],
"editor": "custom",
"campaign": {
"campaignId": "V"
},
"sendOn": null,
"fromField": {
"fromFieldId": "V"
},
"replyTo": null,
"content": {
"html": "Test content",
"plain": null
},
"attachments": [
{
"fileName": "some_file.jpeg",
"content": "sdfadsfetsdjfdskafdsaf==",
"mimeType": "image/jpeg"
}
],
"sendSettings": {
"timeTravel": "false",
"perfectTiming": "true",
"selectedCampaigns": [
"V"
],
"selectedSegments": [],
"selectedSuppressions": [],
"excludedCampaigns": [],
"excludedSegments": [],
"selectedContacts": [
"V"
]
}
}
Body params
Field name | Field type | Field description |
---|
name | string | Name of the newsletter |
type | string | Type of a newsletter. If set to 'draft' then standard draft will be created. Default to 'broadcast' |
editor | string | Describes how content was created. Possible values: 'getresponse' if content was created only in Getresponse Web editor, 'plain' if content is only text and 'custom' if any changes to the html was made outside Getresponse web editor |
subject (required) | string | Subject of the newsletter |
fromField (required) | object | Email from fieldField name | Field type | Field description |
---|
fromFieldId (required) | string | Id of fromField which will be used as email from field |
|
replyTo | object | Email reply-to fieldField name | Field type | Field description |
---|
fromFieldId (required) | string | Id of fromField which will be used as email reply-to field |
|
campaign (required) | object | Newsletter must belong to campaignField name | Field type | Field description |
---|
campaignId (required) | string | Id of campaign which will newsletter belong to |
|
sendOn | string | Scheduled send date time in ISO 8601 format |
content (required) | object | Message contentsField name | Field type | Field description |
---|
html | string | HTML content of message | plain | string | Plain text content equivalent of message |
|
flags | set | Message flags. Allowed values: openrate, clicktrack and google_analytics |
attachments | collection | Newsletter attachments, sum of attachments size cannot excess 400kbField name | Field type | Field description |
---|
fileName (required) | string | File name | content (required) | string | Base64 encoded file content | mimeType (required) | string | File mime type |
|
sendSettings (required) | object | How message will be delivered to subscriber. You can specify multiple parameters, then it uses AND logic.Field name | Field type | Field description |
---|
selectedCampaigns | set | List of selected campaigns | selectedSegments | set | List of selected segments | selectedSuppressions | set | List of selected suppressions | excludedCampaigns | set | List of excluded campaigns | excludedSegments | set | List of excluded segments | selectedContacts | set | List of selected contacts | timeTravel | string | Use time travel functionality - message will be sent according to each recipient time zone. Possible values: true, false | perfectTiming | string | Use perfect timing functionality. Possible values: true, false |
|
Example Response
{
"newsletterId": "M4",
"href": "http://api.getresponse.com/v3/newsletters/M4",
"campaign": {
"campaignId": "V",
"href": "http://api.getresponse.com/v3/campaigns/V",
"name": "TestCampaign2"
},
"fromField": {
"fromFieldId": "V"
},
"name": "Test email",
"type": "broadcast",
"status": "active",
"subject": "Test email",
"content": {
"html": false,
"plain": "My first email integration test"
},
"flags": [],
"sendOn": "2014-12-08T11:28:08+0000",
"editor": "api",
"createdOn": "2014-12-08T11:28:08+0000",
"sendSettings": {
"timeTravel": "false",
"perfectTiming": "true",
"selectedCampaigns": [
"V"
],
"selectedSegments": [],
"selectedSuppresions": [],
"excludedCampaigns": [],
"excludedSegments": [],
"selectedContacts": [
"V"
]
},
"attachments": [
{
"fileName": "some_file.jpeg",
"content": "sdfadsfetsdjfdskafdsaf==",
"mimeType": "image/jpeg"
}
]
}
Possible Errors
Allows you to easily fetch statistics for a single newsletter. You can group data hourly, daily, monthly and as a total sum. You should also remember that all statistics periods are given in standard UTC period type objects. (See ISO 8601 standard)
Returns status code
200
Request url
/newsletters/V/statistics?query[groupBy]=day&page=1&perPage=100
Request params
Field name | Field type | Field description |
---|
query (required) | hash | Used to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.Key | Possible values if fixed |
---|
groupBy | total, hour, day, month |
|
fields | string | List of fields that should be returned. Id is always returned. Fields should be separated by comma |
page | integer | Specify which page of results return. |
perPage | integer | Specify how many results per page should be returned |
Example Response
[
{
"timeInterval": "2014-09-20T00:00:00+0000/P2M18DT10H0M0S",
"sent": "2",
"totalOpened": "4",
"uniqueOpened": "6",
"totalClicked": "2",
"uniqueClicked": "0",
"goals": "0",
"uniqueGoals": "0",
"forwarded": "0",
"unsubsribed": "0",
"bounced": "0",
"complaints": "0"
}
]
Returns status code
204
Possible Errors
sendMetrics > status can be one of: "scheduled", "in_progress" or "finished"
Returns status code
200
Request url
/newsletters/V?fields=name,type
Request params
Field name | Field type | Field description |
---|
fields | string | List of fields that should be returned. Id is always returned. Fields should be separated by comma |
Example Response
{
"newsletterId": "V",
"name": "message name 1",
"type": "broadcast",
"subject": "test1",
"flags": [
"openrate"
],
"editor": "custom",
"href": "http://api.getresponse.com/v3/newsletters/V",
"campaign": {
"campaignId": "V",
"href": "http://api.getresponse.com/v3/campaigns/V",
"name": "my_campaign"
},
"status": "enabled",
"sendOn": "2014-12-15T08:34:34+0000",
"createdOn": "2014-12-15T08:34:34+0000",
"fromField": {
"fromFieldId": "V",
"href": "http://api.getresponse.com/v3/from-fields/V"
},
"replyTo": null,
"clickTracks": [],
"content": {
"html": "Test content",
"plain": null
},
"sendSettings": {
"timeTravel": "false",
"perfectTiming": "true",
"selectedCampaigns": [
"V"
],
"selectedSegments": [],
"selectedSuppresions": [],
"excludedCampaigns": [],
"excludedSegments": [],
"selectedContacts": [
"V"
]
},
"attachments": [
{
"fileName": "some_file.jpeg",
"content": "sdfadsfetsdjfdskafdsaf==",
"mimeType": "image/jpeg"
}
],
"sendMetrics": {
"status": "finished",
"sent": "3",
"total": "3"
}
}
Possible Errors
sendMetrics > status can be one of: "scheduled", "in_progress" or "finished"
Returns status code
200
Request url
/newsletters?query[subject]=test&fields=name,status&sort[createdOn]=asc&page=1&perPage=100
Request params
Field name | Field type | Field description |
---|
query | hash | Used to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.Key | Possible values if fixed |
---|
subject | * | name | * | status | enabled, disabled | createdOn[from] | * | createdOn[to] | * | type | draft, broadcast, splittest, automation | campaignId | Id of a campaign - you can specify multiple campaign separated by comma |
|
fields | string | List of fields that should be returned. Id is always returned. Fields should be separated by comma |
sort | hash | Enable sorting using specified field (set as a key) and order (set as a value).Key | Possible values if fixed |
---|
createdOn | asc,desc |
|
perPage | int | Number results on page |
page | int | Page number |
Example Response
[
{
"newsletterId": "TX44E",
"type": "broadcast",
"subject": "Sample newsletter",
"name": "fdsgs",
"flags": "clicktrack,openrate",
"editor": "getresponse",
"href": "https://api.getresponse.com/v3/newsletters/TX44E",
"campaign": {
"campaignId": "o5lx",
"href": "https://api.getresponse.com/v3/campaigns/o5lx",
"name": "campaign_name"
},
"status": "enabled",
"sendOn": "2014-07-10T07:33:59+0000",
"createdOn": "2014-07-10T07:33:59+0000",
"sendSettings": {
"timeTravel": "false",
"perfectTiming": "false"
},
"sendMetrics": {
"status": "finished",
"sent": "3",
"total": "3"
}
}
]
Returns status code
201
Example Request Body
{
"messageId": "UOv",
"sendOn": "2017-12-12T08:00:00+0000",
"sendSettings": {
"selectedCampaigns": [
"V"
]
}
}
Body params
Field name | Field type | Field description |
---|
messageId (required) | string | Message identifier (equals to newsletterId) |
sendOn | string | Scheduled send date time in ISO 8601 format |
sendSettings (required) | object | How message will be delivered to subscriberField name | Field type | Field description |
---|
selectedCampaigns | set | List of selected campaigns | selectedSegments | set | List of selected segments | selectedSuppressions | set | List of suppressions | excludedCampaigns | set | List of excluded campaigns | excludedSegments | set | List of excluded segments | selectedContacts | set | List of selected contacts | timeTravel | string | Use time travel functionality - message will be sent according to each recipient time zone. Possible values: true, false | perfectTiming | string | Use perfect timing functionality. Possible values: true, false |
|
Example Response
{
"newsletterId": "UOv",
"name": "newsletter name 1",
"type": "broadcast",
"subject": "test1",
"flags": [
"openrate"
],
"editor": "custom",
"href": "http://api.getresponse.com/v3/newsletters/UOv",
"campaign": {
"campaignId": "V",
"href": "http://api.getresponse.com/v3/campaigns/V",
"name": "my_campaign"
},
"status": "enabled",
"sendOn": "2017-12-12T08:00:00+0000",
"createdOn": "2014-12-15T08:34:34+0000",
"fromField": {
"fromFieldId": "V",
"href": "http://api.getresponse.com/v3/from-fields/V"
},
"replyTo": null,
"clickTracks": [],
"content": {
"html": "Test content",
"plain": null
},
"sendSettings": {
"timeTravel": "false",
"perfectTiming": "true",
"selectedCampaigns": [
"V"
],
"selectedSegments": [],
"selectedSuppresions": [],
"excludedCampaigns": [],
"excludedSegments": [],
"selectedContacts": [
"V"
]
}
}
Possible Errors
Using this method You can cancel newsletter, it will also change newsletters type to "draft"
Returns status code
200
Example Response
{
"newsletterId": "V",
"name": "name wiadomosci 1",
"type": "draft",
"subject": "test1",
"flags": [
"openrate"
],
"editor": "custom",
"href": "http://api.getresponse.com/v3/newsletters/V",
"campaign": {
"campaignId": "V",
"href": "http://api.getresponse.com/v3/campaigns/V",
"name": "my_campaign"
},
"status": "enabled",
"sendOn": null,
"createdOn": "2014-12-15T08:34:34+0000",
"fromField": {
"fromFieldId": "V",
"href": "http://api.getresponse.com/v3/from-fields/V"
},
"replyTo": null,
"clickTracks": [],
"content": {
"html": "Test content",
"plain": null
},
"sendSettings": {
"timeTravel": "false",
"perfectTiming": "true",
"selectedCampaigns": [
"V"
],
"selectedSegments": [],
"selectedSuppresions": [],
"excludedCampaigns": [],
"excludedSegments": [],
"selectedContacts": [
"V"
]
}
}
Possible Errors