With these endpoints, you can get information about your mailings including their HTML contents.
View the official documentation here.
- mailing.list([params], callback)
- mailing.validate([params], callback)
- mailing.withID(id).details(callback)
- mailing.withID(id).resend([params], callback)
- mailing.withID(id).update([params], callback)
- mailing.withID(id).members(callback)
- mailing.withID(id).delete(callback)
- mailing.withID(id).cancel(callback)
- mailing.withID(id).getMessageToMember(id).all(callback)
- mailing.withID(id).getMessageToMember(id).html(callback)
- mailing.withID(id).getMessageToMember(id).plaintext(callback)
- mailing.withID(id).getMessageToMember(id).subject(callback)
- mailing.withID(id).forwardToMembers(memberID, details, callback)
- mailing.withID(id).groups(callback)
- mailing.withID(id).searches(callback)
- mailing.withID(id).headsup(callback)
Get information about current mailings.
params
<Object> Can have the following fields:include_archived
<Boolean> Optional. Flag to include archived mailings in the list.mailing_types
<String> Accepts a comma-separated string with one or more of the following mailing types: ‘m’ (standard), ‘t’ (test), ‘r’ (trigger), ‘s’ (split). Defaults to ‘m,t’, standard and test mailings, when none are specified.mailing_statuses
<String> Accepts a comma-separated string with one or more of the following mailing statuses: ‘p’ (pending), ‘a’ (paused), ‘s’ (sending), ‘x’ (canceled), ‘c’ (complete), ‘u’ (unapproved), ‘f’ (failed). Defaults to ‘p,a,s,x,c,u,f’, all statuses, when none are specified.is_scheduled
<Boolean> Mailings that have a scheduled timestamp.with_html_body
<Boolean> Include the html_body content.with_plaintext
<Boolean> Include the plaintext content.
- returns: An array of mailings.
- raises: Http400 if invalid mailing types or statuses are specified.
Validate that a mailing has valid personalization-tag syntax. Checks tag syntax in three params:
params
<Object> Can have the following fields:- returns:
True
if the update was successful. - raises: Http400 if any tags are invalid. The response body will have information about the invalid tags.
Get detailed information for one mailing.
- returns: A mailing.
- Raises: Http404 if no mailing is found.
Send a prior mailing to additional recipients. A new mailing will be created that inherits its content from the original.
params
<Object> Can have the following fields:sender
<String> The message sender. If this is not supplied, the sender of the original mailing will be used.heads_up_emails
<Array> A list of email addresses that heads-up notification emails will be sent to.recipient_emails
<Array> An array of email addresses to which the new mailing should be sent.recipient_groups
<Array> An array of member groups to which the new mailing should be sent.recipient_searches
<Array> A list of searches that this mailing should be sent to.
- returns: A reference to the new mailing.
- raises: Http404 if no mailing is found.
Update status of a current mailing. This method can be used to control the progress of a mailing by pausing, canceling or resuming it. Once a mailing is canceled it can’t be resumed, and will not show in the normal mailing_list output.
params
<Object> Can have the following fields:status
<String> Can be 'canceled', 'paused', or 'ready'.
- returns: The mailing's new status.
Get the list of members to whom the given mailing was sent. This does not include groups or searches.
- returns: An array of members including status and member fields.
- raises: Http404 if no mailing is found.
Sets archived timestamp for a mailing so it is no longer included in mailing_list.
- returns:
True
if the mailing is successfully archived.
Cancels a mailing that has a current status of pending or paused.
- returns:
True
if mailing marked as canceled. - raises: Http404 if it has any other status.
Gets the personalized message content as sent to a specific member as part of the specified mailing.
- returns: Message content from a mailing, personalized for a member. The response will contain all parts of the mailing.
- raises: Http404 if no message is found.
Gets the personalized message content as sent to a specific member as part of the specified mailing.
- returns: Message content from a mailing, personalized for a member. The response will contain HTML of the mailing.
- raises: Http404 if no message is found.
Gets the personalized message content as sent to a specific member as part of the specified mailing.
- returns: Message content from a mailing, personalized for a member. The response will contain plaintext of the mailing.
- raises: Http404 if no message is found.
Gets the personalized message content as sent to a specific member as part of the specified mailing.
- returns: Message content from a mailing, personalized for a member. The response will contain the subject of the mailing.
- raises: Http404 if no message is found.
Forward a previous message to additional recipients. If these recipients are not already in the audience, they will be added with a status of FORWARDED.
params
<Object> Can have the following fields:- returns: A reference to the new mailing.
- raises: Http404 if no message is found.
Get the groups to which a particular mailing was sent.
- returns: An array of groups.
- raises: Http404 if no mailing is found.
Get all searches associated with a sent mailing.
- returns: An array of searches.
- raises: Http404 if no mailing is found.
Get heads-up email address(es) related to a mailing.
- returns: An array of heads-up email addresses.
- raises: Http404 if no mailing is found.