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 nameField typeField description
query (required)hashUsed to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.
KeyPossible values if fixed
groupBytotal,hour,day,month
newsletterIdList of newsletter resource ids. (string separated with ",")
campaignIdList of campaign resource ids. (string separated with ",")
createdOn[from]Date YYYY-mm-dd
createdOn[to]Date YYYY-mm-dd
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated by comma
pageintegerSpecify which page of results return.
perPageintegerSpecify 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 nameField typeField description
namestringName of the newsletter
typestringType of a newsletter. If set to 'draft' then standard draft will be created. Default to 'broadcast'
editorstringDescribes 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)stringSubject of the newsletter
fromField (required)objectEmail from field
Field nameField typeField description
fromFieldId (required)stringId of fromField which will be used as email from field
replyToobjectEmail reply-to field
Field nameField typeField description
fromFieldId (required)stringId of fromField which will be used as email reply-to field
campaign (required)objectNewsletter must belong to campaign
Field nameField typeField description
campaignId (required)stringId of campaign which will newsletter belong to
sendOnstringScheduled send date time in ISO 8601 format
content (required)objectMessage contents
Field nameField typeField description
htmlstringHTML content of message
plainstringPlain text content equivalent of message
flagssetMessage flags. Allowed values: openrate, clicktrack and google_analytics
attachmentscollectionNewsletter attachments, sum of attachments size cannot excess 400kb
Field nameField typeField description
fileName (required)stringFile name
content (required)stringBase64 encoded file content
mimeType (required)stringFile mime type
sendSettings (required)objectHow message will be delivered to subscriber. You can specify multiple parameters, then it uses AND logic.
Field nameField typeField description
selectedCampaignssetList of selected campaigns
selectedSegmentssetList of selected segments
selectedSuppressionssetList of selected suppressions
excludedCampaignssetList of excluded campaigns
excludedSegmentssetList of excluded segments
selectedContactssetList of selected contacts
timeTravelstringUse time travel functionality - message will be sent according to each recipient time zone. Possible values: true, false
perfectTimingstringUse 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 nameField typeField description
query (required)hashUsed to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.
KeyPossible values if fixed
groupBytotal, hour, day, month
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated by comma
pageintegerSpecify which page of results return.
perPageintegerSpecify 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 nameField typeField description
fieldsstringList 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 nameField typeField description
queryhashUsed to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.
KeyPossible values if fixed
subject*
statusenabled, disabled
createdOn[from]*
createdOn[to]*
typedraft, broadcast, splittest, automation
campaignIdId of a campaign - you can specify multiple campaign separated by comma
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated by comma
sorthashEnable sorting using specified field (set as a key) and order (set as a value).
KeyPossible values if fixed
createdOnasc,desc
perPageintNumber results on page
pageintPage 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 nameField typeField description
messageId (required)stringMessage identifier (equals to newsletterId)
sendOnstringScheduled send date time in ISO 8601 format
sendSettings (required)objectHow message will be delivered to subscriber
Field nameField typeField description
selectedCampaignssetList of selected campaigns
selectedSegmentssetList of selected segments
selectedSuppressionssetList of suppressions
excludedCampaignssetList of excluded campaigns
selectedSegmentssetList of excluded segments
selectedContactssetList of selected contacts

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