This is an older version of the Campaign Monitor API. We strongly encourage you to quit livin' in the past and use the shiny new RESTful version with lots of new functionality. You won't regret it.

Campaign.GetOpens

Gets a list of all subscribers who opened a given campaign, and the number of times they opened the campaign

Parameters and required information

Here’s a list of all the parameters you’ll need to pass to the Campaign.GetOpens method. All of the parameters are required unless otherwise noted.

ApiKey
Your API application key. See here for more details.

CampaignID
The ID of the campaign you want data for. You can get the ID via the Client.GetCampaigns method.

Return Codes

Success

Upon a successful call, this method will return a collection of SubscriberOpen objects, each of which consists of the subscribers email address, the list they belong to, and the number of times they opened the given campaign.

Error

100: Invalid API Key
The API key pass was not valid or has expired.

301: Invalid CampaignID
The CampaignID value passed in was not valid.

SOAP 1.1

The following is a sample SOAP request and response. The placeholders shown need to be replaced with actual values.

POST /api/api.asmx HTTP/1.1
Host: api.createsend.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://api.createsend.com/api/Campaign.GetOpens"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Campaign.GetOpens xmlns="http://api.createsend.com/api/">
      <ApiKey>string</ApiKey>
      <CampaignID>string</CampaignID>
    </Campaign.GetOpens>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Campaign.GetOpensResponse xmlns="http://api.createsend.com/api/">

      <Campaign.GetOpensResult>
        <SubscriberOpen>
          <EmailAddress>string</EmailAddress>
          <ListID>string</ListID>
          <NumberOfOpens>int</NumberOfOpens>
        </SubscriberOpen>

        <SubscriberOpen>
          <EmailAddress>string</EmailAddress>
          <ListID>string</ListID>
          <NumberOfOpens>int</NumberOfOpens>
        </SubscriberOpen>

      </Campaign.GetOpensResult>
    </Campaign.GetOpensResponse>
  </soap:Body>
</soap:Envelope>

HTTP GET

The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /api/api.asmx/Campaign.GetOpens?ApiKey=string&CampaignID=string HTTP/1.1
Host: api.createsend.com
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfSubscriberOpen xmlns="http://api.createsend.com/api/">

  <SubscriberOpen>
    <EmailAddress>string</EmailAddress>
    <ListID>string</ListID>
    <NumberOfOpens>int</NumberOfOpens>
  </SubscriberOpen>

  <SubscriberOpen>
    <EmailAddress>string</EmailAddress>
    <ListID>string</ListID>
    <NumberOfOpens>int</NumberOfOpens>
  </SubscriberOpen>

</ArrayOfSubscriberOpen>

HTTP POST

The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /api/api.asmx/Campaign.GetOpens HTTP/1.1
Host: api.createsend.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

ApiKey=string&CampaignID=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfSubscriberOpen xmlns="http://api.createsend.com/api/">

  <SubscriberOpen>
    <EmailAddress>string</EmailAddress>
    <ListID>string</ListID>
    <NumberOfOpens>int</NumberOfOpens>
  </SubscriberOpen>

  <SubscriberOpen>
    <EmailAddress>string</EmailAddress>
    <ListID>string</ListID>
    <NumberOfOpens>int</NumberOfOpens>
  </SubscriberOpen>

</ArrayOfSubscriberOpen>