REST Email Marketing API Documentation

MAILINGS — AUDIENCE

Gets the list of recipients for an unsent mailing where the audience has been provided as a specific set of recipients. No results are shown if the audience is a segment or all subscribed recipients of a topic.

To view the recipients queued for a mailing use the Report API.

HTTP VERB

Get

URL

/API/Rest/Mailings/Audience

ARGUMENTS

mailingTitle

Required permission

EditMailing

ERRORS

No Permission
Invalid mailing title
Mailing is using segmentation
Mailing has been queued
Database error
Unknown error

RETURNS

The recipients in the large result set structure

{"downloadGuid":"1d4c654c-3901-4d6f-95cc-ff2f039dd2da","totalRows":4,"userData":[["j@aol.com"], ["kate@msn.com"],["jim@yahoo.com"],["dave@aol.com"]]}

EXAMPLE

Get the audience for one specific mailing.

string url = "http://example.com/api/rest/Mailings/Audience?accountName=acme&login=ApiUser&mailingTitle=test1";
							
try
{
	System.Net.HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
	request.Headers.Add("Password", "34teh6i6j565ydw4h");
	using (System.Net.WebResponse response = request.GetResponse())
		using (Stream responseStream = response.GetResponseStream())
			using (StreamReader reader = new StreamReader(responseStream, Encoding.UTF8))
				System.Console.WriteLine(reader.ReadToEnd());
}
catch (System.Net.WebException ex)
{
	System.Diagnostics.Debug.Fail(ex.Message);
}
							
# encoding: utf-8
require 'rest-client'
require 'json'
							
url = 'http://example.com/api/rest/Mailings/Audience/?accountName=acme&login=ApiUser&mailingTitle=Test1'
response = RestClient.get(url, "", {:Password => "sfhdf6df5fdy"})
puts response						
						
import requests

url = "http://www.example.com/api/rest/Mailings/Audience/?accountName=acme&login=ApiUser&mailingTitle=Test1'";
headers = {'password':'sfhdf6df5fdy'}
resp = requests.get(url, headers=headers)
if resp.status_code == 200:
	print resp.text
						

http://example.com/api/rest/Mailings/Audience/?accountName=acme &login=ApiUser &password=sdff34fg34s &mailingTitle=Test1

Share this: