MPZ API > List Campaigns

Use the API to get a list of campaigns for a user.

Request

Submit an XML Request with the following details:
Post URL: https://mpzmail.com/api/v3.0/campaigns/listCampaigns/
Fields to Post
apiKey String REQUIRED The APIKey of the requesting user.
fromDate DateTime OPTIONAL yyyy-mm-dd hh:mm:ss - The date you would like to start searching from.
toDate Datetime OPTIONAL The date time that you would like to retrieve stats to (format yyyy-mm-dd hh:mm:ss)

Response

Data Sent Back
error Int Indicates wether an error has occured. 0 for no error. 1 for error.
status String If there's been an error, a text description of the error that occured will be here.
campaignCnt Int The number of campaigns returned
campaigns    
----> campaign    
--------> campaignID Int The Campaign ID
--------> campaignName String The friendly name of the campaign
--------> dateCreated Date Time The date the campaign was created.
--------> sentFrom String The name the email was sent from.
--------> subject String The email subject.
--------> startDate Date Time The date the campaign is/was scheduled to start.
--------> endDate Date Time The date the campaign finished sending.
--------> status Int The status of the campaign. 0 = Scheduled, 1 = Queued, 2 = Copying Subscribers, 3 = Sending Campaign, 4 = Complete.
--------> groupID Int The ID of the group sent to.
--------> emailFrom String The email address the campaign was sent from.
--------> totalRecipients Int The total number of recipients who were sent the campaign.
--------> opened Int The number of emails read/opened.
--------> clicks Int The number of links clicked.
--------> unsubscribers Int The number of unsubscribers.
--------> bounced Int The number of emails that bounced.

Sample request XML

<xml>
     <apiKey>44-121312131223</apiKey>
</xml>

Sample response XML

<xml>
     <error>0</error>
     <status>success</status>
     <campaignCnt>1</campaignCnt>
     <campaigns>
          <campaign>
               <campaignID>1234</campaignID>
               <campaignName>Sample Campaign</campaignName>
               <dateCreated>2014-06-01 11:00</dateCreated>
               <sentFrom>Test User</sentFrom>
               <subject>My Sample Campaign</subject>
               <startDate>2014-06-02 12:00</startDate>
               <status>4</status>
               <groupID>1314</groupID>
               <emailFrom>my@emailaddress.com</emailFrom>
               <totalRecipients>12</totalRecipients>
               <opened>3/opened>
               <clicks>2</clicks>
               <unsubscribers>1</unsubscribers>
               <bounced>2</bounced>
          </campaign>
     </campaigns>
</xml>

Comments