REST Email Marketing API Documentation

MAILINGS — QUEUE

Send an existing mailing. The delivery should either start immediately or at the time provided. The queueing process can take some time, depending on the number of recipients and the speed of the database. If the operation hasn't completed quickly you will be given a message "Mailing has been queued. Check back later for the results." Use the CheckQueueResults function to get the results.

HTTP VERB

Put

URL

/API/Rest/Mailings/Queue

ARGUMENTS

mailingTitle
queueTime (Optional)

Required permission

QueueMailing

ERRORS

Mailing has been queued. Check back later for the results.
No Permission
Invalid mailing title
Too many API calls
Database error
Unknown error

RETURNS

A structure with fields for the different exclusions. The total recipients that were queued for the mailing is the totalRecords minus each of the exclusions.

{"totalHeldMembers":6261, "totalUnconfirmedMembers":3201, "totalUnsubscribedMembers":99, "totalRecencyMembers":0, "totalSuppressedMembers":0, "fccBans":0, "totalRecords":25510}

EXAMPLE

Send a mailing.

string url = "http://example.com/api/rest/Mailings/Queue/?accountName=acme&login=ApiUser&mailingTitle=Test1";
								
try
{
	System.Net.HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
	request.Headers.Add("Password", "sdjks8fsdysgd7");
	request.Method = "PUT";
	request.ContentLength = 0;
	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/Queue/?accountName=acme&login=ApiUser&mailingTitle=Test1'
response = RestClient.put(url, "", {:Password => "sfhdf6df5fdy"})
puts response						
						
import requests

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

curl -X PUT -H "password:g34g3q3t" http://www.example.com/api/rest/Mailings/Queue/?accountName=acme &login=ApiUser &mailingTitle=Test1

Share this: