REST Email Marketing API Documentation

DOCUMENTS — QUEUE

Send a document to a recipient. The recipient must have been added to the database previously.

HTTP VERB

Put

URL

/API/Rest/Documents/Queue

ARGUMENTS

documentName
emailAddress

Required permission

QueueDocument

ERRORS

No Permission
Email address is not a known recipient
Invalid document name
Recipient is on hold because of an invalid email address
Recipient is on the global unsubscribe list.
Recipient is suppressed for this topic
Recipient is on the global suppression list
Recipient is unsubscribed from this topic
Recipient has not responded to a confirmation request
Database error
Unknown error

RETURNS

Email queued to be sent


EXAMPLE

Queue a document to be sent to a recipient.

string url = "http://example.com/api/rest/Documents/Queue/?accountName=acme&login=ApiUser&documentName=TestDoc&emailAddress=joe@example.com";

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://www.example.com/api/rest/Documents/Queue?accountName=acme&login=ApiUser&documentName=TestDoc&emailAddress=joe@example.com'
response = RestClient.put(url, "", {:Password => "sfhdf6df5fdy"})
puts response
						
import requests

url = "http://www.example.com/api/rest/Documents/Queue?accountName=Acme&login=ApiUser&emailAddress=dave@aol.com&documentName=TestDoc";
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/Documents/Queue?accountName=Acme &login=ApiUser &emailAddress=dave@aol.com &documentName=TestDoc

As a user of Goolara Symphonie, the REST API is free and included in the latest version of the software. If you have any questions about using Symphonie’s REST API, feel free to contact us.