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.

using System;
using System.Net.Http;

string url = "https://example.com/API/Rest/Mailings/Queue?accountName=acme&login=ApiUser&mailingTitle=Test1";

// Reuse HttpClient for multiple requests in production code.
using (var client = new HttpClient())
using (var request = new HttpRequestMessage(HttpMethod.Put, url))
{
	request.Headers.Add("Password", "YOUR_PASSWORD");

	using (HttpResponseMessage response = await client.SendAsync(request))
	{
		response.EnsureSuccessStatusCode();
		Console.WriteLine(await response.Content.ReadAsStringAsync());
	}
}
			
# encoding: utf-8
require 'rest-client'
require 'json'
							
url = 'https://example.com/API/Rest/Mailings/Queue?accountName=acme&login=ApiUser&mailingTitle=Test1'
response = RestClient.put(url, "", {:Password => "YOUR_PASSWORD"})
puts response						
						
import requests

url = "https://example.com/API/Rest/Mailings/Queue?accountName=acme&login=ApiUser&mailingTitle=Test1"
headers = {'password':'YOUR_PASSWORD'}
resp = requests.put(url, headers=headers)
if resp.status_code == 200:
	print(resp.text)
curl --request PUT --header "Password: YOUR_PASSWORD" "https://example.com/API/Rest/Mailings/Queue?accountName=acme&login=ApiUser&mailingTitle=Test1"