latestOpenAPI 3.1.02026-08-085123123.9 KB

bf0b51ee8e8a

Mailings

Create a new mailing

Create a new mailing scheduled to be sent.

post/mailings

Request body

subjectstring required
languagestring required

en_ca or fr_ca

groupsstring required

CSV list of group IDs to send the mailing to

sendAtstring required

Date and time to start sending. Format: yyyy-mm-dd HH:mm:ss

replyTostring
fromNamestring
mailFromstring

The email address to put as From: for the mailing. This must be a validated sender email address in your account.

bodyHtmlstring

HTML body. At least one of bodyHtml or bodyText is required.

bodyTextstring

Plain text body. At least one of bodyHtml or bodyText is required.

googleAnalyticsboolean
googleAnalyticsCampaignstring
mailingStatistics'detailed' | 'anonymized'

'detailed' (default) or 'anonymized' to anonymize click/open statistics

updateProfileFormnumber

Update profile form ID to include at the bottom of the mailing

Example request

{
  "subject": "This is a test mailing",
  "language": "en_ca",
  "groups": "159868,171416",
  "sendAt": "2015-10-27 14:00:00",
  "replyTo": "info@example.org",
  "fromName": "testing department",
  "mailFrom": "info@example.org",
  "bodyHtml": "<b>Testing!</b>",
  "bodyText": "Testing!",
  "googleAnalytics": true,
  "googleAnalyticsCampaign": "testing campaign 2015",
  "mailingStatistics": "detailed",
  "updateProfileForm": 32
}

Response

The mailing representation

idinteger
subjectstring
languagestring
startedOnstring nullable
scheduledOnstring nullable
replyTostring
bodyHtmlstring
bodyTextstring
recipientsCountinteger
emailsSentinteger
emailsDeliveredinteger
emailsStoppedinteger
viewsinteger
clicksinteger
sentToFriendinteger
incorrectAddressesinteger
technicalProblemsinteger
deliveryRatenumber
clickRatenumber
viewRatenumber
statusstring
mailFromstring
fromNamestring
mailingStatisticsstring
viewOnlineURLstring

Example response

{
  "id": 2481,
  "subject": "API Testing",
  "language": "en_ca",
  "scheduledOn": "2015-10-14 08:58:33.000",
  "replyTo": "info@example.org",
  "bodyHtml": "<a href=\"http://example.org\">Hello world</a>...",
  "bodyText": "Hello world !!!",
  "emailsSent": 2,
  "emailsDelivered": 2,
  "views": 1,
  "clicks": 1,
  "sentToFriend": 1,
  "clickRate": 0.5,
  "viewRate": 0.5,
  "status": "sent",
  "mailFrom": "admin@example.org",
  "fromName": "John Doe",
  "mailingStatistics": "detailed",
  "links": [
    {
      "id": 6899,
      "url": "https://example.org"
    }
  ],
  "recipientGroups": [
    {
      "id": 159854,
      "title": "Testing group"
    }
  ],
  "viewOnlineURL": "http://example.org"
}