NewZapp Web API

A help guide for developers

Foreword

This document outlines the structure of the NewZapp Web API for external developers. It contains a list of resource end points and the appropriate formats with which to access them. It also defines the structure of responses from the API and expected error messages from the API.


NewZapp Playground - Testing App

The NewZapp Playground is a small app that allows you to test your API connection to ensure you have everything set-up correctly. If you are experiencing difficulties in making a successful API connection the first step is to test it using the Playground. Using this app you can check your Authentication is correct and that you can retrieve subscriber and campaign data using your API connection to your own NewZapp account.

The program runs on Windows desktops and can be downloaded here


NZAPI Authorisation

Access to the NZAPI is restricted by either OAuth Login or an API Key. API Keys can be found and maintained within a NewZapp account, whilst OAuth Login requires access to our Authorization Server.

Authorization Server

Accessing the API using the Authorization Server is a more secure (and flexible) way of connecting to NewZapp.

The first step to accessing the Authorization Server is to obtain a client secret and client id. These can be obtained via the Registered Applications tab under Settings in your NewZapp account.

To register an application we require an Application name, Application description, Company/Organisation, Application website, a Redirect URL and a Logo (optional).

Once the application is registered, you will be provided with a client ID and client secret. The secret is displayed only on creation so remember to copy and save the secret to a safe place. If you lose your client secret you will need to generate a new one, which can be done under Edit Application.

To get Authenticated and Authorised by OAuth, the Server is located at this address: https://auth.newzapp.co.uk

The server provides two different endpoints dependant of the way you want to authorise your users.

To authorise a user through a web browser, the endpoint is:

/connect/authorize

For an in depth specification of using OpenId and this endpoint, visit the OpenId Specification:

http://openid.net/specs/openid-connect-core-1_0.html#AuthRequest

The Authorization Server provides an Access Token. The same Access Token can be used for multiple requests and is easily attached to an API Request, but does have a limited lifespan.

To obtain an Access Token (e.g. for a browser, console or mobile application) use the Token endpoint with the following address:

/connect/token

The format of the request is as follows:

POST /token HTTP/1.1
Host: server.example.com
grant_type=password&
username=bob&
password=pass&
client_id=s6BhdRkqt3&
client_secret=54729057&
scopes=openid customerid offline_access

In the above example, the scopes inform the server which pieces of data the Access Token would contain.

Upon validation, the OAuth Client will receive the Access Token, along with a Refresh Token. Refresh tokens will allow for longer and more secure sessions. For a further explanation on how to use Refresh Tokens:

http://openid.net/specs/openid-connect-core-1_0.html#RefreshTokens

Accessing Resources from the API

In the Request to the API endpoint, the parameter Authorization should be added to the Header.

It should be in the format:

Authorization: Bearer {access_token}

Please be aware of the space between Bearer and the Access Token value.

public string SendAPIRequest(string AccessToken)
{
HttpWebResponse APIResponse = null;

var SuppliedToken = string.Format("Bearer {0}", AccessToken);

string TargetURL = "https://api.newzapp.co.uk/subscribers";

HttpWebRequest APIRequest = (HttpWebRequest)HttpWebRequest.Create(TargetURL);
APIRequest.Method = "GET";
APIRequest.Headers.Add("Authorization", SuppliedToken);

string APIJson = null;

using (APIResponse = (HttpWebResponse)APIRequest.GetResponse())
{
Stream DataStream = APIResponse.GetResponseStream();
StreamReader ResponseReader = new StreamReader(DataStream);
APIJson = ResponseReader.ReadToEnd();
ResponseReader.Close();
DataStream.Close();
}
return APIJson;
}
Public Function SendAPIRequest(AccessToken As String) As String

Dim SuppliedToken As String = String.Format("Bearer {0}", AccessToken)

Dim TargetURL As String = "https://api.newzapp.co.uk/subscribers"

Dim APIRequest As WebRequest = WebRequest.Create(TargetURL)
APIRequest.Method = "GET"
APIRequest.Headers.Add("Authorization", SuppliedToken)

Dim APIJson As String = ""

Dim APIResponse As WebResponse = APIRequest.GetResponse()
Dim ResponseEncode As Encoding = System.Text.Encoding.GetEncoding("utf-8")
Dim DataStream As Stream = APIResponse.GetResponseStream()
Dim ResponseReader As StreamReader = New StreamReader(DataStream, ResponseEncode)

APIJson = ResponseReader.ReadToEnd()

ResponseReader.Close()
DataStream.Close()
APIResponse.Close()

Return APIJson

End Function
TBA
function SendAPIRequest(AccessToken) {
var APIRequest = new XMLHttpRequest();
var TargetURL = "https://api.newzapp.co.uk/subscribers";

APIRequest.open("GET", TargetURL, false);
APIRequest.setRequestHeader("Authorization", "Bearer " + AccessToken);
APIRequest.send();

return APIRequest.responseText;
}

API Key

API Keys are another way to access the API. If accessing resources with an API Key, the key must be added in the header.

It should be in the format:

Authorization: Basic {APIKey}

API Keys can be viewed and managed in a NewZapp V6 account.

Please note, you should never share your API Keys with anyone that is not fully authorised to access your data. API Keys, whilst a very useful and powerful tool, can be very dangerous if obtained by malicious individuals. Keep your API Keys safe and only in the hands of authorized persons.

public string SendAPIRequest(string APIKey)
{
HttpWebResponse APIResponse = null;

var SuppliedAPIKey = string.Format("Basic {0}", APIKey);

string TargetURL = "https://api.newzapp.co.uk/subscribers";

HttpWebRequest APIRequest = (HttpWebRequest)HttpWebRequest.Create(TargetURL);
APIRequest.Method = "GET";
APIRequest.Headers.Add("Authorization", SuppliedAPIKey);

string APIJson = null;
using (APIResponse = (HttpWebResponse)APIRequest.GetResponse())
{
Stream DataStream = APIResponse.GetResponseStream();
StreamReader ResponseReader = new StreamReader(DataStream);
APIJson = ResponseReader.ReadToEnd();
ResponseReader.Close();
DataStream.Close();
}
return APIJson;
}
Public Function SendAPIRequest(APIKey As String) As String

Dim SuppliedAPIKey As String = String.Format("Basic {0}", APIKey)

Dim TargetURL As String = "https://api.newzapp.co.uk/subscribers"

Dim APIRequest As WebRequest = WebRequest.Create(TargetURL)
APIRequest.Method = "GET"
APIRequest.Headers.Add("Authorization", SuppliedAPIKey)

Dim APIJson As String = ""

Dim APIResponse As WebResponse = APIRequest.GetResponse()

Dim ResponseEncode As Encoding = System.Text.Encoding.GetEncoding("utf-8")

Dim DataStream As Stream = APIResponse.GetResponseStream()
Dim ResponseReader As StreamReader = New StreamReader(DataStream, ResponseEncode)

APIJson = ResponseReader.ReadToEnd()

ResponseReader.Close()
DataStream.Close()
APIResponse.Close()

Return APIJson

End Function
TBA
function SendAPIRequest(APIKey) {
var APIRequest = new XMLHttpRequest();
var TargetURL = "https://api.newzapp.co.uk/subscribers";

APIRequest.open("GET", TargetURL, false);
APIRequest.setRequestHeader("Authorization", "Basic " + APIKey);
APIRequest.send();

return APIRequest.responseText;
}

NZAPI Resources

The NewZapp API at this time only accepts and returns JSON format. All incoming objects must be appropriately formatted in JSON to be read by the server correctly. All data responses will be a combination of HTTP code and JSON data (if expected).

The API Url is located at:

api.newzapp.co.uk

Current Resources:

  • Subscribers
  • Campaigns

Subscribers

The Subscriber resource governs all subscriber related data. It includes a number of sub-resources for each subscriber. It is located at: api.newzapp.co.uk/subscribers

Entities

Subscriber
  • int Id – The Id of the Subscriber. Read only
  • string Email (119) – Email Address of the Subscriber. Unique. Must be Email. Required
  • string Title (9) – Title of the Subscriber. A-Z, a-z, -, ., and space characters only
  • string FirstName (49) – First Name of the Subscriber. A-Z, a-z, -, ., and space characters only
  • string LastName (49) – Last Name of the Subscriber. A-Z, a-z, -, ., and space characters only
  • string Company (49) – Company of the Subscriber. Unaccepted characters: ^ * ‹ › [ ] { } |
  • string EmailType (9) – Email Type of the Subscriber. Multipart, HTML and Text only
  • DateTime SubscribedDate – Date the Subscriber was added. Read only
  • DateTime UnsubscribedDate – Date the Subscriber Unsubscribed. Read only
  • *Dictionary ‹string, string› CustomFields – Dictionary of Key/Value pairs for CustomFields for Subscriber
  • *List‹SubscriberGroup› Groups – List of SubscriberGroups for Subscriber
  • *SubscriberAddress Address – SubscriberAddress entity for Subscriber

*Not included in the GET List‹subscriber› (Extended Data), only available for POST and GET & PUT for subscriber/{id}.

Dictionary (CustomFields)
  • string Key (49) : string Value (99)
SubscriberGroup (Groups)
  • int GroupId – The Id of the Group. Read only
  • string GroupName (49) – The Name of the Group. Read only
SubscriberAddress (Address)
  • string JobTitle(49) – Job Title of the Subscriber. Unaccepted characters: ^ * < > [ ] { } |
  • string Address1 (99) – Address1 of the Subscriber. A-Z, a-z, 0-9, -, ., and space characters only
  • string Address2 (49) – Address2 of the Subscriber. A-Z, a-z, 0-9, -, ., and space characters only
  • string Address3 (49) – Address3 of the Subscriber. A-Z, a-z, 0-9, -, ., and space characters only
  • string City (99) – City of the Subscriber. A-Z, a-z, -, ., and space characters only
  • string County (49) – County of the Subscriber. A-Z, a-z, -, ., and space characters only
  • string Postcode (14) – Postcode of the Subscriber. A-Z, a-z, 0-9, -, ., and space characters only
  • string Country (9) – Country of the Subscriber. A-Z, a-z, -, ., and space characters only
  • string Telephone (20) – Telephone of the Subscriber. 0-9, -, (, ), ., and space characters only
  • string Fax (20) – Fax of the Subscriber. 0-9, -, (, ), ., and space characters only
  • string AlternateTelephone (20) – Alternate Telephone of the Subscriber. 0-9, -, (, ), ., and space characters only

Resource Paths

Path /subscribers?groupid={groupid}&take ={take}&skip={skip}
Method GET
Input [Optional - URL]
  • int groupid – Get a List of Subscribers that are members of Group, selected by groupid.
  • int take – Get X number of Subscribers, selected by take. Default 100. Ordered by Email Address.
  • int skip – Get a List of Subscribers skipping the first X records of the List, selected by skip. Default 0. Ordered by Email Address.
Response [Body] List ‹Subscriber›

Expected JSON

[{"Id":18,"Email":"1test@emailaddress.com","Title":"Mr","FirstName":"Test",
"LastName":"Tests","Company":"Company Name Here","EmailType":"Multipart",
"SubscribedDate":"2015-04-28T13:46:43.857","UnsubscribedDate":null},
{"Id":22,"Email":"2test@emailaddress.com","Title":"Mr","FirstName":"Test",
"LastName":"Tests","Company":"Company Name Here","EmailType":"Multipart",
"SubscribedDate":"2015-04-28T13:46:43.857","UnsubscribedDate":null},
{"Id":26,"Email":"3test@emailaddress.com","Title":"Mr","FirstName":"Test",
"LastName":"Tests","Company":"Company Name Here","EmailType":"Multipart",
"SubscribedDate":"2015-04-28T13:46:43.857","UnsubscribedDate":null}]
Path /subscribers/count
Method GET
Input
Response int count – Count of Active Subscribers on account.
Path /subscribers/{id}
Method GET
Input [URL]
  • int id – Selected Subscriber’s id.
Response [Body] Subscriber

Expected JSON

{"Id":18,"Email":"1test@emailaddress.com","Title":"Mr",
"FirstName":"Test","LastName":"Tests","Company":"Company Name Here",
"EmailType":"Multipart","SubscribedDate":"2015-04-28T13:46:43.857",
"UnsubscribedDate":null,
"CustomFields":{"PreferedContact":"Phone","LikesSport":"yes"},
"Groups":[{"GroupId":1,"GroupName":"Monday"},{"GroupId":29, "GroupName":"Tuesday"}],
"Address":{"JobTitle":"Manager", "Address1":"123 Test Street",
"Address2":"Area","Address3":null, "City":"Exeter","County":"Devon",
"Postcode":"TTT TTT","Country":"England", "Telephone":"01777 777 777",
"Fax":"01777 777 777", "AlternateTelephone":"01777 777 777"}}
Path /subscribers
Method POST
Input [Body] List ‹Subscriber›

Expected JSON

[{"Email":"1test@emailaddress.com","Title":"Mr","FirstName":"Test",
"LastName":"Tests","Company":"Company Name Here","EmailType":"Multipart",
"CustomFields":{"PreferedContact":"Phone","LikesSport":"yes"},
"Groups":[{"GroupId":1,"GroupName":"Monday"},{"GroupId":29, "GroupName":"Tuesday"}],
"Address":{"JobTitle":"Manager", "Address1":"123 Test Street",
"Address2":"Area","Address3":null, "City":"Exeter","County":"Devon",
"Postcode":"TTT TTT","Country":"England", "Telephone":"01777 777 777",
"Fax":"01777 777 777", "AlternateTelephone":"01777 777 777"}},
{"Email":"1test@emailaddress.com","Title":"Mr","FirstName":"Test",
"LastName":"Tests","Company":"Company Name Here","EmailType":"Multipart",
"CustomFields":{"PreferedContact":"Phone","LikesSport":"yes"},
"Groups":[{"GroupId":1,"GroupName":"Monday"},{"GroupId":29, "GroupName":"Tuesday"}],
"Address":{"JobTitle":"Manager", "Address1":"123 Test Street",
"Address2":"Area","Address3":null, "City":"Exeter","County":"Devon",
"Postcode":"TTT TTT","Country":"England", "Telephone":"01777 777 777",
"Fax":"01777 777 777", "AlternateTelephone":"01777 777 777"}}]
Response HTTPResponseCode
Path /subscribers/{id}
Method PUT
Input [URL]
  • int id – Selected Subscriber’s id.
[Body] Subscriber

Expected JSON

{"Email":"1test@emailaddress.com","Title":"Mr","FirstName":"Test",
"LastName":"Tests","Company":"Company Name Here","EmailType":"Multipart",
"CustomFields":{"PreferedContact":"Phone","LikesSport":"yes"},
"Groups":[{"GroupId":1,"GroupName":"Monday"},{"GroupId":29, "GroupName":"Tuesday"}],
"Address":{"JobTitle":"Manager", "Address1":"123 Test Street",
"Address2":"Area","Address3":null, "City":"Exeter","County":"Devon",
"Postcode":"TTT TTT","Country":"England", "Telephone":"01777 777 777",
"Fax":"01777 777 777", "AlternateTelephone":"01777 777 777"}}
Response HTTPResponseCode
Path /subscribers/{id}
Method DELETE
Input [URL]
  • int id – Selected Subscriber’s id.
Response HTTPResponseCode
Path /subscribers/newthismonth/count
Method GET
Input
Response int count – Count of New Subscribers this month.
Path /subscribers/unsubscribes/count?range={range}
Method GET
Input [Optional - URL]
  • string range – Either month, 3month, year, or allTime . Defaults to month.
Response int count – Count of Unsubscribers this month.
Path /subscribers/unsubscribes?take={take}&skip={skip}
Method GET
Input [Optional - URL]
  • int take – Get X number of Subscribers that have Unsubscribed, selected by take. Default 100. Ordered by Email Address.
  • int skip – Get a List of Subscribers that have Unsubscribed, skipping the first X records of the List, selected by skip. Default 0. Ordered by Email Address.
Response [Body] List ‹Subscriber›

Expected JSON

[{"Id":18,"Email":"1test@emailaddress.com","Title":"Mr","FirstName":"Test",
"LastName":"Tests","Company":"Company Name Here","EmailType":"Multipart",
"SubscribedDate":"2015-04-28T13:46:43.857","UnsubscribedDate":"2015-04-28T13:46:43.857"},
{"Id":22,"Email":"2test@emailaddress.com","Title":"Mr","FirstName":"Test",
"LastName":"Tests","Company":"Company Name Here","EmailType":"Multipart",
"SubscribedDate":"2015-04-28T13:46:43.857","UnsubscribedDate":"2015-04-28T13:46:43.857"},
{"Id":26,"Email":"3test@emailaddress.com","Title":"Mr","FirstName":"Test",
"LastName":"Tests","Company":"Company Name Here","EmailType":"Multipart",
"SubscribedDate":"2015-04-28T13:46:43.857","UnsubscribedDate":"2015-04-28T13:46:43.857"}]

Sub Resource Paths

Groups
Path /subscribers/{id}/groups
Method GET
Input [URL]
  • int id – Selected Subscriber’s id.
Response [Body] List‹SubscriberGroup›

Expected JSON

[{"GroupId":1,"GroupName":"Monday"},{"GroupId":29,"GroupName":"Tuesday"}]
Path /subscribers/{id}/groups?groupname={groupname}
Method POST
Input [URL]
  • int id – Selected Subscriber’s id.
  • string groupname – GroupName of SubscriberGroup entity to add to Subscriber’s Groups.
Response HTTPResponseCode
Path /subscribers/{id}/groups/{name}
Method DELETE
Input [URL]
  • int id – Selected Subscriber’s id.
  • string name – GroupName of SubscriberGroup entity to remove from Subscriber’s Groups.
Response HTTPResponseCode

CustomFields
Path /subscribers/{id}/customfields
Method GET
Input [URL]
  • int id – Selected Subscriber’s id.
Response [Body] Dictionary‹string,string›

Expected JSON

{"PreferedContact":"Phone","LikesSport":"yes"}
Path /subscribers/{id}/customfields
Method POST
Input [URL]
  • int id – Selected Subscriber’s id.
[Body] Dictionary‹string,string›

Expected JSON

{"PreferedContact":"Phone","LikesSport":"yes"}
Response HTTPResponseCode
Path /subscribers/{id}/customfields/{name}?value={value}
Method PUT
Input [URL]
  • int id – Selected Subscriber’s id.
  • string name – Name of CustomField key to update from Subscriber’s CustomFields.
  • string value – Value of CustomField to update to CustomField key for Subscriber.
Response HTTPResponseCode
Path /subscribers/{id}/customfields/{name}
Method DELETE
Input [URL]
  • int id – Selected Subscriber’s id.
  • string name – Name of CustomField key to update from Subscriber’s CustomFields.
Response HTTPResponseCode

Campaigns

The Campaign resource governs all Campaign related data. It includes a number of sub-resources for each campaign. It is located at: api.newzapp.co.uk/campaigns

Entities

Campaign
  • int Id – Id of the Campaign.
  • string Name (249) – Name of the Campaign.
  • string Subject (249) – Subject Title of the Email.
  • string FromName (249) – Name of the Email Sender.
  • string FromEmail (249) – Email Address of the Email Sender.
  • DateTime CreatedDateTime – Date the Campaign was created.
  • DateTime SchedueledDateTime – Date the Campaign is scheduled to send.
CampaignSummary
  • int Id – Id of the Campaign.
  • string Name (249) – Name of the Campaign.
  • string Subject (249) – Subject Title of the Email.
  • DateTime SentDateTime – Date the Campaign is scheduled to send.
  • int Sent – Number of Sent Emails.
  • int Opened – Number of Email Opens.
  • int Bounced – Number of Email Bounces.
  • int Failed – Number of Emails that Failed.
CampaignHTML
  • string HTML – HTML of the Campaign Email.
CampaignText
  • string Text – The Text version of the Campaign Email.
CampaignAction
  • int Id – Id of the Campaign Action.
  • int CampaignId – Id of the Campaign.
  • int SubscriberId – The Id of the Subscriber.
  • DateTime ActivityDate – Date the Action took place.
  • string Type (49) – Type of Action, I.E. Open, Click etc.
  • string CampaignName (249) – Name of the Campaign.
  • string Email (119) – Email Address of the Subscriber.

Resource Paths

Path /campaigns?take={take}&skip={skip}
Method GET
Input [Optional - URL]
  • int take – Get X number of Campaigns, selected by take. Default 50. Ordered by Created Date.
  • int skip – Get a List of Campaigns, skipping the first X records of the List, selected by skip. Default 0. Ordered by Created Date.
Response [Body] List ‹Campaigns›

Expected JSON

[{"Id":1,"Name":"Jan Newsletter","Subject":"Jan ewsletter","FromName":"AZ++ Tyres",
"FromEmail":"email@address.com","CreatedDateTime":"2015-01-10T15:19:56",
"SchedueledDateTime":"2015-01-26T00:00:00"},
{"Id":2,"Name":"Jan Newsletter","Subject":"Jan Newsletter","FromName":"AZ++ Tyres",
"FromEmail":"email@address.com","CreatedDateTime":"2015-01-10T15:19:56",
"SchedueledDateTime":"2015-01-26T00:00:00"},
{"Id":3,"Name":"Jan Newsletter","Subject":"Jan Newsletter","FromName":"AZ++ Tyres",
"FromEmail":"email@address.com","CreatedDateTime":"2015-01-10T15:19:56",
"SchedueledDateTime":"2015-01-26T00:00:00"}]
Path /campaigns/{id}
Method GET
Input [URL]
  • int id – Selected Campaign’s id.
Response [Body] Campaigns

Expected JSON

{"Id":1,"Name":"Jan Newsletter","Subject":"Jan ewsletter","FromName":"AZ++ Tyres",
"FromEmail":"email@address.com","CreatedDateTime":"2015-01-10T15:19:56",
"SchedueledDateTime":"2015-01-26T00:00:00"}
Path /campaigns
Method POST
Input [Optional - URL]
  • int pageid – NewZapp HTML Email Template id (to use a template build within NewZapp).
  • string template – HTML Template (to use a template build outside of NewZapp).
  • bool sendToAll – Send to all Subscribers if true.
  • int[] groups – Send to Groups, list of Group Ids.
  • string[] emailAddresses – Send to Email Addresses, list of Email Addresses.
  • bool tracked – Track the Email if true.

[Body] Campaign

{"Name":"Jan Newsletter","Subject":"Jan ewsletter","FromName":"AZ++ Tyres",
"FromEmail":"email@address.com","SchedueledDateTime":"2015-01-26T00:00:00",
"HTML":"‹html›‹head›‹meta http-equiv=\"Content-Type\" content=\"text/html;charset=iso-8859-1\"›
‹title›NewZapp Email Marketing‹/title›‹/head›‹body›ContentHere‹/body›‹/html›"
"Text":"\r\nTo view this email online, follow this link:\r\n\r\n
==========================================================================\r\r\n\r\nTitle\r\n\r\n
----------------------------------------\r\n\r\n:: Test email\r\n :: \r\n\r\n
Test email\r\nexample hyperlink\r\ \r\n\r\n\r\n\r\nThis message was sent to by
using NewZapp Email Marketing www.newzapp.co.uk. Follow this link to Unsubscribe.\r\n\r\n
==========================================================================\r\n\r\n"}
Response HTTPResponseCode
Path /campaigns/{id}
Method DELETE
Input [URL]
  • int id – Selected Campaign’s id.
Response HTTPResponseCode

Sub Resource Paths

Path /campaigns/{id}/summary
Method GET
Input [URL]
  • int id – Selected Campaign’s id.
Response [Body] CampaignSummary

Expected JSON

{"Id":418776,"Name":"10 Jan Newsletter","Subject":"10 Jan Newsletter",
"SentDateTime":"2012-01-10T15:19:56","Sent":1,"Opened":2,
"Clicked":0,"Bounced":0,"Failed":0}
Path /campaigns/{id}/html
Method GET
Input [URL]
  • int id – Selected Campaign’s id.
Response [Body] CampaignHTML

Expected JSON

{"HTML":"‹html›‹head›‹meta http-equiv=\"Content-Type\" content=\"text/html;charset=iso-8859-1\"›
‹title›NewZapp Email Marketing‹/title›‹/head›‹body›ContentHere‹/body›‹/html›"}
Path /campaigns/{id}/text
Method GET
Input [URL]
  • int id – Selected Campaign’s id.
Response [Body] CampaignText

Expected JSON

{"Text":"\r\nTo view this email online, follow this link:\r\n\r\n
==========================================================================\r\r\n\r\nTitle\r\n\r\n
----------------------------------------\r\n\r\n:: Test email\r\n :: \r\n\r\n
Test email\r\nexample hyperlink\r\ \r\n\r\n\r\n\r\nThis message was sent to by
using NewZapp Email Marketing www.newzapp.co.uk. Follow this link to Unsubscribe.\r\n\r\n
==========================================================================\r\n\r\n"}
Path /campaigns/{id}/actions?take={take}&skip={skip}
Method GET
Input [URL]
  • int id – Selected Campaign’s id.
[OPTIONAL]
  • int take – Get X number of Campaigns, selected by take. Default 50. Ordered by Created Date.
  • int skip – Get a List of Campaigns, skipping the first X records of the List, selected by skip. Default 0. Ordered by Created Date.
Response [Body] List ‹CampaignAction›

Expected JSON

[{"Id":1,"CampaignId":1,"SubscriberId":1, "ActivityDate":"2015-01-10T00:00:00","Type":"Open",
"CampaignName":"Jan Newsletter","Email":"email@address.com"},
{"Id":2,"CampaignId":1,"SubscriberId":2, "ActivityDate":"2015-01-10T00:00:00","Type":"Open",
"CampaignName":"Jan Newsletter","Email":"email@address.com"}]

Groups

The Group resource governs all Group related data not attached to a Subscriber. It is located at: api.newzapp.co.uk/groups

Entities

Group
  • int Id – The Id of the Group. Read only
  • string Name (49) – The Name of the Group. Unique. Required
  • string Description (249) – The Description of the Group

Resource Paths

Path /groups
Method GET
Input -
Response [Body] List ‹Groups›

Expected JSON

[{"Id":1,"Name":"Group1","Description":"Description Of Group"},
{"Id":2,"Name":"Group2","Description":"Description Of Group2"}]
Path /groups/count
Method GET
Input
Response int count – Count of Groups.
Path /groups/{id}
Method GET
Input [URL]
  • int id – Selected Group’s id.
Response [Body] Group

Expected JSON

{"Id":1,"Name":"Group1","Description":"Description Of Group"}
Path /groups/{id}/count
Method GET
Input [URL]
  • int id – Selected Group’s id.
Response int count – Count of Subscribers in a given Group.
Path /groups
Method POST
Input

[Body] Group

{"Name":"Group1","Description":"Description Of Group"}
Response HTTPResponseCode
Path /groups/{id}
Method DELETE
Input [URL]
  • int id – Selected Group’s id.
Response HTTPResponseCode

CustomFields

The CustomFields resource governs all CustomFields related data not attached to a Subscriber. It is located at: api.newzapp.co.uk/customfields

Entities

CustomField
  • int Id – The Id of the CustomField. Read only
  • string Name (49) – The Name of the CustomField. Unique. Required
  • bool Display – Whether the CustomField is editable for a Subscriber Entity or not in Newzapp.com
  • date DateCreated – The Date the CustomField was created. Read only

Resource Paths

Path /customfields
Method GET
Input -
Response [Body] List ‹CustomField›

Expected JSON

[{"Id":1,"Name":"Customfield1","Display":true,"DateCreated":"2015-02-26T09:47:46"},
{"Id":2,"Name":"Group2","Display":true,"DateCreated":"2015-02-26T09:47:46"}]
Path /customfields/{id}
Method GET
Input [URL]
  • int id – Selected CustomField’s id.
Response [Body] CustomField

Expected JSON

{"Id":1,"Name":"Customfield1","Display":true,"DateCreated":"2015-02-26T09:47:46"}
Path /customfields
Method POST
Input

[Body] CustomField

{"Name":"Customfield1","Display":true,"DateCreated":"2015-02-26T09:47:46"}
Response HTTPResponseCode
Path /customfields/{id}
Method DELETE
Input [URL]
  • int id – Selected CustomField’s id.
Response HTTPResponseCode